Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libselinux: libselinux-2.1.12-r3.ebuild ChangeLog
Date: Fri, 29 Mar 2013 09:20:12
Message-Id: 20130329092007.D06F62171D@flycatcher.gentoo.org
1 swift 13/03/29 09:20:07
2
3 Modified: ChangeLog
4 Added: libselinux-2.1.12-r3.ebuild
5 Log:
6 Fix bugs #463410 and 462626
7
8 (Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key 0xCDBA2FDB)
9
10 Revision Changes Path
11 1.94 sys-libs/libselinux/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.94&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.94&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?r1=1.93&r2=1.94
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v
20 retrieving revision 1.93
21 retrieving revision 1.94
22 diff -u -r1.93 -r1.94
23 --- ChangeLog 30 Dec 2012 15:17:46 -0000 1.93
24 +++ ChangeLog 29 Mar 2013 09:20:07 -0000 1.94
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-libs/libselinux
27 -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.93 2012/12/30 15:17:46 swift Exp $
29 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.94 2013/03/29 09:20:07 swift Exp $
31 +
32 +*libselinux-2.1.12-r3 (29 Mar 2013)
33 +
34 + 29 Mar 2013; Sven Vermeulen <swift@g.o> +libselinux-2.1.12-r3.ebuild:
35 + Fix error return codes (bug #462626) and Python3 failure if built with swig-1
36 + (bug #463410)
37
38 30 Dec 2012; Sven Vermeulen libselinux-2.1.12-r2.ebuild:
39 Stabilize
40
41
42
43 1.1 sys-libs/libselinux/libselinux-2.1.12-r3.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild?rev=1.1&content-type=text/plain
47
48 Index: libselinux-2.1.12-r3.ebuild
49 ===================================================================
50 # Copyright 1999-2013 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.12-r3.ebuild,v 1.1 2013/03/29 09:20:07 swift Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="python? *"
56 SUPPORT_PYTHON_ABIS="1"
57 RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
58 USE_RUBY="ruby18 ruby19"
59 RUBY_OPTIONAL="yes"
60
61 inherit multilib python toolchain-funcs eutils ruby-ng
62
63 SEPOL_VER="2.1.8"
64
65 DESCRIPTION="SELinux userland library"
66 HOMEPAGE="http://userspace.selinuxproject.org"
67 SRC_URI="http://userspace.selinuxproject.org/releases/20120924/${P}.tar.gz
68 http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${P}-r3.tar.gz"
69
70 LICENSE="public-domain"
71 SLOT="0"
72 KEYWORDS="~amd64 ~x86"
73 IUSE="python ruby static-libs"
74
75 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
76 >=dev-libs/libpcre-8.30-r2[static-libs?]
77 ruby? ( $(ruby_implementations_depend) )"
78 DEPEND="${RDEPEND}
79 virtual/pkgconfig
80 ruby? ( >=dev-lang/swig-2.0.9 )
81 python? ( >=dev-lang/swig-2.0.9 )"
82
83 S="${WORKDIR}/${P}"
84
85 pkg_setup() {
86 if use python; then
87 python_pkg_setup
88 fi
89 }
90
91 src_unpack() {
92 default
93 }
94
95 src_prepare() {
96 # fix up paths for multilib
97 sed -i \
98 -e "/^LIBDIR/s/lib/$(get_libdir)/" \
99 -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
100 src/Makefile utils/Makefile || die
101
102 EPATCH_MULTI_MSG="Applying libselinux patches ... " \
103 EPATCH_SUFFIX="patch" \
104 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
105 EPATCH_FORCE="yes" \
106 epatch
107
108 epatch_user
109 }
110
111 each_ruby_compile() {
112 local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
113 cd "${WORKDIR}/${P}"
114 cp -r src src-ruby-${RUBYLIBVER}
115 cd src-ruby-${RUBYLIBVER}
116
117 if [[ "${RUBYLIBVER}" == "1.8" ]]; then
118 emake CC="$(tc-getCC)" RUBY="${RUBY}" RUBYINC="-I$(ruby_get_hdrdir)" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" rubywrap || die
119 else
120 emake CC="$(tc-getCC)" RUBY="${RUBY}" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" rubywrap || die
121 fi
122 }
123
124 src_compile() {
125 tc-export RANLIB
126 emake \
127 AR="$(tc-getAR)" \
128 CC="$(tc-getCC)" \
129 LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" all || die
130
131 if use python; then
132 python_copy_sources src
133 building() {
134 emake CC="$(tc-getCC)" PYINC="-I$(python_get_includedir)" PYTHONLIBDIR="$(python_get_library -l)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC $($(tc-getPKG_CONFIG) libpcre --libs) ${LDFLAGS}" pywrap
135 }
136 python_execute_function -s --source-dir src building
137 fi
138
139 if use ruby; then
140 ruby-ng_src_compile
141 fi
142 }
143
144 each_ruby_install() {
145 local RUBYLIBVER=$(${RUBY} -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
146
147 cd "${WORKDIR}/${P}/src-ruby-${RUBYLIBVER}"
148 emake RUBY="${RUBY}" DESTDIR="${D}" install-rubywrap || die
149 }
150
151 src_install() {
152 emake DESTDIR="${D}" install || die
153
154 if use python; then
155 installation() {
156 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
157 }
158 python_execute_function -s --source-dir src installation
159 fi
160
161 if use ruby; then
162 ruby-ng_src_install
163 fi
164
165 use static-libs || rm "${D}"/usr/lib*/*.a
166 }
167
168 pkg_postinst() {
169 if use python; then
170 python_mod_optimize selinux
171 fi
172 }
173
174 pkg_postrm() {
175 if use python; then
176 python_mod_cleanup selinux
177 fi
178 }