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