1 |
commit: 2a9da294f39199baec5a9eedd5ee368d62af42ec |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 11 12:16:43 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 11 12:18:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a9da294 |
7 |
|
8 |
dev-vcs/subversion: Security bump to versions 1.8.18 and 1.9.7 |
9 |
|
10 |
Committed straight to stable. |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
13 |
|
14 |
dev-vcs/subversion/Manifest | 2 + |
15 |
dev-vcs/subversion/subversion-1.8.18.ebuild | 512 ++++++++++++++++++++++++++++ |
16 |
dev-vcs/subversion/subversion-1.9.7.ebuild | 510 +++++++++++++++++++++++++++ |
17 |
3 files changed, 1024 insertions(+) |
18 |
|
19 |
diff --git a/dev-vcs/subversion/Manifest b/dev-vcs/subversion/Manifest |
20 |
index 915904a6d36..1de734c86af 100644 |
21 |
--- a/dev-vcs/subversion/Manifest |
22 |
+++ b/dev-vcs/subversion/Manifest |
23 |
@@ -1,3 +1,5 @@ |
24 |
DIST subversion-1.8.17.tar.bz2 6924354 SHA256 de119538d29a5f2c028984cb54a55a4af3e9c32fa9316331bcbe5719e474a090 SHA512 49de24703bc40ccfd5a5df15215fd037f81c20f3047be5d3321bb2ce53dc7664505460791408a8989ede4a1357a0bdb49fb90a3db6ea2e2893c14a13a15b3ae7 WHIRLPOOL 6b420eb23fbf01ba418d759c275d1f0778c3904c76b78e88d4e82ed948fb44f578f6b171f927e4a4d96cf59eb49b528c9204909951d2cb41ad62804979098f1e |
25 |
+DIST subversion-1.8.18.tar.bz2 6884906 SHA256 e56b00ad3e927183bb6568781b85fe66dd3a7372c342af6e73b21a4473c397a6 SHA512 48d596c442da34fa3eb4f0f8b10cc3d5d27841b2fc4e7a493cac8e6f4c722f63fcd67fe99dfac5bbe31ac405055072a304d9a6771974c9990927cb21c5eb31d0 WHIRLPOOL a4e44512406bdadf8d80df4d888c0a6992affc04cd1de1a59482d031039ab9a485a85ab297b26f2f5c91c7883b14e00a7300b26413c28a5868f10424ff8c1c82 |
26 |
DIST subversion-1.9.5.tar.bz2 7904861 SHA256 8a4fc68aff1d18dcb4dd9e460648d24d9e98657fbed496c582929c6b3ce555e5 SHA512 ff7241ffae2506e97f40011242b5d5c6fa665f5463743f9acc52136b59ad84b6db00b60e70c44a9060579db49b818db06da1d1352aaee78e5bfe6ce56f32a2cf WHIRLPOOL 37a124dc2f99bb465b47083de168530f8178305e3208972d56c2c29a93bbf73ded816f742808cf9e7a5d3f13690e48cdd9f800abd85452ad1da4c13d603454f3 |
27 |
DIST subversion-1.9.6.tar.bz2 7882084 SHA256 dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19 SHA512 bdca362ff45a7f028e2123efbc9bfd41a07e6ebdfcf62627ce24f413e0304b45011bbac1f142ceb1c031a07622c06786982f86cd9109065cae5e26fd689fc11e WHIRLPOOL 27f3701273806c8968aed62eca9f5c13a086785362173b351d0e06fdf5d96ebdf4a461a019016cf7f2ae5b74f4f01c9fabd4706a7ac764d6e23543d87a5aaaa5 |
28 |
+DIST subversion-1.9.7.tar.bz2 7881909 SHA256 c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623 SHA512 a55efd3edaddbc099450d849fcc6fe5a8d20b85ece966d8ac2fd73ee9cb4255a0349bbcfceb4e9fca6daf054ce7c648eff8d273c6873f5dade6e62dcea7eeb2b WHIRLPOOL ec2491100ebc94fe9bb82b50daf349564ba7bf1ec7b404bf5a31aec0e1e0932843b41d96813a2659220e139c34aa996ddcbb2999528c49cea3dede2f2af43bf2 |
29 |
|
30 |
diff --git a/dev-vcs/subversion/subversion-1.8.18.ebuild b/dev-vcs/subversion/subversion-1.8.18.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..663a46742ac |
33 |
--- /dev/null |
34 |
+++ b/dev-vcs/subversion/subversion-1.8.18.ebuild |
35 |
@@ -0,0 +1,512 @@ |
36 |
+# Copyright 1999-2017 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=5 |
40 |
+PYTHON_COMPAT=( python2_7 ) |
41 |
+USE_RUBY="ruby22 ruby21 ruby20" |
42 |
+DISTUTILS_OPTIONAL=1 |
43 |
+WANT_AUTOMAKE="none" |
44 |
+GENTOO_DEPEND_ON_PERL="no" |
45 |
+ |
46 |
+inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module ruby-single |
47 |
+ |
48 |
+MY_P="${P/_/-}" |
49 |
+DESCRIPTION="Advanced version control system" |
50 |
+HOMEPAGE="http://subversion.apache.org/" |
51 |
+SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2" |
52 |
+S="${WORKDIR}/${MY_P}" |
53 |
+ |
54 |
+LICENSE="Subversion GPL-2" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
57 |
+IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kwallet nls perl python ruby sasl test vim-syntax" |
58 |
+ |
59 |
+COMMON_DEPEND=" |
60 |
+ app-arch/bzip2 |
61 |
+ >=dev-db/sqlite-3.7.12 |
62 |
+ >=dev-libs/apr-1.3:1 |
63 |
+ >=dev-libs/apr-util-1.3:1 |
64 |
+ dev-libs/expat |
65 |
+ sys-apps/file |
66 |
+ sys-libs/zlib |
67 |
+ berkdb? ( >=sys-libs/db-4.0.14:= ) |
68 |
+ ctypes-python? ( ${PYTHON_DEPS} ) |
69 |
+ gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring ) |
70 |
+ http? ( >=net-libs/serf-1.2.1 ) |
71 |
+ kwallet? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 kde-frameworks/kdelibs:4 ) |
72 |
+ perl? ( dev-lang/perl:= ) |
73 |
+ python? ( ${PYTHON_DEPS} ) |
74 |
+ ruby? ( ${RUBY_DEPS} ) |
75 |
+ sasl? ( dev-libs/cyrus-sasl )" |
76 |
+RDEPEND="${COMMON_DEPEND} |
77 |
+ apache2? ( www-servers/apache[apache2_modules_dav] ) |
78 |
+ java? ( >=virtual/jre-1.5 ) |
79 |
+ kwallet? ( || ( |
80 |
+ ( >=kde-frameworks/kwallet-5.34.0-r1 ) |
81 |
+ ( kde-apps/kwalletd:4 ) |
82 |
+ ) ) |
83 |
+ nls? ( virtual/libintl ) |
84 |
+ perl? ( dev-perl/URI )" |
85 |
+# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once |
86 |
+DEPEND="${COMMON_DEPEND} |
87 |
+ !!<sys-apps/sandbox-1.6 |
88 |
+ ctypes-python? ( dev-python/ctypesgen ) |
89 |
+ doc? ( app-doc/doxygen ) |
90 |
+ gnome-keyring? ( virtual/pkgconfig ) |
91 |
+ http? ( virtual/pkgconfig ) |
92 |
+ java? ( >=virtual/jdk-1.5 ) |
93 |
+ kwallet? ( virtual/pkgconfig ) |
94 |
+ nls? ( sys-devel/gettext ) |
95 |
+ test? ( ${PYTHON_DEPS} )" |
96 |
+ |
97 |
+REQUIRED_USE=" |
98 |
+ ctypes-python? ( ${PYTHON_REQUIRED_USE} ) |
99 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
100 |
+ test? ( |
101 |
+ ${PYTHON_REQUIRED_USE} |
102 |
+ !dso |
103 |
+ )" |
104 |
+ |
105 |
+PATCHES=( |
106 |
+ "${FILESDIR}"/${PN}-1.5.4-interix.patch |
107 |
+ "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch |
108 |
+ "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch |
109 |
+ "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch |
110 |
+ "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch |
111 |
+ "${FILESDIR}"/${PN}-1.8.16-javadoc-nolint.patch |
112 |
+) |
113 |
+ |
114 |
+want_apache |
115 |
+ |
116 |
+pkg_setup() { |
117 |
+ if use berkdb ; then |
118 |
+ local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
119 |
+ | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
120 |
+ | sed 's:.*b::')" |
121 |
+ einfo |
122 |
+ if [[ -z "${SVN_BDB_VERSION}" ]] ; then |
123 |
+ if [[ -n "${apu_bdb_version}" ]] ; then |
124 |
+ SVN_BDB_VERSION="${apu_bdb_version}" |
125 |
+ einfo "Matching db version to apr-util" |
126 |
+ else |
127 |
+ SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
128 |
+ einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
129 |
+ fi |
130 |
+ fi |
131 |
+ einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
132 |
+ einfo |
133 |
+ |
134 |
+ if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
135 |
+ eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
136 |
+ eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
137 |
+ eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
138 |
+ eerror "Aborting to avoid possible run-time crashes." |
139 |
+ die "Berkeley DB version mismatch" |
140 |
+ fi |
141 |
+ fi |
142 |
+ |
143 |
+ depend.apache_pkg_setup |
144 |
+ |
145 |
+ java-pkg-opt-2_pkg_setup |
146 |
+ |
147 |
+ if ! use http ; then |
148 |
+ ewarn "WebDAV support is disabled. You need WebDAV to" |
149 |
+ ewarn "access repositories through the HTTP protocol." |
150 |
+ ewarn "Consider enabling \"http\" USE flag" |
151 |
+ echo -ne "\a" |
152 |
+ fi |
153 |
+ |
154 |
+ if use debug ; then |
155 |
+ append-cppflags -DSVN_DEBUG -DAP_DEBUG |
156 |
+ fi |
157 |
+ |
158 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E |
159 |
+ [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__ |
160 |
+ |
161 |
+ # Allow for custom repository locations. |
162 |
+ SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
163 |
+ |
164 |
+ if use ruby ; then |
165 |
+ local rbslot |
166 |
+ RB_VER="" |
167 |
+ for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@g' <<< ${USE_RUBY//ruby}) ; do |
168 |
+ if has_version dev-lang/ruby:${rbslot} ; then |
169 |
+ RB_VER="${rbslot/.}" |
170 |
+ break |
171 |
+ fi |
172 |
+ done |
173 |
+ [[ -z "${RB_VER}" ]] && die "No useable ruby version found" |
174 |
+ fi |
175 |
+} |
176 |
+ |
177 |
+src_prepare() { |
178 |
+ epatch "${PATCHES[@]}" |
179 |
+ |
180 |
+ fperms +x build/transform_libtool_scripts.sh |
181 |
+ |
182 |
+ sed -i \ |
183 |
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
184 |
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
185 |
+ |
186 |
+ # this bites us in particular on Solaris |
187 |
+ sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
188 |
+ die "/bin/sh is not POSIX shell!" |
189 |
+ |
190 |
+ eautoconf |
191 |
+ elibtoolize |
192 |
+ |
193 |
+ sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \ |
194 |
+ -i build-outputs.mk || die "sed failed" |
195 |
+ |
196 |
+ if use python ; then |
197 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
198 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C20130614113003.GA19257@××××××.local2%3E |
199 |
+ # in short, we don't have gnome-keyring stuff here, patch |
200 |
+ # borrowed from MacPorts |
201 |
+ epatch "${FILESDIR}"/${PN}-1.8.5-swig-python-no-gnome-keyring.patch |
202 |
+ fi |
203 |
+ |
204 |
+ # XXX: make python_copy_sources accept path |
205 |
+ S=${S}/subversion/bindings/swig/python python_copy_sources |
206 |
+ rm -r "${S}"/subversion/bindings/swig/python || die |
207 |
+ fi |
208 |
+} |
209 |
+ |
210 |
+src_configure() { |
211 |
+ local myconf=() |
212 |
+ |
213 |
+ if use python || use perl || use ruby; then |
214 |
+ myconf+=( --with-swig ) |
215 |
+ else |
216 |
+ myconf+=( --without-swig ) |
217 |
+ fi |
218 |
+ |
219 |
+ if use java ; then |
220 |
+ myconf+=( --without-junit ) |
221 |
+ fi |
222 |
+ |
223 |
+ case ${CHOST} in |
224 |
+ *-aix*) |
225 |
+ # avoid recording immediate path to sharedlibs into executables |
226 |
+ append-ldflags -Wl,-bnoipath |
227 |
+ ;; |
228 |
+ *-interix*) |
229 |
+ # loader crashes on the LD_PRELOADs... |
230 |
+ myconf+=( --disable-local-library-preloading ) |
231 |
+ ;; |
232 |
+ *-solaris*) |
233 |
+ # need -lintl to link |
234 |
+ use nls && append-libs intl |
235 |
+ # this breaks installation, on x64 echo replacement is 32-bits |
236 |
+ myconf+=( --disable-local-library-preloading ) |
237 |
+ ;; |
238 |
+ *-mint*) |
239 |
+ myconf+=( --enable-all-static --disable-local-library-preloading ) |
240 |
+ ;; |
241 |
+ *) |
242 |
+ # inject LD_PRELOAD entries for easy in-tree development |
243 |
+ myconf+=( --enable-local-library-preloading ) |
244 |
+ ;; |
245 |
+ esac |
246 |
+ |
247 |
+ #version 1.7.7 again tries to link against the older installed version and fails, when trying to |
248 |
+ #compile for x86 on amd64, so workaround this issue again |
249 |
+ #check newer versions, if this is still/again needed |
250 |
+ myconf+=( --disable-disallowing-of-undefined-references ) |
251 |
+ |
252 |
+ # for build-time scripts |
253 |
+ if use ctypes-python || use python || use test; then |
254 |
+ python_setup |
255 |
+ fi |
256 |
+ |
257 |
+ if use python && [[ ${CHOST} == *-darwin* ]] ; then |
258 |
+ export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
259 |
+ export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
260 |
+ export ac_cv_python_compile="$(tc-getCC)" |
261 |
+ fi |
262 |
+ |
263 |
+ # allow overriding Python include directory |
264 |
+ ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby${RB_VER}" "none") \ |
265 |
+ ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc${RB_VER}" "none") \ |
266 |
+ ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \ |
267 |
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
268 |
+ $(use_with apache2 apache-libexecdir) \ |
269 |
+ $(use_with apache2 apxs "${APXS}") \ |
270 |
+ $(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
271 |
+ $(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \ |
272 |
+ $(use_enable dso runtime-module-search) \ |
273 |
+ $(use_with gnome-keyring) \ |
274 |
+ $(use_enable java javahl) \ |
275 |
+ $(use_with java jdk "${JAVA_HOME}") \ |
276 |
+ $(use_with kwallet) \ |
277 |
+ $(use_enable nls) \ |
278 |
+ $(use_with sasl) \ |
279 |
+ $(use_with http serf) \ |
280 |
+ ${myconf[@]} \ |
281 |
+ --with-apr="${EPREFIX}/usr/bin/apr-1-config" \ |
282 |
+ --with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \ |
283 |
+ --disable-experimental-libtool \ |
284 |
+ --without-jikes \ |
285 |
+ --disable-mod-activation \ |
286 |
+ --disable-static |
287 |
+} |
288 |
+ |
289 |
+src_compile() { |
290 |
+ emake local-all |
291 |
+ |
292 |
+ if use ctypes-python ; then |
293 |
+ # pre-generate .py files |
294 |
+ use ctypes-python && emake ctypes-python |
295 |
+ |
296 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
297 |
+ distutils-r1_src_compile |
298 |
+ popd >/dev/null || die |
299 |
+ fi |
300 |
+ |
301 |
+ if use python ; then |
302 |
+ swig_py_compile() { |
303 |
+ local p=subversion/bindings/swig/python |
304 |
+ rm -f ${p} || die |
305 |
+ ln -s "${BUILD_DIR}" ${p} || die |
306 |
+ |
307 |
+ python_export PYTHON_INCLUDEDIR |
308 |
+ emake swig-py \ |
309 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
310 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" |
311 |
+ } |
312 |
+ |
313 |
+ # this will give us proper BUILD_DIR for symlinking |
314 |
+ BUILD_DIR=python \ |
315 |
+ python_foreach_impl swig_py_compile |
316 |
+ fi |
317 |
+ |
318 |
+ if use perl ; then |
319 |
+ emake swig-pl |
320 |
+ fi |
321 |
+ |
322 |
+ if use ruby ; then |
323 |
+ emake swig-rb |
324 |
+ fi |
325 |
+ |
326 |
+ if use java ; then |
327 |
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl |
328 |
+ fi |
329 |
+ |
330 |
+ if use extras ; then |
331 |
+ emake tools |
332 |
+ fi |
333 |
+ |
334 |
+ if use doc ; then |
335 |
+ doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
336 |
+ |
337 |
+ if use java; then |
338 |
+ emake doc-javahl |
339 |
+ fi |
340 |
+ fi |
341 |
+} |
342 |
+ |
343 |
+src_test() { |
344 |
+ if has_version ~${CATEGORY}/${P} ; then |
345 |
+ default |
346 |
+ |
347 |
+ if use ctypes-python ; then |
348 |
+ python_test() { |
349 |
+ "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \ |
350 |
+ || die "ctypes-python tests fail with ${EPYTHON}" |
351 |
+ } |
352 |
+ |
353 |
+ distutils-r1_src_test |
354 |
+ fi |
355 |
+ |
356 |
+ if use python ; then |
357 |
+ swig_py_test() { |
358 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
359 |
+ "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}" |
360 |
+ popd >/dev/null || die |
361 |
+ } |
362 |
+ |
363 |
+ BUILD_DIR=subversion/bindings/swig/python \ |
364 |
+ python_foreach_impl swig_py_test |
365 |
+ fi |
366 |
+ else |
367 |
+ ewarn "The test suite shows errors when there is an older version of" |
368 |
+ ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*" |
369 |
+ ewarn "before running the test suite." |
370 |
+ ewarn "Test suite skipped." |
371 |
+ fi |
372 |
+} |
373 |
+ |
374 |
+src_install() { |
375 |
+ emake -j1 DESTDIR="${D}" local-install |
376 |
+ |
377 |
+ if use ctypes-python ; then |
378 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
379 |
+ distutils-r1_src_install |
380 |
+ popd >/dev/null || die |
381 |
+ fi |
382 |
+ |
383 |
+ if use python ; then |
384 |
+ swig_py_install() { |
385 |
+ local p=subversion/bindings/swig/python |
386 |
+ rm -f ${p} || die |
387 |
+ ln -s "${BUILD_DIR}" ${p} || die |
388 |
+ |
389 |
+ emake \ |
390 |
+ DESTDIR="${D}" \ |
391 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
392 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" \ |
393 |
+ install-swig-py |
394 |
+ } |
395 |
+ |
396 |
+ BUILD_DIR=python \ |
397 |
+ python_foreach_impl swig_py_install |
398 |
+ fi |
399 |
+ |
400 |
+ if use perl ; then |
401 |
+ emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl |
402 |
+ perl_delete_localpod |
403 |
+ find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -delete |
404 |
+ fi |
405 |
+ |
406 |
+ if use ruby ; then |
407 |
+ emake DESTDIR="${D}" install-swig-rb |
408 |
+ fi |
409 |
+ |
410 |
+ if use java ; then |
411 |
+ emake DESTDIR="${D}" install-javahl |
412 |
+ java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*$(get_libname) |
413 |
+ java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
414 |
+ rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar |
415 |
+ fi |
416 |
+ |
417 |
+ # Install Apache module configuration. |
418 |
+ if use apache2 ; then |
419 |
+ keepdir "${APACHE_MODULES_CONFDIR}" |
420 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
421 |
+ doins "${FILESDIR}/47_mod_dav_svn.conf" |
422 |
+ fi |
423 |
+ |
424 |
+ # Install Bash Completion, bug 43179. |
425 |
+ newbashcomp tools/client-side/bash_completion svn |
426 |
+ bashcomp_alias svn svn{admin,dumpfilter,look,sync,version} |
427 |
+ rm -f tools/client-side/bash_completion |
428 |
+ |
429 |
+ # Install hot backup script, bug 54304. |
430 |
+ newbin tools/backup/hot-backup.py svn-hot-backup |
431 |
+ rm -fr tools/backup |
432 |
+ |
433 |
+ # Install svnserve init-script and xinet.d snippet, bug 43245. |
434 |
+ newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
435 |
+ newconfd "${FILESDIR}"/svnserve.confd svnserve |
436 |
+ insinto /etc/xinetd.d |
437 |
+ newins "${FILESDIR}"/svnserve.xinetd svnserve |
438 |
+ |
439 |
+ #adjust default user and group with disabled apache2 USE flag, bug 381385 |
440 |
+ use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
441 |
+ -e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
442 |
+ -i "${ED}"etc/init.d/svnserve || die |
443 |
+ use apache2 || sed -e "0,/apache/s//svn/" \ |
444 |
+ -e "s:apache:svnusers:" \ |
445 |
+ -i "${ED}"etc/xinetd.d/svnserve || die |
446 |
+ |
447 |
+ # Install documentation. |
448 |
+ dodoc CHANGES COMMITTERS README |
449 |
+ dodoc tools/xslt/svnindex.{css,xsl} |
450 |
+ rm -fr tools/xslt |
451 |
+ |
452 |
+ # Install extra files. |
453 |
+ if use extras ; then |
454 |
+ cat << EOF > 80subversion-extras |
455 |
+PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
456 |
+ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
457 |
+EOF |
458 |
+ doenvd 80subversion-extras |
459 |
+ |
460 |
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools |
461 |
+ |
462 |
+ find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
463 |
+ rm -fr tools/client-side/svnmucc |
464 |
+ rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
465 |
+ rm -fr tools/{buildbot,dev,diff,po} |
466 |
+ |
467 |
+ insinto /usr/share/${PN} |
468 |
+ find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die |
469 |
+ doins -r tools |
470 |
+ fi |
471 |
+ |
472 |
+ if use doc ; then |
473 |
+ docinto html |
474 |
+ dodoc -r doc/doxygen/html/* |
475 |
+ |
476 |
+ if use java ; then |
477 |
+ java-pkg_dojavadoc doc/javadoc |
478 |
+ fi |
479 |
+ fi |
480 |
+ |
481 |
+ prune_libtool_files --all |
482 |
+ |
483 |
+ cd "${ED}"usr/share/locale |
484 |
+ for i in * ; do |
485 |
+ [[ ${i} == *$LINGUAS* ]] || { rm -r ${i} || die ; } |
486 |
+ done |
487 |
+} |
488 |
+ |
489 |
+pkg_preinst() { |
490 |
+ # Compare versions of Berkeley DB, bug 122877. |
491 |
+ if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]] ; then |
492 |
+ OLD_BDB_VERSION="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
493 |
+ NEW_BDB_VERSION="$(scanelf -nq "${ED}usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
494 |
+ if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then |
495 |
+ CHANGED_BDB_VERSION="1" |
496 |
+ fi |
497 |
+ fi |
498 |
+} |
499 |
+ |
500 |
+pkg_postinst() { |
501 |
+ if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then |
502 |
+ ewarn "You upgraded from an older version of Berkeley DB and may experience" |
503 |
+ ewarn "problems with your repository. Run the following commands as root to fix it:" |
504 |
+ ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
505 |
+ ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
506 |
+ fi |
507 |
+ |
508 |
+ ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
509 |
+} |
510 |
+ |
511 |
+pkg_postrm() { |
512 |
+ : |
513 |
+} |
514 |
+ |
515 |
+pkg_config() { |
516 |
+ # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
517 |
+ # already has EPREFIX in it |
518 |
+ einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
519 |
+ if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
520 |
+ echo "A Subversion repository already exists and I will not overwrite it." |
521 |
+ echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
522 |
+ else |
523 |
+ mkdir -p "${SVN_REPOS_LOC}/conf" |
524 |
+ |
525 |
+ einfo "Populating repository directory..." |
526 |
+ # Create initial repository. |
527 |
+ "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
528 |
+ |
529 |
+ einfo "Setting repository permissions..." |
530 |
+ SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
531 |
+ SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
532 |
+ if use apache2 ; then |
533 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
534 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
535 |
+ else |
536 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
537 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
538 |
+ fi |
539 |
+ chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
540 |
+ chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
541 |
+ echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
542 |
+ echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
543 |
+ echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
544 |
+ echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
545 |
+ echo "to finish the configuration." |
546 |
+ fi |
547 |
+} |
548 |
|
549 |
diff --git a/dev-vcs/subversion/subversion-1.9.7.ebuild b/dev-vcs/subversion/subversion-1.9.7.ebuild |
550 |
new file mode 100644 |
551 |
index 00000000000..0d83b616b84 |
552 |
--- /dev/null |
553 |
+++ b/dev-vcs/subversion/subversion-1.9.7.ebuild |
554 |
@@ -0,0 +1,510 @@ |
555 |
+# Copyright 1999-2017 Gentoo Foundation |
556 |
+# Distributed under the terms of the GNU General Public License v2 |
557 |
+ |
558 |
+EAPI=6 |
559 |
+PYTHON_COMPAT=( python2_7 ) |
560 |
+USE_RUBY="ruby23 ruby22 ruby21" |
561 |
+DISTUTILS_OPTIONAL=1 |
562 |
+WANT_AUTOMAKE="none" |
563 |
+GENTOO_DEPEND_ON_PERL="no" |
564 |
+ |
565 |
+inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module ruby-single |
566 |
+ |
567 |
+MY_P="${P/_/-}" |
568 |
+DESCRIPTION="Advanced version control system" |
569 |
+HOMEPAGE="http://subversion.apache.org/" |
570 |
+SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2" |
571 |
+S="${WORKDIR}/${MY_P}" |
572 |
+ |
573 |
+LICENSE="Subversion GPL-2" |
574 |
+SLOT="0" |
575 |
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
576 |
+IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kwallet nls perl python ruby sasl test vim-syntax" |
577 |
+ |
578 |
+COMMON_DEPEND=" |
579 |
+ app-arch/bzip2 |
580 |
+ >=dev-db/sqlite-3.7.12 |
581 |
+ >=dev-libs/apr-1.3:1 |
582 |
+ >=dev-libs/apr-util-1.3:1 |
583 |
+ dev-libs/expat |
584 |
+ sys-apps/file |
585 |
+ sys-libs/zlib |
586 |
+ berkdb? ( >=sys-libs/db-4.0.14:= ) |
587 |
+ ctypes-python? ( ${PYTHON_DEPS} ) |
588 |
+ gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring ) |
589 |
+ http? ( >=net-libs/serf-1.3.4 ) |
590 |
+ kwallet? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 kde-frameworks/kdelibs:4 ) |
591 |
+ perl? ( dev-lang/perl:= ) |
592 |
+ python? ( ${PYTHON_DEPS} ) |
593 |
+ ruby? ( ${RUBY_DEPS} ) |
594 |
+ sasl? ( dev-libs/cyrus-sasl )" |
595 |
+RDEPEND="${COMMON_DEPEND} |
596 |
+ apache2? ( www-servers/apache[apache2_modules_dav] ) |
597 |
+ java? ( >=virtual/jre-1.5 ) |
598 |
+ kwallet? ( || ( |
599 |
+ ( >=kde-frameworks/kwallet-5.34.0-r1 ) |
600 |
+ ( kde-apps/kwalletd:4 ) |
601 |
+ ) ) |
602 |
+ nls? ( virtual/libintl ) |
603 |
+ perl? ( dev-perl/URI )" |
604 |
+# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once |
605 |
+DEPEND="${COMMON_DEPEND} |
606 |
+ !!<sys-apps/sandbox-1.6 |
607 |
+ ctypes-python? ( dev-python/ctypesgen ) |
608 |
+ doc? ( app-doc/doxygen ) |
609 |
+ gnome-keyring? ( virtual/pkgconfig ) |
610 |
+ http? ( virtual/pkgconfig ) |
611 |
+ java? ( >=virtual/jdk-1.5 ) |
612 |
+ kwallet? ( virtual/pkgconfig ) |
613 |
+ nls? ( sys-devel/gettext ) |
614 |
+ test? ( ${PYTHON_DEPS} )" |
615 |
+ |
616 |
+REQUIRED_USE=" |
617 |
+ ctypes-python? ( ${PYTHON_REQUIRED_USE} ) |
618 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
619 |
+ test? ( |
620 |
+ ${PYTHON_REQUIRED_USE} |
621 |
+ !dso |
622 |
+ )" |
623 |
+ |
624 |
+PATCHES=( |
625 |
+ "${FILESDIR}"/${PN}-1.5.4-interix.patch |
626 |
+ "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch |
627 |
+ "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch |
628 |
+ "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch |
629 |
+ "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch |
630 |
+ "${FILESDIR}"/${PN}-1.8.16-javadoc-nolint.patch |
631 |
+) |
632 |
+ |
633 |
+want_apache |
634 |
+ |
635 |
+pkg_setup() { |
636 |
+ if use berkdb ; then |
637 |
+ local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
638 |
+ | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
639 |
+ | sed 's:.*b::')" |
640 |
+ einfo |
641 |
+ if [[ -z "${SVN_BDB_VERSION}" ]] ; then |
642 |
+ if [[ -n "${apu_bdb_version}" ]] ; then |
643 |
+ SVN_BDB_VERSION="${apu_bdb_version}" |
644 |
+ einfo "Matching db version to apr-util" |
645 |
+ else |
646 |
+ SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
647 |
+ einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
648 |
+ fi |
649 |
+ fi |
650 |
+ einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
651 |
+ einfo |
652 |
+ |
653 |
+ if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
654 |
+ eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
655 |
+ eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
656 |
+ eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
657 |
+ eerror "Aborting to avoid possible run-time crashes." |
658 |
+ die "Berkeley DB version mismatch" |
659 |
+ fi |
660 |
+ fi |
661 |
+ |
662 |
+ depend.apache_pkg_setup |
663 |
+ |
664 |
+ java-pkg-opt-2_pkg_setup |
665 |
+ |
666 |
+ if ! use http ; then |
667 |
+ ewarn "WebDAV support is disabled. You need WebDAV to" |
668 |
+ ewarn "access repositories through the HTTP protocol." |
669 |
+ ewarn "Consider enabling \"http\" USE flag" |
670 |
+ echo -ne "\a" |
671 |
+ fi |
672 |
+ |
673 |
+ if use debug ; then |
674 |
+ append-cppflags -DSVN_DEBUG -DAP_DEBUG |
675 |
+ fi |
676 |
+ |
677 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E |
678 |
+ [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__ |
679 |
+ |
680 |
+ # Allow for custom repository locations. |
681 |
+ SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
682 |
+ |
683 |
+ if use ruby ; then |
684 |
+ local rbslot |
685 |
+ RB_VER="" |
686 |
+ for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@g' <<< ${USE_RUBY//ruby}) ; do |
687 |
+ if has_version dev-lang/ruby:${rbslot} ; then |
688 |
+ RB_VER="${rbslot/.}" |
689 |
+ break |
690 |
+ fi |
691 |
+ done |
692 |
+ [[ -z "${RB_VER}" ]] && die "No useable ruby version found" |
693 |
+ fi |
694 |
+} |
695 |
+ |
696 |
+src_prepare() { |
697 |
+ default |
698 |
+ |
699 |
+ fperms +x build/transform_libtool_scripts.sh |
700 |
+ |
701 |
+ sed -i \ |
702 |
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
703 |
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
704 |
+ |
705 |
+ # this bites us in particular on Solaris |
706 |
+ sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
707 |
+ die "/bin/sh is not POSIX shell!" |
708 |
+ |
709 |
+ eautoconf |
710 |
+ elibtoolize |
711 |
+ |
712 |
+ sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \ |
713 |
+ -i build-outputs.mk || die "sed failed" |
714 |
+ |
715 |
+ if use python ; then |
716 |
+ # XXX: make python_copy_sources accept path |
717 |
+ S=${S}/subversion/bindings/swig/python python_copy_sources |
718 |
+ rm -r "${S}"/subversion/bindings/swig/python || die |
719 |
+ fi |
720 |
+} |
721 |
+ |
722 |
+src_configure() { |
723 |
+ local myconf=( |
724 |
+ --libdir="${EPREFIX%/}/usr/$(get_libdir)" |
725 |
+ $(use_with apache2 apache-libexecdir) |
726 |
+ $(use_with apache2 apxs "${APXS}") |
727 |
+ $(use_with berkdb berkeley-db "db.h:${EPREFIX%/}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") |
728 |
+ $(use_with ctypes-python ctypesgen "${EPREFIX%/}/usr") |
729 |
+ $(use_enable dso runtime-module-search) |
730 |
+ $(use_with gnome-keyring) |
731 |
+ $(use_enable java javahl) |
732 |
+ $(use_with java jdk "${JAVA_HOME}") |
733 |
+ $(use_with kwallet) |
734 |
+ $(use_enable nls) |
735 |
+ $(use_with sasl) |
736 |
+ $(use_with http serf) |
737 |
+ --with-apr="${EPREFIX%/}/usr/bin/apr-1-config" |
738 |
+ --with-apr-util="${EPREFIX%/}/usr/bin/apu-1-config" |
739 |
+ --disable-experimental-libtool |
740 |
+ --without-jikes |
741 |
+ --disable-mod-activation |
742 |
+ --disable-static |
743 |
+ ) |
744 |
+ |
745 |
+ if use python || use perl || use ruby; then |
746 |
+ myconf+=( --with-swig ) |
747 |
+ else |
748 |
+ myconf+=( --without-swig ) |
749 |
+ fi |
750 |
+ |
751 |
+ if use java ; then |
752 |
+ myconf+=( --without-junit ) |
753 |
+ fi |
754 |
+ |
755 |
+ case ${CHOST} in |
756 |
+ *-aix*) |
757 |
+ # avoid recording immediate path to sharedlibs into executables |
758 |
+ append-ldflags -Wl,-bnoipath |
759 |
+ ;; |
760 |
+ *-cygwin*) |
761 |
+ # no LD_PRELOAD support, no undefined symbols |
762 |
+ myconf+=( --disable-local-library-preloading LT_LDFLAGS=-no-undefined ) |
763 |
+ ;; |
764 |
+ *-interix*) |
765 |
+ # loader crashes on the LD_PRELOADs... |
766 |
+ myconf+=( --disable-local-library-preloading ) |
767 |
+ ;; |
768 |
+ *-solaris*) |
769 |
+ # need -lintl to link |
770 |
+ use nls && append-libs intl |
771 |
+ # this breaks installation, on x64 echo replacement is 32-bits |
772 |
+ myconf+=( --disable-local-library-preloading ) |
773 |
+ ;; |
774 |
+ *-mint*) |
775 |
+ myconf+=( --enable-all-static --disable-local-library-preloading ) |
776 |
+ ;; |
777 |
+ *) |
778 |
+ # inject LD_PRELOAD entries for easy in-tree development |
779 |
+ myconf+=( --enable-local-library-preloading ) |
780 |
+ ;; |
781 |
+ esac |
782 |
+ |
783 |
+ #version 1.7.7 again tries to link against the older installed version and fails, when trying to |
784 |
+ #compile for x86 on amd64, so workaround this issue again |
785 |
+ #check newer versions, if this is still/again needed |
786 |
+ myconf+=( --disable-disallowing-of-undefined-references ) |
787 |
+ |
788 |
+ # for build-time scripts |
789 |
+ if use ctypes-python || use python || use test; then |
790 |
+ python_setup |
791 |
+ fi |
792 |
+ |
793 |
+ if use python && [[ ${CHOST} == *-darwin* ]] ; then |
794 |
+ export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
795 |
+ export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
796 |
+ export ac_cv_python_compile="$(tc-getCC)" |
797 |
+ fi |
798 |
+ |
799 |
+ # allow overriding Python include directory |
800 |
+ ac_cv_path_RUBY=$(usex ruby "${EPREFIX%/}/usr/bin/ruby${RB_VER}" "none") \ |
801 |
+ ac_cv_path_RDOC=$(usex ruby "${EPREFIX%/}/usr/bin/rdoc${RB_VER}" "none") \ |
802 |
+ ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \ |
803 |
+ econf "${myconf[@]}" |
804 |
+} |
805 |
+ |
806 |
+src_compile() { |
807 |
+ emake local-all |
808 |
+ |
809 |
+ if use ctypes-python ; then |
810 |
+ # pre-generate .py files |
811 |
+ use ctypes-python && emake ctypes-python |
812 |
+ |
813 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
814 |
+ distutils-r1_src_compile |
815 |
+ popd >/dev/null || die |
816 |
+ fi |
817 |
+ |
818 |
+ if use python ; then |
819 |
+ swig_py_compile() { |
820 |
+ local p=subversion/bindings/swig/python |
821 |
+ rm -f ${p} || die |
822 |
+ ln -s "${BUILD_DIR}" ${p} || die |
823 |
+ |
824 |
+ python_export PYTHON_INCLUDEDIR |
825 |
+ emake swig-py \ |
826 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
827 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" |
828 |
+ } |
829 |
+ |
830 |
+ # this will give us proper BUILD_DIR for symlinking |
831 |
+ BUILD_DIR=python \ |
832 |
+ python_foreach_impl swig_py_compile |
833 |
+ fi |
834 |
+ |
835 |
+ if use perl ; then |
836 |
+ emake swig-pl |
837 |
+ fi |
838 |
+ |
839 |
+ if use ruby ; then |
840 |
+ emake swig-rb |
841 |
+ fi |
842 |
+ |
843 |
+ if use java ; then |
844 |
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl |
845 |
+ fi |
846 |
+ |
847 |
+ if use extras ; then |
848 |
+ emake tools |
849 |
+ fi |
850 |
+ |
851 |
+ if use doc ; then |
852 |
+ doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
853 |
+ |
854 |
+ if use java; then |
855 |
+ emake doc-javahl |
856 |
+ fi |
857 |
+ fi |
858 |
+} |
859 |
+ |
860 |
+src_test() { |
861 |
+ if has_version ~${CATEGORY}/${P} ; then |
862 |
+ default |
863 |
+ |
864 |
+ if use ctypes-python ; then |
865 |
+ python_test() { |
866 |
+ "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \ |
867 |
+ || die "ctypes-python tests fail with ${EPYTHON}" |
868 |
+ } |
869 |
+ |
870 |
+ distutils-r1_src_test |
871 |
+ fi |
872 |
+ |
873 |
+ if use python ; then |
874 |
+ swig_py_test() { |
875 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
876 |
+ "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}" |
877 |
+ popd >/dev/null || die |
878 |
+ } |
879 |
+ |
880 |
+ BUILD_DIR=subversion/bindings/swig/python \ |
881 |
+ python_foreach_impl swig_py_test |
882 |
+ fi |
883 |
+ else |
884 |
+ ewarn "The test suite shows errors when there is an older version of" |
885 |
+ ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*" |
886 |
+ ewarn "before running the test suite." |
887 |
+ ewarn "Test suite skipped." |
888 |
+ fi |
889 |
+} |
890 |
+ |
891 |
+src_install() { |
892 |
+ emake -j1 DESTDIR="${D}" local-install |
893 |
+ |
894 |
+ if use ctypes-python ; then |
895 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
896 |
+ distutils-r1_src_install |
897 |
+ popd >/dev/null || die |
898 |
+ fi |
899 |
+ |
900 |
+ if use python ; then |
901 |
+ swig_py_install() { |
902 |
+ local p=subversion/bindings/swig/python |
903 |
+ rm -f ${p} || die |
904 |
+ ln -s "${BUILD_DIR}" ${p} || die |
905 |
+ |
906 |
+ emake \ |
907 |
+ DESTDIR="${D}" \ |
908 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
909 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" \ |
910 |
+ install-swig-py |
911 |
+ } |
912 |
+ |
913 |
+ BUILD_DIR=python \ |
914 |
+ python_foreach_impl swig_py_install |
915 |
+ fi |
916 |
+ |
917 |
+ if use perl ; then |
918 |
+ emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl |
919 |
+ perl_delete_localpod |
920 |
+ find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -delete |
921 |
+ fi |
922 |
+ |
923 |
+ if use ruby ; then |
924 |
+ emake DESTDIR="${D}" install-swig-rb |
925 |
+ fi |
926 |
+ |
927 |
+ if use java ; then |
928 |
+ emake DESTDIR="${D}" install-javahl |
929 |
+ java-pkg_regso "${ED%/}"/usr/$(get_libdir)/libsvnjavahl*$(get_libname) |
930 |
+ java-pkg_dojar "${ED%/}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
931 |
+ rm -fr "${ED%/}"/usr/$(get_libdir)/svn-javahl/*.jar |
932 |
+ fi |
933 |
+ |
934 |
+ # Install Apache module configuration. |
935 |
+ if use apache2 ; then |
936 |
+ keepdir "${APACHE_MODULES_CONFDIR}" |
937 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
938 |
+ doins "${FILESDIR}/47_mod_dav_svn.conf" |
939 |
+ fi |
940 |
+ |
941 |
+ # Install Bash Completion, bug 43179. |
942 |
+ newbashcomp tools/client-side/bash_completion svn |
943 |
+ bashcomp_alias svn svn{admin,dumpfilter,look,sync,version} |
944 |
+ rm -f tools/client-side/bash_completion |
945 |
+ |
946 |
+ # Install hot backup script, bug 54304. |
947 |
+ newbin tools/backup/hot-backup.py svn-hot-backup |
948 |
+ rm -fr tools/backup |
949 |
+ |
950 |
+ # Install svnserve init-script and xinet.d snippet, bug 43245. |
951 |
+ newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
952 |
+ newconfd "${FILESDIR}"/svnserve.confd svnserve |
953 |
+ insinto /etc/xinetd.d |
954 |
+ newins "${FILESDIR}"/svnserve.xinetd svnserve |
955 |
+ |
956 |
+ #adjust default user and group with disabled apache2 USE flag, bug 381385 |
957 |
+ use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
958 |
+ -e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
959 |
+ -i "${ED%/}"/etc/init.d/svnserve || die |
960 |
+ use apache2 || sed -e "0,/apache/s//svn/" \ |
961 |
+ -e "s:apache:svnusers:" \ |
962 |
+ -i "${ED%/}"/etc/xinetd.d/svnserve || die |
963 |
+ |
964 |
+ # Install documentation. |
965 |
+ dodoc CHANGES COMMITTERS README |
966 |
+ dodoc tools/xslt/svnindex.{css,xsl} |
967 |
+ rm -fr tools/xslt |
968 |
+ |
969 |
+ # Install extra files. |
970 |
+ if use extras ; then |
971 |
+ cat <<- EOF > 80subversion-extras |
972 |
+ PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
973 |
+ ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
974 |
+ EOF |
975 |
+ doenvd 80subversion-extras |
976 |
+ |
977 |
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools |
978 |
+ |
979 |
+ find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
980 |
+ rm -fr tools/client-side/svnmucc |
981 |
+ rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
982 |
+ rm -fr tools/{buildbot,dev,diff,po} |
983 |
+ |
984 |
+ insinto /usr/share/${PN} |
985 |
+ find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die |
986 |
+ doins -r tools |
987 |
+ fi |
988 |
+ |
989 |
+ if use doc ; then |
990 |
+ docinto html |
991 |
+ dodoc -r doc/doxygen/html/* |
992 |
+ |
993 |
+ if use java ; then |
994 |
+ java-pkg_dojavadoc doc/javadoc |
995 |
+ fi |
996 |
+ fi |
997 |
+ |
998 |
+ prune_libtool_files --all |
999 |
+ |
1000 |
+ cd "${ED%/}"/usr/share/locale |
1001 |
+ for i in * ; do |
1002 |
+ [[ ${i} == *$LINGUAS* ]] || { rm -r ${i} || die ; } |
1003 |
+ done |
1004 |
+} |
1005 |
+ |
1006 |
+pkg_preinst() { |
1007 |
+ # Compare versions of Berkeley DB, bug 122877. |
1008 |
+ if use berkdb && [[ -f "${EROOT%/}/usr/bin/svn" ]] ; then |
1009 |
+ OLD_BDB_VERSION="$(scanelf -nq "${EROOT%/}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
1010 |
+ NEW_BDB_VERSION="$(scanelf -nq "${ED%/}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
1011 |
+ if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then |
1012 |
+ CHANGED_BDB_VERSION="1" |
1013 |
+ fi |
1014 |
+ fi |
1015 |
+} |
1016 |
+ |
1017 |
+pkg_postinst() { |
1018 |
+ if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then |
1019 |
+ ewarn "You upgraded from an older version of Berkeley DB and may experience" |
1020 |
+ ewarn "problems with your repository. Run the following commands as root to fix it:" |
1021 |
+ ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
1022 |
+ ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
1023 |
+ fi |
1024 |
+ |
1025 |
+ ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
1026 |
+} |
1027 |
+ |
1028 |
+pkg_postrm() { |
1029 |
+ : |
1030 |
+} |
1031 |
+ |
1032 |
+pkg_config() { |
1033 |
+ # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
1034 |
+ # already has EPREFIX in it |
1035 |
+ einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
1036 |
+ if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
1037 |
+ echo "A Subversion repository already exists and I will not overwrite it." |
1038 |
+ echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
1039 |
+ else |
1040 |
+ mkdir -p "${SVN_REPOS_LOC}/conf" |
1041 |
+ |
1042 |
+ einfo "Populating repository directory..." |
1043 |
+ # Create initial repository. |
1044 |
+ "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
1045 |
+ |
1046 |
+ einfo "Setting repository permissions..." |
1047 |
+ SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
1048 |
+ SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
1049 |
+ if use apache2 ; then |
1050 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
1051 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
1052 |
+ else |
1053 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
1054 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
1055 |
+ fi |
1056 |
+ chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
1057 |
+ chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
1058 |
+ echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
1059 |
+ echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
1060 |
+ echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
1061 |
+ echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
1062 |
+ echo "to finish the configuration." |
1063 |
+ fi |
1064 |
+} |