jobextra/gdb/PKGBUILD
2024-01-23 05:12:59 +02:00

84 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.1
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=(d66df51276143451fcbff464cc8723d68f1e9df45a6a2d5635a54e71643edb80 # gdb-14.1.tar.xz
172f841de5d7cd1beee6d44a57a005f7314ea78507f2cb5dfc3d7359deef6c5d) # gdb-14.1.tar.xz.sig
## 65c9b1f7c65e6dffd8cc6373126696e96a46040a275f18bf5f0bcbd6156b13d0 gdb-14.1-01-x86_64.pkg.tar.lz
## 271e2c1d5b8b40299d82518101780b8f10940289f8f460bf49233833682fa39b gdb-common-14.1-01-x86_64.pkg.tar.lz