Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openswan: openswan-2.6.31.ebuild ChangeLog openswan-2.6.28.ebuild
Date: Sat, 27 Nov 2010 12:32:30
Message-Id: 20101127123218.7970720051@flycatcher.gentoo.org
1 mrness 10/11/27 12:32:18
2
3 Modified: ChangeLog
4 Added: openswan-2.6.31.ebuild
5 Removed: openswan-2.6.28.ebuild
6 Log:
7 Fix multilib-strict checks (#344735).
8 (Portage version: 2.1.8.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.75 net-misc/openswan/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?rev=1.75&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?rev=1.75&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/ChangeLog?r1=1.74&r2=1.75
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v
20 retrieving revision 1.74
21 retrieving revision 1.75
22 diff -u -r1.74 -r1.75
23 --- ChangeLog 29 Sep 2010 22:54:58 -0000 1.74
24 +++ ChangeLog 27 Nov 2010 12:32:18 -0000 1.75
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-misc/openswan
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.74 2010/09/29 22:54:58 mrness Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/ChangeLog,v 1.75 2010/11/27 12:32:18 mrness Exp $
30 +
31 +*openswan-2.6.31 (27 Nov 2010)
32 +
33 + 27 Nov 2010; Alin Năstac <mrness@g.o> -openswan-2.6.28.ebuild,
34 + -files/openswan-2.6.28-gentoo.patch, +openswan-2.6.31.ebuild,
35 + +files/openswan-2.6.31-gentoo.patch:
36 + Fix multilib-strict checks (#344735).
37
38 *openswan-2.6.29 (29 Sep 2010)
39
40
41
42
43 1.1 net-misc/openswan/openswan-2.6.31.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/openswan-2.6.31.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openswan/openswan-2.6.31.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openswan-2.6.31.ebuild
49 ===================================================================
50 # Copyright 1999-2010 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-misc/openswan/openswan-2.6.31.ebuild,v 1.1 2010/11/27 12:32:18 mrness Exp $
53
54 EAPI="2"
55
56 inherit eutils linux-info toolchain-funcs flag-o-matic
57
58 DESCRIPTION="Open Source implementation of IPsec for the Linux operating system (was SuperFreeS/WAN)."
59 HOMEPAGE="http://www.openswan.org/"
60 SRC_URI="http://www.openswan.org/download/${P}.tar.gz"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
65 IUSE="caps curl ldap pam ssl extra-algorithms weak-algorithms nocrypto-algorithms ms-bad-proposal nss"
66
67 COMMON_DEPEND="!net-misc/strongswan
68 dev-libs/gmp
69 dev-lang/perl
70 caps? ( sys-libs/libcap-ng )
71 curl? ( net-misc/curl )
72 ldap? ( net-nds/openldap )
73 nss? ( dev-libs/nss )
74 ssl? ( dev-libs/openssl )"
75 DEPEND="${COMMON_DEPEND}
76 virtual/linux-sources
77 app-text/xmlto
78 app-text/docbook-xml-dtd:4.1.2" # see bug 237132
79 RDEPEND="${COMMON_DEPEND}
80 virtual/logger
81 sys-apps/iproute2"
82
83 pkg_setup() {
84 if use nocrypto-algorithms && ! use weak-algorithms; then
85 ewarn "Enabling nocrypto-algorithms USE flag has no effect when"
86 ewarn "weak-algorithms USE flag is disabled"
87 fi
88
89 linux-info_pkg_setup
90
91 if kernel_is 2 6; then
92 einfo "This ebuild will set ${P} to use 2.6 native IPsec (KAME)."
93 einfo "KLIPS will not be compiled/installed."
94 MYMAKE="programs"
95
96 elif kernel_is 2 4; then
97 if ! [[ -d "${KERNEL_DIR}/net/ipsec" ]]; then
98 eerror "You need to have an IPsec enabled 2.4.x kernel."
99 eerror "Ensure you have one running and make a symlink to it in /usr/src/linux"
100 die
101 fi
102
103 einfo "Using patched-in IPsec code for kernel 2.4"
104 einfo "Your kernel only supports KLIPS for kernel level IPsec."
105 MYMAKE="confcheck programs"
106
107 else
108 die "Unsupported kernel version"
109 fi
110
111 # most code is OK, but programs/pluto code breaks strict aliasing
112 append-cflags -fno-strict-aliasing
113 }
114
115 src_prepare() {
116 epatch "${FILESDIR}"/${P}-gentoo.patch
117 use ms-bad-proposal && epatch "${FILESDIR}"/${PN}-${PV%.*}-allow-ms-bad-proposal.patch
118
119 find . -type f -regex '.*[.]\([1-8]\|html\|xml\)' -exec sed -i \
120 -e s:/usr/local:/usr:g '{}' \; ||
121 die "failed to replace text in docs"
122 }
123
124 get_make_options() {
125 echo KERNELSRC=\"${KERNEL_DIR}\"\
126 FINALEXAMPLECONFDIR=/usr/share/doc/${PF}\
127 INC_RCDEFAULT=/etc/init.d\
128 INC_USRLOCAL=/usr\
129 INC_MANDIR=share/man\
130 FINALDOCDIR=/usr/share/doc/${PF}/html\
131 FINALLIBDIR=/usr/$(get_libdir)/ipsec\
132 DESTDIR=\"${D}\"\
133 USERCOMPILE=\"${CFLAGS}\"\
134 CC=\"$(tc-getCC)\"
135
136 use caps\
137 && echo USE_LIBCAP_NG=true\
138 || echo USE_LIBCAP_NG=false
139
140 use curl\
141 && echo USE_LIBCURL=true\
142 || echo USE_LIBCURL=false
143
144 use ldap\
145 && echo USE_LDAP=true\
146 || echo USE_LDAP=false
147
148 echo USE_XAUTH=true
149 use pam\
150 && echo USE_XAUTHPAM=true\
151 || echo USE_XAUTHPAM=false
152
153 use nss\
154 && echo USE_LIBNSS=true\
155 || echo USE_LIBNSS=false
156
157 use ssl\
158 && echo HAVE_OPENSSL=true\
159 || echo HAVE_OPENSSL=false
160
161 use extra-algorithms\
162 && echo USE_EXTRACRYPTO=true\
163 || echo USE_EXTRACRYPTO=false
164 if use weak-algorithms ; then
165 echo USE_WEAKSTUFF=true
166 if use nocrypto-algorithms; then
167 echo USE_NOCRYPTO=true
168 fi
169 else
170 echo USE_WEAKSTUFF=false
171 fi
172
173 echo USE_LWRES=false # needs bind9 with lwres support
174 if use curl || use ldap || use pam; then
175 echo HAVE_THREADS=true
176 else
177 echo HAVE_THREADS=false
178 fi
179 }
180
181 src_compile() {
182 eval set -- $(get_make_options)
183 emake "$@" ${MYMAKE} || die "emake failed"
184 }
185
186 src_install() {
187 eval set -- $(get_make_options)
188 emake "$@" install || die "emake install failed"
189
190 dodoc docs/{KNOWN_BUGS*,RELEASE-NOTES*,PATENTS*,debugging*}
191 dohtml doc/*.html
192 docinto quickstarts
193 dodoc doc/quickstarts/*
194
195 newinitd "${FILESDIR}"/ipsec-initd ipsec || die "failed to install init script"
196
197 keepdir /var/run/pluto
198 }
199
200 pkg_preinst() {
201 if has_version "<net-misc/openswan-2.6.14" && pushd "${ROOT}etc/ipsec"; then
202 ewarn "Following files and directories were moved from '${ROOT}etc/ipsec' to '${ROOT}etc':"
203 local i err=0
204 if [ -h "../ipsec.d" ]; then
205 rm "../ipsec.d" || die "failed to remove ../ipsec.d symlink"
206 fi
207 for i in *; do
208 if [ -e "../$i" ]; then
209 eerror " $i NOT MOVED, ../$i already exists!"
210 err=1
211 elif [ -d "$i" ]; then
212 mv "$i" .. || die "failed to move $i directory"
213 ewarn " directory $i"
214 elif [ -f "$i" ]; then
215 sed -i -e 's:/etc/ipsec/:/etc/:g' "$i" && \
216 mv "$i" .. && ewarn " file $i" || \
217 die "failed to move $i file"
218 else
219 eerror " $i NOT MOVED, it is not a file nor a directory!"
220 err=1
221 fi
222 done
223 popd
224 if [ $err -eq 0 ]; then
225 rmdir "${ROOT}etc/ipsec" || eerror "Failed to remove ${ROOT}etc/ipsec"
226 else
227 ewarn "${ROOT}etc/ipsec is not empty, you will have to remove it yourself"
228 fi
229 fi
230 }
231
232 pkg_postinst() {
233 if kernel_is 2 6; then
234 CONFIG_CHECK="~NET_KEY ~INET_XFRM_MODE_TRANSPORT ~INET_XFRM_MODE_TUNNEL ~INET_AH ~INET_ESP ~INET_IPCOMP"
235 WARNING_INET_AH="CONFIG_INET_AH:\tmissing IPsec AH support (needed if you want only authentication)"
236 WARNING_INET_ESP="CONFIG_INET_ESP:\tmissing IPsec ESP support (needed if you want authentication and encryption)"
237 WARNING_INET_IPCOMP="CONFIG_INET_IPCOMP:\tmissing IPsec Payload Compression (required for compress=yes)"
238 check_extra_config
239 fi
240 }