aboutsummaryrefslogtreecommitdiffstats
path: root/main/newt/APKBUILD
blob: fe7ad26f701b7f32475f3b712d4e66a9450707ac (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
pkgver=0.52.16
pkgrel=0
pkgdesc="Redhat's Newt windowing toolkit development files"
url="https://fedorahosted.org/newt/"
arch="all"
license="LGPL2"
depends=
makedepends="slang-dev popt-dev python-dev ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc py-newt:py"
source="https://fedorahosted.org/releases/n/e/newt/newt-$pkgver.tar.gz
	parallel-build.patch
	fix-includes.patch"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in ../*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done

	sed -i -e 's:-lslang:-lslang -lncurses:g' \
		-e 's:instroot:DESTDIR:g' Makefile.in || return 1
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-tcl \
		--disable-nls \
		|| return 1
	make RPM_OPT_FLAGS="$CFLAGS" || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	# TODO: fix the make install target to not try install po files
	make -j1 DESTDIR="$pkgdir" prefix="/usr" RPM_OPT_FLAGS="ERROR" install \
		||  true
}

py() {
	pkgdesc="A NEWT module for Python"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

md5sums="6ce923015cf87ef2c17779d24692f573  newt-0.52.16.tar.gz
3351a92d9bdc1c0c7d05664e95622208  parallel-build.patch
d4637d1cec167e1d7087b9137b6954db  fix-includes.patch"
sha256sums="1b9574bc9c8fb7b25cd26e5c3f2840e8c17fde5dd09c759604925919b3589cd3  newt-0.52.16.tar.gz
f153d75b728ef41153bf4deb0306336cc17a2fe538026e0122ebc398f146266d  parallel-build.patch
bff77da4814f8f4ec09572bac464bf7545d4790ada2f4c0deffb27128b6dd83d  fix-includes.patch"
sha512sums="38cf5aa6660a3ee0409ed0767c02d777a4a2c28a000a359bb735da5abf8ee38f375ef333d10865a1eb3828497b6c58d2f3f6011c7b7e7c2360612b985dcf3d25  newt-0.52.16.tar.gz
ea3937142ce776b6c227936e87f7bc28116ab7775db5785600e39bee38eba914d3ccae1ecb54d9f4ac9505918da255d69a777b105d80d72cd087545b1dae18bc  parallel-build.patch
ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611  fix-includes.patch"