Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/openssl: openssl-1.0.0e-r1.ebuild ChangeLog
Date: Thu, 01 Dec 2011 05:36:08
Message-Id: 20111201053547.E8D512004C@flycatcher.gentoo.org
1 vapier 11/12/01 05:35:47
2
3 Modified: ChangeLog
4 Added: openssl-1.0.0e-r1.ebuild
5 Log:
6 Remove CROSS_COMPILE from the env since we setup all the tools explicitly #311473 by Thomas Sachau. Add USE=static-libs support #378259 by Agostino Sarubbo. Try and fix up parallel build yet again #196554 by Duncan. Clean up the pkg-config files to keep --libs clean (not include --static output).
7
8 (Portage version: 2.2.0_alpha75/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.411 dev-libs/openssl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.411&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.411&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.410&r2=1.411
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
20 retrieving revision 1.410
21 retrieving revision 1.411
22 diff -u -r1.410 -r1.411
23 --- ChangeLog 1 Dec 2011 05:32:56 -0000 1.410
24 +++ ChangeLog 1 Dec 2011 05:35:47 -0000 1.411
25 @@ -1,6 +1,16 @@
26 # ChangeLog for dev-libs/openssl
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.410 2011/12/01 05:32:56 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.411 2011/12/01 05:35:47 vapier Exp $
30 +
31 +*openssl-1.0.0e-r1 (01 Dec 2011)
32 +
33 + 01 Dec 2011; Mike Frysinger <vapier@g.o> +openssl-1.0.0e-r1.ebuild,
34 + +files/openssl-1.0.0e-parallel-build.patch,
35 + +files/openssl-1.0.0e-pkg-config.patch:
36 + Remove CROSS_COMPILE from the env since we setup all the tools explicitly
37 + #311473 by Thomas Sachau. Add USE=static-libs support #378259 by Agostino
38 + Sarubbo. Try and fix up parallel build yet again #196554 by Duncan. Clean up
39 + the pkg-config files to keep --libs clean (not include --static output).
40
41 01 Dec 2011; Mike Frysinger <vapier@g.o> metadata.xml:
42 Document USE=bindist specifics #369245 by Donald.
43
44
45
46 1.1 dev-libs/openssl/openssl-1.0.0e-r1.ebuild
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0e-r1.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0e-r1.ebuild?rev=1.1&content-type=text/plain
50
51 Index: openssl-1.0.0e-r1.ebuild
52 ===================================================================
53 # Copyright 1999-2011 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.0e-r1.ebuild,v 1.1 2011/12/01 05:35:47 vapier Exp $
56
57 EAPI="2"
58
59 inherit eutils flag-o-matic toolchain-funcs
60
61 REV="1.7"
62 DESCRIPTION="full-strength general purpose cryptography library (including SSL v2/v3 and TLS v1)"
63 HOMEPAGE="http://www.openssl.org/"
64 SRC_URI="mirror://openssl/source/${P}.tar.gz
65 http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/~checkout~/packages/${PN}/${PN}-c_rehash.sh?rev=${REV} -> ${PN}-c_rehash.sh.${REV}"
66
67 LICENSE="openssl"
68 SLOT="0"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
70 IUSE="bindist gmp kerberos rfc3779 sse2 static-libs test zlib"
71
72 # Have the sub-libs in RDEPEND with [static-libs] since, logically,
73 # our libssl.a depends on libz.a/etc... at runtime.
74 LIB_DEPEND="gmp? ( dev-libs/gmp[static-libs] )
75 zlib? ( sys-libs/zlib[static-libs] )
76 kerberos? ( app-crypt/mit-krb5 )"
77 RDEPEND="static-libs? ( ${LIB_DEPEND} )
78 !static-libs? ( ${LIB_DEPEND//\[static-libs]} )"
79 DEPEND="${RDEPEND}
80 sys-apps/diffutils
81 >=dev-lang/perl-5
82 test? ( sys-devel/bc )"
83 PDEPEND="app-misc/ca-certificates"
84
85 src_unpack() {
86 unpack ${P}.tar.gz
87 cp "${DISTDIR}"/${PN}-c_rehash.sh.${REV} "${WORKDIR}"/c_rehash || die
88 }
89
90 src_prepare() {
91 # Make sure we only ever touch Makefile.org and avoid patching a file
92 # that gets blown away anyways by the Configure script in src_configure
93 rm -f Makefile
94
95 epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
96 epatch "${FILESDIR}"/${PN}-1.0.0d-fbsd-amd64.patch #363089
97 epatch "${FILESDIR}"/${PN}-1.0.0d-windres.patch #373743
98 epatch "${FILESDIR}"/${PN}-1.0.0e-pkg-config.patch
99 epatch "${FILESDIR}"/${PN}-1.0.0e-parallel-build.patch
100 epatch_user #332661
101
102 # disable fips in the build
103 # make sure the man pages are suffixed #302165
104 # don't bother building man pages if they're disabled
105 sed -i \
106 -e '/DIRS/s: fips : :g' \
107 -e '/^MANSUFFIX/s:=.*:=ssl:' \
108 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
109 -e $(has noman FEATURES \
110 && echo '/^install:/s:install_docs::' \
111 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
112 Makefile.org \
113 || die
114 # show the actual commands in the log
115 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
116
117 # allow openssl to be cross-compiled
118 cp "${FILESDIR}"/gentoo.config-1.0.0 gentoo.config || die
119 chmod a+rx gentoo.config
120
121 append-flags -fno-strict-aliasing
122 append-flags $(test-flags-CC -Wa,--noexecstack)
123
124 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
125 ./config --test-sanity || die "I AM NOT SANE"
126 }
127
128 src_configure() {
129 unset APPS #197996
130 unset SCRIPTS #312551
131 unset CROSS_COMPILE #311473
132
133 tc-export CC AR RANLIB RC
134
135 # Clean out patent-or-otherwise-encumbered code
136 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
137 # IDEA: 5,214,703 07/01/2012 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
138 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
139 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
140 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
141
142 use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
143 echoit() { echo "$@" ; "$@" ; }
144
145 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
146
147 local sslout=$(./gentoo.config)
148 einfo "Use configuration ${sslout:-(openssl knows best)}"
149 local config="Configure"
150 [[ -z ${sslout} ]] && config="config"
151 echoit \
152 ./${config} \
153 ${sslout} \
154 $(use sse2 || echo "no-sse2") \
155 enable-camellia \
156 $(use_ssl !bindist ec) \
157 $(use_ssl !bindist idea) \
158 enable-mdc2 \
159 $(use_ssl !bindist rc5) \
160 enable-tlsext \
161 $(use_ssl gmp gmp -lgmp) \
162 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
163 $(use_ssl rfc3779) \
164 $(use_ssl zlib) \
165 --prefix=/usr \
166 --openssldir=/etc/ssl \
167 --libdir=$(get_libdir) \
168 shared threads \
169 || die
170
171 # Clean out hardcoded flags that openssl uses
172 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
173 -e 's:^CFLAG=::' \
174 -e 's:-fomit-frame-pointer ::g' \
175 -e 's:-O[0-9] ::g' \
176 -e 's:-march=[-a-z0-9]* ::g' \
177 -e 's:-mcpu=[-a-z0-9]* ::g' \
178 -e 's:-m[a-z0-9]* ::g' \
179 )
180 sed -i \
181 -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
182 -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
183 Makefile || die
184 }
185
186 src_compile() {
187 # depend is needed to use $confopts; it also doesn't matter
188 # that it's -j1 as the code itself serializes subdirs
189 emake -j1 depend || die
190 emake all || die
191 # rehash is needed to prep the certs/ dir; do this
192 # separately to avoid parallel build issues.
193 emake rehash || die
194 }
195
196 src_test() {
197 emake -j1 test || die
198 }
199
200 src_install() {
201 emake INSTALL_PREFIX="${D}" install || die
202 dobin "${WORKDIR}"/c_rehash || die #333117
203 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
204 dohtml -r doc/*
205 use rfc3779 && dodoc engines/ccgost/README.gost
206
207 # This is crappy in that the static archives are still built even
208 # when USE=static-libs. But this is due to a failing in the openssl
209 # build system: the static archives are built as PIC all the time.
210 # Only way around this would be to manually configure+compile openssl
211 # twice; once with shared lib support enabled and once without.
212 use static-libs || rm -f "${D}"/usr/lib*/lib*.a
213
214 # create the certs directory
215 dodir /etc/ssl/certs
216 cp -RP certs/* "${D}"/etc/ssl/certs/ || die
217 rm -r "${D}"/etc/ssl/certs/{demo,expired}
218
219 # Namespace openssl programs to prevent conflicts with other man pages
220 cd "${D}"/usr/share/man
221 local m d s
222 for m in $(find . -type f | xargs grep -L '#include') ; do
223 d=${m%/*} ; d=${d#./} ; m=${m##*/}
224 [[ ${m} == openssl.1* ]] && continue
225 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
226 mv ${d}/{,ssl-}${m}
227 # fix up references to renamed man pages
228 sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
229 ln -s ssl-${m} ${d}/openssl-${m}
230 # locate any symlinks that point to this man page ... we assume
231 # that any broken links are due to the above renaming
232 for s in $(find -L ${d} -type l) ; do
233 s=${s##*/}
234 rm -f ${d}/${s}
235 ln -s ssl-${m} ${d}/ssl-${s}
236 ln -s ssl-${s} ${d}/openssl-${s}
237 done
238 done
239 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
240
241 dodir /etc/sandbox.d #254521
242 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
243
244 diropts -m0700
245 keepdir /etc/ssl/private
246 }
247
248 pkg_preinst() {
249 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
250 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
251 }
252
253 pkg_postinst() {
254 ebegin "Running 'c_rehash ${ROOT}etc/ssl/certs/' to rebuild hashes #333069"
255 c_rehash "${ROOT}etc/ssl/certs" >/dev/null
256 eend $?
257
258 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
259 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
260 }