summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2019-02-09 22:00:27 -0500
committerBrian Evans <grknight@gentoo.org>2019-02-09 22:00:27 -0500
commitec8daf15e08a001221b6cebc7c905c6b7bdb0e75 (patch)
treef64e6101574a305f4467cfe0a293d262ed368f8c
parentsys-boot/grub: Cleanup metadata.xml (diff)
downloadgentoo-ec8daf15.tar.gz
gentoo-ec8daf15.tar.bz2
gentoo-ec8daf15.zip
dev-libs/poco: Revbump to fix MySQL dependencies and detection
Bug: https://bugs.gentoo.org/665880 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r--dev-libs/poco/metadata.xml1
-rw-r--r--dev-libs/poco/poco-1.7.6-r1.ebuild119
-rw-r--r--dev-libs/poco/poco-1.9.0-r1.ebuild128
3 files changed, 248 insertions, 0 deletions
diff --git a/dev-libs/poco/metadata.xml b/dev-libs/poco/metadata.xml
index a2b0f1f2ac3f..f7a05b32b68d 100644
--- a/dev-libs/poco/metadata.xml
+++ b/dev-libs/poco/metadata.xml
@@ -33,6 +33,7 @@ done quickly and working on the features that make their application unique.
<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="mariadb">Prefer <pkg>dev-db/mariadb-connector-c</pkg> over <pkg>dev-db/mysql-connector-c</pkg></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>
diff --git a/dev-libs/poco/poco-1.7.6-r1.ebuild b/dev-libs/poco/poco-1.7.6-r1.ebuild
new file mode 100644
index 000000000000..0f6dc7386860
--- /dev/null
+++ b/dev-libs/poco/poco-1.7.6-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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="https://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? ( dev-db/mysql-connector-c:0= )
+ 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
+
+ # Fix MySQL detection
+ sed -i -e 's/mysqlclient_r/mysqlclient/' \
+ -e 's/STATUS "Couldn/FATAL_ERROR "Couldn/' \
+ cmake/FindMySQL.cmake || die
+ 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
+}
diff --git a/dev-libs/poco/poco-1.9.0-r1.ebuild b/dev-libs/poco/poco-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..a00decb0b061
--- /dev/null
+++ b/dev-libs/poco/poco-1.9.0-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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="https://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 mariadb +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? ( !mariadb? ( dev-db/mysql-connector-c:0= )
+ mariadb? ( dev-db/mariadb-connector-c:0= ) )
+ 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
+
+ if use mariadb ; then
+ # Fix MariaDB detection
+ sed -i -e 's~/usr/include/mysql~~' \
+ -e 's/STATUS "Couldn/FATAL_ERROR "Couldn/' \
+ cmake/FindMySQL.cmake || die
+ else
+ # Fix MySQL detection
+ sed -i -e 's/mysqlclient_r/mysqlclient/' \
+ -e 's/STATUS "Couldn/FATAL_ERROR "Couldn/' \
+ cmake/FindMySQL.cmake || 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
+}