* [gentoo-commits] repo/gentoo:master commit in: dev-libs/cryptlib/files/, dev-libs/cryptlib/
@ 2017-02-04 9:33 Alon Bar-Lev
0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2017-02-04 9:33 UTC (permalink / raw
To: gentoo-commits
commit: e935143d704b71f9d82afb9aa4677aabeb44b66a
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 4 04:37:07 2017 +0000
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Feb 4 09:33:30 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e935143d
dev-libs/cryptlib: cleanups
Package-Manager: portage-2.3.3
...b-3.4.3.1.ebuild => cryptlib-3.4.3.1-r1.ebuild} | 61 +++++-------
.../cryptlib/files/cryptlib-3.4.3.1-build.patch | 104 +++++++++++++++++++++
.../cryptlib/files/cryptlib-3.4.3.1-tests.patch | 52 +++++++++++
3 files changed, 179 insertions(+), 38 deletions(-)
diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.1.ebuild b/dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild
similarity index 64%
rename from dev-libs/cryptlib/cryptlib-3.4.3.1.ebuild
rename to dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild
index de6d98c..d63a959 100644
--- a/dev-libs/cryptlib/cryptlib-3.4.3.1.ebuild
+++ b/dev-libs/cryptlib/cryptlib-3.4.3.1-r1.ebuild
@@ -20,7 +20,7 @@ SRC_URI="ftp://ftp.franken.de/pub/crypt/cryptlib/cl${MY_PV}.zip
LICENSE="Sleepycat"
KEYWORDS="~amd64 ~x86"
SLOT="0"
-IUSE="doc ldap odbc python"
+IUSE="doc ldap odbc python test"
S="${WORKDIR}"
@@ -34,6 +34,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${P}-build.patch"
"${FILESDIR}/${P}-zlib.patch"
+ "${FILESDIR}/${P}-tests.patch"
)
src_unpack() {
@@ -63,20 +64,10 @@ src_prepare() {
# change 'make' to '$(MAKE)'
sed -i -e "s:@\?make:\$(MAKE):g" makefile || die "sed makefile failed"
- # NOTICE:
- # Because of stack execution
- # assembly parts are disabled.
- sed -i -e 's:i\[3,4,5,6\]86:___:g' makefile || die "sed makefile failed"
-
- # Fix version number of shared library.
- sed -i -e 's/PLV="2"/PLV="3"/' tools/buildall.sh || die "sed tools/buildall.sh failed"
-
wrap_python ${FUNCNAME}
}
src_compile() {
- local libname="libcl.so.$(get_version_component_range 1-3 ${PV})"
-
# At least -O2 is needed.
replace-flags -O -O2
replace-flags -O0 -O2
@@ -84,31 +75,25 @@ src_compile() {
replace-flags -Os -O2
is-flagq -O* || append-flags -O2
- append-flags "-fPIC"
- append-cppflags "-D__UNIX__ -DOSVERSION=2 -DNDEBUG -I."
-
- if [ -f /usr/include/pthread.h -a \
- `grep -c PTHREAD_MUTEX_RECURSIVE /usr/include/pthread.h` -ge 0 ] ; then
- append-cppflags "-DHAS_RECURSIVE_MUTEX"
- fi
- if [ -f /usr/include/pthread.h -a \
- `grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h` -ge 0 ] ; then
- append-cppflags "-DHAS_ROBUST_MUTEX"
- fi
-
use ldap && append-cppflags -DHAS_LDAP
use odbc && append-cppflags -DHAS_ODBC
- emake directories
- emake toolscripts
- emake CC="$(tc-getCC)" CFLAGS="${CPPFLAGS} ${CFLAGS} -c" STRIP=true Linux
+ export DISABLE_AUTODETECT=1
+ emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" default
+ emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" shared
+ use test && emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" stestlib
- emake TARGET=${libname} OBJPATH="./shared-obj/" CC="$(tc-getCC)" \
- CFLAGS="${CPPFLAGS} ${CFLAGS} -c" STRIP=true Linux
+ #
+ # 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
- # Without this python will link against the static lib
- ln -s libcl.so.${PV} libcl.so || die
# Python bindings don't work with -O2 and higher.
replace-flags -O* -O1
@@ -117,18 +102,18 @@ src_compile() {
fi
}
-src_install() {
- local libname="libcl.so.$(get_version_component_range 1-3 ${PV})"
- local solibname="libcl.so.$(get_version_component_range 1-2 ${PV})"
+src_test() {
+ LD_LIBRARY_PATH="." ./stestlib || die "test failed"
+}
- dolib.so "${libname}"
- dosym "${libname}" "/usr/$(get_libdir)/${solibname}"
- dosym "${solibname}" "/usr/$(get_libdir)/libcl.so"
- dolib.a "libcl.a"
+src_install() {
+ einstalldocs
doheader cryptlib.h
- dodoc README
+ dolib.so libcl.so*
+ dolib.a libcl.a
+
if use doc; then
newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf"
fi
diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
index 3a0e558..6fbbe0a 100644
--- a/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-build.patch
@@ -24,3 +24,107 @@ index 9a23592..c90dbc1 100644
--
2.10.2
+From 188dce32ea9c58271c8ce48ab02a3b255498bf9f Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 05:08:47 +0200
+Subject: [PATCH] build: allow specify additional CFLAGS
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index cb9884c..827a78a 100644
+--- a/makefile
++++ b/makefile
+@@ -90,7 +90,7 @@ DYLIBNAME = lib$(PROJ).$(MAJ).$(MIN).dylib
+ # Further cc flags are gathered dynamically at runtime via the ccopts.sh
+ # script.
+
+-CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
++CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(EXTRA_CFLAGS)
+ CFLAGS_ANALYSE = -c -D__UNIX__ -I.
+ CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 --coverage -fprofile-arcs -ftest-coverage
+ CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
+--
+2.10.2
+
+From 3a084f090f12ebc65cef7b14aeaa28257dacaaaa Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 06:19:51 +0200
+Subject: [PATCH] build: ccopts: detect mutex using pre-processor
+
+this required for proper cross compile detection.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ tools/ccopts.sh | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/tools/ccopts.sh b/tools/ccopts.sh
+index e506c6c..8cc87ff 100644
+--- a/tools/ccopts.sh
++++ b/tools/ccopts.sh
+@@ -324,13 +324,14 @@ fi
+ # tend to be somewhat hit-and-miss but we at least indicate their presence
+ # via a define.
+
+-if [ -f /usr/include/pthread.h ] ; then
+- if [ "$(grep -c PTHREAD_MUTEX_RECURSIVE /usr/include/pthread.h)" -gt 0 ] ; then
+- CCARGS="$CCARGS -DHAS_RECURSIVE_MUTEX" ;
+- fi ;
+- if [ "$(grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h)" -gt 0 ] ; then
+- CCARGS="$CCARGS -DHAS_ROBUST_MUTEX" ;
+- fi ;
++PTHREAD_OUT="$(echo "#include <pthread.h>" | ${CC} -E - 2> /dev/null)"
++if [ $? -eq 0 ]; then
++ if echo "${PTHREAD_OUT}" | grep -q PTHREAD_MUTEX_RECURSIVE; then
++ CCARGS="$CCARGS -DHAS_RECURSIVE_MUTEX"
++ fi
++ if echo "${PTHREAD_OUT}" | grep -q PTHREAD_MUTEX_ROBUST; then
++ CCARGS="$CCARGS -DHAS_ROBUST_MUTEX"
++ fi
+ fi
+
+ # If we're not using gcc, we're done. This isn't as simple as a straight
+--
+2.10.2
+
+From 489a81e89103a7a3c653b9e95e279eefa1514c51 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 06:28:03 +0200
+Subject: [PATCH] build: ccopts: support disable of autodetection
+
+requires for cross-compile and explicit predictable build.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ tools/ccopts.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/ccopts.sh b/tools/ccopts.sh
+index 8cc87ff..296bc80 100644
+--- a/tools/ccopts.sh
++++ b/tools/ccopts.sh
+@@ -150,7 +150,7 @@ case $OSNAME in
+ HASDYNLOAD=1 ;
+ fi ;;
+ esac
+-if [ $HASDYNLOAD -gt 0 ] ; then
++if [ -z $DISABLE_AUTODETECT ] && [ $HASDYNLOAD -gt 0 ] ; then
+ if [ -f /usr/include/sql.h ] ; then
+ echo "ODBC interface detected, enabling ODBC support." >&2 ;
+ CCARGS="$CCARGS -DHAS_ODBC" ;
+@@ -181,7 +181,7 @@ if [ $HASDYNLOAD -gt 0 ] ; then
+ CCARGS="$CCARGS -DNCIPHER_PKCS11" ;
+ fi
+ fi
+-if [ -d /usr/include/event2 ] && [ -f /usr/include/event2/event.h ] ; then
++if [ -z $DISABLE_AUTODETECT ] && [ -d /usr/include/event2 ] && [ -f /usr/include/event2/event.h ] ; then
+ echo " (Enabling use of libevent)." >&2 ;
+ CCARGS="$CCARGS -DHAS_LIBEVENT" ;
+ fi
+--
+2.10.2
+
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
new file mode 100644
index 00000000..f18bc96
--- /dev/null
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.3.1-tests.patch
@@ -0,0 +1,52 @@
+From c25dad21f5b1db106e4fe42f38a0dac6290b8a41 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 05:48:54 +0200
+Subject: [PATCH] tests: disable online tests
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ 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
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/cryptlib/files/, dev-libs/cryptlib/
@ 2017-08-31 18:52 Alon Bar-Lev
0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2017-08-31 18:52 UTC (permalink / raw
To: gentoo-commits
commit: e3ccf22ff4505f2d99a78a187826c490eb7a38dd
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 31 18:52:03 2017 +0000
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Thu Aug 31 18:52:19 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3ccf22f
dev-libs/cryptlib: version bump (beta)
Package-Manager: Portage-2.3.6, Repoman-2.3.1
dev-libs/cryptlib/Manifest | 2 +
dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild | 1 +
....4.3.1-r2.ebuild => cryptlib-3.4.4_beta.ebuild} | 73 ++++++++++++++++------
.../cryptlib/files/cryptlib-3.4.4_beta-build.patch | 25 ++++++++
4 files changed, 83 insertions(+), 18 deletions(-)
diff --git a/dev-libs/cryptlib/Manifest b/dev-libs/cryptlib/Manifest
index c4284aeb356..898863be77a 100644
--- a/dev-libs/cryptlib/Manifest
+++ b/dev-libs/cryptlib/Manifest
@@ -1,2 +1,4 @@
DIST cl3431.zip 5828863 SHA256 4a608d725f66669d983083420f9f57f763f320292c50346de3e8c1caeee743bd SHA512 d6a3403361fe39b855ec85b030989c5dfc54e499260869de0de151ad6f62245020561dd308b86edf6792da9663e19a0c0d21c53aa7434b21e83eb4b7445fd8dc WHIRLPOOL eccc446361f7daa9cf5a017ae7e229b2003f198490b9cae1bed61fd7bd585e9a08ec54c6c035ba2c4f3e8a58d3eb9756a61f608d5a299c8cc66b159a87e95874
+DIST cl344beta.zip 4433862 SHA256 f661e3f26944465fa9492cd17b339710d457da86d85d66e801f14fc4ba617411 SHA512 5144162b101c62e02fdaab20030a2fd3fb3b7a75cdf8a8160a3616f8e23d8f4a8db0eb9b1116d89f8c93e9be348b0458c22f3674e1d6c50f7380e50f60ad2483 WHIRLPOOL cc8f6e7e1ff3641e59ec8ade9034caca11e1b6b0e8801bd5da8b03104aee372d0a8f205f04829a8a6ec5fd0bad1736230b2d24733037a64dd401106e09d43a1f
DIST cryptlib-3.4.0-manual.pdf.bz2 1215921 SHA256 b06b736e6e123f578adcd08a8ede6cdb62e3e6d4ac2decb3570def1b29d44da8 SHA512 dbf9914a110a686dc23fedd23c16cefbae12cc67e378db67ac292f8f782b3b615a5819013f2b9c4861086c7ddfab690db9d68a911346102def323255cf48069b WHIRLPOOL 8cc64ab7ffe8a97714e793dd3dfe36708e7e2c7ec583479c593d767de22b860be5bcf0a70427f6f2e7e1d9732ec4ba2d2b3f1617f97bb649c0298924e4a93fb6
+DIST cryptlib-3.4.4_beta-manual.pdf 3497791 SHA256 0317cde5a4d6967ceaf49471fe911c0238e78a233465d52755404f07ad2873a5 SHA512 3440aa86ac9672dfff302054c3868856d0dbc1a9ada47cfeed3761f7b3dc17cd45950ce24127ef5832803596263fa34bc6bfdd7a7b369f68959b4b93d59a3435 WHIRLPOOL af53cd9328931ea7dfb8f2c65dc7265fe52db70f1e3b1d487bc10228fc8e6a53b18a0947e57e61e68e087c70a593b8799b5dfc7fd3bbf7825661afefd972aca4
diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild b/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild
index 54b2988b4ac..e6c6f90c117 100644
--- a/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild
+++ b/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild
@@ -72,6 +72,7 @@ src_prepare() {
src_compile() {
use ldap && append-cppflags -DHAS_LDAP
use odbc && append-cppflags -DHAS_ODBC
+ append-cppflags -DHAS_ZLIB
export DISABLE_AUTODETECT=1
emake EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" shared
diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
similarity index 61%
copy from dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild
copy to dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
index 54b2988b4ac..7bca33567f3 100644
--- a/dev-libs/cryptlib/cryptlib-3.4.3.1-r2.ebuild
+++ b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
@@ -9,15 +9,16 @@ DISTUTILS_OPTIONAL=1
inherit distutils-r1 flag-o-matic multilib toolchain-funcs versionator
MY_PV="${PV//.}"
+MY_PV="${MY_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 )"
+SRC_URI="http://www.cypherpunks.to/~peter/cl${MY_PV}.zip
+ doc? ( http://www.cypherpunks.to/~peter/manual.pdf -> ${P}-manual.pdf )"
LICENSE="Sleepycat"
-KEYWORDS="amd64 x86"
+KEYWORDS=""
SLOT="0"
IUSE="doc ldap odbc python static-libs test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -33,16 +34,18 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${P}-build.patch"
- "${FILESDIR}/${P}-zlib.patch"
)
+#
# test access the network
+# upstream provides no way to disable these
+# tests
+#
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() {
@@ -52,19 +55,41 @@ wrap_python() {
fi
}
+pkg_setup() {
+ #
+ # Disable upstream detection
+ # Non standard and hardcoded methods
+ #
+ export DISABLE_AUTODETECT=1
+
+ #
+ # Add our own CFLAGS/CPPFLAGS
+ #
+ export EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}"
+}
+
src_prepare() {
default
- rm -fr zlib || die
+ #
+ # Make sure we do not use the embedded zlib
+ #
+ rm -fr zlib || die "remove zlib"
- # we want our own CFLAGS ;-)
- sed -i -e "s:-m.*=pentium::g" -e "s:-fomit-frame-pointer::g" -e "s:-O2::g" \
+ #
+ # Upstream package should not set optimization flags
+ # Or at least allow simple method to disable behavior
+ #
+ sed -i -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"
+ #
+ # Not sure why MAKE = make is required
+ # make sets this to correct value
+ #
+ sed -i -e "/^MAKE/d" makefile || die "sed makefile make failed"
wrap_python ${FUNCNAME}
}
@@ -73,16 +98,25 @@ 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
+ #
+ # Disable internal zlib dependnecies
+ # For some reason this applied also when
+ # System zlib is being used
+ #
+ COMMON_MAKE_OPTS="ZLIBOBJS= CC=$(tc-getCC) AR=$(tc-getAR) STRIP=true"
+ emake ${COMMON_MAKE_OPTS} shared
+ use static-libs && emake ${COMMON_MAKE_OPTS} default
+ use test && emake ${COMMON_MAKE_OPTS} stestlib
#
+ # Symlink the libraries.
+ #
# Without this:
# 1. python will link against the static lib
# 2. tests will not work find soname.
#
+ # Bad upstream behavior
+ #
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
@@ -100,14 +134,17 @@ src_test() {
src_install() {
einstalldocs
+ #
+ # Upstream does not provide
+ # a simple target for install
+ #
doheader cryptlib.h
-
dolib.so libcl.so*
use static-libs && dolib.a libcl.a
+ wrap_python ${FUNCNAME}
+
if use doc; then
- newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf"
+ newdoc "${DISTDIR}/${P}-manual.pdf" "manual.pdf"
fi
-
- wrap_python ${FUNCNAME}
}
diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
new file mode 100644
index 00000000000..1a99287c6f3
--- /dev/null
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
@@ -0,0 +1,25 @@
+From 188dce32ea9c58271c8ce48ab02a3b255498bf9f Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Feb 2017 05:08:47 +0200
+Subject: [PATCH] build: allow specify additional CFLAGS
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index cb9884c..827a78a 100644
+--- a/makefile
++++ b/makefile
+@@ -90,7 +90,7 @@ DYLIBNAME = lib$(PROJ).$(MAJ).$(MIN).dylib
+ # Further cc flags are gathered dynamically at runtime via the ccopts.sh
+ # script.
+
+-CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
++CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(EXTRA_CFLAGS)
+ CFLAGS_ANALYSE = -c -D__UNIX__ -I.
+ CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 --coverage -fprofile-arcs -ftest-coverage
+ CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
+--
+2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/cryptlib/files/, dev-libs/cryptlib/
@ 2017-08-31 19:47 Alon Bar-Lev
0 siblings, 0 replies; 3+ messages in thread
From: Alon Bar-Lev @ 2017-08-31 19:47 UTC (permalink / raw
To: gentoo-commits
commit: 0e6d486dfde2656ece413843ea22db5ad73fd91b
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 31 19:47:03 2017 +0000
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Thu Aug 31 19:47:33 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e6d486d
dev-libs/cryptlib: fixups (beta)
Package-Manager: Portage-2.3.6, Repoman-2.3.1
dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild | 25 +++----
.../cryptlib/files/cryptlib-3.4.4_beta-build.patch | 76 ++++++++++++++++++++--
2 files changed, 81 insertions(+), 20 deletions(-)
diff --git a/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
index 7bca33567f3..cc10e5c17e6 100644
--- a/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
+++ b/dev-libs/cryptlib/cryptlib-3.4.4_beta.ebuild
@@ -66,6 +66,13 @@ pkg_setup() {
# Add our own CFLAGS/CPPFLAGS
#
export EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}"
+
+ #
+ # Disable internal zlib dependnecies
+ # For some reason this applied also when
+ # System zlib is being used
+ #
+ COMMON_MAKE_OPTS="ZLIBOBJS= CC=$(tc-getCC) AR=$(tc-getAR) STRIP=true"
}
src_prepare() {
@@ -98,12 +105,6 @@ src_compile() {
use ldap && append-cppflags -DHAS_LDAP
use odbc && append-cppflags -DHAS_ODBC
- #
- # Disable internal zlib dependnecies
- # For some reason this applied also when
- # System zlib is being used
- #
- COMMON_MAKE_OPTS="ZLIBOBJS= CC=$(tc-getCC) AR=$(tc-getAR) STRIP=true"
emake ${COMMON_MAKE_OPTS} shared
use static-libs && emake ${COMMON_MAKE_OPTS} default
use test && emake ${COMMON_MAKE_OPTS} stestlib
@@ -115,7 +116,8 @@ src_compile() {
# 1. python will link against the static lib
# 2. tests will not work find soname.
#
- # Bad upstream behavior
+ # Upstream should have created the symlinks when
+ # building and not when installing.
#
local libname="libcl.so.$(get_version_component_range 1-3 ${PV})"
local solibname="libcl.so.$(get_version_component_range 1-2 ${PV})"
@@ -132,16 +134,9 @@ src_test() {
}
src_install() {
+ emake install ${COMMON_MAKE_OPTS} DESTDIR="${D}" PREFIX=/usr PATH_LIB="/usr/$(get_libdir)"
einstalldocs
- #
- # Upstream does not provide
- # a simple target for install
- #
- doheader cryptlib.h
- dolib.so libcl.so*
- use static-libs && dolib.a libcl.a
-
wrap_python ${FUNCNAME}
if use doc; then
diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
index 1a99287c6f3..e2530b7e557 100644
--- a/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
+++ b/dev-libs/cryptlib/files/cryptlib-3.4.4_beta-build.patch
@@ -1,7 +1,7 @@
-From 188dce32ea9c58271c8ce48ab02a3b255498bf9f Mon Sep 17 00:00:00 2001
+From 515d66d1d091b444330b225127b084a9b19fa807 Mon Sep 17 00:00:00 2001
From: Alon Bar-Lev <alon.barlev@gmail.com>
-Date: Sat, 4 Feb 2017 05:08:47 +0200
-Subject: [PATCH] build: allow specify additional CFLAGS
+Date: Thu, 31 Aug 2017 22:12:52 +0300
+Subject: [PATCH 1/3] build: allow specify additional CFLAGS
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
@@ -9,7 +9,7 @@ Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/makefile b/makefile
-index cb9884c..827a78a 100644
+index de5381f..a31bc1d 100644
--- a/makefile
+++ b/makefile
@@ -90,7 +90,7 @@ DYLIBNAME = lib$(PROJ).$(MAJ).$(MIN).dylib
@@ -22,4 +22,70 @@ index cb9884c..827a78a 100644
CFLAGS_COVERAGE = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1 --coverage -fprofile-arcs -ftest-coverage
CFLAGS_DEBUG = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O0
--
-2.10.2
+2.13.5
+
+From cbec0a8ab9fab9acda239d3f37b7e593ac8e44e9 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Thu, 31 Aug 2017 22:14:47 +0300
+Subject: [PATCH 2/3] build: install: create correct directories + quote
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/makefile b/makefile
+index a31bc1d..2a49040 100644
+--- a/makefile
++++ b/makefile
+@@ -443,13 +443,13 @@ PATH_LIB=$(PREFIX)/lib
+ PATH_INCLUDE=$(PREFIX)/include
+
+ install-dirs:
+- @if [ ! -d $(PATH_LIB) ] ; then \
+- mkdir $(PATH_LIB) ; \
+- chmod 755 $(PATH_LIB) ; \
++ @if [ ! -d "$(DESTDIR)$(PATH_LIB)" ] ; then \
++ mkdir -p "$(DESTDIR)$(PATH_LIB)" ; \
++ chmod 755 "$(DESTDIR)$(PATH_LIB)" ; \
+ fi
+- @if [ ! -d $(PATH_INCLUDE) ] ; then \
+- mkdir $(PATH_INCLUDE) ; \
+- chmod 755 $(PATH_INCLUDE) ; \
++ @if [ ! -d "$(DESTDIR)$(PATH_INCLUDE)" ] ; then \
++ mkdir -p "$(DESTDIR)$(PATH_INCLUDE)" ; \
++ chmod 755 "$(DESTDIR)$(PATH_INCLUDE)" ; \
+ fi
+
+ install:
+--
+2.13.5
+
+From 78cd16457a88e0d79a5b61d8dee29b535cd81a28 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Thu, 31 Aug 2017 22:30:25 +0300
+Subject: [PATCH 3/3] build: install: use relative symlinks
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makefile b/makefile
+index 2a49040..5582252 100644
+--- a/makefile
++++ b/makefile
+@@ -461,8 +461,8 @@ install:
+ if [ -f "$(SLIBNAME)" ] ; then \
+ cp "$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)" ; \
+ chmod 755 "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" ; \
+- ln -s "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so.$(MAJ)" ; \
+- ln -s "$(DESTDIR)$(PATH_LIB)/$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so" ; \
++ ln -s "$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so.$(MAJ)" ; \
++ ln -s "$(SLIBNAME)" "$(DESTDIR)$(PATH_LIB)/lib$(PROJ).so" ; \
+ fi
+ cp cryptlib.h "$(DESTDIR)$(PATH_INCLUDE)"
+ chmod 644 "$(DESTDIR)$(PATH_INCLUDE)/cryptlib.h"
+--
+2.13.5
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-31 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-31 19:47 [gentoo-commits] repo/gentoo:master commit in: dev-libs/cryptlib/files/, dev-libs/cryptlib/ Alon Bar-Lev
-- strict thread matches above, loose matches on Subject: below --
2017-08-31 18:52 Alon Bar-Lev
2017-02-04 9:33 Alon Bar-Lev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox