Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/openssl: ChangeLog openssl-0.9.8k-r1.ebuild
Date: Fri, 29 May 2009 21:33:55
Message-Id: E1MA9i4-00027D-Pe@stork.gentoo.org
1 flameeyes 09/05/29 21:33:52
2
3 Modified: ChangeLog
4 Added: openssl-0.9.8k-r1.ebuild
5 Log:
6 Revision bump with zlib linked in at build-time rather than dlopened. See bug #271415.
7 (Portage version: 2.2_rc33/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.290 dev-libs/openssl/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.290&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.290&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.289&r2=1.290
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
19 retrieving revision 1.289
20 retrieving revision 1.290
21 diff -u -r1.289 -r1.290
22 --- ChangeLog 9 Apr 2009 20:20:29 -0000 1.289
23 +++ ChangeLog 29 May 2009 21:33:52 -0000 1.290
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-libs/openssl
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.289 2009/04/09 20:20:29 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.290 2009/05/29 21:33:52 flameeyes Exp $
29 +
30 +*openssl-0.9.8k-r1 (29 May 2009)
31 +
32 + 29 May 2009; Diego E. Pettenò <flameeyes@g.o>
33 + +openssl-0.9.8k-r1.ebuild:
34 + Revision bump with zlib linked in at build-time rather than dlopened. See
35 + bug #271415.
36
37 09 Apr 2009; Mike Frysinger <vapier@g.o> openssl-0.9.8k.ebuild:
38 Make sure we dont accidently create /etc/sandbox.d with 0700 perms #265376
39
40
41
42 1.1 dev-libs/openssl/openssl-0.9.8k-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8k-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8k-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: openssl-0.9.8k-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8k-r1.ebuild,v 1.1 2009/05/29 21:33:52 flameeyes Exp $
52
53 inherit eutils flag-o-matic toolchain-funcs
54
55 DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
56 HOMEPAGE="http://www.openssl.org/"
57 SRC_URI="mirror://openssl/source/${P}.tar.gz"
58
59 LICENSE="openssl"
60 SLOT="0"
61 KEYWORDS="-* ~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
62 IUSE="bindist gmp kerberos sse2 test zlib"
63
64 RDEPEND="gmp? ( dev-libs/gmp )
65 zlib? ( sys-libs/zlib )
66 kerberos? ( app-crypt/mit-krb5 )"
67 DEPEND="${RDEPEND}
68 sys-apps/diffutils
69 >=dev-lang/perl-5
70 test? ( sys-devel/bc )"
71 PDEPEND="app-misc/ca-certificates"
72
73 src_unpack() {
74 unpack ${A}
75 cd "${S}"
76
77 epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch
78 epatch "${FILESDIR}"/${PN}-0.9.7-alpha-default-gcc.patch
79 #Forward port of the -b patch. Parallel make fails though.
80 epatch "${FILESDIR}"/${PN}-0.9.8j-parallel-build.patch
81 epatch "${FILESDIR}"/${PN}-0.9.8-make-engines-dir.patch
82 epatch "${FILESDIR}"/${PN}-0.9.8k-toolchain.patch
83 epatch "${FILESDIR}"/${PN}-0.9.8b-doc-updates.patch
84 epatch "${FILESDIR}"/${PN}-0.9.8-makedepend.patch #149583
85 epatch "${FILESDIR}"/${PN}-0.9.8e-make.patch #146316
86 #epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
87 epatch "${FILESDIR}"/${PN}-0.9.8g-sslv3-no-tlsext.patch
88 #epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
89 sed -i -e '/DIRS/ s/ fips / /g' Makefile{,.org} \
90 || die "Removing fips from openssl failed."
91
92 # allow openssl to be cross-compiled
93 cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
94 chmod a+rx gentoo.config
95
96 # Don't build manpages if we don't want them
97 has noman FEATURES \
98 && sed -i '/^install:/s:install_docs::' Makefile.org \
99 || sed -i '/^MANDIR=/s:=.*:=/usr/share/man:' Makefile.org
100
101 # Try to derice users and work around broken ass toolchains
102 if [[ $(gcc-major-version) == "3" ]] ; then
103 filter-flags -fprefetch-loop-arrays -freduce-all-givs -funroll-loops
104 [[ $(tc-arch) == "ppc64" ]] && replace-flags -O? -O
105 fi
106 [[ $(tc-arch) == ppc* ]] && append-flags -fno-strict-aliasing
107 append-flags -Wa,--noexecstack
108
109 # using a library directory other than lib requires some magic
110 sed -i \
111 -e "s+\(\$(INSTALL_PREFIX)\$(INSTALLTOP)\)/lib+\1/$(get_libdir)+g" \
112 -e "s+libdir=\$\${exec_prefix}/lib+libdir=\$\${exec_prefix}/$(get_libdir)+g" \
113 Makefile.org engines/Makefile \
114 || die "sed failed"
115 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
116 sed -i '/^"debug-steve/d' Configure # 0.9.8k shipped broken
117 ./config --test-sanity || die "I AM NOT SANE"
118 }
119
120 src_compile() {
121 unset APPS #197996
122
123 tc-export CC AR RANLIB
124
125 # Clean out patent-or-otherwise-encumbered code
126 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
127 # IDEA: 5,214,703 25/05/2010 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
128 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
129 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
130 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
131
132 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
133 echoit() { echo "$@" ; "$@" ; }
134
135 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
136
137 local sslout=$(./gentoo.config)
138 einfo "Use configuration ${sslout:-(openssl knows best)}"
139 local config="Configure"
140 [[ -z ${sslout} ]] && config="config"
141 echoit \
142 ./${config} \
143 ${sslout} \
144 $(use sse2 || echo "no-sse2") \
145 enable-camellia \
146 $(use_ssl !bindist ec) \
147 $(use_ssl !bindist idea) \
148 enable-mdc2 \
149 $(use_ssl !bindist rc5) \
150 enable-tlsext \
151 $(use_ssl gmp) \
152 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
153 $(use_ssl zlib) \
154 --prefix=/usr \
155 --openssldir=/etc/ssl \
156 shared threads \
157 || die "Configure failed"
158
159 # Clean out hardcoded flags that openssl uses
160 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
161 -e 's:^CFLAG=::' \
162 -e 's:-fomit-frame-pointer ::g' \
163 -e 's:-O[0-9] ::g' \
164 -e 's:-march=[-a-z0-9]* ::g' \
165 -e 's:-mcpu=[-a-z0-9]* ::g' \
166 -e 's:-m[a-z0-9]* ::g' \
167 )
168 sed -i \
169 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
170 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
171 Makefile || die
172
173 # depend is needed to use $confopts
174 # rehash is needed to prep the certs/ dir
175 emake -j1 depend || die "depend failed"
176 emake -j1 all rehash || die "make all failed"
177 }
178
179 src_test() {
180 emake -j1 test || die "make test failed"
181 }
182
183 src_install() {
184 emake -j1 INSTALL_PREFIX="${D}" install || die
185 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
186 dohtml 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 ln -s ssl-${m} ${d}/openssl-${m}
202 # locate any symlinks that point to this man page ... we assume
203 # that any broken links are due to the above renaming
204 for s in $(find -L ${d} -type l) ; do
205 s=${s##*/}
206 rm -f ${d}/${s}
207 ln -s ssl-${m} ${d}/ssl-${s}
208 ln -s ssl-${s} ${d}/openssl-${s}
209 done
210 done
211 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
212
213 dodir /etc/sandbox.d #254521
214 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
215
216 diropts -m0700
217 keepdir /etc/ssl/private
218 }
219
220 pkg_preinst() {
221 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
222 }
223
224 pkg_postinst() {
225 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
226 }