Commit ae00e251 authored by Sören Tempel's avatar Sören Tempel
Browse files

main/gdb: add multiarch subpackage

parent 22857ede
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdb
pkgver=8.3.1
pkgrel=3
pkgrel=4
pkgdesc="The GNU Debugger"
url="https://www.gnu.org/software/gdb/"
arch="all"
......@@ -9,7 +9,7 @@ license="GPL-3.0-or-later LGPL-3.0-or-later"
makedepends="ncurses-dev expat-dev texinfo readline-dev python3-dev
zlib-dev autoconf automake libtool linux-headers perl"
options="!check"
subpackages="$pkgname-doc"
subpackages="$pkgname-doc $pkgname-multiarch"
source="https://ftp.gnu.org/gnu/gdb/gdb-$pkgver.tar.xz
s390x-use-elf-gdb_fpregset_t.patch
ppc-musl.patch
......@@ -18,7 +18,12 @@ source="https://ftp.gnu.org/gnu/gdb/gdb-$pkgver.tar.xz
python-3.8.patch
"
build () {
prepare() {
default_prepare
mkdir -p "$builddir"/vanilla "$builddir"/multiarch
}
build() {
local _config="
--build=$CBUILD
--host=$CHOST
......@@ -40,11 +45,17 @@ build () {
# avoid generation of mangled and non-mangled objects on ppc64
[ "$CARCH" = ppc64le ] && _config="$_config --enable-build-with-cxx=no"
./configure $_config
cd "$builddir"/vanilla
../configure $_config
make
cd "$builddir"/multiarch
../configure $_config --enable-targets=all
make
}
package() {
cd "$builddir"/vanilla
make DESTDIR="$pkgdir" install
# resolve conflict with binutils-doc
......@@ -56,6 +67,14 @@ package() {
rm -rf "$pkgdir"/usr/lib
}
multiarch() {
depends="$pkgname"
pkgdesc="The GNU Debugger for all supported architectures"
install -Dm755 "$builddir"/multiarch/gdb/gdb \
"$subpkgdir"/usr/bin/gdb-multiarch
}
sha512sums="9053a2dc6b9eb921907afbc4cecc75d635aa76df5e8c4f0e5824ccf57cb206b299c19b127fff000b65c334826ff8304a54ff6098428365a8e997cca886c39e9a gdb-8.3.1.tar.xz
70e7d04e4d72461436da503b5bfa370c5779e03245c521f30e9779d5ff37dbb2d708b05f2afb27f43ad9defc44df4bd979d72f777e744851fdbf156295e1cc9f s390x-use-elf-gdb_fpregset_t.patch
04911f87904b62dd7662435f9182b20485afb29ddb3d6398a9d31fef13495f7b70639c77fdae3a40e2775e270d7cd40d0cfd7ddf832372b506808d33c8301e01 ppc-musl.patch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment