blob: fde562603810808575432b56ee38d1f1da1e2205 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Maintainer: Kevin Brodsky <corax26 at gmail dot com>
_name=ncurses
pkgname=lib32-${_name}5-compat-libs
pkgver=6.6
pkgrel=1
pkgdesc="System V Release 4.0 curses emulation library (32-bit), ABI 5"
arch=(x86_64)
url=https://invisible-island.net/ncurses/ncurses.html
license=(MIT)
depends=(
lib32-gcc-libs
lib32-glibc
lib32-$_name=$pkgver
)
makedepends=(
git
)
source=(
$_name::git+https://github.com/ThomasDickey/ncurses-snapshots.git?signed#tag=v${pkgver/./_}
$_name-6.6-libs.patch
$_name-6.5-20250118-pkgconfig.patch
)
sha512sums=('cad17bf83ef3ccd71fb7c33933ddbbbef2e8bd050d5e4e4ebb344b5df8292b1cd3c9e1787e88087d73cc96f625ba0c7cd6714d7720af7f8bd50b314e9838d2a7'
'46031bb868d4522c751aa15e569213b172ffb48cf708d9f6188d89a4c9f2085c94cab9f601f1ab16a46e760fe7ef3f06bfa9efb308261ed7c1187cc167829a82'
'50f18928512b37935d29d463da2013772413752a8718f403d717464e50ea4f8e9b85c0bf6ec1c30c49f2798d2a2814bbb687e254b560faf9543d6142ca27204a')
b2sums=('af7f3dd1fd2d471d6b1b144acfbf4f44bdbf040ff8746a48aa9fdcc86f74a004939a31204d22966ef857096ccd7da6ee74769996e082a5a2735b1e6e934319a3'
'bcf601da8243e332ace14966fd0f1bb2e11fb1ac11c49260ac711db20efa66f2c7357fcd741eaebf855ce0a205e9b22dd11d2a6523be8e9fb4f1db0d4dfeb482'
'e98fcd297be873e0719d73b7d1611a98943d5efc3a2c5c1b61b901f36ebe40dd1a98c65b5605ee5ff6a5288e4217bea4d0dddc4767732f464bd4949270e42ac6')
validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03') # Thomas Dickey <dickey@invisible-island.net>
prepare() {
# do not link against test libraries
patch -Np1 -d $_name -i ../$_name-6.6-libs.patch
# do not leak build-time LDFLAGS into the pkgconfig files:
# https://bugs.archlinux.org/task/68523
patch -Np1 -d $_name -i ../$_name-6.5-20250118-pkgconfig.patch
# NOTE: can't run autoreconf because the autotools setup is custom and ancient
}
build() {
local configure_options=(
--prefix=/usr
--libdir=/usr/lib32
--disable-db-install
--disable-root-access
--disable-root-environ
--disable-setuid-environ
--enable-widec
--mandir=/usr/share/man
--with-shared
--with-versioned-syms
--without-ada
--without-debug
--without-manpages
--without-progs
--without-tack
--without-tests
--with-abi-version=5
--without-gpm
--without-pkg-config
)
export CC="gcc -m32"
export CXX="g++ -m32"
# allow building with gcc >= 15
CFLAGS+=' -std=gnu17'
cd $_name
./configure "${configure_options[@]}"
make
}
package() {
make DESTDIR="$pkgdir" install -C $_name
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses form panel menu; do
ln -sv lib${lib}w.so.5 "$pkgdir/usr/lib32/lib$lib.so.5"
done
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
ln -sv libncursesw.so.5 "$pkgdir/usr/lib32/lib$lib.so.5"
done
# remove all files conflicting with ncurses
rm -frv "$pkgdir/usr/"{bin,include,share}
# Remove .so symlinks and static libraries (conflicting with lib32-ncurses)
rm -fv "$pkgdir/usr/"{lib32/*.so,lib32/*.a}
mkdir -p "$pkgdir/usr/share/licenses"
ln -s $_name "$pkgdir/usr/share/licenses/$pkgname"
}
# vim: set et ts=2 sw=2:
|