1 |
commit: ae5edb7a02fa508a7586ada9bf2a0368104777ac |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 14:27:35 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 28 14:27:49 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae5edb7a |
7 |
|
8 |
dev-vcs/subversion: Bump to version 1.10.0_rc1 |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
dev-vcs/subversion/Manifest | 2 + |
13 |
dev-vcs/subversion/subversion-1.10.0_rc1.ebuild | 524 ++++++++++++++++++++++++ |
14 |
2 files changed, 526 insertions(+) |
15 |
|
16 |
diff --git a/dev-vcs/subversion/Manifest b/dev-vcs/subversion/Manifest |
17 |
index 25926622225..dbf615a829a 100644 |
18 |
--- a/dev-vcs/subversion/Manifest |
19 |
+++ b/dev-vcs/subversion/Manifest |
20 |
@@ -1,3 +1,5 @@ |
21 |
+DIST subversion-1.10.0-rc1.tar.bz2 8346944 BLAKE2B 4d7594af685b74b18e8834449b33128102e49d6806881203e4e2a3a0e073d043ec2c6ee375bd70db722ebecc38b6bcc503734809ef6a0bda089bc88ed15af24c SHA512 b31bdbdc2ddd927e5ccc0ead8baebe641682eed58b7aee00bb775f0b5397a326eb25249b1138adfa92ac2724839b7a71012d77cf6be74edaaf13afd3fea76007 |
22 |
+DIST subversion-1.10.0_rc1-patches-1.tar.xz 2984 BLAKE2B 7c9619b95ca6b433a58dc5baf3a1e1b14ef0017f714af81762b975d50a37b743788a4da65cf7f9eb8e633cbc813ad8dd974b530a19ec2d3fc74b75921f8f0c17 SHA512 aa7a25a253ea2da99520399d292d3e1602985392bae6dc5582003fdb9719d654638754b6e370b68b184ee6729ba3833bd511c09b2cb36f8f476b42063f55fbb2 |
23 |
DIST subversion-1.8.18-patchset.tar.bz2 7407 BLAKE2B dc3b6d80dfdf4c6cc30f1663c8cee3eebc4f42d433c3965d8b309f9cc79c31b566a74cf43b3b04037c2498b6a2bffe2c60953c5cfb25aec61a8e4a7e928efcae SHA512 b5c207ed7b6923f1259290563409b2e946a512cc052e4e5d8a061abf3f0909dbbb15c0525a1fca618f1ec5e4abbbc8b49f3f0f714c9dd100f1d6c7e6d88442b2 |
24 |
DIST subversion-1.8.18.tar.bz2 6884906 BLAKE2B 77c0f2e43cd6d69fb360adfea78b42e38ebbfeb6c8d3407a4cdec61e2310e690859247b760f0b67e7a02a0c6d73f0cd6fa77eceed7d4e11eb19e0f0a56e50fdc SHA512 48d596c442da34fa3eb4f0f8b10cc3d5d27841b2fc4e7a493cac8e6f4c722f63fcd67fe99dfac5bbe31ac405055072a304d9a6771974c9990927cb21c5eb31d0 |
25 |
DIST subversion-1.9.7.tar.bz2 7881909 BLAKE2B 004a180780e00f5af80e14586dee799bae07dccde7f240a51594590b1a084f3054b5b4d917d5e47e0b6ffb11097ecfb97fff490f6d31c0532f2aae8cd9d10031 SHA512 a55efd3edaddbc099450d849fcc6fe5a8d20b85ece966d8ac2fd73ee9cb4255a0349bbcfceb4e9fca6daf054ce7c648eff8d273c6873f5dade6e62dcea7eeb2b |
26 |
|
27 |
diff --git a/dev-vcs/subversion/subversion-1.10.0_rc1.ebuild b/dev-vcs/subversion/subversion-1.10.0_rc1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..6d7267595a4 |
30 |
--- /dev/null |
31 |
+++ b/dev-vcs/subversion/subversion-1.10.0_rc1.ebuild |
32 |
@@ -0,0 +1,524 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+USE_RUBY="ruby23 ruby22 ruby21" |
40 |
+DISTUTILS_OPTIONAL=1 |
41 |
+WANT_AUTOMAKE="none" |
42 |
+GENTOO_DEPEND_ON_PERL="no" |
43 |
+ |
44 |
+inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common flag-o-matic java-pkg-opt-2 libtool ltprune multilib perl-module ruby-single xdg-utils |
45 |
+ |
46 |
+MY_P="${P/_/-}" |
47 |
+DESCRIPTION="Advanced version control system" |
48 |
+HOMEPAGE="https://subversion.apache.org/" |
49 |
+SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2 |
50 |
+ https://dev.gentoo.org/~polynomial-c/${PN}-1.10.0_rc1-patches-1.tar.xz" |
51 |
+S="${WORKDIR}/${MY_P}" |
52 |
+ |
53 |
+LICENSE="Subversion GPL-2" |
54 |
+SLOT="0" |
55 |
+[[ "${PV}" = *_rc* ]] || \ |
56 |
+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" |
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 |
+ app-arch/lz4 |
62 |
+ >=dev-db/sqlite-3.7.12 |
63 |
+ >=dev-libs/apr-1.3:1 |
64 |
+ >=dev-libs/apr-util-1.3:1 |
65 |
+ dev-libs/expat |
66 |
+ dev-libs/libutf8proc |
67 |
+ sys-apps/file |
68 |
+ sys-libs/zlib |
69 |
+ berkdb? ( >=sys-libs/db-4.0.14:= ) |
70 |
+ ctypes-python? ( ${PYTHON_DEPS} ) |
71 |
+ gnome-keyring? ( |
72 |
+ dev-libs/glib:2 |
73 |
+ gnome-base/libgnome-keyring |
74 |
+ sys-apps/dbus |
75 |
+ ) |
76 |
+ http? ( >=net-libs/serf-1.3.4 ) |
77 |
+ kwallet? ( |
78 |
+ dev-qt/qtcore:5 |
79 |
+ dev-qt/qtdbus:5 |
80 |
+ dev-qt/qtgui:5 |
81 |
+ kde-frameworks/kcoreaddons:5 |
82 |
+ kde-frameworks/ki18n:5 |
83 |
+ kde-frameworks/kwallet:5 |
84 |
+ sys-apps/dbus |
85 |
+ ) |
86 |
+ perl? ( dev-lang/perl:= ) |
87 |
+ python? ( ${PYTHON_DEPS} ) |
88 |
+ ruby? ( ${RUBY_DEPS} ) |
89 |
+ sasl? ( dev-libs/cyrus-sasl )" |
90 |
+RDEPEND="${COMMON_DEPEND} |
91 |
+ apache2? ( www-servers/apache[apache2_modules_dav] ) |
92 |
+ java? ( >=virtual/jre-1.5 ) |
93 |
+ nls? ( virtual/libintl ) |
94 |
+ perl? ( dev-perl/URI )" |
95 |
+# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once |
96 |
+DEPEND="${COMMON_DEPEND} |
97 |
+ !!<sys-apps/sandbox-1.6 |
98 |
+ ctypes-python? ( dev-python/ctypesgen ) |
99 |
+ doc? ( app-doc/doxygen ) |
100 |
+ gnome-keyring? ( virtual/pkgconfig ) |
101 |
+ http? ( virtual/pkgconfig ) |
102 |
+ java? ( >=virtual/jdk-1.5 ) |
103 |
+ kwallet? ( |
104 |
+ kde-frameworks/kdelibs4support:5 |
105 |
+ virtual/pkgconfig |
106 |
+ ) |
107 |
+ nls? ( sys-devel/gettext ) |
108 |
+ test? ( ${PYTHON_DEPS} )" |
109 |
+ |
110 |
+REQUIRED_USE=" |
111 |
+ ctypes-python? ( ${PYTHON_REQUIRED_USE} ) |
112 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
113 |
+ test? ( |
114 |
+ ${PYTHON_REQUIRED_USE} |
115 |
+ !dso |
116 |
+ )" |
117 |
+ |
118 |
+want_apache |
119 |
+ |
120 |
+pkg_setup() { |
121 |
+ if use berkdb ; then |
122 |
+ local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
123 |
+ | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
124 |
+ | sed 's:.*b::')" |
125 |
+ einfo |
126 |
+ if [[ -z "${SVN_BDB_VERSION}" ]] ; then |
127 |
+ if [[ -n "${apu_bdb_version}" ]] ; then |
128 |
+ SVN_BDB_VERSION="${apu_bdb_version}" |
129 |
+ einfo "Matching db version to apr-util" |
130 |
+ else |
131 |
+ SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
132 |
+ einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
133 |
+ fi |
134 |
+ fi |
135 |
+ einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
136 |
+ einfo |
137 |
+ |
138 |
+ if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
139 |
+ eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
140 |
+ eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
141 |
+ eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
142 |
+ eerror "Aborting to avoid possible run-time crashes." |
143 |
+ die "Berkeley DB version mismatch" |
144 |
+ fi |
145 |
+ fi |
146 |
+ |
147 |
+ depend.apache_pkg_setup |
148 |
+ |
149 |
+ java-pkg-opt-2_pkg_setup |
150 |
+ |
151 |
+ if ! use http ; then |
152 |
+ ewarn "WebDAV support is disabled. You need WebDAV to" |
153 |
+ ewarn "access repositories through the HTTP protocol." |
154 |
+ ewarn "Consider enabling \"http\" USE flag" |
155 |
+ echo -ne "\a" |
156 |
+ fi |
157 |
+ |
158 |
+ if use debug ; then |
159 |
+ append-cppflags -DSVN_DEBUG -DAP_DEBUG |
160 |
+ fi |
161 |
+ |
162 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E |
163 |
+ [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__ |
164 |
+ |
165 |
+ # Allow for custom repository locations. |
166 |
+ SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
167 |
+ |
168 |
+ if use ruby ; then |
169 |
+ local rbslot |
170 |
+ RB_VER="" |
171 |
+ for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@g' <<< ${USE_RUBY//ruby}) ; do |
172 |
+ if has_version dev-lang/ruby:${rbslot} ; then |
173 |
+ RB_VER="${rbslot/.}" |
174 |
+ break |
175 |
+ fi |
176 |
+ done |
177 |
+ [[ -z "${RB_VER}" ]] && die "No useable ruby version found" |
178 |
+ fi |
179 |
+} |
180 |
+ |
181 |
+src_prepare() { |
182 |
+ eapply "${WORKDIR}/patches" |
183 |
+ eapply_user |
184 |
+ |
185 |
+ fperms +x build/transform_libtool_scripts.sh |
186 |
+ |
187 |
+ sed -i \ |
188 |
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
189 |
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
190 |
+ |
191 |
+ # this bites us in particular on Solaris |
192 |
+ sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
193 |
+ die "/bin/sh is not POSIX shell!" |
194 |
+ |
195 |
+ eautoconf |
196 |
+ elibtoolize |
197 |
+ |
198 |
+ sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \ |
199 |
+ -i build-outputs.mk || die "sed failed" |
200 |
+ |
201 |
+ if use python ; then |
202 |
+ # XXX: make python_copy_sources accept path |
203 |
+ S=${S}/subversion/bindings/swig/python python_copy_sources |
204 |
+ rm -r "${S}"/subversion/bindings/swig/python || die |
205 |
+ fi |
206 |
+ |
207 |
+ xdg_environment_reset |
208 |
+} |
209 |
+ |
210 |
+src_configure() { |
211 |
+ local myconf=( |
212 |
+ --libdir="${EPREFIX%/}/usr/$(get_libdir)" |
213 |
+ $(use_with apache2 apache-libexecdir) |
214 |
+ $(use_with apache2 apxs "${APXS}") |
215 |
+ $(use_with berkdb berkeley-db "db.h:${EPREFIX%/}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") |
216 |
+ $(use_with ctypes-python ctypesgen "${EPREFIX%/}/usr") |
217 |
+ $(use_enable dso runtime-module-search) |
218 |
+ $(use_with gnome-keyring) |
219 |
+ $(use_enable java javahl) |
220 |
+ $(use_with java jdk "${JAVA_HOME}") |
221 |
+ $(use_with kwallet) |
222 |
+ $(use_enable nls) |
223 |
+ $(use_with sasl) |
224 |
+ $(use_with http serf) |
225 |
+ --with-apr="${EPREFIX%/}/usr/bin/apr-1-config" |
226 |
+ --with-apr-util="${EPREFIX%/}/usr/bin/apu-1-config" |
227 |
+ --disable-experimental-libtool |
228 |
+ --without-jikes |
229 |
+ --disable-mod-activation |
230 |
+ --disable-static |
231 |
+ ) |
232 |
+ |
233 |
+ if use python || use perl || use ruby; then |
234 |
+ myconf+=( --with-swig ) |
235 |
+ else |
236 |
+ myconf+=( --without-swig ) |
237 |
+ fi |
238 |
+ |
239 |
+ if use java ; then |
240 |
+ myconf+=( --without-junit ) |
241 |
+ fi |
242 |
+ |
243 |
+ case ${CHOST} in |
244 |
+ *-aix*) |
245 |
+ # avoid recording immediate path to sharedlibs into executables |
246 |
+ append-ldflags -Wl,-bnoipath |
247 |
+ ;; |
248 |
+ *-cygwin*) |
249 |
+ # no LD_PRELOAD support, no undefined symbols |
250 |
+ myconf+=( --disable-local-library-preloading LT_LDFLAGS=-no-undefined ) |
251 |
+ ;; |
252 |
+ *-interix*) |
253 |
+ # loader crashes on the LD_PRELOADs... |
254 |
+ myconf+=( --disable-local-library-preloading ) |
255 |
+ ;; |
256 |
+ *-solaris*) |
257 |
+ # need -lintl to link |
258 |
+ use nls && append-libs intl |
259 |
+ # this breaks installation, on x64 echo replacement is 32-bits |
260 |
+ myconf+=( --disable-local-library-preloading ) |
261 |
+ ;; |
262 |
+ *-mint*) |
263 |
+ myconf+=( --enable-all-static --disable-local-library-preloading ) |
264 |
+ ;; |
265 |
+ *) |
266 |
+ # inject LD_PRELOAD entries for easy in-tree development |
267 |
+ myconf+=( --enable-local-library-preloading ) |
268 |
+ ;; |
269 |
+ esac |
270 |
+ |
271 |
+ #version 1.7.7 again tries to link against the older installed version and fails, when trying to |
272 |
+ #compile for x86 on amd64, so workaround this issue again |
273 |
+ #check newer versions, if this is still/again needed |
274 |
+ myconf+=( --disable-disallowing-of-undefined-references ) |
275 |
+ |
276 |
+ # for build-time scripts |
277 |
+ if use ctypes-python || use python || use test; then |
278 |
+ python_setup |
279 |
+ fi |
280 |
+ |
281 |
+ if use python && [[ ${CHOST} == *-darwin* ]] ; then |
282 |
+ export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
283 |
+ export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
284 |
+ export ac_cv_python_compile="$(tc-getCC)" |
285 |
+ fi |
286 |
+ |
287 |
+ # allow overriding Python include directory |
288 |
+ ac_cv_path_RUBY=$(usex ruby "${EPREFIX%/}/usr/bin/ruby${RB_VER}" "none") \ |
289 |
+ ac_cv_path_RDOC=$(usex ruby "${EPREFIX%/}/usr/bin/rdoc${RB_VER}" "none") \ |
290 |
+ ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \ |
291 |
+ econf "${myconf[@]}" |
292 |
+} |
293 |
+ |
294 |
+src_compile() { |
295 |
+ emake local-all |
296 |
+ |
297 |
+ if use ctypes-python ; then |
298 |
+ # pre-generate .py files |
299 |
+ use ctypes-python && emake ctypes-python |
300 |
+ |
301 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
302 |
+ distutils-r1_src_compile |
303 |
+ popd >/dev/null || die |
304 |
+ fi |
305 |
+ |
306 |
+ if use python ; then |
307 |
+ swig_py_compile() { |
308 |
+ local p=subversion/bindings/swig/python |
309 |
+ rm -f ${p} || die |
310 |
+ ln -s "${BUILD_DIR}" ${p} || die |
311 |
+ |
312 |
+ python_export PYTHON_INCLUDEDIR |
313 |
+ emake swig-py \ |
314 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
315 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" |
316 |
+ } |
317 |
+ |
318 |
+ # this will give us proper BUILD_DIR for symlinking |
319 |
+ BUILD_DIR=python \ |
320 |
+ python_foreach_impl swig_py_compile |
321 |
+ fi |
322 |
+ |
323 |
+ if use perl ; then |
324 |
+ emake swig-pl |
325 |
+ fi |
326 |
+ |
327 |
+ if use ruby ; then |
328 |
+ emake swig-rb |
329 |
+ fi |
330 |
+ |
331 |
+ if use java ; then |
332 |
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl |
333 |
+ fi |
334 |
+ |
335 |
+ if use extras ; then |
336 |
+ emake tools |
337 |
+ fi |
338 |
+ |
339 |
+ if use doc ; then |
340 |
+ doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
341 |
+ |
342 |
+ if use java; then |
343 |
+ emake doc-javahl |
344 |
+ fi |
345 |
+ fi |
346 |
+} |
347 |
+ |
348 |
+src_test() { |
349 |
+ if has_version ~${CATEGORY}/${P} ; then |
350 |
+ default |
351 |
+ |
352 |
+ if use ctypes-python ; then |
353 |
+ python_test() { |
354 |
+ "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \ |
355 |
+ || die "ctypes-python tests fail with ${EPYTHON}" |
356 |
+ } |
357 |
+ |
358 |
+ distutils-r1_src_test |
359 |
+ fi |
360 |
+ |
361 |
+ if use python ; then |
362 |
+ swig_py_test() { |
363 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
364 |
+ "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}" |
365 |
+ popd >/dev/null || die |
366 |
+ } |
367 |
+ |
368 |
+ BUILD_DIR=subversion/bindings/swig/python \ |
369 |
+ python_foreach_impl swig_py_test |
370 |
+ fi |
371 |
+ else |
372 |
+ ewarn "The test suite shows errors when there is an older version of" |
373 |
+ ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*" |
374 |
+ ewarn "before running the test suite." |
375 |
+ ewarn "Test suite skipped." |
376 |
+ fi |
377 |
+} |
378 |
+ |
379 |
+src_install() { |
380 |
+ emake -j1 DESTDIR="${D}" local-install |
381 |
+ |
382 |
+ if use ctypes-python ; then |
383 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
384 |
+ distutils-r1_src_install |
385 |
+ popd >/dev/null || die |
386 |
+ fi |
387 |
+ |
388 |
+ if use python ; then |
389 |
+ swig_py_install() { |
390 |
+ local p=subversion/bindings/swig/python |
391 |
+ rm -f ${p} || die |
392 |
+ ln -s "${BUILD_DIR}" ${p} || die |
393 |
+ |
394 |
+ emake \ |
395 |
+ DESTDIR="${D}" \ |
396 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
397 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" \ |
398 |
+ install-swig-py |
399 |
+ } |
400 |
+ |
401 |
+ BUILD_DIR=python \ |
402 |
+ python_foreach_impl swig_py_install |
403 |
+ fi |
404 |
+ |
405 |
+ if use perl ; then |
406 |
+ emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl |
407 |
+ perl_delete_localpod |
408 |
+ find "${ED}" \( -name .packlist -o -name "*.bs" \) -delete || die |
409 |
+ fi |
410 |
+ |
411 |
+ if use ruby ; then |
412 |
+ emake DESTDIR="${D}" install-swig-rb |
413 |
+ fi |
414 |
+ |
415 |
+ if use java ; then |
416 |
+ emake DESTDIR="${D}" install-javahl |
417 |
+ java-pkg_regso "${ED%/}"/usr/$(get_libdir)/libsvnjavahl*$(get_libname) |
418 |
+ java-pkg_dojar "${ED%/}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
419 |
+ rm -fr "${ED%/}"/usr/$(get_libdir)/svn-javahl/*.jar |
420 |
+ fi |
421 |
+ |
422 |
+ # Install Apache module configuration. |
423 |
+ if use apache2 ; then |
424 |
+ keepdir "${APACHE_MODULES_CONFDIR}" |
425 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
426 |
+ doins "${FILESDIR}/47_mod_dav_svn.conf" |
427 |
+ fi |
428 |
+ |
429 |
+ # Install Bash Completion, bug 43179. |
430 |
+ newbashcomp tools/client-side/bash_completion svn |
431 |
+ bashcomp_alias svn svn{admin,dumpfilter,look,sync,version} |
432 |
+ rm -f tools/client-side/bash_completion |
433 |
+ |
434 |
+ # Install hot backup script, bug 54304. |
435 |
+ newbin tools/backup/hot-backup.py svn-hot-backup |
436 |
+ rm -fr tools/backup |
437 |
+ |
438 |
+ # Install svnserve init-script and xinet.d snippet, bug 43245. |
439 |
+ newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
440 |
+ newconfd "${FILESDIR}"/svnserve.confd svnserve |
441 |
+ insinto /etc/xinetd.d |
442 |
+ newins "${FILESDIR}"/svnserve.xinetd svnserve |
443 |
+ |
444 |
+ #adjust default user and group with disabled apache2 USE flag, bug 381385 |
445 |
+ if ! use apache2 ; then |
446 |
+ sed -e "s\USER:-apache\USER:-svn\g" \ |
447 |
+ -e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
448 |
+ -i "${ED%/}"/etc/init.d/svnserve || die |
449 |
+ sed -e "0,/apache/s//svn/" \ |
450 |
+ -e "s:apache:svnusers:" \ |
451 |
+ -i "${ED%/}"/etc/xinetd.d/svnserve || die |
452 |
+ fi |
453 |
+ |
454 |
+ # Install documentation. |
455 |
+ dodoc CHANGES COMMITTERS README |
456 |
+ dodoc tools/xslt/svnindex.{css,xsl} |
457 |
+ rm -fr tools/xslt |
458 |
+ |
459 |
+ # Install extra files. |
460 |
+ if use extras ; then |
461 |
+ cat <<- EOF > 80subversion-extras |
462 |
+ PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
463 |
+ ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
464 |
+ EOF |
465 |
+ doenvd 80subversion-extras |
466 |
+ |
467 |
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools |
468 |
+ |
469 |
+ find tools \( -name "*.bat" -o -name "*.in" -o -name ".libs" \) -print0 | xargs -0 rm -fr |
470 |
+ rm -fr tools/client-side/svnmucc |
471 |
+ rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
472 |
+ rm -fr tools/{buildbot,dev,diff,po} |
473 |
+ |
474 |
+ insinto /usr/share/${PN} |
475 |
+ find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die |
476 |
+ doins -r tools |
477 |
+ fi |
478 |
+ |
479 |
+ if use doc ; then |
480 |
+ docinto html |
481 |
+ dodoc -r doc/doxygen/html/* |
482 |
+ |
483 |
+ if use java ; then |
484 |
+ java-pkg_dojavadoc doc/javadoc |
485 |
+ fi |
486 |
+ fi |
487 |
+ |
488 |
+ prune_libtool_files --all |
489 |
+ |
490 |
+ cd "${ED%/}"/usr/share/locale |
491 |
+ for i in * ; do |
492 |
+ if [[ ${i} != *${LINGUAS}* ]] ; then |
493 |
+ rm -r ${i} || die |
494 |
+ fi |
495 |
+ done |
496 |
+} |
497 |
+ |
498 |
+pkg_preinst() { |
499 |
+ # Compare versions of Berkeley DB, bug 122877. |
500 |
+ if use berkdb && [[ -f "${EROOT}/usr/bin/svn" ]] ; then |
501 |
+ 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/")" |
502 |
+ 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/")" |
503 |
+ if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then |
504 |
+ CHANGED_BDB_VERSION="1" |
505 |
+ fi |
506 |
+ fi |
507 |
+} |
508 |
+ |
509 |
+pkg_postinst() { |
510 |
+ if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then |
511 |
+ ewarn "You upgraded from an older version of Berkeley DB and may experience" |
512 |
+ ewarn "problems with your repository. Run the following commands as root to fix it:" |
513 |
+ ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
514 |
+ ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
515 |
+ fi |
516 |
+ |
517 |
+ ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
518 |
+} |
519 |
+ |
520 |
+pkg_postrm() { |
521 |
+ : |
522 |
+} |
523 |
+ |
524 |
+pkg_config() { |
525 |
+ # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
526 |
+ # already has EPREFIX in it |
527 |
+ einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
528 |
+ if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
529 |
+ echo "A Subversion repository already exists and I will not overwrite it." |
530 |
+ echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
531 |
+ else |
532 |
+ mkdir -p "${SVN_REPOS_LOC}/conf" |
533 |
+ |
534 |
+ einfo "Populating repository directory..." |
535 |
+ # Create initial repository. |
536 |
+ "${EROOT}/usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
537 |
+ |
538 |
+ einfo "Setting repository permissions..." |
539 |
+ SVNSERVE_USER="$(. "${EROOT}/etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
540 |
+ SVNSERVE_GROUP="$(. "${EROOT}/etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
541 |
+ if use apache2 ; then |
542 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
543 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
544 |
+ else |
545 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
546 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
547 |
+ fi |
548 |
+ chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
549 |
+ chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
550 |
+ echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
551 |
+ echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
552 |
+ echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
553 |
+ echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
554 |
+ echo "to finish the configuration." |
555 |
+ fi |
556 |
+} |