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