summaryrefslogtreecommitdiff
path: root/system/ncurses/APKBUILD
blob: a61c9415c3c11db92ce549c07b3d90fedbad78f2 (plain) (blame)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=ncurses
pkgver=6.3
_ver=20220416
pkgrel=0
pkgdesc="Console display library"
url="https://invisible-island.net/ncurses/ncurses.html"
arch="all"
options="!check"  # "tests" are actual demo programs, not a test suite.
license="MIT"
depends=""
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
	$pkgname-terminfo-base:base:noarch $pkgname-terminfo:terminfo:noarch"
# ATTENTION MAINTAINERS: This is generated by the 'maintain' script.
source="https://invisible-mirror.net/archives/ncurses/ncurses-6.3.tar.gz
	ncurses-6.3-20211026.patch
	ncurses-6.3-20211030.patch
	ncurses-6.3-20211106.patch
	ncurses-6.3-20211113.patch
	ncurses-6.3-20211115.patch
	ncurses-6.3-20211120.patch
	ncurses-6.3-20211127.patch
	ncurses-6.3-20211204.patch
	ncurses-6.3-20211211.patch
	ncurses-6.3-20211219.patch
	ncurses-6.3-20211225.patch
	ncurses-6.3-20220101.patch
	ncurses-6.3-20220115.patch
	ncurses-6.3-20220122.patch
	ncurses-6.3-20220129.patch
	ncurses-6.3-20220205.patch
	ncurses-6.3-20220212.patch
	ncurses-6.3-20220219.patch
	ncurses-6.3-20220226.patch
	ncurses-6.3-20220305.patch
	ncurses-6.3-20220312.patch
	ncurses-6.3-20220319.patch
	ncurses-6.3-20220326.patch
	ncurses-6.3-20220402.patch
	ncurses-6.3-20220409.patch
	ncurses-6.3-20220416.patch
	"

# secfixes:
#   6.3-r0:
#     - CVE-2021-39537
#   6.0_p20171125-r0:
#     - CVE-2017-16879 
#   6.0_p20170701-r0:
#     - CVE-2017-10684

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--libdir=/lib \
		--mandir=/usr/share/man \
		--without-ada \
		--without-tests \
		--disable-termcap \
		--disable-rpath-hack \
		--disable-stripping \
		--with-pkg-config-libdir=/usr/lib/pkgconfig \
		--without-cxx-binding \
		--with-terminfo-dirs="/etc/terminfo:/usr/share/terminfo" \
		--enable-pc-files \
		--with-shared \
		--with-termlib \
		--enable-widec
	make
}

package() {
	make -j1 DESTDIR="$pkgdir" install

	# Install basic terms in /etc/terminfo
	for i in ansi console dumb linux rxvt screen sun vt52 vt100 vt102 \
		 vt200 vt220 xterm xterm-color xterm-xfree86 xterm-256color \
		 alacritty tmux tmux-256color terminator 'terminology*' \
		 vte vte-256color gnome gnome-256color kitty konsole konsole-256color \
		 konsole-linux putty putty-256color rxvt-256color 'st-*' \
		 screen-256color; do
		local termfiles="$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null)"
		local basedir="$(basename $(dirname "$termfile"))"

		[ -z "$termfiles" ] && continue
		
	for termfile in $termfiles; do
		local basedir=$(basename "$(dirname "$termfile")")
		install -d "$pkgdir"/etc/terminfo/$basedir
		mv "$termfile" "$pkgdir"/etc/terminfo/$basedir/
		ln -s ../../../../etc/terminfo/$basedir/${termfile##*/} \
			"$pkgdir"/usr/share/terminfo/$basedir/${termfile##*/}
		done
	done
}

dev() {
	default_dev
	# force link against *w.so and *w.a
	for lib in ncurses ncurses++ form panel menu tinfo; do
		echo "INPUT(-l${lib}w)" > "$subpkgdir"/lib/lib${lib}.so
		echo "INPUT(-l${lib}w)" > "$subpkgdir"/lib/lib${lib}.a
		ln -s ${lib}w.pc "$subpkgdir"/usr/lib/pkgconfig/${lib}.pc
	done
	# link curses -> ncurses
	echo "INPUT(-lncursesw)" > "$subpkgdir"/lib/libcursesw.so
	ln -s libncurses.so "$subpkgdir"/lib/libcurses.so
}

terminfo() {
	pkgdesc="$pkgdesc (other terminfo files)"
	depends="$pkgname-terminfo-base"
	rm -rf $subpkgdir
	mkdir -p $subpkgdir/usr/share
	mv $pkgdir/usr/share/terminfo $subpkgdir/usr/share
}

libs() {
	pkgdesc="$pkgdesc (libraries)"
	depends="$pkgname-terminfo"
	provides="ncurses-widec-libs=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"
	mv "$pkgdir"/lib "$subpkgdir"/
}

base() {
	pkgdesc="Descriptions of common terminals"
	mkdir -p "$subpkgdir"/etc
	mv "$pkgdir"/etc/terminfo "$subpkgdir"/etc/
}

static() {
	pkgdesc="Static libraries for the ncurses library"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/*.a "$subpkgdir"/lib/
}

# ATTENTION MAINTAINERS: This is generated by the 'maintain' script.
sha512sums="
683fee64baa744e24385dd015939d1bbc0dd5a22aad4d7e25e19b480c0b41e60fd995f9f992fa195249b4e2d84d400d4bda8cd17d4fc3028ac9827f594003835  ncurses-6.3-20211026.patch
1ad21b25aa4fe101842ce15ebab34ad65a18cf01c6cf43ea29ab6f93320a00a2d41ea9de865f04f975646bda42d5a0aa998f64b7824d00e30edd8cc34b9ce257  ncurses-6.3-20211030.patch
64cf460c3b4f15df270ae4fe4759a6ce893026dc78427c319a93d0941e40b50663c01f0a5b6e27850cfba7f640177aa32f48ea1752516623187b9caec1b2ad5a  ncurses-6.3-20211106.patch
8dc3b61122f571f610a90a079ccab08ae344c6870cab98967fe0b21b07bae961ee93c7f7899efda5f044d0a614fbae3bfef30921b4cc7e31de9f818103206273  ncurses-6.3-20211113.patch
7c22c11778f122f947e5cb67920e40960f595418eb1c6d4fde5e0531f15232e096c589883b28d1f2440c2b202b897f7b4b96a16564de0ffdd9d162182e1e89b5  ncurses-6.3-20211115.patch
0aa1085f776c17dc9b4cddd408e7b8ea98d8aacb8d7f87f291b16a6817e29cb2842163084c541375fc98fdb73b832a3c31aea4b9ae933e2302e01bb091c26a9a  ncurses-6.3-20211120.patch
6f3121497ba2dde290ed8ba3e737057897ce802a8055a7354a7b26555cf53d2906a4e57f291fb196cbde0800fa80a31d5e716eb77eaf3c3c525f92497775fade  ncurses-6.3-20211127.patch
e51184184e11983523ec212f208ef0df228b2592ec98e8a2eb7687bcfcc6bc84b68089cde5934fe57bd1f85b23d6d15a7f166b12de9d694bff95a014ed1369d0  ncurses-6.3-20211204.patch
d89013c9b9695c33ece934595e0e598ec4f33f365ba49352cbe6937224a5a6d7d93110465bfdde7193695690302b904151e3c87262552b49cc53ae55a4e99149  ncurses-6.3-20211211.patch
e7d8da585eaf716cec4657653956d0ea4152b403c123a8b1076d0bf4ab7a9791e500e4c57d2ff0b99243b969e9fa21ce7d5cd226c98a881bedc049ba6e19297a  ncurses-6.3-20211219.patch
645dd8f967b2779069fe9c085685a60585bffd5ad326a3fe7b94e0783ddbb5df73a9cfe345da4a1a6bf67a613ebb58df92dbb9edb4cabc0527f6a95d264f98cc  ncurses-6.3-20211225.patch
1f7e48d33980baa1a23c61e871805f4c8b556a3607eb826fc1a8a14c24139a7574db56344395addc3e62fb4792c8e1795316be1213c72f16805074ff3836586b  ncurses-6.3-20220101.patch
100ed324dc07b328ffb0b30e454aa13eb04a1ee585649bb4528c4afab2d6be551d473d09e6de04a3b92403c25fee4102773d294eff613d36e70fdfcbfd716bbc  ncurses-6.3-20220115.patch
c54cd26d2950adf521be0f343a4911f8b84106d99fe8be9a56cf9a9d776aea63b96e2a415818219d1adbf06e42990409ec9af759ce0aee6db14160640b2b84cc  ncurses-6.3-20220122.patch
bb7778d055fd7ae54121782b02fab9df6901a53c6cb3b6f2b4d02f1deef13a5adbb991b0cf73fb59d122dc4f2e5b949ea3292f4a60fe8fc3e5e968e9d52cbbf8  ncurses-6.3-20220129.patch
b6109602f96990d6ea7dc71c20e9b46df8d49dd4fb134c9188886af66c0e5a5790ef3989a9f0d11d4ee66f891b81a640b86e7e4cf24471d370804c70c2fbf8ec  ncurses-6.3-20220205.patch
9ac6c8f4403a882fd900c7ff6027674ffe48707c1121762b31f88bc6af2a77fdc1d3e7abe26f185ea60d153f39fc6dad22983bd3a75fa6b3c93456b47be4f113  ncurses-6.3-20220212.patch
e99142ee904c326d027f1aca16d00ed12027c6ec1e2d078d43b8a6d4a319de1797b84ea54408b2ab2c10de1b6f54b530d804e27c188e3ce2b0fa6f010e570fb5  ncurses-6.3-20220219.patch
e7c4e75dd36637b0a812396a7a379e8f03e16a6ed98129a5c82ace7b9e1c053ded045074e528a61f50377b05b7674ca542d14a7d49175d7c204440af9796eec0  ncurses-6.3-20220226.patch
f629f40f42f187df2d2bd958f7aa8cbfc58a12f37a3aa905540c07c0c0afaa6315863616451ed43a3d6da33ff9a28b79a2dd863eeda029f892ec1c2f2716ebc9  ncurses-6.3-20220305.patch
9012cdb6ee73776fe04098b5677fa423dce324ba9307500b01488c4a9bf0d73c669d2bfa9b655633778dda041db92f5db7023a404883be99287724a1cc340a2d  ncurses-6.3-20220312.patch
a77e2b9555a8eb863ad2c6706787c1fdc5f27df964ab5136e0db947f9ec299e94323342bb162a2eaee9231c3282f38f460692fb82664aea079b342db184fd858  ncurses-6.3-20220319.patch
a4945607917f59442de8ef08f4e7347a63b349e5686228c6f5fda4fcb7017362d51afe2a590ebe2a0743a7cccf905c79d06f5937f853fbfda4d3d3f0054a0f6b  ncurses-6.3-20220326.patch
a8daa9c031a937caefaab41d2b9555e76b72c58aad385a6cbb79e5fc7860302c487ed09ae31f4857a849366c0ab65c36647a7d2be0fa791b3099479917f2a857  ncurses-6.3-20220402.patch
dd418aa115ef5cd0f5441bcc230bfdcb479bf4469de8c0e91133d09371c029b48a2ae9cde21c76464b9a02aba136b496647eaabf4f960ccc564f8534898f9adb  ncurses-6.3-20220409.patch
f244cc8a241e85fb595b784e628ea43dd015124674e8e61dd35044d47664b620a04d35c73b2f4adea798f9843629c9d61cbfe52f8de49ead8e0159086f192931  ncurses-6.3-20220416.patch
5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105  ncurses-6.3.tar.gz"