blob: 8ad4f5c064473721b25ebd6b1b318da1f070e6a5 (
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
|
pkgname=mingw-w64-gdb
pkgver=14.2
pkgrel=1
pkgdesc="The GNU Debugger (mingw-w64)"
arch=(any)
url="http://www.gnu.org/software/gdb/"
license=('LGPL')
depends=('mingw-w64-dlfcn' 'mingw-w64-expat' 'mingw-w64-zlib' 'mingw-w64-readline' 'mingw-w64-mpfr')
makedepends=('mingw-w64-configure' 'texinfo')
options=('staticlibs' '!buildflags' '!strip')
source=("http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz")
sha256sums=('2d4dd8061d8ded12b6c63f55e45344881e8226105f4d2a9b234040efa5ce7772')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare () {
cd "$srcdir/gdb-$pkgver"
# https://sourceware.org/bugzilla/show_bug.cgi?id=27657
sed -i "s|\$(WIN32LIBS) \$(LIBGNU)|\$(WIN32LIBS) \$(LIBGNU) -lbcrypt|g" gdb/Makefile.in
}
build() {
cd "$srcdir/gdb-$pkgver"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
CXXFLAGS="${CXXFLAGS} -Wno-format-security" ${_arch}-configure \
--enable-lto \
--disable-source-highlight \
--disable-tui \
--with-system-readline \
--with-expat ..
make
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir"/gdb-${pkgver}/build-${_arch}
make install DESTDIR="$pkgdir"
rm -r "$pkgdir"/usr/${_arch}/share/{man,info,locale}
rm -r "$pkgdir"/usr/${_arch}/{lib,include}
${_arch}-strip "$pkgdir"/usr/${_arch}/bin/*.exe
done
}
|