summaryrefslogtreecommitdiff
path: root/dev-libs/poco
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/poco
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/poco')
-rw-r--r--dev-libs/poco/Manifest12
-rw-r--r--dev-libs/poco/files/1.4.6_p4-gentoo.patch71
-rw-r--r--dev-libs/poco/files/poco-1.4.4-patch-for-libpcre-8.32.patch45
-rw-r--r--dev-libs/poco/files/poco-1.7.2-iodbc-incdir.patch13
-rw-r--r--dev-libs/poco/metadata.xml47
-rw-r--r--dev-libs/poco/poco-1.4.6_p4-r1.ebuild121
-rw-r--r--dev-libs/poco/poco-1.4.6_p4.ebuild118
-rw-r--r--dev-libs/poco/poco-1.7.6.ebuild115
8 files changed, 542 insertions, 0 deletions
diff --git a/dev-libs/poco/Manifest b/dev-libs/poco/Manifest
new file mode 100644
index 000000000000..77fa35c0db30
--- /dev/null
+++ b/dev-libs/poco/Manifest
@@ -0,0 +1,12 @@
+AUX 1.4.6_p4-gentoo.patch 2899 SHA256 458e84551044226afd5e5f6c17884cfe88ac66ed8520346337260a881fe37b1e SHA512 d43ffa2422b8fcf465b94d9cf075ce855a90339949cc662e8c8ab81cdc744cdb7aa6563f872a12bffe87526385b9a6decf2b21f244e2b66c1871b6d578de0e79 WHIRLPOOL 0b0e04a723e32ce1665fe64680274e3ae0320b47e530cce21df2b13b1a8ff3cbf29c388d96087ab6fd0fa1f5d9b07cf2e256a7bc195fc307d5d2264e9b8f9334
+AUX poco-1.4.4-patch-for-libpcre-8.32.patch 1970 SHA256 e5e0328898393d28e8caccf983b3ac4486af35844a2af9f68c79f7ade247c467 SHA512 955a1ed90c1a3ebe50e110ef650853e9e8784aa9ca7c8806478ee4689d886b31f6afb6f613d290dd19b174243001083d975135175027615bf182ad41a9c413b7 WHIRLPOOL 060427a5ecfbdbb61a2ccb131a6f360f9879365d729ab672ebf7c990d8f828fdc24e1693f63e191c4c6bbb65b49c8909e4ebc6b224f0a9133305269abadea646
+AUX poco-1.7.2-iodbc-incdir.patch 321 SHA256 5463972a699297a26b326d05019788cbbc1b7bd93b0c2257b6f6717ed18e299d SHA512 f3a0b4032fd4f71f0281d58c00241b1cd2f92da1a23a8501c420949621167d1fc7e2a2ed3ec48b6f75d35569f6443e3391eaf19a8c8fbd17e24d1cbd9ffd892d WHIRLPOOL fb5da4ebe7bc6e62bec5f4ec01a76966a0f17d0fc43d8ffd09b87ec827cfb21b7ce3da5180891f49062cb50eb991df8b69eaf565c69681ae7759c0d938aa0ba1
+DIST poco-1.4.6-all-doc.zip 2072762 SHA256 a1cfb143a671bcef7a2bafcbba095edf8ed21e51a30ae7eb19955e73bb23067d SHA512 458e1a3c6a6017b5ae5efcbd0d7b2bbf50aedd6ddc7ae7befddac07ed133b7243208aadd6ecdb17b3fa273e04eb0da4d73b1d3e5591aee98b754e430b2248e52 WHIRLPOOL af52385b3557853ea4fcd1a31092a5e1fa009e082bc4fcec8e51e42207147400eca7c26c9a65c84de24d322677fcfaa364207dc83f88299ddca2fd06cf9a26af
+DIST poco-1.4.6p4-all.tar.bz2 3158594 SHA256 e48ce805702048e099eee4965f3db573728e32bd9a15ff643f5ea856926f2dd6 SHA512 ae4e1190a0ba719f807d0abaf1c47ff445a8f5867157f209260672546f3755ff021c7073bc8d5e656be383d5667dc15ad7eae8208728053fb61439c4c80a7fca WHIRLPOOL fd4efd270103dc7ce248481d5e9048a88caf1ece985384fdd2385d381a3d0bc5cad124b6230dbc6ba9679c3ae4ce69dbe77ae5d684798eb2c4a916d373f87e4a
+DIST poco-1.7.6.tar.gz 8044937 SHA256 b9590f10493deb6379452cc926bdf13bdf1fb941ad63c983ffecc140e97ba5c9 SHA512 a02b7ff66acf080942517b3b8644d6e5c7136c5edc6e58fd13083a74b97b5619253fc9db7863284a565226f95410ad4da1fa9738d14885f560aeb03c1f7c18aa WHIRLPOOL d51074280980a7794204a44fd1510bca5dc2ff3fcc83deec3ea324caff485b65489e6ec51d08570b241cabeb0818f17abaea722c2297d9278fa2b8613c73db0d
+EBUILD poco-1.4.6_p4-r1.ebuild 3448 SHA256 7081e3fcc1da16e35d202a0e5fdbe0baa9262869e622b7aa5d6acbd44f84e128 SHA512 4159f14e6c162d1891e3f255fe8b1bf792c33945cd34d29331a55f1cc7c09d9639f27fda2673b6fe7f12ca81a5917a8b43f2aa96a1307525447254fa49fbcdb3 WHIRLPOOL 9faceac5beb3d581b519a53e14cdba0d1f09c204a2ae52b3ae36fd58aa7b30404f45ffb68b3fb0ace5bd77c5c40687108d76db79dc2a68c9a3be3a0f75185392
+EBUILD poco-1.4.6_p4.ebuild 3382 SHA256 7c4893a8888e3bfd5a75b29ce780d9e725b731ebb656370fe05cffce7f6d07f6 SHA512 6953b8c06bebf97566cf97b9821f08f47e60b4a20707fac6ffc271c97fd396dae9d89489d131ff0351016b279a8aee5e8ef7745f8c4decf5305818be0102b9a5 WHIRLPOOL 23dc34cac8e5132f48d6fc1717d424550fd62ec03c05c614eacf43a80a938ae3eac45dc95f1a3f1b74776ac0000f1b83092d9a700b0da2f03db41c2c994552b7
+EBUILD poco-1.7.6.ebuild 3301 SHA256 6ae66b2c9ee34c5592c22d51bcd56aa676734f4fc43091b1b165f3a7781db145 SHA512 7467ab9df1d17b90730e85dc3d49ecbe6770f96482349475415b5bdc0bca0c0150e01aa1d68bc4417c287a3afa2e299a0323870fbe6fc6a1cd0241976dc2c496 WHIRLPOOL 77ef149dd0baee2d690f81c5a3a84e12fa3c10515f63aad4f8d27cbd857705b57dee0fcead31222dced69f483561a9851bff609672bd05bec4688833962234ca
+MISC ChangeLog 3596 SHA256 7ae74d6271760de6346160d263f155b3bc35fb0f522b28b5c2bae45da85ef28f SHA512 fc9e983f7fdb6166d129f2a42954848c8c7647fa9002d90a88bb1b99a7455e87b151a2627f8d78652bfbf39084b48047f9a8d21a0a699ced2817ed3a561ab456 WHIRLPOOL d7ec06066abadc7e8340c7f289a7cb6c2070b62d88a2e1621866b73e6e3351075e3c4d429453bd0c0fb7b3a53b6097c9ad71b5facf98b732acdaf0c9be16ffe2
+MISC ChangeLog-2015 5664 SHA256 039b891407f996f630fd1b9c467d9c968196ab087422abb2484b9c0f2df98a7b SHA512 916a672ee7613ab38f3633e9bbab35d55fab7baadd17ed8d5f221b8a9efb35bde9d7cd5f3921174ce2a9ed89d5424884a3e17b34e980f11572b35d41b0767248 WHIRLPOOL 24c1983f276d8c272bf5b592b76aaaee681901c5fccbfad45edb25fd26cdc964ab54907499cbdb82ee8712f439ec3edd2f43f518048a71a487dc9cb751b6f3c7
+MISC metadata.xml 2516 SHA256 711b2762e2767815b6be7671484f869a196e1c1656765473e5e497de71623bd1 SHA512 a85a369be9cff2d225b6bedeba4a8fbaaf5735b811367ca6c213c56ffde6165f4e4fac9018243308d0a6b15ff416298a76738f35db10528c20571d5e71998a47 WHIRLPOOL c7da6eb33a2b59efd404d227c0aa115b0c1c7efab053fe34e5bae8fd84179ef6853d30ab1b7f9583d8641f70372a167229aee44aa3555617b23d64cdb450247b
diff --git a/dev-libs/poco/files/1.4.6_p4-gentoo.patch b/dev-libs/poco/files/1.4.6_p4-gentoo.patch
new file mode 100644
index 000000000000..8cfc9237db01
--- /dev/null
+++ b/dev-libs/poco/files/1.4.6_p4-gentoo.patch
@@ -0,0 +1,71 @@
+--- components 2012-11-18 16:56:59.000000000 +0100
++++ components 2012-12-06 12:29:07.779546771 +0100
+@@ -1,14 +1,8 @@
+-CppUnit
+ Foundation
+ XML
+ Util
+ Net
+-Crypto
+-NetSSL_OpenSSL
+ Data
+-Data/SQLite
+-Data/ODBC
+-Data/MySQL
+ Zip
+ PageCompiler
+ PageCompiler/File2Page
+--- Data/ODBC/ODBC.make 2014-04-18 13:41:55.000000000 +0200
++++ Data/ODBC/ODBC.make.new 2014-12-29 13:44:03.000000000 +0100
+@@ -14,9 +14,9 @@
+ ifeq (0, $(shell test -d /usr/lib/$(OSARCH)-linux-gnu; echo $$?))
+ ODBCLIBDIR = /usr/lib/$(OSARCH)-linux-gnu
+ else ifeq (0, $(shell test -d /usr/lib64; echo $$?))
+-ODBCLIBDIR = /usr/lib64
++ODBCLIBDIR = /usr/$(LIBDIR)
+ else
+-ODBCLIBDIR = /usr/lib
++ODBCLIBDIR = /usr/$(LIBDIR)
+ endif
+ endif
+
+@@ -35,10 +35,10 @@
+ # -DODBCVER=0x0300: SQLHandle declaration issue
+ # -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
+ CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
+-else ifeq (0, $(shell test -e $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
++else ifeq (unixodbc, $(GENTOO_ODBC))
+ SYSLIBS += -lodbc
+ COMMONFLAGS += -DPOCO_UNIXODBC
+-else ifeq (0, $(shell test -e $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
++else ifeq (unixodbc, $(GENTOO_ODBC))
+ SYSLIBS += -liodbc -liodbcinst
+ COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
+ else
+--- Makefile 2012-11-18 16:57:00.000000000 +0100
++++ Makefile 2012-12-06 12:29:07.779546771 +0100
+@@ -33,7 +33,7 @@
+
+ install: libexecs
+ mkdir -p $(INSTALLDIR)/include/Poco
+- mkdir -p $(INSTALLDIR)/lib
++ mkdir -p $(INSTALLDIR)/$(LIBDIR)
+ mkdir -p $(INSTALLDIR)/bin
+ for comp in $(COMPONENTS) ; do \
+ if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
+@@ -43,11 +43,11 @@
+ find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
+ fi ; \
+ done
+- find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
+- find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
++ find $(POCO_BUILD)/$(LIBDIR) -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/$(LIBDIR) \;
++ find $(POCO_BUILD)/$(LIBDIR) -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/$(LIBDIR) \;
+
+-libexecs = Foundation-libexec XML-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec
+-tests = Foundation-tests XML-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests Zip-tests
++libexecs = Foundation-libexec XML-libexec Util-libexec Net-libexec Data-libexec Zip-libexec PageCompiler-libexec
++tests = Foundation-tests XML-tests Util-tests Net-tests Data-tests Zip-tests
+ samples = Foundation-samples XML-samples Util-samples Net-samples Crypto-samples NetSSL_OpenSSL-samples Data-samples Zip-samples PageCompiler-samples
+
+ .PHONY: $(libexecs)
diff --git a/dev-libs/poco/files/poco-1.4.4-patch-for-libpcre-8.32.patch b/dev-libs/poco/files/poco-1.4.4-patch-for-libpcre-8.32.patch
new file mode 100644
index 000000000000..d2654b59edec
--- /dev/null
+++ b/dev-libs/poco/files/poco-1.4.4-patch-for-libpcre-8.32.patch
@@ -0,0 +1,45 @@
+Index: poco-1.5.0/Foundation/Makefile
+===================================================================
+--- poco-1.5.0.orig/Foundation/Makefile
++++ poco-1.5.0/Foundation/Makefile
+@@ -45,6 +45,7 @@ pcre_utf8_objects = pcre_ucd pcre_tables
+
+ ifdef POCO_UNBUNDLED
+ SYSLIBS += -lpcre -lz
++ objects += $(pcre_utf8_objects) # unicode.cpp uses internal pcre tables
+ else
+ objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)
+ endif
+Index: poco-1.5.0/Foundation/src/pcre_internal.h
+===================================================================
+--- poco-1.5.0.orig/Foundation/src/pcre_internal.h
++++ poco-1.5.0/Foundation/src/pcre_internal.h
+@@ -1109,6 +1109,16 @@ typedef struct {
+ } ucp_type_table;
+
+
++/* renamed to avoid clashes with system pcre */
++#define _pcre_utf8_table1 _poco__pcre_utf8_table1
++#define _pcre_utf8_table1_size _poco__pcre_utf8_table1_size
++#define _pcre_utf8_table2 _poco__pcre_utf8_table2
++#define _pcre_utf8_table3 _poco__pcre_utf8_table3
++#define _pcre_utf8_table4 _poco__pcre_utf8_table4
++#define _pcre_utt _poco__pcre_utt
++#define _pcre_utt_size _poco__pcre_utt_size
++#define _pcre_utt_names _poco__pcre_utt_names
++#define _pcre_OP_lengths _poco__pcre_OP_lengths
+ /* Internal shared data tables. These are tables that are used by more than one
+ of the exported public functions. They have to be "external" in the C sense,
+ but are not part of the PCRE public API. The data for these tables is in the
+@@ -1153,6 +1163,11 @@ typedef struct {
+ pcre_int32 other_case;
+ } ucd_record;
+
++/* renamed to avoid clashes with system pcre */
++#define _pcre_ucd_records _poco__pcre_ucd_records
++#define _pcre_ucd_stage1 _poco__pcre_ucd_stage1
++#define _pcre_ucd_stage2 _poco__pcre_ucd_stage2
++#define _pcre_ucp_gentype _poco__pcre_ucp_gentype
+ extern const ucd_record _pcre_ucd_records[];
+ extern const uschar _pcre_ucd_stage1[];
+ extern const pcre_uint16 _pcre_ucd_stage2[];
diff --git a/dev-libs/poco/files/poco-1.7.2-iodbc-incdir.patch b/dev-libs/poco/files/poco-1.7.2-iodbc-incdir.patch
new file mode 100644
index 000000000000..e41d8f390d9f
--- /dev/null
+++ b/dev-libs/poco/files/poco-1.7.2-iodbc-incdir.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/FindODBC.cmake b/cmake/FindODBC.cmake
+index 9e229ed..5d79c7e 100644
+--- a/cmake/FindODBC.cmake
++++ b/cmake/FindODBC.cmake
+@@ -16,7 +16,7 @@
+ find_path(ODBC_INCLUDE_DIRECTORIES
+ NAMES sql.h
+ HINTS
+- /usr/include
++ /usr/include/iodbc
+ /usr/include/odbc
+ /usr/local/include
+ /usr/local/include/odbc
diff --git a/dev-libs/poco/metadata.xml b/dev-libs/poco/metadata.xml
new file mode 100644
index 000000000000..e115e946586f
--- /dev/null
+++ b/dev-libs/poco/metadata.xml
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tommy@gentoo.org</email>
+ <name>Thomas Sachau (Tommy[D])</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+ </maintainer>
+ <longdescription>
+POCO, the C++ Portable Components, is a collection of open source
+C++ class libraries that simplify and accelerate the development of
+network-centric, portable applications in C++. The libraries integrate
+perfectly with the C++ Standard Library and fill many of the functional
+gaps left open by it. Their modular and efficient design and implementation
+makes the C++ Portable Components extremely well suited for embedded
+development, an area where the C++ programming language is becoming
+increasingly popular, due to its suitability for both low-level (device
+I/O, interrupt handlers, etc.) and high-level object-oriented development.
+Of course, POCO is also ready for enterprise-level challenges.
+
+The POCO libraries free developers from re-inventing the wheel, and allow
+them to spend their time on more worthwhile areas, such as getting things
+done quickly and working on the features that make their application unique.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">poco</remote-id>
+ <remote-id type="github">pocoproject/poco</remote-id>
+ </upstream>
+ <use>
+ <flag name="7z">Add Support for the 7z archive format</flag>
+ <flag name="apache">Enable support to write Apache modules using POCO</flag>
+ <flag name="cppparser">Build and install a minimal C++ parser</flag>
+ <flag name="crypto">Encryption and digital signing classes</flag>
+ <flag name="data">Database abstraction layer to easily send/retrieve data to/from various databases</flag>
+ <flag name="file2pagecompiler">Utility to convert ordinary files to Page Compiler source files</flag>
+ <flag name="json">Add JSON support</flag>
+ <flag name="mongodb">Add <pkg>dev-db/mongodb</pkg> support</flag>
+ <flag name="net">Classes to write network clients &amp; servers</flag>
+ <flag name="pagecompiler">Simple compiler translating HTML pages containing embedded C++ code into HTTPRequestHandler classes</flag>
+ <flag name="pocodoc">POCO documentation generator</flag>
+ <flag name="util">Several utility classes (like logger, timer, config file parser)</flag>
+ <flag name="zip">Add support for the zip &amp; gz archive formats</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-libs/poco/poco-1.4.6_p4-r1.ebuild b/dev-libs/poco/poco-1.4.6_p4-r1.ebuild
new file mode 100644
index 000000000000..77806a182593
--- /dev/null
+++ b/dev-libs/poco/poco-1.4.6_p4-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib versionator
+
+MY_P="${P/_}"
+MY_DOCP="${PN}-$(get_version_component_range 1-3)-all-doc"
+
+DESCRIPTION="C++ libraries for building network-based applications"
+HOMEPAGE="http://pocoproject.org/"
+SRC_URI="http://pocoproject.org/releases/poco-$(get_version_component_range 1-3)/${MY_P}-all.tar.bz2
+ doc? ( mirror://sourceforge/poco/${MY_DOCP}.zip )"
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc examples iodbc libressl mysql odbc sqlite ssl test"
+
+DEPEND=">=dev-libs/libpcre-8.13
+ dev-libs/expat
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ odbc? ( iodbc? ( dev-db/libiodbc )
+ !iodbc? ( dev-db/unixODBC ) )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ sqlite? ( dev-db/sqlite:3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}-all"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/poco-1.4.4-patch-for-libpcre-8.32.patch
+}
+
+src_configure() {
+ targets="libexecs"
+ odbc="unixodbc"
+
+ if use ssl; then
+ targets="${targets} NetSSL_OpenSSL-libexec Crypto-libexec"
+ echo NetSSL_OpenSSL >> components
+ echo Crypto >> components
+ fi
+ if use odbc; then
+ targets="${targets} Data/ODBC-libexec"
+ echo Data/ODBC >> components
+ if use iodbc; then
+ append-flags "-I/usr/include/iodbc"
+ odbc="iodbc"
+ fi
+ fi
+ if use sqlite; then
+ targets="${targets} Data/SQLite-libexec"
+ echo Data/SQLite >> components
+ fi
+ if use mysql; then
+ targets="${targets} Data/MySQL-libexec"
+ echo Data/MySQL >> components
+ fi
+
+ if use test; then
+ targets="${targets} cppunit tests"
+ echo CppUnit >> components
+ use ssl && targets="${targets} NetSSL_OpenSSL-tests Crypto-tests"
+ use odbc && targets="${targets} Data/ODBC-tests"
+ use sqlite && targets="${targets} Data/SQLite-tests"
+ use mysql && targets="${targets} Data/MySQL-tests"
+ fi
+
+ local myconf
+ use test || myconf="--no-tests"
+ # not autoconf
+ ./configure \
+ --no-samples ${myconf} \
+ --prefix=/usr \
+ --unbundled \
+ || die "configure failed"
+
+ sed -i \
+ -e 's|-O2||g' \
+ -e "s|CC = .*|CC = $(tc-getCC)|" \
+ -e "s|CXX = .*|CXX = $(tc-getCXX)|" \
+ -e "s|RANLIB = .*|RANLIB = $(tc-getRANLIB)|" \
+ -e "s|LIB = ar|LIB = $(tc-getAR)|" \
+ -e "s|STRIP = .*|STRIP = /bin/true|" \
+ -e "s|CFLAGS = |CFLAGS = ${CFLAGS}|" \
+ -e "s|CXXFLAGS = |CXXFLAGS = ${CXXFLAGS} |" \
+ -e "s|LINKFLAGS =|LINKFLAGS = ${LDFLAGS} |" \
+ -e "s|SHAREDOPT_LINK = -Wl,-rpath,\$(LIBPATH)|SHAREDOPT_LINK =|" \
+ build/config/Linux build/config/FreeBSD || die "sed failed"
+ sed -i -e "s|SHLIBFLAGS)|SHLIBFLAGS) ${LDFLAGS}|" build/rules/lib || die
+}
+
+src_compile() {
+ emake POCO_PREFIX=/usr GENTOO_ODBC="${odbc}" LIBDIR="$(get_libdir)" ${targets} || die "emake failed"
+}
+
+src_install() {
+ emake POCO_PREFIX=/usr LIBDIR="$(get_libdir)" DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGELOG CONTRIBUTORS NEWS README
+
+ use doc && dohtml -r "${WORKDIR}/${MY_DOCP}"/*
+
+ if use examples ; then
+ for d in Net XML Data Util NetSSL_OpenSSL Foundation ; do
+ insinto /usr/share/doc/${PF}/examples/${d}
+ doins -r ${d}/samples
+ done
+ find "${D}/usr/share/doc/${PF}/examples" \
+ -iname "*.sln" -or -iname "*.vcproj" -or \
+ -iname "*.vmsbuild" -or -iname "*.properties" \
+ | xargs rm
+ fi
+}
diff --git a/dev-libs/poco/poco-1.4.6_p4.ebuild b/dev-libs/poco/poco-1.4.6_p4.ebuild
new file mode 100644
index 000000000000..a84174e298be
--- /dev/null
+++ b/dev-libs/poco/poco-1.4.6_p4.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib versionator
+
+MY_P="${P/_}"
+MY_DOCP="${PN}-$(get_version_component_range 1-3)-all-doc"
+
+DESCRIPTION="C++ libraries for building network-based applications"
+HOMEPAGE="http://pocoproject.org/"
+SRC_URI="http://pocoproject.org/releases/poco-$(get_version_component_range 1-3)/${MY_P}-all.tar.bz2
+ doc? ( mirror://sourceforge/poco/${MY_DOCP}.zip )"
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="doc examples iodbc mysql odbc sqlite ssl test"
+
+DEPEND=">=dev-libs/libpcre-8.13
+ dev-libs/expat
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ odbc? ( iodbc? ( dev-db/libiodbc )
+ !iodbc? ( dev-db/unixODBC ) )
+ ssl? ( dev-libs/openssl )
+ sqlite? ( dev-db/sqlite:3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}-all"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/poco-1.4.4-patch-for-libpcre-8.32.patch
+}
+
+src_configure() {
+ targets="libexecs"
+ odbc="unixodbc"
+
+ if use ssl; then
+ targets="${targets} NetSSL_OpenSSL-libexec Crypto-libexec"
+ echo NetSSL_OpenSSL >> components
+ echo Crypto >> components
+ fi
+ if use odbc; then
+ targets="${targets} Data/ODBC-libexec"
+ echo Data/ODBC >> components
+ if use iodbc; then
+ append-flags "-I/usr/include/iodbc"
+ odbc="iodbc"
+ fi
+ fi
+ if use sqlite; then
+ targets="${targets} Data/SQLite-libexec"
+ echo Data/SQLite >> components
+ fi
+ if use mysql; then
+ targets="${targets} Data/MySQL-libexec"
+ echo Data/MySQL >> components
+ fi
+
+ if use test; then
+ targets="${targets} cppunit tests"
+ echo CppUnit >> components
+ use ssl && targets="${targets} NetSSL_OpenSSL-tests Crypto-tests"
+ use odbc && targets="${targets} Data/ODBC-tests"
+ use sqlite && targets="${targets} Data/SQLite-tests"
+ use mysql && targets="${targets} Data/MySQL-tests"
+ fi
+
+ local myconf
+ use test || myconf="--no-tests"
+ # not autoconf
+ ./configure \
+ --no-samples ${myconf} \
+ --prefix=/usr \
+ --unbundled \
+ || die "configure failed"
+
+ sed -i \
+ -e 's|-O2||g' \
+ -e "s|CC = .*|CC = $(tc-getCC)|" \
+ -e "s|CXX = .*|CXX = $(tc-getCXX)|" \
+ -e "s|RANLIB = .*|RANLIB = $(tc-getRANLIB)|" \
+ -e "s|LIB = ar|LIB = $(tc-getAR)|" \
+ -e "s|STRIP = .*|STRIP = /bin/true|" \
+ -e "s|CFLAGS = |CFLAGS = ${CFLAGS}|" \
+ -e "s|CXXFLAGS = |CXXFLAGS = ${CXXFLAGS} |" \
+ -e "s|LINKFLAGS =|LINKFLAGS = ${LDFLAGS} |" \
+ -e "s|SHAREDOPT_LINK = -Wl,-rpath,\$(LIBPATH)|SHAREDOPT_LINK =|" \
+ build/config/Linux build/config/FreeBSD || die "sed failed"
+ sed -i -e "s|SHLIBFLAGS)|SHLIBFLAGS) ${LDFLAGS}|" build/rules/lib || die
+}
+
+src_compile() {
+ emake POCO_PREFIX=/usr GENTOO_ODBC="${odbc}" LIBDIR="$(get_libdir)" ${targets} || die "emake failed"
+}
+
+src_install() {
+ emake POCO_PREFIX=/usr LIBDIR="$(get_libdir)" DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc CHANGELOG CONTRIBUTORS NEWS README
+
+ use doc && dohtml -r "${WORKDIR}/${MY_DOCP}"/*
+
+ if use examples ; then
+ for d in Net XML Data Util NetSSL_OpenSSL Foundation ; do
+ insinto /usr/share/doc/${PF}/examples/${d}
+ doins -r ${d}/samples
+ done
+ find "${D}/usr/share/doc/${PF}/examples" \
+ -iname "*.sln" -or -iname "*.vcproj" -or \
+ -iname "*.vmsbuild" -or -iname "*.properties" \
+ | xargs rm
+ fi
+}
diff --git a/dev-libs/poco/poco-1.7.6.ebuild b/dev-libs/poco/poco-1.7.6.ebuild
new file mode 100644
index 000000000000..cd5a524f2790
--- /dev/null
+++ b/dev-libs/poco/poco-1.7.6.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="C++ libraries for building network-based applications"
+HOMEPAGE="http://pocoproject.org/"
+SRC_URI="https://github.com/pocoproject/${PN}/archive/${P}-release.tar.gz -> ${P}.tar.gz"
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="7z apache cppparser +crypto +data examples +file2pagecompiler +json +pagecompiler iodbc libressl +mongodb mysql +net odbc pdf pocodoc sqlite +ssl test +util +xml +zip"
+REQUIRED_USE="7z? ( xml )
+ apache? ( net util )
+ file2pagecompiler? ( pagecompiler )
+ iodbc? ( odbc )
+ mongodb? ( data )
+ mysql? ( data )
+ odbc? ( data )
+ pagecompiler? ( json net util xml )
+ pocodoc? ( cppparser util xml )
+ sqlite? ( data )
+ test? ( data? ( sqlite ) json util xml )"
+
+RDEPEND=">=dev-libs/libpcre-8.13
+ xml? ( dev-libs/expat )
+ apache? ( dev-libs/apr
+ dev-libs/apr-util
+ www-servers/apache )
+ mysql? ( virtual/mysql )
+ odbc? ( iodbc? ( dev-db/libiodbc )
+ !iodbc? ( dev-db/unixODBC ) )
+ ssl? (
+ !libressl? ( <dev-libs/openssl-1.1.0:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ sqlite? ( dev-db/sqlite:3 )
+ zip? ( sys-libs/zlib )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}-release"
+
+PATCHES=( "${FILESDIR}/${PN}-1.7.2-iodbc-incdir.patch" )
+
+src_prepare() {
+ if use test ; then
+ # ignore missing tests on experimental library
+ # and tests requiring running DB-servers, internet connections, etc.
+ sed -i \
+ -e '/testsuite/d' \
+ {Data/{MySQL,ODBC},MongoDB,Net,NetSSL_OpenSSL,PDF}/CMakeLists.txt || die
+ # Poco expands ~ using passwd, which does not match $HOME in the build environment
+ sed -i \
+ -e '/CppUnit_addTest.*testExpand/d' \
+ Foundation/testsuite/src/PathTest.cpp || die
+ # ignore failing Crypto test since upstream does not seem to care,
+ # see https://github.com/pocoproject/poco/issues/1209
+ sed -i \
+ -e '/RSATest, testRSACipherLarge/d' \
+ Crypto/testsuite/src/RSATest.cpp || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DPOCO_UNBUNDLED=ON
+ -DENABLE_APACHECONNECTOR="$(usex apache)"
+ -DENABLE_CPPPARSER="$(usex cppparser)"
+ -DENABLE_CRYPTO="$(usex ssl)"
+ -DENABLE_DATA="$(usex data)"
+ -DENABLE_DATA_MYSQL="$(usex mysql)"
+ -DENABLE_DATA_ODBC="$(usex odbc)"
+ -DENABLE_DATA_SQLITE="$(usex sqlite)"
+ -DENABLE_JSON="$(usex util)"
+ -DENABLE_MONGODB="$(usex mongodb)"
+ -DENABLE_NET="$(usex net)"
+ -DENABLE_NETSSL="$(usex ssl)"
+ -DENABLE_NETSSL_WIN=OFF
+ -DENABLE_PAGECOMPILER="$(usex pagecompiler)"
+ -DENABLE_PAGECOMPILER_FILE2PAGE="$(usex file2pagecompiler)"
+ -DENABLE_PDF="$(usex pdf)"
+ -DENABLE_POCODOC="$(usex pocodoc)"
+ -DENABLE_SEVENZIP="$(usex 7z)"
+ -DENABLE_TESTS="$(usex test)"
+ -DENABLE_UTIL="$(usex util)"
+ -DENABLE_XML="$(usex xml)"
+ -DENABLE_ZIP="$(usex zip)"
+ )
+
+ if ! use iodbc ; then
+ sed -i -e 's|iodbc||' cmake/FindODBC.cmake || die
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ for sd in */samples ; do
+ insinto /usr/share/doc/${PF}/examples/${sd%/samples}
+ doins -r ${sd}
+ done
+ find "${D}/usr/share/doc/${PF}/examples" \
+ -iname "*.sln" -or -iname "*.vcproj" -or \
+ -iname "*.vmsbuild" -or -iname "*.properties" \
+ | xargs rm
+ fi
+}