Gentoo Archives: gentoo-commits

From: "Jason Zaman (perfinion)" <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libselinux: libselinux-2.4.ebuild ChangeLog
Date: Wed, 04 Feb 2015 17:50:00
Message-Id: 20150204174956.D05C5110D2@oystercatcher.gentoo.org
1 perfinion 15/02/04 17:49:56
2
3 Modified: ChangeLog
4 Added: libselinux-2.4.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0x7EF137EC935B0EAF)
9
10 Revision Changes Path
11 1.139 sys-libs/libselinux/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.139&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?rev=1.139&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/ChangeLog?r1=1.138&r2=1.139
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v
20 retrieving revision 1.138
21 retrieving revision 1.139
22 diff -u -r1.138 -r1.139
23 --- ChangeLog 26 Jan 2015 10:35:15 -0000 1.138
24 +++ ChangeLog 4 Feb 2015 17:49:56 -0000 1.139
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-libs/libselinux
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.138 2015/01/26 10:35:15 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.139 2015/02/04 17:49:56 perfinion Exp $
30 +
31 +*libselinux-2.4 (04 Feb 2015)
32 +
33 + 04 Feb 2015; Jason Zaman <perfinion@g.o> +libselinux-2.4.ebuild:
34 + Version bump
35
36 26 Jan 2015; Agostino Sarubbo <ago@g.o> libselinux-2.3-r2.ebuild:
37 Stable for x86, wrt bug #535682
38
39
40
41 1.1 sys-libs/libselinux/libselinux-2.4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libselinux/libselinux-2.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libselinux-2.4.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.4.ebuild,v 1.1 2015/02/04 17:49:56 perfinion Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python2_7 python3_2 python3_3 python3_4 )
54 USE_RUBY="ruby19 ruby20"
55
56 # No, I am not calling ruby-ng
57 inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
58
59 MY_P="${P//_/-}"
60 SEPOL_VER="${PV}"
61
62 DESCRIPTION="SELinux userland library"
63 HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
64 SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${MY_P}.tar.gz"
65
66 LICENSE="public-domain"
67 SLOT="0"
68 KEYWORDS="~amd64 ~x86"
69
70 IUSE="python ruby static-libs ruby_targets_ruby19 ruby_targets_ruby20"
71
72 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
73 >=dev-libs/libpcre-8.33-r1[static-libs?,${MULTILIB_USEDEP}]
74 python? ( ${PYTHON_DEPS} )
75 ruby? (
76 ruby_targets_ruby19? ( dev-lang/ruby:1.9 )
77 ruby_targets_ruby20? ( dev-lang/ruby:2.0 )
78 )"
79 DEPEND="${RDEPEND}
80 virtual/pkgconfig
81 python? ( >=dev-lang/swig-2.0.9 )"
82
83 S="${WORKDIR}/${MY_P}"
84
85 src_prepare() {
86 epatch "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch"
87 epatch "${FILESDIR}/0006-build-related-fixes-bug-500674.patch"
88
89 epatch_user
90
91 multilib_copy_sources
92 }
93
94 multilib_src_compile() {
95 tc-export PKG_CONFIG RANLIB
96 local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
97 local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
98 export PCRE_{CFLAGS,LIBS}
99
100 emake \
101 AR="$(tc-getAR)" \
102 CC="$(tc-getCC)" \
103 LIBDIR="\$(PREFIX)/$(get_libdir)" \
104 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
105 LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
106 all
107
108 if multilib_is_native_abi && use python; then
109 building() {
110 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
111 emake \
112 CC="$(tc-getCC)" \
113 PYINC="-I${PYTHON_INCLUDEDIR}" \
114 PYTHONLIBDIR="${PYTHON_LIBPATH}" \
115 PYPREFIX="${EPYTHON##*/}" \
116 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
117 pywrap
118 }
119 python_foreach_impl building
120 fi
121
122 if multilib_is_native_abi && use ruby; then
123 building() {
124 einfo "Calling rubywrap for ${1}"
125 # Clean up .lo file to force rebuild
126 test -f src/selinuxswig_ruby_wrap.lo && rm src/selinuxswig_ruby_wrap.lo
127 emake \
128 CC="$(tc-getCC)" \
129 RUBY=${1} \
130 RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \
131 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
132 rubywrap
133 }
134 for RUBYTARGET in ${USE_RUBY}; do
135 use ruby_targets_${RUBYTARGET} || continue
136
137 building ${RUBYTARGET}
138 done
139 fi
140 }
141
142 multilib_src_install() {
143 LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
144 emake DESTDIR="${D}" install
145
146 if multilib_is_native_abi && use python; then
147 installation() {
148 LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
149 python_optimize # bug 531638
150 }
151 python_foreach_impl installation
152 fi
153
154 if multilib_is_native_abi && use ruby; then
155 installation() {
156 einfo "Calling install-rubywrap for ${1}"
157 # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
158 rm src/selinuxswig_ruby_wrap.lo
159 LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \
160 RUBY=${1} \
161 RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \
162 install-rubywrap
163 }
164 for RUBYTARGET in ${USE_RUBY}; do
165 use ruby_targets_${RUBYTARGET} || continue
166
167 installation ${RUBYTARGET}
168 done
169 fi
170
171 use static-libs || rm "${D}"/usr/lib*/*.a
172 }
173
174 pkg_postinst() {
175 # Fix bug 473502
176 for POLTYPE in ${POLICY_TYPES};
177 do
178 mkdir -p /etc/selinux/${POLTYPE}/contexts/files
179 touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local
180 # Fix bug 516608
181 for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
182 sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE};
183 done
184 done
185 }