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=14.2
pkgrel=02
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=(2d4dd8061d8ded12b6c63f55e45344881e8226105f4d2a9b234040efa5ce7772 # gdb-14.2.tar.xz
3d6730838f5c377ef2f6f5f6fb346aaf386068a77b856cb26fcf95037733e915) # gdb-14.2.tar.xz.sig
## 778fe64b39ba5ad15bf068206c47208393cfc891541544102e94e16119883cb8 gdb-14.2-02-x86_64.pkg.tar.lz
## d900cda422c7cfd70db84acefa690f7bed49c25d4210339001825b461a58c4d5 gdb-common-14.2-02-x86_64.pkg.tar.lz