aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-04-03 13:22:52 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-04-03 13:23:21 +0000
commit473c070d5ba6ed3c8f3badaa8968b6a98bf85f14 (patch)
tree32e28701feb566bd4faea92d6d97b6e1d70f1bf3
parent30d0d0c694dc81ea99b750d6b88e19c3c45f57be (diff)
downloadaports-473c070d5ba6ed3c8f3badaa8968b6a98bf85f14.tar.bz2
aports-473c070d5ba6ed3c8f3badaa8968b6a98bf85f14.tar.xz
testing/poco: new aport
C++ class libraries for building network- and internet-based applications
-rw-r--r--testing/poco/200-strerror.patch11
-rw-r--r--testing/poco/APKBUILD63
-rw-r--r--testing/poco/cxxflags.patch24
3 files changed, 98 insertions, 0 deletions
diff --git a/testing/poco/200-strerror.patch b/testing/poco/200-strerror.patch
new file mode 100644
index 0000000000..54cce519eb
--- /dev/null
+++ b/testing/poco/200-strerror.patch
@@ -0,0 +1,11 @@
+--- a/Foundation/src/Error.cpp
++++ b/Foundation/src/Error.cpp
+@@ -66,7 +66,7 @@
+ without -D_GNU_SOURCE is needed, otherwise the GNU version is
+ preferred.
+ */
+-#if defined _GNU_SOURCE && !POCO_ANDROID
++#if (defined _GNU_SOURCE && (defined __GLIBC__ || defined __UCLIBC__)) && !POCO_ANDROID
+ char errmsg[256] = "";
+ return std::string(strerror_r(errorCode, errmsg, 256));
+ #elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
diff --git a/testing/poco/APKBUILD b/testing/poco/APKBUILD
new file mode 100644
index 0000000000..c0c8fefe7b
--- /dev/null
+++ b/testing/poco/APKBUILD
@@ -0,0 +1,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"
diff --git a/testing/poco/cxxflags.patch b/testing/poco/cxxflags.patch
new file mode 100644
index 0000000000..0ba6f7b789
--- /dev/null
+++ b/testing/poco/cxxflags.patch
@@ -0,0 +1,24 @@
+--- a/build/config/Linux
++++ b/build/config/Linux
+@@ -41,7 +41,7 @@
+ CFLAGS =
+ CFLAGS32 =
+ CFLAGS64 =
+-CXXFLAGS = -Wall -Wno-sign-compare
++CXXFLAGS = -Wall -Wno-sign-compare -fomit-frame-pointer
+ CXXFLAGS32 =
+ CXXFLAGS64 =
+ LINKFLAGS =
+@@ -56,9 +56,9 @@
+ DEBUGOPT_CC = -g -D_DEBUG
+ DEBUGOPT_CXX = -g -D_DEBUG
+ DEBUGOPT_LINK = -g
+-RELEASEOPT_CC = -O2 -DNDEBUG
+-RELEASEOPT_CXX = -O2 -DNDEBUG
+-RELEASEOPT_LINK = -O2
++RELEASEOPT_CC = -Os -DNDEBUG
++RELEASEOPT_CXX = -Os -DNDEBUG
++RELEASEOPT_LINK = -Os
+
+ #
+ # System Specific Flags