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-0.9.8h-r1.ebuild
Date: Sat, 21 Jun 2008 05:37:01
Message-Id: E1K9vmR-0002B9-0x@stork.gentoo.org
1 vapier 08/06/21 05:36:55
2
3 Modified: ChangeLog
4 Added: openssl-0.9.8h-r1.ebuild
5 Log:
6 Respect LDFLAGS #181438 by Arfrever Frehtes Taifersar Arahesis and add fix from upstream for PKCS12 troubles #224843 by Per Pomsel.
7 (Portage version: 2.2_pre8/cvs/Linux 2.6.25 x86_64)
8
9 Revision Changes Path
10 1.268 dev-libs/openssl/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.268&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.268&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.267&r2=1.268
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
19 retrieving revision 1.267
20 retrieving revision 1.268
21 diff -u -r1.267 -r1.268
22 --- ChangeLog 5 Jun 2008 18:08:59 -0000 1.267
23 +++ ChangeLog 21 Jun 2008 05:36:54 -0000 1.268
24 @@ -1,6 +1,14 @@
25 # ChangeLog for dev-libs/openssl
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.267 2008/06/05 18:08:59 dertobi123 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.268 2008/06/21 05:36:54 vapier Exp $
29 +
30 +*openssl-0.9.8h-r1 (21 Jun 2008)
31 +
32 + 21 Jun 2008; Mike Frysinger <vapier@g.o>
33 + +files/openssl-0.9.8h-ldflags.patch, +files/openssl-0.9.8h-pkcs12.patch,
34 + +openssl-0.9.8h-r1.ebuild:
35 + Respect LDFLAGS #181438 by Arfrever Frehtes Taifersar Arahesis and add fix
36 + from upstream for PKCS12 troubles #224843 by Per Pomsel.
37
38 05 Jun 2008; Tobias Scherbaum <dertobi123@g.o>
39 openssl-0.9.8g-r2.ebuild:
40
41
42
43 1.1 dev-libs/openssl/openssl-0.9.8h-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8h-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8h-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openssl-0.9.8h-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8h-r1.ebuild,v 1.1 2008/06/21 05:36:54 vapier Exp $
53
54 inherit eutils flag-o-matic toolchain-funcs
55
56 DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
57 HOMEPAGE="http://www.openssl.org/"
58 SRC_URI="mirror://openssl/source/${P}.tar.gz"
59
60 LICENSE="openssl"
61 SLOT="0"
62 KEYWORDS="-* ~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
63 IUSE="bindist gmp kerberos sse2 test zlib"
64
65 RDEPEND="gmp? ( dev-libs/gmp )
66 zlib? ( sys-libs/zlib )
67 kerberos? ( app-crypt/mit-krb5 )"
68 DEPEND="${RDEPEND}
69 sys-apps/diffutils
70 >=dev-lang/perl-5
71 test? ( sys-devel/bc )"
72 PDEPEND="app-misc/ca-certificates"
73
74 src_unpack() {
75 unpack ${A}
76 cd "${S}"
77
78 epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch
79 epatch "${FILESDIR}"/${PN}-0.9.7-alpha-default-gcc.patch
80 epatch "${FILESDIR}"/${PN}-0.9.8b-parallel-build.patch
81 epatch "${FILESDIR}"/${PN}-0.9.8-make-engines-dir.patch
82 epatch "${FILESDIR}"/${PN}-0.9.8-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 epatch "${FILESDIR}"/${PN}-0.9.8h-pkcs12.patch #224843
90
91 # allow openssl to be cross-compiled
92 cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
93 chmod a+rx gentoo.config
94
95 # Don't build manpages if we don't want them
96 has noman FEATURES \
97 && sed -i '/^install:/s:install_docs::' Makefile.org \
98 || sed -i '/^MANDIR=/s:=.*:=/usr/share/man:' Makefile.org
99
100 # Try to derice users and work around broken ass toolchains
101 if [[ $(gcc-major-version) == "3" ]] ; then
102 filter-flags -fprefetch-loop-arrays -freduce-all-givs -funroll-loops
103 [[ $(tc-arch) == "ppc64" ]] && replace-flags -O? -O
104 fi
105 [[ $(tc-arch) == ppc* ]] && append-flags -fno-strict-aliasing
106 append-flags -Wa,--noexecstack
107
108 # using a library directory other than lib requires some magic
109 sed -i \
110 -e "s+\(\$(INSTALL_PREFIX)\$(INSTALLTOP)\)/lib+\1/$(get_libdir)+g" \
111 -e "s+libdir=\$\${exec_prefix}/lib+libdir=\$\${exec_prefix}/$(get_libdir)+g" \
112 Makefile.org engines/Makefile \
113 || die "sed failed"
114 ./config --test-sanity || die "I AM NOT SANE"
115 }
116
117 src_compile() {
118 unset APPS #197996
119
120 tc-export CC AR RANLIB
121
122 # Clean out patent-or-otherwise-encumbered code
123 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
124 # IDEA: 5,214,703 25/05/2010 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
125 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
126 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
127 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
128
129 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
130 echoit() { echo "$@" ; "$@" ; }
131
132 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
133
134 local sslout=$(./gentoo.config)
135 einfo "Use configuration ${sslout:-(openssl knows best)}"
136 local config="Configure"
137 [[ -z ${sslout} ]] && config="config"
138 echoit \
139 ./${config} \
140 ${sslout} \
141 $(use sse2 || echo "no-sse2") \
142 enable-camellia \
143 $(use_ssl !bindist ec) \
144 $(use_ssl !bindist idea) \
145 enable-mdc2 \
146 $(use_ssl !bindist rc5) \
147 enable-tlsext \
148 $(use_ssl gmp) \
149 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
150 $(use_ssl zlib) \
151 $(use_ssl zlib zlib-dynamic) \
152 --prefix=/usr \
153 --openssldir=/etc/ssl \
154 shared threads \
155 || die "Configure failed"
156
157 # Clean out hardcoded flags that openssl uses
158 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
159 -e 's:^CFLAG=::' \
160 -e 's:-fomit-frame-pointer ::g' \
161 -e 's:-O[0-9] ::g' \
162 -e 's:-march=[-a-z0-9]* ::g' \
163 -e 's:-mcpu=[-a-z0-9]* ::g' \
164 -e 's:-m[a-z0-9]* ::g' \
165 )
166 sed -i \
167 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
168 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
169 Makefile || die
170
171 # depend is needed to use $confopts
172 # rehash is needed to prep the certs/ dir
173 emake -j1 depend || die "depend failed"
174 emake all rehash || die "make all failed"
175 }
176
177 src_test() {
178 # make sure sandbox doesnt die on *BSD
179 addpredict /dev/crypto
180
181 emake -j1 test || die "make test failed"
182 }
183
184 src_install() {
185 emake -j1 INSTALL_PREFIX="${D}" install || die
186 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
187 dohtml doc/*
188
189 # create the certs directory
190 dodir /etc/ssl/certs
191 cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs"
192 rm -r "${D}"/etc/ssl/certs/{demo,expired}
193
194 # Namespace openssl programs to prevent conflicts with other man pages
195 cd "${D}"/usr/share/man
196 local m d s
197 for m in $(find . -type f | xargs grep -L '#include') ; do
198 d=${m%/*} ; d=${d#./} ; m=${m##*/}
199 [[ ${m} == openssl.1* ]] && continue
200 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
201 mv ${d}/{,ssl-}${m}
202 ln -s ssl-${m} ${d}/openssl-${m}
203 # locate any symlinks that point to this man page ... we assume
204 # that any broken links are due to the above renaming
205 for s in $(find -L ${d} -type l) ; do
206 s=${s##*/}
207 rm -f ${d}/${s}
208 ln -s ssl-${m} ${d}/ssl-${s}
209 ln -s ssl-${s} ${d}/openssl-${s}
210 done
211 done
212 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
213
214 diropts -m0700
215 keepdir /etc/ssl/private
216 }
217
218 pkg_preinst() {
219 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
220 }
221
222 pkg_postinst() {
223 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
224
225 if [[ ${CHOST} == i686* ]] ; then
226 ewarn "Due to the way openssl is architected, you cannot"
227 ewarn "switch between optimized versions without breaking"
228 ewarn "ABI. The default i686 0.9.8 ABI was an unoptimized"
229 ewarn "version with horrible performance. This version uses"
230 ewarn "the optimized ABI. If you experience segfaults when"
231 ewarn "using ssl apps (like openssh), just re-emerge the"
232 ewarn "offending package."
233 fi
234 }
235
236
237
238 --
239 gentoo-commits@l.g.o mailing list