blob: a81445cbbf242f8fe77d8b20bfa743206e219f07 (
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
57
58
59
|
# Maintainer: drakkan <nicola.murino at gmail dot com>
# Contributor: Filip Brcic <brcha@gna.org>
# Contributor: ant32 <antreimer@gmail.com>
pkgname=mingw-w64-termcap
pkgver=1.3.1
pkgrel=9
arch=(any)
pkgdesc="Terminal feature database (mingw-w64)"
depends=(mingw-w64-crt)
makedepends=(mingw-w64-configure)
options=(!strip !buildflags staticlibs)
license=(GPL LGPL)
groups=('mingw-w64')
url="https://ftp.gnu.org/gnu/termcap/"
source=(
"https://ftp.gnu.org/gnu/termcap/termcap-${pkgver}.tar.gz"
"tparam_c.patch"
)
sha256sums=('91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100'
'e531131a7715736ca6daabe9c53c60305b9568e4580b510a065f965ad23760fe')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "$srcdir/termcap-$pkgver"
patch -Np0 -i "$srcdir/tparam_c.patch"
}
build() {
cd "$srcdir/termcap-$pkgver"
autoconf
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-configure
make
# Build a shared library. No need for -fPIC on Windows.
${_arch}-gcc -shared \
-Wl,--out-implib,libtermcap.dll.a \
-o libtermcap-0.dll \
termcap.o tparam.o version.o
popd
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir/termcap-$pkgver/build-${_arch}"
# make install has no support for destdir
make install prefix="${pkgdir}/usr/${_arch}" exec_prefix="${pkgdir}/usr/${_arch}" oldincludedir=
#rm -r "$pkgdir"/usr/${_arch}/info/
mkdir -p "${pkgdir}"/usr/${_arch}/{bin,lib}
install -m 0755 libtermcap-0.dll "${pkgdir}/usr/${_arch}/bin"
install -m 0644 libtermcap.dll.a "${pkgdir}/usr/${_arch}/lib"
find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
done
}
# vim: set sw=2 ts=2 et:
|