Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/cryptlib/
Date: Fri, 30 Dec 2016 21:04:57
Message-Id: 1483130700.ad4f05a688221d20741207a724c05d250572bf63.alonbl@gentoo
1 commit: ad4f05a688221d20741207a724c05d250572bf63
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 30 20:37:43 2016 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 30 20:45:00 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad4f05a6
7
8 dev-libs/cryptlib: cleanup
9
10 Package-Manager: Portage-2.3.0, Repoman-2.3.1
11
12 dev-libs/cryptlib/cryptlib-3.4.0-r2.ebuild | 142 -----------------------------
13 dev-libs/cryptlib/cryptlib-3.4.3.ebuild | 130 --------------------------
14 2 files changed, 272 deletions(-)
15
16 diff --git a/dev-libs/cryptlib/cryptlib-3.4.0-r2.ebuild b/dev-libs/cryptlib/cryptlib-3.4.0-r2.ebuild
17 deleted file mode 100644
18 index 5f12f72..00000000
19 --- a/dev-libs/cryptlib/cryptlib-3.4.0-r2.ebuild
20 +++ /dev/null
21 @@ -1,142 +0,0 @@
22 -# Copyright 1999-2016 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -# $Id$
25 -
26 -EAPI=5
27 -
28 -PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
29 -DISTUTILS_OPTIONAL=1
30 -
31 -inherit distutils-r1 eutils flag-o-matic multilib toolchain-funcs
32 -
33 -MY_PV="${PV//.}"
34 -
35 -DESCRIPTION="Powerful security toolkit for adding encryption to software"
36 -HOMEPAGE="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/"
37 -DOC_PREFIX="${PN}-${PV}"
38 -SRC_URI="ftp://ftp.franken.de/pub/crypt/cryptlib/cl${MY_PV}.zip
39 - doc? ( mirror://gentoo/${DOC_PREFIX}-manual.pdf.bz2 )"
40 -
41 -LICENSE="Sleepycat"
42 -KEYWORDS="~amd64 ~x86"
43 -SLOT="0"
44 -IUSE="doc ldap odbc python"
45 -
46 -S="${WORKDIR}"
47 -
48 -RDEPEND="sys-libs/zlib
49 - ldap? ( net-nds/openldap )
50 - odbc? ( dev-db/unixODBC )
51 - python? ( ${PYTHON_DEPS} )"
52 -DEPEND="${RDEPEND}
53 - app-arch/unzip"
54 -
55 -src_unpack() {
56 - # we need the -a option, so we can not use 'unpack'
57 - unzip -qoa "${DISTDIR}/cl${MY_PV}.zip" || die
58 - use doc && unpack "${DOC_PREFIX}-manual.pdf.bz2"
59 -}
60 -
61 -wrap_python() {
62 - if use python; then
63 - # cd bindings || die
64 -
65 - distutils-r1_${1}
66 - fi
67 -}
68 -
69 -src_prepare() {
70 - rm -fr zlib || die
71 -
72 - # we want our own CFLAGS ;-)
73 - sed -i -e "s:-m.*=pentium::g" -e "s:-fomit-frame-pointer::g" -e "s:-O2::g" \
74 - -e "s:-O3::g" -e "s:-O4::g" makefile || die "sed makefile failed"
75 - sed -i -e "s/-march=[[:alnum:]\.=-]*//g" -e "s/-mcpu=[[:alnum:]\.=-]*//g" \
76 - -e "s:-O2::g" -e "s:-O3::g" tools/ccopts.sh || die "sed tools/ccopts.sh failed"
77 -
78 - # change 'make' to '$(MAKE)'
79 - sed -i -e "s:@\?make:\$(MAKE):g" makefile || die "sed makefile failed"
80 -
81 - # NOTICE:
82 - # Because of stack execution
83 - # assembly parts are disabled.
84 - sed -i -e 's:i\[3,4,5,6\]86:___:g' makefile || die "sed makefile failed"
85 -
86 - # Fix version number of shared library.
87 - sed -i -e 's/PLV="2"/PLV="3"/' tools/buildall.sh || die "sed tools/buildall.sh failed"
88 -
89 - # Respect LDFLAGS and fix soname and strip issues.
90 - epatch "${FILESDIR}/${PN}-3.3.2-ld.patch"
91 -
92 - # Use external zlib.
93 - epatch "${FILESDIR}/${PN}-3.4.0-external-zlib.patch"
94 -
95 - # Fix setup.py
96 - epatch "${FILESDIR}"/${P}-python.patch
97 -
98 - # For some reason, setup.py is half-designed to be run from proper dir,
99 - # and half-designed to be run from root. Since the patch fixes it to
100 - # be completely from root, move it.
101 - #
102 - # When bumping the package, please update the patch to make setup.py work
103 - # properly when executed from 'bindings' subdirectory.
104 - mv bindings/setup.py . || die
105 -
106 - wrap_python ${FUNCNAME}
107 -}
108 -
109 -src_compile() {
110 - local libname="libcl.so.${PV}"
111 -
112 - # At least -O2 is needed.
113 - replace-flags -O -O2
114 - replace-flags -O0 -O2
115 - replace-flags -O1 -O2
116 - replace-flags -Os -O2
117 - is-flagq -O* || append-flags -O2
118 -
119 - append-flags "-D__UNIX__ -DOSVERSION=2 -DNDEBUG -I."
120 -
121 - if [ -f /usr/include/pthread.h -a \
122 - `grep -c PTHREAD_MUTEX_RECURSIVE /usr/include/pthread.h` -ge 0 ] ; then
123 - append-flags "-DHAS_RECURSIVE_MUTEX"
124 - fi
125 - if [ -f /usr/include/pthread.h -a \
126 - `grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h` -ge 0 ] ; then
127 - append-flags "-DHAS_ROBUST_MUTEX"
128 - fi
129 -
130 - use ldap && append-flags -DHAS_LDAP
131 - use odbc && append-flags -DHAS_ODBC
132 -
133 - emake directories
134 - emake toolscripts
135 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -c" Linux
136 -
137 - emake TARGET=${libname} OBJPATH="./shared-obj/" CC="$(tc-getCC)" \
138 - CFLAGS="${CFLAGS} -fPIC -c" Linux
139 -
140 - if use python; then
141 - ln -s libcl.so.${PV} libcl.so || die
142 -
143 - # Python bindings don't work with -O2 and higher.
144 - replace-flags -O* -O1
145 -
146 - wrap_python ${FUNCNAME}
147 - fi
148 -}
149 -
150 -src_install() {
151 - dolib.so "libcl.so.${PV}"
152 - dosym "libcl.so.${PV}" "/usr/$(get_libdir)/libcl.so"
153 - dolib.a "libcl.a"
154 -
155 - doheader cryptlib.h
156 -
157 - dodoc README
158 - if use doc; then
159 - newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf"
160 - fi
161 -
162 - wrap_python ${FUNCNAME}
163 -}
164
165 diff --git a/dev-libs/cryptlib/cryptlib-3.4.3.ebuild b/dev-libs/cryptlib/cryptlib-3.4.3.ebuild
166 deleted file mode 100644
167 index 26b4fad..00000000
168 --- a/dev-libs/cryptlib/cryptlib-3.4.3.ebuild
169 +++ /dev/null
170 @@ -1,130 +0,0 @@
171 -# Copyright 1999-2016 Gentoo Foundation
172 -# Distributed under the terms of the GNU General Public License v2
173 -# $Id$
174 -
175 -EAPI=5
176 -
177 -PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
178 -DISTUTILS_OPTIONAL=1
179 -
180 -inherit distutils-r1 eutils flag-o-matic multilib toolchain-funcs versionator
181 -
182 -MY_PV="${PV//.}"
183 -
184 -DESCRIPTION="Powerful security toolkit for adding encryption to software"
185 -HOMEPAGE="http://www.cs.auckland.ac.nz/~pgut001/cryptlib/"
186 -DOC_PREFIX="${PN}-$(get_version_component_range 1-2 ${PV}).0"
187 -SRC_URI="ftp://ftp.franken.de/pub/crypt/cryptlib/cl${MY_PV}.zip
188 - doc? ( mirror://gentoo/${DOC_PREFIX}-manual.pdf.bz2 )"
189 -
190 -LICENSE="Sleepycat"
191 -KEYWORDS="~amd64 ~x86"
192 -SLOT="0"
193 -IUSE="doc ldap odbc python"
194 -
195 -S="${WORKDIR}"
196 -
197 -RDEPEND="sys-libs/zlib
198 - ldap? ( net-nds/openldap )
199 - odbc? ( dev-db/unixODBC )
200 - python? ( ${PYTHON_DEPS} )"
201 -DEPEND="${RDEPEND}
202 - app-arch/unzip"
203 -
204 -src_unpack() {
205 - # we need the -a option, so we can not use 'unpack'
206 - unzip -qoa "${DISTDIR}/cl${MY_PV}.zip" || die
207 - use doc && unpack "${DOC_PREFIX}-manual.pdf.bz2"
208 -}
209 -
210 -wrap_python() {
211 - if use python; then
212 - cd bindings || die
213 - distutils-r1_${1}
214 - fi
215 -}
216 -
217 -src_prepare() {
218 - rm -fr zlib || die
219 -
220 - # we want our own CFLAGS ;-)
221 - sed -i -e "s:-m.*=pentium::g" -e "s:-fomit-frame-pointer::g" -e "s:-O2::g" \
222 - -e "s:-O3::g" -e "s:-O4::g" makefile || die "sed makefile failed"
223 - sed -i -e "s/-march=[[:alnum:]\.=-]*//g" -e "s/-mcpu=[[:alnum:]\.=-]*//g" \
224 - -e "s:-O2::g" -e "s:-O3::g" tools/ccopts.sh || die "sed tools/ccopts.sh failed"
225 -
226 - # change 'make' to '$(MAKE)'
227 - sed -i -e "s:@\?make:\$(MAKE):g" makefile || die "sed makefile failed"
228 -
229 - # NOTICE:
230 - # Because of stack execution
231 - # assembly parts are disabled.
232 - sed -i -e 's:i\[3,4,5,6\]86:___:g' makefile || die "sed makefile failed"
233 -
234 - # Fix version number of shared library.
235 - sed -i -e 's/PLV="2"/PLV="3"/' tools/buildall.sh || die "sed tools/buildall.sh failed"
236 -
237 - # Respect LDFLAGS and fix soname and strip issues.
238 - epatch "${FILESDIR}/${P}-build.patch"
239 -
240 - # Use external zlib.
241 - epatch "${FILESDIR}/${P}-zlib.patch"
242 -
243 - wrap_python ${FUNCNAME}
244 -}
245 -
246 -src_compile() {
247 - local libname="libcl.so.${PV}"
248 -
249 - # At least -O2 is needed.
250 - replace-flags -O -O2
251 - replace-flags -O0 -O2
252 - replace-flags -O1 -O2
253 - replace-flags -Os -O2
254 - is-flagq -O* || append-flags -O2
255 -
256 - append-flags "-fPIC -D__UNIX__ -DOSVERSION=2 -DNDEBUG -I."
257 -
258 - if [ -f /usr/include/pthread.h -a \
259 - `grep -c PTHREAD_MUTEX_RECURSIVE /usr/include/pthread.h` -ge 0 ] ; then
260 - append-flags "-DHAS_RECURSIVE_MUTEX"
261 - fi
262 - if [ -f /usr/include/pthread.h -a \
263 - `grep -c PTHREAD_MUTEX_ROBUST /usr/include/pthread.h` -ge 0 ] ; then
264 - append-flags "-DHAS_ROBUST_MUTEX"
265 - fi
266 -
267 - use ldap && append-flags -DHAS_LDAP
268 - use odbc && append-flags -DHAS_ODBC
269 -
270 - emake directories
271 - emake toolscripts
272 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -c" STRIP=true Linux
273 -
274 - emake TARGET=${libname} OBJPATH="./shared-obj/" CC="$(tc-getCC)" \
275 - CFLAGS="${CFLAGS} -c" STRIP=true Linux
276 -
277 - if use python; then
278 - #ln -s libcl.so.${PV} libcl.so || die
279 -
280 - # Python bindings don't work with -O2 and higher.
281 - replace-flags -O* -O1
282 -
283 - wrap_python ${FUNCNAME}
284 - fi
285 -}
286 -
287 -src_install() {
288 - dolib.so "libcl.so.${PV}"
289 - dosym "libcl.so.${PV}" "/usr/$(get_libdir)/libcl.so"
290 - dolib.a "libcl.a"
291 -
292 - doheader cryptlib.h
293 -
294 - dodoc README
295 - if use doc; then
296 - newdoc "${DOC_PREFIX}-manual.pdf" "manual.pdf"
297 - fi
298 -
299 - wrap_python ${FUNCNAME}
300 -}