Mail archive
alpine-aports

[alpine-aports] [PATCH 6/6] testing/gdb-embedded: New aport

From: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Sun, 10 Mar 2019 10:01:25 +0100

GDB for embedded targets
---
 testing/gdb-embedded/APKBUILD | 102 ++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 testing/gdb-embedded/APKBUILD
diff --git a/testing/gdb-embedded/APKBUILD b/testing/gdb-embedded/APKBUILD
new file mode 100644
index 0000000000..f5584ecd41
--- /dev/null
+++ b/testing/gdb-embedded/APKBUILD
_at_@ -0,0 +1,102 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
+_pkgbase=gdb
+_targets="
+	arm-none-eabi
+	avr
+	mips-mti-elf
+	msp430-elf
+	"
+pkgname="$_pkgbase-embedded"
+pkgver=8.2.1
+pkgrel=0
+pkgdesc="The GNU Debugger for embedded targets"
+url="https://www.sourceware.org/gdb/"
+arch="all"
+license="GPL-2.0-only GPL-2.0-or-later GPL-3.0-only GPL-3.0-or-later LGPL-2.1-only"
+depends="gdb"
+makedepends="
+	autoconf
+	automake
+	expat-dev
+	libtool
+	linux-headers
+	ncurses-dev
+	perl
+	python3-dev
+	readline-dev
+	texinfo
+	zlib-dev
+	"
+options="!check"
+source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz"
+for target in $_targets; do
+	targetnorm="${target//-/_}"
+	subpackages="${_pkgbase}-${target}:${targetnorm} ${subpackages}"
+done
+builddir="$srcdir"/$_pkgbase-$pkgver
+
+build () {
+	for target in $_targets; do
+		mkdir -p "$srcdir/build/$target"
+		cd "$srcdir/build/$target"
+
+		"$builddir/configure" \
+			--target=$target \
+			--prefix=/usr \
+			--mandir=/deleteme/man \
+			--infodir=/deleteme/info \
+			--pdfdir=/deleteme/pdf \
+			--htmldir=/deleteme/html \
+			--disable-nls \
+			--disable-werror \
+			--enable-interwork \
+			--enable-languages=c,c++ \
+			--enable-multilib \
+			--with-python=/usr/bin/python3 \
+			--with-system-gdbinit=/etc/gdb/gdbinit \
+			--with-system-readline \
+			--with-system-zlib
+		make
+	done
+}
+
+package() {
+	for target in $_targets; do
+		depends="$depends $_pkgbase-$target"
+	done
+	mkdir -p "$pkgdir"
+}
+
+_install_subpkg() {
+	target="${subpkgname#${_pkgbase}-}"
+	pkgdesc="The GNU Debugger for $target"
+	cd "$srcdir/build/$target"
+	make DESTDIR="$subpkgdir" install
+
+	rm -rf "$subpkgdir"/deleteme
+
+	# those are provided by gdb
+	rm -rf "$subpkgdir"/usr/share
+	# those are provided by binutils
+	rm -rf "$subpkgdir"/usr/include
+	rm -rf "$subpkgdir"/usr/lib
+}
+
+arm_none_eabi() {
+	_install_subpkg
+}
+
+avr() {
+	_install_subpkg
+}
+
+mips_mti_elf() {
+	_install_subpkg
+}
+
+msp430_elf() {
+	_install_subpkg
+}
+
+
+sha512sums="2aa81cfd389bb48c35d7d9f95cc10e88b4f7ad4597bdde0f8f1fd312f60f10d9fb2cc6e5a9355227d89ff328f7feb0fc411a69394560cafeb9fa75d35d896d11  gdb-8.2.1.tar.xz"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Mar 10 2019 - 10:01:25 UTC