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.ebuild
Date: Wed, 28 May 2008 16:30:44
Message-Id: E1K1OXw-0005Ry-WE@stork.gentoo.org
1 vapier 08/05/28 16:30:40
2
3 Modified: ChangeLog
4 Added: openssl-0.9.8h.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_pre5.spank.spunk)
8
9 Revision Changes Path
10 1.260 dev-libs/openssl/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.260&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.260&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.259&r2=1.260
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
19 retrieving revision 1.259
20 retrieving revision 1.260
21 diff -u -r1.259 -r1.260
22 --- ChangeLog 16 May 2008 15:52:48 -0000 1.259
23 +++ ChangeLog 28 May 2008 16:30:40 -0000 1.260
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.259 2008/05/16 15:52:48 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.260 2008/05/28 16:30:40 vapier Exp $
29 +
30 +*openssl-0.9.8h (28 May 2008)
31 +
32 + 28 May 2008; Mike Frysinger <vapier@g.o> +openssl-0.9.8h.ebuild:
33 + Version bump.
34
35 16 May 2008; Ulrich Mueller <ulm@g.o> openssl-0.9.8g-r1.ebuild:
36 Don't install bogus Emacs support file, bug 222337.
37
38
39
40 1.1 dev-libs/openssl/openssl-0.9.8h.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8h.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/openssl/openssl-0.9.8h.ebuild?rev=1.1&content-type=text/plain
44
45 Index: openssl-0.9.8h.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.8h.ebuild,v 1.1 2008/05/28 16:30: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
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 unset APPS #197996
114
115 tc-export CC AR RANLIB
116
117 # Clean out patent-or-otherwise-encumbered code
118 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
119 # IDEA: 5,214,703 25/05/2010 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
120 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
121 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
122 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
123
124 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
125 echoit() { echo "$@" ; "$@" ; }
126
127 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
128
129 local sslout=$(./gentoo.config)
130 einfo "Use configuration ${sslout:-(openssl knows best)}"
131 local config="Configure"
132 [[ -z ${sslout} ]] && config="config"
133 echoit \
134 ./${config} \
135 ${sslout} \
136 $(use sse2 || echo "no-sse2") \
137 enable-camellia \
138 $(use_ssl !bindist ec) \
139 $(use_ssl !bindist idea) \
140 enable-mdc2 \
141 $(use_ssl !bindist rc5) \
142 enable-tlsext \
143 $(use_ssl gmp) \
144 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
145 $(use_ssl zlib) \
146 $(use_ssl zlib zlib-dynamic) \
147 --prefix=/usr \
148 --openssldir=/etc/ssl \
149 shared threads \
150 || die "Configure failed"
151
152 # Clean out hardcoded flags that openssl uses
153 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
154 -e 's:^CFLAG=::' \
155 -e 's:-fomit-frame-pointer ::g' \
156 -e 's:-O[0-9] ::g' \
157 -e 's:-march=[-a-z0-9]* ::g' \
158 -e 's:-mcpu=[-a-z0-9]* ::g' \
159 -e 's:-m[a-z0-9]* ::g' \
160 )
161 sed -i \
162 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
163 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
164 Makefile || die
165
166 # depend is needed to use $confopts
167 # rehash is needed to prep the certs/ dir
168 emake -j1 depend || die "depend failed"
169 emake all rehash || die "make all failed"
170 }
171
172 src_test() {
173 # make sure sandbox doesnt die on *BSD
174 addpredict /dev/crypto
175
176 emake -j1 test || die "make test failed"
177 }
178
179 src_install() {
180 emake -j1 INSTALL_PREFIX="${D}" install || die
181 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
182 dohtml doc/*
183
184 # create the certs directory
185 dodir /etc/ssl/certs
186 cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs"
187 rm -r "${D}"/etc/ssl/certs/{demo,expired}
188
189 # Namespace openssl programs to prevent conflicts with other man pages
190 cd "${D}"/usr/share/man
191 local m d s
192 for m in $(find . -type f | xargs grep -L '#include') ; do
193 d=${m%/*} ; d=${d#./} ; m=${m##*/}
194 [[ ${m} == openssl.1* ]] && continue
195 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
196 mv ${d}/{,ssl-}${m}
197 ln -s ssl-${m} ${d}/openssl-${m}
198 # locate any symlinks that point to this man page ... we assume
199 # that any broken links are due to the above renaming
200 for s in $(find -L ${d} -type l) ; do
201 s=${s##*/}
202 rm -f ${d}/${s}
203 ln -s ssl-${m} ${d}/ssl-${s}
204 ln -s ssl-${s} ${d}/openssl-${s}
205 done
206 done
207 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
208
209 diropts -m0700
210 keepdir /etc/ssl/private
211 }
212
213 pkg_preinst() {
214 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
215 }
216
217 pkg_postinst() {
218 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
219
220 if [[ ${CHOST} == i686* ]] ; then
221 ewarn "Due to the way openssl is architected, you cannot"
222 ewarn "switch between optimized versions without breaking"
223 ewarn "ABI. The default i686 0.9.8 ABI was an unoptimized"
224 ewarn "version with horrible performance. This version uses"
225 ewarn "the optimized ABI. If you experience segfaults when"
226 ewarn "using ssl apps (like openssh), just re-emerge the"
227 ewarn "offending package."
228 fi
229 }
230
231
232
233 --
234 gentoo-commits@l.g.o mailing list