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