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