From 41509daa139cc19bd8d5753057444be9a2536e92 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sun, 5 Feb 2017 21:02:42 +0200 Subject: dev-libs/cryptlib: fixups Remove cflags translations based on upstream recommendation we should interact with upstream if there are issues. Remove the test patch as it was not helpful, tests were accessing network anyway. Added restrict tests. Add static-libs USE for pleasure Package-Manager: portage-2.3.3 --- dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild | 122 --------------------- dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild | 113 +++++++++++++++++++ .../cryptlib/files/cryptlib-3.4.3.1-tests.patch | 52 --------- 3 files changed, 113 insertions(+), 174 deletions(-) delete mode 100644 dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild create mode 100644 dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild delete mode 100644 dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch (limited to 'dev-libs') diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild b/dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild deleted file mode 100644 index d63a9590a4ed..000000000000 --- a/dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -PYTHON_COMPAT=( python2_7 pypy ) -DISTUTILS_OPTIONAL=1 - -inherit distutils-r1 eutils flag-o-matic multilib toolchain-funcs versionator - -MY_PV="${PV//.}" - -DESCRIPTION="Powerful security toolkit for adding encryption to software" -HOMEPAGE="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/" -DOC_PREFIX="${PN}-$(get_version_component_range 1-2 ${PV}).0" -SRC_URI="ftp://ftp.franken.de/pub/crypt/cryptlib/cl${MY_PV}.zip - doc? ( mirror://gentoo/${DOC_PREFIX}-manual.pdf.bz2 )" - -LICENSE="Sleepycat" -KEYWORDS="~amd64 ~x86" -SLOT="0" -IUSE="doc ldap odbc python test" - -S="${WORKDIR}" - -RDEPEND="sys-libs/zlib - ldap? ( net-nds/openldap ) - odbc? ( dev-db/unixODBC ) - python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - app-arch/unzip" - -PATCHES=( - "${FILESDIR}/${P}-build.patch" - "${FILESDIR}/${P}-zlib.patch" - "${FILESDIR}/${P}-tests.patch" -) - -src_unpack() { - # we need the -a option, so we can not use 'unpack' - unzip -qoa "${DISTDIR}/cl${MY_PV}.zip" || die - use doc && unpack "${DOC_PREFIX}-manual.pdf.bz2" -} - -wrap_python() { - if use python; then - cd bindings || die - distutils-r1_${1} - fi -} - -src_prepare() { - default - - rm -fr zlib || die - - # we want our own CFLAGS ;-) - sed -i -e "s:-m.*=pentium::g" -e "s:-fomit-frame-pointer::g" -e "s:-O2::g" \ - -e "s:-O3::g" -e "s:-O4::g" makefile || die "sed makefile failed" - sed -i -e "s/-march=[[:alnum:]\.=-]*//g" -e "s/-mcpu=[[:alnum:]\.=-]*//g" \ - -e "s:-O2::g" -e "s:-O3::g" tools/ccopts.sh || die "sed tools/ccopts.sh failed" - - # change 'make' to '$(MAKE)' - sed -i -e "s:@\?make:\$(MAKE):g" makefile || die "sed makefile failed" - - wrap_python ${FUNCNAME} -} - -src_compile() { - # At least -O2 is needed. - replace-flags -O -O2 - replace-flags -O0 -O2 - replace-flags -O1 -O2 - replace-flags -Os -O2 - is-flagq -O* || append-flags -O2 - - use ldap && append-cppflags -DHAS_LDAP - use odbc && append-cppflags -DHAS_ODBC - - export DISABLE_AUTODETECT=1 - emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" default - emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" shared - use test && emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" stestlib - - # - # Without this: - # 1. python will link against the static lib - # 2. tests will not work find soname. - # - local libname="libcl.so.$(get_version_component_range 1-3 ${PV})" - local solibname="libcl.so.$(get_version_component_range 1-2 ${PV})" - ln -s "${libname}" "${solibname}" || die - ln -s "${solibname}" libcl.so || die - - if use python; then - - # Python bindings don't work with -O2 and higher. - replace-flags -O* -O1 - - wrap_python ${FUNCNAME} - fi -} - -src_test() { - LD_LIBRARY_PATH="." ./stestlib || die "test failed" -} - -src_install() { - einstalldocs - - doheader cryptlib.h - - dolib.so libcl.so* - dolib.a libcl.a - - if use doc; then - newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf" - fi - - wrap_python ${FUNCNAME} -} diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild b/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild new file mode 100644 index 000000000000..b9161e529325 --- /dev/null +++ b/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 pypy ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 eutils flag-o-matic multilib toolchain-funcs versionator + +MY_PV="${PV//.}" + +DESCRIPTION="Powerful security toolkit for adding encryption to software" +HOMEPAGE="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/" +DOC_PREFIX="${PN}-$(get_version_component_range 1-2 ${PV}).0" +SRC_URI="ftp://ftp.franken.de/pub/crypt/cryptlib/cl${MY_PV}.zip + doc? ( mirror://gentoo/${DOC_PREFIX}-manual.pdf.bz2 )" + +LICENSE="Sleepycat" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="doc ldap odbc python static-libs test" + +S="${WORKDIR}" + +RDEPEND="sys-libs/zlib + ldap? ( net-nds/openldap ) + odbc? ( dev-db/unixODBC ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + app-arch/unzip" + +PATCHES=( + "${FILESDIR}/${P}-build.patch" + "${FILESDIR}/${P}-zlib.patch" +) + +# test access the network +RESTRICT="test" + +src_unpack() { + # we need the -a option, so we can not use 'unpack' + unzip -qoa "${DISTDIR}/cl${MY_PV}.zip" || die + use doc && unpack "${DOC_PREFIX}-manual.pdf.bz2" +} + +wrap_python() { + if use python; then + cd bindings || die + distutils-r1_${1} + fi +} + +src_prepare() { + default + + rm -fr zlib || die + + # we want our own CFLAGS ;-) + sed -i -e "s:-m.*=pentium::g" -e "s:-fomit-frame-pointer::g" -e "s:-O2::g" \ + -e "s:-O3::g" -e "s:-O4::g" makefile || die "sed makefile failed" + sed -i -e "s/-march=[[:alnum:]\.=-]*//g" -e "s/-mcpu=[[:alnum:]\.=-]*//g" \ + -e "s:-O2::g" -e "s:-O3::g" tools/ccopts.sh || die "sed tools/ccopts.sh failed" + + # change 'make' to '$(MAKE)' + sed -i -e "s:@\?make:\$(MAKE):g" makefile || die "sed makefile failed" + + wrap_python ${FUNCNAME} +} + +src_compile() { + use ldap && append-cppflags -DHAS_LDAP + use odbc && append-cppflags -DHAS_ODBC + + export DISABLE_AUTODETECT=1 + emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" shared + use static-libs && emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" default + use test && emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" stestlib + + # + # Without this: + # 1. python will link against the static lib + # 2. tests will not work find soname. + # + local libname="libcl.so.$(get_version_component_range 1-3 ${PV})" + local solibname="libcl.so.$(get_version_component_range 1-2 ${PV})" + ln -s "${libname}" "${solibname}" || die + ln -s "${solibname}" libcl.so || die + + if use python; then + wrap_python ${FUNCNAME} + fi +} + +src_test() { + LD_LIBRARY_PATH="." ./stestlib || die "test failed" +} + +src_install() { + einstalldocs + + doheader cryptlib.h + + dolib.so libcl.so* + use static-libs && dolib.a libcl.a + + if use doc; then + newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf" + fi + + wrap_python ${FUNCNAME} +} diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch deleted file mode 100644 index f18bc96be108..000000000000 --- a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c25dad21f5b1db106e4fe42f38a0dac6290b8a41 Mon Sep 17 00:00:00 2001 -From: Alon Bar-Lev -Date: Sat, 4 Feb 2017 05:48:54 +0200 -Subject: [PATCH] tests: disable online tests - -Signed-off-by: Alon Bar-Lev ---- - test/testfunc.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/test/testfunc.c b/test/testfunc.c -index 79d7148..017a4a8 100644 ---- a/test/testfunc.c -+++ b/test/testfunc.c -@@ -1119,6 +1119,7 @@ BOOLEAN testSessions( void ) - } - if( !testSessionAttributes() ) - return( FALSE ); -+#if 0 - if( !testSessionSSH() ) - return( FALSE ); - if( !testSessionSSHPubkeyAuth() ) -@@ -1127,6 +1128,7 @@ BOOLEAN testSessions( void ) - return( FALSE ); - if( !testSessionSSHExec() ) - return( FALSE ); -+#endif - if( !testSessionSSL() ) - return( FALSE ); - if( !testSessionSSLLocalSocket() ) -@@ -1147,14 +1149,18 @@ BOOLEAN testSessions( void ) - if( !testSessionTLS12ClientCert() ) - return( FALSE ); - #endif /* 0 */ -+#if 0 - if( !testSessionOCSP() ) - return( FALSE ); -+#endif -+#if 0 - if( !testSessionTSP() ) - return( FALSE ); - if( !testSessionEnvTSP() ) - return( FALSE ); - if( !testSessionCMP() ) - return( FALSE ); -+#endif - - return( TRUE ); - } --- -2.10.2 - -- cgit v1.2.3-65-gdbad