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.8o.ebuild
Date: Thu, 03 Jun 2010 02:29:11
Message-Id: 20100603022908.BD77A2CF37@corvid.gentoo.org
1 vapier 10/06/03 02:29:08
2
3 Modified: ChangeLog
4 Added: openssl-0.9.8o.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.332 dev-libs/openssl/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.332&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.332&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.331&r2=1.332
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
19 retrieving revision 1.331
20 retrieving revision 1.332
21 diff -u -r1.331 -r1.332
22 --- ChangeLog 3 Jun 2010 02:28:34 -0000 1.331
23 +++ ChangeLog 3 Jun 2010 02:29:08 -0000 1.332
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-libs/openssl
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.331 2010/06/03 02:28:34 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.332 2010/06/03 02:29:08 vapier Exp $
29 +
30 +*openssl-0.9.8o (03 Jun 2010)
31 +
32 + 03 Jun 2010; Mike Frysinger <vapier@g.o> +openssl-0.9.8o.ebuild:
33 + Version bump.
34
35 *openssl-1.0.0a (03 Jun 2010)
36
37
38
39
40 1.1 dev-libs/openssl/openssl-0.9.8o.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-0.9.8o.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-0.9.8o.ebuild?rev=1.1&content-type=text/plain
44
45 Index: openssl-0.9.8o.ebuild
46 ===================================================================
47 # Copyright 1999-2010 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.8o.ebuild,v 1.1 2010/06/03 02:29:08 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 ~x86 ~sparc-fbsd ~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.8e-bsd-sparc64.patch
77 epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
78 epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
79
80 # disable fips in the build
81 # make sure the man pages are suffixed #302165
82 # don't bother building man pages if they're disabled
83 sed -i \
84 -e '/DIRS/s: fips : :g' \
85 -e '/^MANSUFFIX/s:=.*:=ssl:' \
86 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
87 -e $(has noman FEATURES \
88 && echo '/^install:/s:install_docs::' \
89 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
90 Makefile{,.org} \
91 || die
92 # show the actual commands in the log
93 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
94
95 # allow openssl to be cross-compiled
96 cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
97 chmod a+rx gentoo.config
98
99 append-flags -fno-strict-aliasing
100 append-flags -Wa,--noexecstack
101
102 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
103 sed -i '/^"debug-steve/d' Configure # 0.9.8k shipped broken
104 ./config --test-sanity || die "I AM NOT SANE"
105 }
106
107 src_compile() {
108 unset APPS #197996
109 unset SCRIPTS #312551
110
111 tc-export CC AR RANLIB
112
113 # Clean out patent-or-otherwise-encumbered code
114 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
115 # IDEA: 5,214,703 25/05/2010 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
116 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
117 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
118 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
119
120 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
121 echoit() { echo "$@" ; "$@" ; }
122
123 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
124
125 local sslout=$(./gentoo.config)
126 einfo "Use configuration ${sslout:-(openssl knows best)}"
127 local config="Configure"
128 [[ -z ${sslout} ]] && config="config"
129 echoit \
130 ./${config} \
131 ${sslout} \
132 $(use sse2 || echo "no-sse2") \
133 enable-camellia \
134 $(use_ssl !bindist ec) \
135 $(use_ssl !bindist idea) \
136 enable-mdc2 \
137 $(use_ssl !bindist rc5) \
138 enable-tlsext \
139 $(use_ssl gmp gmp -lgmp) \
140 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
141 $(use_ssl zlib) \
142 --prefix=/usr \
143 --openssldir=/etc/ssl \
144 shared threads \
145 || die "Configure failed"
146
147 # Clean out hardcoded flags that openssl uses
148 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
149 -e 's:^CFLAG=::' \
150 -e 's:-fomit-frame-pointer ::g' \
151 -e 's:-O[0-9] ::g' \
152 -e 's:-march=[-a-z0-9]* ::g' \
153 -e 's:-mcpu=[-a-z0-9]* ::g' \
154 -e 's:-m[a-z0-9]* ::g' \
155 )
156 sed -i \
157 -e "/^LIBDIR=/s:=.*:=$(get_libdir):" \
158 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
159 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
160 Makefile || die
161
162 # depend is needed to use $confopts
163 # rehash is needed to prep the certs/ dir
164 emake -j1 depend || die "depend failed"
165 emake -j1 all rehash || die "make all failed"
166 }
167
168 src_test() {
169 emake -j1 test || die "make test failed"
170 }
171
172 src_install() {
173 emake -j1 INSTALL_PREFIX="${D}" install || die
174 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
175 dohtml -r doc/*
176
177 # create the certs directory
178 dodir /etc/ssl/certs
179 cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs"
180 rm -r "${D}"/etc/ssl/certs/{demo,expired}
181
182 # Namespace openssl programs to prevent conflicts with other man pages
183 cd "${D}"/usr/share/man
184 local m d s
185 for m in $(find . -type f | xargs grep -L '#include') ; do
186 d=${m%/*} ; d=${d#./} ; m=${m##*/}
187 # fix up references to renamed man pages
188 sed -i '/^[.]SH "SEE ALSO"/,/^[.][^I]/s:\([^(, I]*([15])\):ssl-\1:g' ${d}/${m}
189 [[ ${m} == openssl.1* ]] && continue
190 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
191 mv ${d}/{,ssl-}${m}
192 ln -s ssl-${m} ${d}/openssl-${m}
193 # locate any symlinks that point to this man page ... we assume
194 # that any broken links are due to the above renaming
195 for s in $(find -L ${d} -type l) ; do
196 s=${s##*/}
197 rm -f ${d}/${s}
198 ln -s ssl-${m} ${d}/ssl-${s}
199 ln -s ssl-${s} ${d}/openssl-${s}
200 done
201 done
202 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
203
204 dodir /etc/sandbox.d #254521
205 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
206
207 diropts -m0700
208 keepdir /etc/ssl/private
209 }
210
211 pkg_preinst() {
212 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
213 }
214
215 pkg_postinst() {
216 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.{6,7}
217 }