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