Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] testing/avarice: New aport

From: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Tue, 10 Jul 2018 09:56:20 +0200

AVaRICE interfaces with GDB and allows debugging of AVR MCUs
http://avarice.sourceforge.net/
---
 testing/avarice/APKBUILD              | 38 +++++++++++++++++++++++++++
 testing/avarice/fix_return_type.patch | 11 ++++++++
 testing/avarice/pragma_gcc6.patch     | 38 +++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 testing/avarice/APKBUILD
 create mode 100644 testing/avarice/fix_return_type.patch
 create mode 100644 testing/avarice/pragma_gcc6.patch
diff --git a/testing/avarice/APKBUILD b/testing/avarice/APKBUILD
new file mode 100644
index 0000000000..1e3816b397
--- /dev/null
+++ b/testing/avarice/APKBUILD
_at_@ -0,0 +1,38 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
+pkgname=avarice
+pkgver=2.13
+pkgrel=0
+pkgdesc="AVaRICE interfaces with GDB and allows debugging of AVR MCUs"
+url="http://avarice.sourceforge.net/"
+arch="all"
+license="GPL2"
+makedepends="binutils-dev"
+depends="gdb-avr"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+        pragma_gcc6.patch
+        fix_return_type.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr
+	make
+}
+
+check() {
+	cd "$builddir"
+	make check
+}
+
+package() {
+	cd "$builddir"
+	make DESTDIR="$pkgdir" install
+}
+
+sha512sums="fa67e46061e32ec9db10bed961484ee050b219e92c2e9900ad35861b3c45161cc6ea6f2a9e63b0303242ef9992193cd963ac5871583db434409c10995b420b5f  avarice-2.13.tar.bz2
+20ea177e6d6e476e0b46e4a827271ffb54658499ad0e80ce1462aaaaeebfe2dc1de0ae5b4d919296e34f361361322e93095a31e57b46cae36d9793b163e0780c  pragma_gcc6.patch
+976bcdd80bebe3e3f68e1f22f6cdc683a6daff3d4486f8be2c567ce4349001ec30bcddde1279aba06cccfe7a602a003a393e34dd68cd70d6889911da119181e8  fix_return_type.patch"
diff --git a/testing/avarice/fix_return_type.patch b/testing/avarice/fix_return_type.patch
new file mode 100644
index 0000000000..389e5b88fd
--- /dev/null
+++ b/testing/avarice/fix_return_type.patch
_at_@ -0,0 +1,11 @@
+--- a/src/jtagrw.cc
++++ b/src/jtagrw.cc
+_at_@ -131,7 +131,7 @@
+ 	else
+ 	    numLocations = (numBytes + 1) / 2;
+ 	if (numLocations > 256)
+-	    return false;
++	    return NULL;
+ 
+ 	command[1] = whichSpace;
+ 	command[2] = numLocations - 1;
diff --git a/testing/avarice/pragma_gcc6.patch b/testing/avarice/pragma_gcc6.patch
new file mode 100644
index 0000000000..3f4cb3da99
--- /dev/null
+++ b/testing/avarice/pragma_gcc6.patch
_at_@ -0,0 +1,38 @@
+--- a/src/pragma.h
++++ b/src/pragma.h
+_at_@ -26,32 +26,8 @@
+ /*
+  * Evaluate which diagnostic pragmas can be used.
+  */
+-#if defined(__GNUC__)
+-#  if __GNUC__ > 4
+-#      define PRAGMA_DIAG_PUSH       _Pragma(GCC diagnostic push)
+-#      define PRAGMA_DIAG_POP        _Pragma(GCC diagnostic pop)
+-#      define PRAGMA_DIAG_IGNORED(x) _Pragma(GCC diagnostic ignored x)
+-#  elif __GNUC__ == 4
+-#    if __GNUC_MINOR__ >= 6
+-#      define PRAGMA_DIAG_PUSH       _Pragma("GCC diagnostic push")
+-#      define PRAGMA_DIAG_POP        _Pragma("GCC diagnostic pop")
+-#      define PRAGMA_(x)             _Pragma(#x)
+-#      define PRAGMA_DIAG_IGNORED(x) PRAGMA_(GCC diagnostic ignored x)
+-#    else
+-#      define PRAGMA_DIAG_PUSH
+-#      define PRAGMA_DIAG_POP
+-#      define PRAGMA_(x)             _Pragma(#x)
+-#      define PRAGMA_DIAG_IGNORED(x) PRAGMA_(GCC diagnostic ignored x)
+-#    endif  /* GCC 4.x */
+-#  else /* too old */
+-#      define PRAGMA_DIAG_PUSH
+-#      define PRAGMA_DIAG_POP
+-#      define PRAGMA_DIAG_IGNORED(x)
+-#  endif
+-#else /* not GCC */
+-#  define PRAGMA_DIAG_PUSH
+-#  define PRAGMA_DIAG_POP
+-#  define PRAGMA_DIAG_IGNORED(x)
+-#endif
++#define PRAGMA_DIAG_PUSH
++#define PRAGMA_DIAG_POP
++#define PRAGMA_DIAG_IGNORED(x)
+ 
+ #endif
-- 
2.18.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jul 10 2018 - 09:56:20 GMT