archrelease: copy trunk to community-any
[ArchLinux/community.git] / lib32-ncurses / repos / multilib-x86_64 / PKGBUILD
blob2c0b95cc409f875f109d96d8e77dfa8e1a4f5b10
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: judd <jvinet@zeroflux.org>
5 _name=ncurses
6 pkgname=lib32-${_name}
7 pkgver=6.4
8 pkgrel=1
9 pkgdesc="System V Release 4.0 curses emulation library (32-bit)"
10 arch=(x86_64)
11 url=https://invisible-island.net/ncurses/ncurses.html
12 license=(MIT)
13 depends=(lib32-gcc-libs lib32-glibc $_name=$pkgver)
14 provides=(libncurses++w.so libformw.so libmenuw.so libpanelw.so libncursesw.so)
15 options=(debug)
16 source=(
17   https://invisible-mirror.net/archives/$_name/$_name-$pkgver.tar.gz{,.asc}
18   $_name-6.3-libs.patch
19   $_name-6.3-pkgconfig.patch
21 sha512sums=('1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34'
22             'SKIP'
23             'adb02b838c40f1e58a1b31c26d5cd0f2a1c43f3b6d68e839981764c0f6c905a9eb51dd36ff018628fdeb20747cc7467727d57135408ab4848259384077a52b28'
24             '2d2c0ec3c880e638ab4aa3dbff5e28e4cd233153e24816bd87e077f848aa3edd5114cd0f2a7f6e8869dd1861a2746e512886c18264ff1676927dcc320c5ef958')
25 b2sums=('47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3'
26         'SKIP'
27         '31bb10e82dd018a75e57252052650d9f0f5eb5e7e887118c2ea40032b11f59ec6aa4d9bae804c615cbecdf3382f3434e0c9e9e8440fdefe66a507be020b8965c'
28         'fb6cf606cf3db7f6b306272696a63bce83d52cfa91e850f9a7bdb9d3d8455a26943529a9cf79731dddc7f763c27211a9afab9c4c31dbb6d12fd720eb390eb0a3')
29 validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03')  # Thomas Dickey <dickey@invisible-island.net>
31 prepare() {
32   # do not link against test libraries
33   patch -Np1 -d $_name-$pkgver -i ../$_name-6.3-libs.patch
34   # do not leak build-time LDFLAGS into the pkgconfig files:
35   # https://bugs.archlinux.org/task/68523
36   patch -Np1 -d $_name-$pkgver  -i ../$_name-6.3-pkgconfig.patch
37   # NOTE: can't run autoreconf because the autotools setup is custom and ancient
40 build() {
41   local configure_options=(
42     --prefix=/usr
43     --libdir=/usr/lib32
44     --disable-db-install
45     --enable-widec
46     --enable-pc-files
47     --mandir=/usr/share/man
48     --with-cxx-binding
49     --with-cxx-shared
50     --with-pkg-config-libdir=/usr/lib32/pkgconfig
51     --with-shared
52     --with-versioned-syms
53     --without-ada
54     --without-debug
55     --without-manpages
56     --without-progs
57     --without-tack
58     --without-tests
59   )
61   export CC="gcc -m32"
62   export CXX="g++ -m32"
63   export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig'
65   cd $_name-$pkgver
66   ./configure "${configure_options[@]}"
67   make
70 package() {
71   make DESTDIR="$pkgdir" install -C $_name-$pkgver
73   install -vDm 644 $_name-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
75   # fool packages looking to link to non-wide-character ncurses libraries
76   for lib in ncurses ncurses++ form panel menu; do
77     printf "INPUT(-l%sw)\n" "$lib" > "$pkgdir/usr/lib32/lib$lib.so"
78     ln -sv ${lib}w.pc "$pkgdir/usr/lib32/pkgconfig/$lib.pc"
79   done
81   # some packages look for -lcurses during build
82   printf 'INPUT(-lncursesw)\n' > "$pkgdir/usr/lib32/libcursesw.so"
83   ln -sv libncurses.so "$pkgdir/usr/lib32/libcurses.so"
85   # tic and ticinfo functionality is built in by default
86   # make sure that anything linking against it links against libncursesw.so instead
87   for lib in tic tinfo; do
88     printf "INPUT(libncursesw.so.%s)\n" "${pkgver:0:1}" > "${pkgdir}/usr/lib32/lib$lib.so"
89     ln -sv libncursesw.so.${pkgver:0:1} "$pkgdir/usr/lib32/lib$lib.so.${pkgver:0:1}"
90     ln -fsv ncursesw.pc "$pkgdir/usr/lib32/pkgconfig/$lib.pc"
91   done
93   # remove all files conflicting with ncurses
94   rm -frv "$pkgdir/usr/"{bin,include}
97 # vim: set et ts=2 sw=2: