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-1.0.0c.ebuild
Date: Thu, 02 Dec 2010 21:34:21
Message-Id: 20101202213346.6824420054@flycatcher.gentoo.org
1 vapier 10/12/02 21:33:46
2
3 Modified: ChangeLog
4 Added: openssl-1.0.0c.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.0_alpha5/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.373 dev-libs/openssl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.373&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.373&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.372&r2=1.373
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
20 retrieving revision 1.372
21 retrieving revision 1.373
22 diff -u -r1.372 -r1.373
23 --- ChangeLog 28 Nov 2010 14:34:36 -0000 1.372
24 +++ ChangeLog 2 Dec 2010 21:33:44 -0000 1.373
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-libs/openssl
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.372 2010/11/28 14:34:36 ranger Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.373 2010/12/02 21:33:44 vapier Exp $
30 +
31 +*openssl-1.0.0c (02 Dec 2010)
32 +
33 + 02 Dec 2010; Mike Frysinger <vapier@g.o> +openssl-1.0.0c.ebuild:
34 + Version bump.
35
36 28 Nov 2010; Brent Baude <ranger@g.o> openssl-0.9.8p.ebuild,
37 openssl-1.0.0b-r1.ebuild:
38
39
40
41 1.1 dev-libs/openssl/openssl-1.0.0c.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0c.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0c.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openssl-1.0.0c.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.0c.ebuild,v 1.1 2010/12/02 21:33:46 vapier Exp $
51
52 EAPI="2"
53
54 inherit eutils flag-o-matic toolchain-funcs
55
56 REV="1.7"
57 DESCRIPTION="full-strength general purpose cryptography library (including SSL v2/v3 and TLS v1)"
58 HOMEPAGE="http://www.openssl.org/"
59 SRC_URI="mirror://openssl/source/${P}.tar.gz
60 http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/~checkout~/packages/${PN}/${PN}-c_rehash.sh?rev=${REV} -> ${PN}-c_rehash.sh.${REV}"
61
62 LICENSE="openssl"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
65 IUSE="bindist gmp kerberos rfc3779 sse2 test zlib"
66
67 RDEPEND="gmp? ( dev-libs/gmp )
68 zlib? ( sys-libs/zlib )
69 kerberos? ( app-crypt/mit-krb5 )"
70 DEPEND="${RDEPEND}
71 sys-apps/diffutils
72 >=dev-lang/perl-5
73 test? ( sys-devel/bc )"
74 PDEPEND="app-misc/ca-certificates"
75
76 src_unpack() {
77 unpack ${P}.tar.gz
78 cp "${DISTDIR}"/${PN}-c_rehash.sh.${REV} "${WORKDIR}"/c_rehash || die
79 }
80
81 src_prepare() {
82 epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch
83 epatch "${FILESDIR}"/${PN}-0.9.8l-binutils.patch #289130
84 epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
85 epatch_user #332661
86
87 # disable fips in the build
88 # make sure the man pages are suffixed #302165
89 # don't bother building man pages if they're disabled
90 sed -i \
91 -e '/DIRS/s: fips : :g' \
92 -e '/^MANSUFFIX/s:=.*:=ssl:' \
93 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
94 -e $(has noman FEATURES \
95 && echo '/^install:/s:install_docs::' \
96 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
97 Makefile{,.org} \
98 || die
99 # show the actual commands in the log
100 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
101
102 # allow openssl to be cross-compiled
103 cp "${FILESDIR}"/gentoo.config-1.0.0 gentoo.config || die "cp cross-compile failed"
104 chmod a+rx gentoo.config
105
106 append-flags -fno-strict-aliasing
107 append-flags -Wa,--noexecstack
108
109 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
110 ./config --test-sanity || die "I AM NOT SANE"
111 }
112
113 src_configure() {
114 unset APPS #197996
115 unset SCRIPTS #312551
116
117 tc-export CC AR RANLIB
118
119 # Clean out patent-or-otherwise-encumbered code
120 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
121 # IDEA: 5,214,703 07/01/2012 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
122 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
123 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
124 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
125
126 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
127 echoit() { echo "$@" ; "$@" ; }
128
129 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
130
131 local sslout=$(./gentoo.config)
132 einfo "Use configuration ${sslout:-(openssl knows best)}"
133 local config="Configure"
134 [[ -z ${sslout} ]] && config="config"
135 echoit \
136 ./${config} \
137 ${sslout} \
138 $(use sse2 || echo "no-sse2") \
139 enable-camellia \
140 $(use_ssl !bindist ec) \
141 $(use_ssl !bindist idea) \
142 enable-mdc2 \
143 $(use_ssl !bindist rc5) \
144 enable-tlsext \
145 $(use_ssl gmp gmp -lgmp) \
146 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
147 $(use_ssl rfc3779) \
148 $(use_ssl zlib) \
149 --prefix=/usr \
150 --openssldir=/etc/ssl \
151 --libdir=$(get_libdir) \
152 shared threads \
153 || die "Configure failed"
154
155 # Clean out hardcoded flags that openssl uses
156 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
157 -e 's:^CFLAG=::' \
158 -e 's:-fomit-frame-pointer ::g' \
159 -e 's:-O[0-9] ::g' \
160 -e 's:-march=[-a-z0-9]* ::g' \
161 -e 's:-mcpu=[-a-z0-9]* ::g' \
162 -e 's:-m[a-z0-9]* ::g' \
163 )
164 sed -i \
165 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
166 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
167 Makefile || die
168 }
169
170 src_compile() {
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 -j1 all rehash || die "make all failed"
175 }
176
177 src_test() {
178 emake -j1 test || die "make test failed"
179 }
180
181 src_install() {
182 emake -j1 INSTALL_PREFIX="${D}" install || die
183 dobin "${WORKDIR}"/c_rehash || die #333117
184 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
185 dohtml -r doc/*
186
187 # create the certs directory
188 dodir /etc/ssl/certs
189 cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs"
190 rm -r "${D}"/etc/ssl/certs/{demo,expired}
191
192 # Namespace openssl programs to prevent conflicts with other man pages
193 cd "${D}"/usr/share/man
194 local m d s
195 for m in $(find . -type f | xargs grep -L '#include') ; do
196 d=${m%/*} ; d=${d#./} ; m=${m##*/}
197 [[ ${m} == openssl.1* ]] && continue
198 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
199 mv ${d}/{,ssl-}${m}
200 # fix up references to renamed man pages
201 sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${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 dodir /etc/sandbox.d #254521
215 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
216
217 diropts -m0700
218 keepdir /etc/ssl/private
219 }
220
221 pkg_preinst() {
222 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
223 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
224 }
225
226 pkg_postinst() {
227 ebegin "Running 'c_rehash ${ROOT}etc/ssl/certs/' to rebuild hashes #333069"
228 c_rehash "${ROOT}etc/ssl/certs" >/dev/null
229 eend $?
230
231 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
232 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
233 }