aboutsummaryrefslogtreecommitdiffstats
path: root/testing/poco/APKBUILD
blob: c0c8fefe7badc4508453ae2356af571a04c0f1df (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=poco
pkgver=1.7.7
pkgrel=0
pkgdesc="C++ class libraries for building network- and internet-based applications"
url="https://pocoproject.org/"
arch="all"
license="GPL"
depends=
depends_dev=
makedepends="$depends_dev libressl-dev linux-headers"
install=
subpackages="$pkgname-dev"
source="https://pocoproject.org/releases/$pkgname-$pkgver/$pkgname-$pkgver-all.tar.gz
	200-strerror.patch
	cxxflags.patch
	"

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

prepare() {
	cd "$builddir"
	default_prepare || return 1
}

build() {
	cd "$builddir"
	./configure --config=Linux \
		--prefix=/usr \
		--minimal \
		--shared \
		--no-tests \
		--no-samples
#		--poquito \
#		--no-fpenvironment \
#		--no-sharedmemory \
#		--no-wstring
	# make CXXFLAGS="$CXXFLAGS -U_GNU_SOURCE -U_DEBUG -D_XOPEN_SOURCE=600" || return 1
	# make CXXFLAGS="$CXXFLAGS" || return 1
	# make CXXFLAGS="-fomit-frame-pointer" || return 1
	# export "CXXFLAGS=$CXXFLAGS"
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	_basedir="$pkgdir"/usr/include/Poco
	for dir in Net Crypto; do
		test -d "$_basedir"/$dir || mkdir "$_basedir"/$dir
	done
	cp NetSSL_OpenSSL/include/Poco/Net/*.h "$_basedir"/Net || return 1
	cp Crypto/include/Poco/Crypto/*.h "$_basedir"/Crypto || return 1 

	# remove the 2 lines below (and this) if there is no init.d script
	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="8fecc361fd0388670ac6d92cf17a9f109d9600e50a3725d38466dc0035d4b010046ca5b162e1a4d8e42e04f9a7fef94dad56331dc4b27ed0ef67252b4be6a5f1  poco-1.7.7-all.tar.gz
29b08dcafb2873eeb8ce11c139e85d7530039dfd65c7e77d2f81e16bfee194d8e57ce3db0d80c838f4d43e66bd2ea54d3763933085304db4c9da737d80ce2ba8  200-strerror.patch
5f72e487074ea26e29e81d6fc244d03989d780d71b33a064456fa19b241aca278fbfd9b303733940b837921ea25781ee62905d70a5f1c57f1b24cd38a2a7d720  cxxflags.patch"