summaryrefslogtreecommitdiff
path: root/main/newt/APKBUILD
blob: 646680dc1f9751094a33c14ba6f4eb198104aed8 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=newt
pkgver=0.52.21
pkgrel=5
pkgdesc="Redhat's Newt windowing toolkit development files"
options="!check" # No testsuite
url="https://pagure.io/newt/"
arch="all"
license="LGPL-2.0-only"
makedepends="slang-dev popt-dev python3-dev ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py3-$pkgname:py3"
source="https://releases.pagure.org/newt/newt-$pkgver.tar.gz
	fix-includes.patch
	"

builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	sed -i -e 's:-lslang:-lslang -lncurses:g' \
		-e 's:instroot:DESTDIR:g' Makefile.in
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-tcl \
		--disable-nls
	make RPM_OPT_FLAGS="$CFLAGS"
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" prefix="/usr" RPM_OPT_FLAGS="ERROR" install
	rm -f "$pkgdir"/usr/lib/*.a
}

py3() {
	pkgdesc="Python3 bindings for Newt windowing toolkit"
	depends="$pkgname=$pkgver-r$pkgrel python3"
	amove '/usr/lib/python*'
}

sha512sums="
d53d927996d17223e688bf54dccfabb2a3dc02bfe38ffc455964e86feaca3cd9f9ab5b19774433be430fa4d761cd9b6680b558f297acb86f80daeb6942f7d23c  newt-0.52.21.tar.gz
ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611  fix-includes.patch
"