diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/cryptlib | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/cryptlib')
-rw-r--r-- | dev-libs/cryptlib/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/cryptlib/cryptlib-3.4.0-r1.ebuild | 142 | ||||
-rw-r--r-- | dev-libs/cryptlib/files/cryptlib-3.3.2-external-zlib.patch | 36 | ||||
-rw-r--r-- | dev-libs/cryptlib/files/cryptlib-3.3.2-ld.patch | 19 | ||||
-rw-r--r-- | dev-libs/cryptlib/files/cryptlib-3.4.0-external-zlib.patch | 35 | ||||
-rw-r--r-- | dev-libs/cryptlib/files/cryptlib-3.4.0-python.patch | 50 | ||||
-rw-r--r-- | dev-libs/cryptlib/metadata.xml | 5 |
7 files changed, 289 insertions, 0 deletions
diff --git a/dev-libs/cryptlib/Manifest b/dev-libs/cryptlib/Manifest new file mode 100644 index 000000000000..1fd4be63327b --- /dev/null +++ b/dev-libs/cryptlib/Manifest @@ -0,0 +1,2 @@ +DIST cl340.zip 5514751 SHA256 fff4cca9e70e579763882cd58bc8a5b36c52c20a7ace6c8b21c5e4e9e05fd9d5 SHA512 b9091ee4ce589f95ce479a0de25c5456db18d955350cc245637addf31f3c03cfe87c971f5a7bff274d17451059d319723cd337cb25a672e0823e29b98b4b87f8 WHIRLPOOL 8965d0c6b0e0bd38d0bbf674a75ac43ea7ea482218c6592d51d0baa7a6ff8673a27c8095084dc7d7cbca39c29bc9acdb6351d6a1f64f6cdc6c1bf906b2579cff +DIST cryptlib-3.4.0-manual.pdf.bz2 1215921 SHA256 b06b736e6e123f578adcd08a8ede6cdb62e3e6d4ac2decb3570def1b29d44da8 SHA512 dbf9914a110a686dc23fedd23c16cefbae12cc67e378db67ac292f8f782b3b615a5819013f2b9c4861086c7ddfab690db9d68a911346102def323255cf48069b WHIRLPOOL 8cc64ab7ffe8a97714e793dd3dfe36708e7e2c7ec583479c593d767de22b860be5bcf0a70427f6f2e7e1d9732ec4ba2d2b3f1617f97bb649c0298924e4a93fb6 diff --git a/dev-libs/cryptlib/cryptlib-3.4.0-r1.ebuild b/dev-libs/cryptlib/cryptlib-3.4.0-r1.ebuild new file mode 100644 index 000000000000..026f344937b2 --- /dev/null +++ b/dev-libs/cryptlib/cryptlib-3.4.0-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 pypy ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 eutils flag-o-matic multilib toolchain-funcs + +MY_PV="${PV//.}" + +DESCRIPTION="Powerful security toolkit for adding encryption to software" +HOMEPAGE="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/" +DOC_PREFIX="${PN}-${PV}" +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" + +S="${WORKDIR}" + +RDEPEND="sys-libs/zlib + ldap? ( net-nds/openldap ) + odbc? ( dev-db/unixODBC ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + app-arch/unzip" + +src_unpack() { + # we need the -a option, so we can not use 'unpack' + unzip -qoa "${DISTDIR}/cl${MY_PV}.zip" + use doc && unpack "${DOC_PREFIX}-manual.pdf.bz2" +} + +wrap_python() { + if use python; then + # cd bindings || die + + distutils-r1_${1} + fi +} + +src_prepare() { + rm -fr zlib + + # 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" + + # 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" + + # Respect LDFLAGS and fix soname and strip issues. + epatch "${FILESDIR}/${PN}-3.3.2-ld.patch" + + # Use external zlib. + epatch "${FILESDIR}/${PN}-3.4.0-external-zlib.patch" + + # Fix setup.py + epatch "${FILESDIR}"/${P}-python.patch + + # For some reason, setup.py is half-designed to be run from proper dir, + # and half-designed to be run from root. Since the patch fixes it to + # be completely from root, move it. + # + # When bumping the package, please update the patch to make setup.py work + # properly when executed from 'bindings' subdirectory. + mv bindings/setup.py . || die + + wrap_python ${FUNCNAME} +} + +src_compile() { + local libname="libcl.so.${PV}" + + # 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 + + append-flags "-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-flags "-DHAS_RECURSIVE_MUTEX" + fi + if [ -f /usr/include/pthread.h -a \ + `grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h` -ge 0 ] ; then + append-flags "-DHAS_ROBUST_MUTEX" + fi + + use ldap && append-flags -DHAS_LDAP + use odbc && append-flags -DHAS_ODBC + + emake directories || die + emake toolscripts || die + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -c" Linux || die "emake static failed" + + emake TARGET=${libname} OBJPATH="./shared-obj/" CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -fPIC -c" Linux + + if use python; then + ln -s libcl.so.${PV} libcl.so || die + + # Python bindings don't work with -O2 and higher. + replace-flags -O* -O1 + + wrap_python ${FUNCNAME} + fi +} + +src_install() { + dolib.so "libcl.so.${PV}" + dosym "libcl.so.${PV}" "/usr/$(get_libdir)/libcl.so" + dolib.a "libcl.a" + + doheader cryptlib.h + + dodoc README + if use doc; then + newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf" + fi + + wrap_python ${FUNCNAME} +} diff --git a/dev-libs/cryptlib/files/cryptlib-3.3.2-external-zlib.patch b/dev-libs/cryptlib/files/cryptlib-3.3.2-external-zlib.patch new file mode 100644 index 000000000000..dcff438c90e9 --- /dev/null +++ b/dev-libs/cryptlib/files/cryptlib-3.3.2-external-zlib.patch @@ -0,0 +1,36 @@ +--- makefile ++++ makefile +@@ -241,8 +241,7 @@ + + OBJS = $(BNOBJS) $(CERTOBJS) $(CRYPTOBJS) $(CTXOBJS) $(DEVOBJS) \ + $(ENVOBJS) $(HASHOBJS) $(IOOBJS) $(KEYSETOBJS) $(KRNLOBJS) \ +- $(LIBOBJS) $(MECHOBJS) $(MISCOBJS) $(SESSOBJS) $(ZLIBOBJS) \ +- $(OSOBJS) ++ $(LIBOBJS) $(MECHOBJS) $(MISCOBJS) $(SESSOBJS) $(OSOBJS) + + # Object files for the self-test code + +@@ -1299,7 +1298,7 @@ + + $(SLIBNAME): $(OBJS) $(EXTRAOBJS) $(TESTOBJS) + @./tools/buildsharedlib.sh $(OSNAME) $(SLIBNAME) $(LD) $(OBJS) \ +- $(EXTRAOBJS) ++ $(EXTRAOBJS) -lz + + $(DYLIBNAME): $(OBJS) $(EXTRAOBJS) $(TESTOBJS) + @$(LD) -dynamiclib -compatibility_version $(MAJ).$(MIN) \ +--- envelope/envelope.h ++++ envelope/envelope.h +@@ -17,11 +17,7 @@ + #endif /* Compiler-specific includes */ + #endif /* _STREAM_DEFINED */ + #ifdef USE_COMPRESSION +- #if defined( INC_ALL ) +- #include "zlib.h" +- #else +- #include "zlib/zlib.h" +- #endif /* Compiler-specific includes */ ++ #include <zlib.h> + #endif /* USE_COMPRESSION */ + + /**************************************************************************** diff --git a/dev-libs/cryptlib/files/cryptlib-3.3.2-ld.patch b/dev-libs/cryptlib/files/cryptlib-3.3.2-ld.patch new file mode 100644 index 000000000000..e54f88fc3c73 --- /dev/null +++ b/dev-libs/cryptlib/files/cryptlib-3.3.2-ld.patch @@ -0,0 +1,19 @@ +--- tools/buildsharedlib.sh ++++ tools/buildsharedlib.sh +@@ -115,13 +115,13 @@ + *) + if [ `$LD -v 2>&1 | grep -c gcc` -gt 0 -a \ + `gcc -Wl,-Bsymbolic 2>&1 | grep -c unrecognized` = 0 ] ; then +- $LD -shared -Wl,-Bsymbolic -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ; ++ $LD -shared $LDFLAGS -Wl,-soname,$LIBNAME -Wl,-Bsymbolic -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ; + else +- $LD -shared -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ; ++ $LD -shared $LDFLAGS -Wl,-soname,$LIBNAME -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ; + fi + if [ `which objdump` -a `objdump -p $LIBNAME | grep -c TEXTREL` -gt '0' ] ; then + echo "Warning: Shared library still contains TEXTREL records." ; + fi +- strip $LIBNAME ;; ++ ;; + esac + rm -f $LINKFILE diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.0-external-zlib.patch b/dev-libs/cryptlib/files/cryptlib-3.4.0-external-zlib.patch new file mode 100644 index 000000000000..5b599b76294a --- /dev/null +++ b/dev-libs/cryptlib/files/cryptlib-3.4.0-external-zlib.patch @@ -0,0 +1,35 @@ +--- makefile 2011-01-18 14:23:05.000000000 -0500 ++++ makefile.new 2011-01-18 14:25:47.000000000 -0500 +@@ -259,7 +259,7 @@ + OBJS = $(BNOBJS) $(CERTOBJS) $(CRYPTOBJS) $(CTXOBJS) $(DEVOBJS) \ + $(ENCDECOBJS) $(ENVOBJS) $(HASHOBJS) $(IOOBJS) $(KEYSETOBJS) \ + $(KRNLOBJS) $(LIBOBJS) $(MECHOBJS) $(MISCOBJS) $(SESSOBJS) \ +- $(ZLIBOBJS) $(OSOBJS) ++ $(OSOBJS) + + # Object files for the self-test code + +@@ -1477,7 +1477,7 @@ + + $(SLIBNAME): $(OBJS) $(EXTRAOBJS) $(TESTOBJS) + @./tools/buildsharedlib.sh $(OSNAME) $(SLIBNAME) $(LD) $(OBJS) \ +- $(EXTRAOBJS) ++ $(EXTRAOBJS) -lz + + $(DYLIBNAME): $(OBJS) $(EXTRAOBJS) $(TESTOBJS) + @$(LD) -dynamiclib -compatibility_version $(MAJ).$(MIN) \ +--- envelope/envelope.h 2010-12-14 23:16:40.000000000 -0500 ++++ envelope.h.new 2011-01-18 14:28:06.000000000 -0500 +@@ -17,11 +17,7 @@ + #endif /* Compiler-specific includes */ + #endif /* _STREAM_DEFINED */ + #ifdef USE_COMPRESSION +- #if defined( INC_ALL ) +- #include "zlib.h" +- #else +- #include "zlib/zlib.h" +- #endif /* Compiler-specific includes */ ++ #include <zlib.h> + #endif /* USE_COMPRESSION */ + + /**************************************************************************** diff --git a/dev-libs/cryptlib/files/cryptlib-3.4.0-python.patch b/dev-libs/cryptlib/files/cryptlib-3.4.0-python.patch new file mode 100644 index 000000000000..e7aa41376497 --- /dev/null +++ b/dev-libs/cryptlib/files/cryptlib-3.4.0-python.patch @@ -0,0 +1,50 @@ +--- bindings/setup.py 2010-12-13 04:51:58.000000000 -0500 ++++ setup.py.new 2011-01-19 08:41:40.000000000 -0500 +@@ -15,7 +15,7 @@ + ext = Extension("cryptlib_py", + sources=["bindings/python.c"], +- library_dirs=['..'], ++ library_dirs=['.'], +- libraries=['cl']) ++ libraries=['cl','resolv']) + + setup(name="cryptlib_py", ext_modules=[ext]) + +--- bindings/python.c 2010-11-30 18:35:52.000000000 -0500 ++++ python.c.new 2011-01-19 09:05:43.000000000 -0500 +@@ -358,6 +358,7 @@ + return(processStatus(status)); + } + ++/* + static PyObject* python_cryptGenerateKeyAsync(PyObject* self, PyObject* args) + { + int status = 0; +@@ -396,6 +397,7 @@ + + return(processStatus(status)); + } ++*/ + + static PyObject* python_cryptEncrypt(PyObject* self, PyObject* args) + { +@@ -1429,9 +1431,9 @@ + { "cryptDestroyContext", python_cryptDestroyContext, METH_VARARGS }, + { "cryptDestroyObject", python_cryptDestroyObject, METH_VARARGS }, + { "cryptGenerateKey", python_cryptGenerateKey, METH_VARARGS }, +- { "cryptGenerateKeyAsync", python_cryptGenerateKeyAsync, METH_VARARGS }, +- { "cryptAsyncQuery", python_cryptAsyncQuery, METH_VARARGS }, +- { "cryptAsyncCancel", python_cryptAsyncCancel, METH_VARARGS }, ++// { "cryptGenerateKeyAsync", python_cryptGenerateKeyAsync, METH_VARARGS }, ++// { "cryptAsyncQuery", python_cryptAsyncQuery, METH_VARARGS }, ++// { "cryptAsyncCancel", python_cryptAsyncCancel, METH_VARARGS }, + { "cryptEncrypt", python_cryptEncrypt, METH_VARARGS }, + { "cryptDecrypt", python_cryptDecrypt, METH_VARARGS }, + { "cryptSetAttribute", python_cryptSetAttribute, METH_VARARGS }, +@@ -4892,4 +4894,4 @@ + v = Py_BuildValue("i", -50); + PyDict_SetItemString(moduleDict, "CRYPT_ENVELOPE_RESOURCE", v); + Py_DECREF(v); /* Need resource to proceed */ +-} +\ No newline at end of file ++} diff --git a/dev-libs/cryptlib/metadata.xml b/dev-libs/cryptlib/metadata.xml new file mode 100644 index 000000000000..d68fe974c15a --- /dev/null +++ b/dev-libs/cryptlib/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>crypto</herd> +</pkgmetadata> |