summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 221517d40f2a626c8df256b30671ae0a3f346826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Johnny Halfmoon <jhalfmoon@milksnot.com>

pkgname=arm-none-eabi-gdb-linaro
_relver=7.8
_relshortdate=14.09
_reldate=20${_relshortdate}
_relverdate=${_relver}-${_reldate}
# This is how I want to define the pkgver, but the AUR doesn't understand it
#pkgver=${_relver}_${_reldate//-/_}
pkgver=7.8_2014.09
pkgrel=3
pkgdesc="Linaro GDB is a branch of FSF GDB that contains ARM focused features and patches."
arch=(i686 x86_64)
url="https://releases.linaro.org/"
license=('GPL3')
groups=('arm-none-eabi-toolchain')
depends=('ncurses' 'expat' 'python36' 'guile2.0')
makedepends=('texinfo')
optdepends=('openocd: for debugging JTAG targets')
provides=('arm-none-eabi-gdb')
conflicts=('cross-arm-none-eabi-gdb' 'arm-none-eabi-gdb')
options=(!libtool !emptydirs)
source=(http://releases.linaro.org/archive/${_relshortdate}/components/toolchain/gdb-linaro/gdb-linaro-${_relverdate}.tar.xz)
_basedir=gdb-linaro-${_relverdate}

build() {
  cd ${srcdir}/${_basedir}
  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

  mkdir build
  cd build
  ../configure --target=arm-none-eabi \
               --prefix=/usr \
               --datarootdir=/usr/share/arm-none-eabi-gdb \
               --enable-multilib \
               --enable-interwork \
               --with-system-readline \
							 --with-guile=guile-2.0 \
							 --with-python=python3.6 \
               --disable-nls
  make
}

package() {
  cd ${srcdir}/${_basedir}/build
  make DESTDIR=${pkgdir} install

	# We don't want these files in a cross version
  rm -f ${pkgdir}/usr/lib/libiberty.a
	rm -rf ${pkgdir}/usr/share/info
	rm -rf ${pkgdir}/usr/share/gdb
	rm -rf ${pkgdir}/usr/include/gdb
}

# vim: set ts=2 sw=2 ft=sh noet:
sha256sums=('fbbe96b8d0debf7c2d8c9a4a6c7ca0ba87d536e43289f81c4af56f95e5f7b5ea')