jobextra/gdb/PKGBUILD

85 lines
2.4 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=gdb
# gdb-common is a package that contains files common for all cross compiled versions
# of gdb (for arm/avr/...)
pkgname=(gdb gdb-common)
pkgver=13.2
pkgrel=01
pkgdesc='The GNU Debugger'
url='https://www.gnu.org/software/gdb/'
makedepends=(glibc gcc-libs texinfo python guile ncurses expat xz mpfr
boost source-highlight readline)
source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig})
# rust.patch::"https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=562403d4f5483e0787219fdb88da72c707c8d7f6")
#prepare() {
# cd gdb-$pkgver
#
# patch -p1 < ../rust.patch
#}
build() {
cd gdb-$pkgver
# patch -Np1 -i ../readline8.patch
mkdir -p build && cd build
../configure \
--prefix=/usr \
--disable-nls \
--enable-source-highlight \
--enable-tui \
--with-system-readline \
--with-python=/usr/bin/python \
--with-system-gdbinit=/etc/gdb/gdbinit
make
# --with-guile=guile-2.2 \
}
package_gdb-common() {
depends=(python guile)
cd gdb-$pkgver/build
make -C gdb/data-directory DESTDIR="$pkgdir" install
}
package_gdb() {
depends=(glibc ncurses libncursesw.so gcc-libs expat xz mpfr source-highlight gdb-common=$pkgver
readline libreadline.so guile python libelf)
backup=(etc/gdb/gdbinit)
cd gdb-$pkgver/build
make -C gdb DESTDIR="$pkgdir" install
make -C gdbserver DESTDIR="$pkgdir" install
# install "custom" system gdbinit
install -dm 755 "$pkgdir/etc/gdb"
touch "$pkgdir/etc/gdb/gdbinit"
# comes from gdb-common
rm -r "$pkgdir/usr/share/gdb/"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(GPL3)
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
sha256sums=(fd5bebb7be1833abdb6e023c2f498a354498281df9d05523d8915babeb893f0a # gdb-13.2.tar.xz
d9eb870c54c9c8f2531046e102c48d9cce57b9361680e4fd22cab83232a63e3e) # gdb-13.2.tar.xz.sig
## e11e5affd4b741a13509bfc58490e1fb40ccffc7004d6f197541b92a40210e90 gdb-13.2-01-x86_64.pkg.tar.lz
## a90864b3b5d646bd45494cb9c35b5ca9cf847f9a512001e01cabe246e402b48b gdb-common-13.2-01-x86_64.pkg.tar.lz