Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-vcs/subversion: ChangeLog subversion-1.8.13-r2.ebuild subversion-1.8.13-r1.ebuild subversion-1.8.13.ebuild
Date: Sat, 30 May 2015 14:55:15
Message-Id: 20150530145509.C1349A0C@oystercatcher.gentoo.org
1 polynomial-c 15/05/30 14:55:09
2
3 Modified: ChangeLog
4 Added: subversion-1.8.13-r2.ebuild
5 subversion-1.8.13-r1.ebuild
6 Removed: subversion-1.8.13.ebuild
7 Log:
8 Split subversion-1.8.13 into two versions. One for stable users depending on ruby20 and one for unstable users depending on ruby21
9
10 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
11
12 Revision Changes Path
13 1.232 dev-vcs/subversion/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.232&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.232&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?r1=1.231&r2=1.232
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v
22 retrieving revision 1.231
23 retrieving revision 1.232
24 diff -u -r1.231 -r1.232
25 --- ChangeLog 27 May 2015 15:48:51 -0000 1.231
26 +++ ChangeLog 30 May 2015 14:55:09 -0000 1.232
27 @@ -1,6 +1,15 @@
28 # ChangeLog for dev-vcs/subversion
29 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.231 2015/05/27 15:48:51 maekke Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.232 2015/05/30 14:55:09 polynomial-c Exp $
32 +
33 +*subversion-1.8.13-r2 (30 May 2015)
34 +*subversion-1.8.13-r1 (30 May 2015)
35 +
36 + 30 May 2015; Lars Wendler <polynomial-c@g.o>
37 + -subversion-1.8.13.ebuild, +subversion-1.8.13-r1.ebuild,
38 + +subversion-1.8.13-r2.ebuild:
39 + Split subversion-1.8.13 into two versions. One for stable users depending on
40 + ruby20 and one for unstable users depending on ruby21.
41
42 27 May 2015; Markus Meier <maekke@g.o> subversion-1.7.20.ebuild:
43 arm stable, bug #545348
44
45
46
47 1.1 dev-vcs/subversion/subversion-1.8.13-r2.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r2.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r2.ebuild?rev=1.1&content-type=text/plain
51
52 Index: subversion-1.8.13-r2.ebuild
53 ===================================================================
54 # Copyright 1999-2015 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r2.ebuild,v 1.1 2015/05/30 14:55:09 polynomial-c Exp $
57
58 EAPI=5
59 PYTHON_COMPAT=( python2_7 )
60 DISTUTILS_OPTIONAL=1
61 WANT_AUTOMAKE="none"
62 GENTOO_DEPEND_ON_PERL="no"
63
64 inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module eutils
65
66 MY_P="${P/_/-}"
67 DESCRIPTION="Advanced version control system"
68 HOMEPAGE="http://subversion.apache.org/"
69 SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2"
70 S="${WORKDIR}/${MY_P}"
71
72 LICENSE="Subversion GPL-2"
73 SLOT="0"
74 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"
75 IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl test vim-syntax"
76
77 COMMON_DEPEND=">=dev-db/sqlite-3.7.12
78 >=dev-libs/apr-1.3:1
79 >=dev-libs/apr-util-1.3:1
80 dev-libs/expat
81 sys-apps/file
82 sys-libs/zlib
83 app-arch/bzip2
84 berkdb? ( >=sys-libs/db-4.0.14:= )
85 ctypes-python? ( ${PYTHON_DEPS} )
86 gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring )
87 kde? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 >=kde-base/kdelibs-4:4 )
88 perl? ( dev-lang/perl:= )
89 python? ( ${PYTHON_DEPS} )
90 ruby? ( >=dev-lang/ruby-2.1:2.1
91 dev-ruby/rubygems[ruby_targets_ruby21] )
92 sasl? ( dev-libs/cyrus-sasl )
93 http? ( >=net-libs/serf-1.2.1 )"
94 RDEPEND="${COMMON_DEPEND}
95 apache2? ( www-servers/apache[apache2_modules_dav] )
96 java? ( >=virtual/jre-1.5 )
97 kde? ( || ( kde-apps/kwalletd:4 kde-base/kwalletd ) )
98 nls? ( virtual/libintl )
99 perl? ( dev-perl/URI )"
100 # Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once
101 DEPEND="${COMMON_DEPEND}
102 !!<sys-apps/sandbox-1.6
103 ctypes-python? ( dev-python/ctypesgen )
104 doc? ( app-doc/doxygen )
105 gnome-keyring? ( virtual/pkgconfig )
106 http? ( virtual/pkgconfig )
107 java? ( >=virtual/jdk-1.5 )
108 kde? ( virtual/pkgconfig )
109 nls? ( sys-devel/gettext )
110 test? ( ${PYTHON_DEPS} )"
111
112 REQUIRED_USE="
113 ctypes-python? ( ${PYTHON_REQUIRED_USE} )
114 python? ( ${PYTHON_REQUIRED_USE} )
115 test? (
116 ${PYTHON_REQUIRED_USE}
117 !dso
118 )"
119
120 want_apache
121
122 pkg_setup() {
123 if use berkdb ; then
124 local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \
125 | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \
126 | sed 's:.*b::')"
127 einfo
128 if [[ -z "${SVN_BDB_VERSION}" ]] ; then
129 if [[ -n "${apu_bdb_version}" ]] ; then
130 SVN_BDB_VERSION="${apu_bdb_version}"
131 einfo "Matching db version to apr-util"
132 else
133 SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
134 einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
135 fi
136 fi
137 einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
138 einfo
139
140 if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
141 eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
142 eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
143 eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
144 eerror "Aborting to avoid possible run-time crashes."
145 die "Berkeley DB version mismatch"
146 fi
147 fi
148
149 depend.apache_pkg_setup
150
151 java-pkg-opt-2_pkg_setup
152
153 if ! use http ; then
154 ewarn "WebDAV support is disabled. You need WebDAV to"
155 ewarn "access repositories through the HTTP protocol."
156 ewarn "Consider enabling \"http\" USE flag"
157 echo -ne "\a"
158 fi
159
160 if use debug ; then
161 append-cppflags -DSVN_DEBUG -DAP_DEBUG
162 fi
163
164 # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E
165 [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__
166
167 # Allow for custom repository locations.
168 SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}"
169 }
170
171 src_prepare() {
172 epatch "${FILESDIR}"/${PN}-1.5.4-interix.patch \
173 "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch \
174 "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch \
175 "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch \
176 "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch
177 epatch_user
178
179 fperms +x build/transform_libtool_scripts.sh
180
181 sed -i \
182 -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
183 -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
184
185 # this bites us in particular on Solaris
186 sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
187 die "/bin/sh is not POSIX shell!"
188
189 eautoconf
190 elibtoolize
191
192 sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \
193 -i build-outputs.mk || die "sed failed"
194
195 if use python ; then
196 if [[ ${CHOST} == *-darwin* ]] ; then
197 # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C20130614113003.GA19257@××××××.local2%3E
198 # in short, we don't have gnome-keyring stuff here, patch
199 # borrowed from MacPorts
200 epatch "${FILESDIR}"/${PN}-1.8.5-swig-python-no-gnome-keyring.patch
201 fi
202
203 # XXX: make python_copy_sources accept path
204 S=${S}/subversion/bindings/swig/python python_copy_sources
205 rm -r "${S}"/subversion/bindings/swig/python || die
206 fi
207 }
208
209 src_configure() {
210 local myconf
211
212 if use python || use perl || use ruby; then
213 myconf+=" --with-swig"
214 else
215 myconf+=" --without-swig"
216 fi
217
218 if use java ; then
219 myconf+=" --without-junit"
220 fi
221
222 case ${CHOST} in
223 *-aix*)
224 # avoid recording immediate path to sharedlibs into executables
225 append-ldflags -Wl,-bnoipath
226 ;;
227 *-interix*)
228 # loader crashes on the LD_PRELOADs...
229 myconf+=" --disable-local-library-preloading"
230 ;;
231 *-solaris*)
232 # need -lintl to link
233 use nls && append-libs intl
234 # this breaks installation, on x64 echo replacement is 32-bits
235 myconf+=" --disable-local-library-preloading"
236 ;;
237 *-mint*)
238 myconf+=" --enable-all-static --disable-local-library-preloading"
239 ;;
240 *)
241 # inject LD_PRELOAD entries for easy in-tree development
242 myconf+=" --enable-local-library-preloading"
243 ;;
244 esac
245
246 #version 1.7.7 again tries to link against the older installed version and fails, when trying to
247 #compile for x86 on amd64, so workaround this issue again
248 #check newer versions, if this is still/again needed
249 myconf+=" --disable-disallowing-of-undefined-references"
250
251 # for build-time scripts
252 if use ctypes-python || use python || use test; then
253 python_export_best
254 fi
255
256 if use python && [[ ${CHOST} == *-darwin* ]] ; then
257 export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
258 export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
259 export ac_cv_python_compile="$(tc-getCC)"
260 fi
261
262 # force ruby-2.1
263 # allow overriding Python include directory
264 ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby21" "none") \
265 ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc21" "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 kde 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 dohtml -r doc/doxygen/html/*
474
475 if use java ; then
476 java-pkg_dojavadoc doc/javadoc
477 fi
478 fi
479
480 prune_libtool_files --all
481
482 cd "${ED}"usr/share/locale
483 for i in * ; do
484 [[ $i == *$LINGUAS* ]] || { rm -r $i || die ; }
485 done
486 }
487
488 pkg_preinst() {
489 # Compare versions of Berkeley DB, bug 122877.
490 if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]] ; then
491 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/")"
492 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/")"
493 if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
494 CHANGED_BDB_VERSION="1"
495 fi
496 fi
497 }
498
499 pkg_postinst() {
500 if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
501 ewarn "You upgraded from an older version of Berkeley DB and may experience"
502 ewarn "problems with your repository. Run the following commands as root to fix it:"
503 ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
504 ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
505 fi
506
507 ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches."
508 }
509
510 pkg_postrm() {
511 :
512 }
513
514 pkg_config() {
515 # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC}
516 # already has EPREFIX in it
517 einfo "Initializing the database in ${SVN_REPOS_LOC}..."
518 if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then
519 echo "A Subversion repository already exists and I will not overwrite it."
520 echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
521 else
522 mkdir -p "${SVN_REPOS_LOC}/conf"
523
524 einfo "Populating repository directory..."
525 # Create initial repository.
526 "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos"
527
528 einfo "Setting repository permissions..."
529 SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
530 SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
531 if use apache2 ; then
532 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
533 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
534 else
535 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
536 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
537 fi
538 chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf"
539 chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos"
540 echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet."
541 echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\""
542 echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet."
543 echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\""
544 echo "to finish the configuration."
545 fi
546 }
547
548
549
550 1.1 dev-vcs/subversion/subversion-1.8.13-r1.ebuild
551
552 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r1.ebuild?rev=1.1&view=markup
553 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r1.ebuild?rev=1.1&content-type=text/plain
554
555 Index: subversion-1.8.13-r1.ebuild
556 ===================================================================
557 # Copyright 1999-2015 Gentoo Foundation
558 # Distributed under the terms of the GNU General Public License v2
559 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.8.13-r1.ebuild,v 1.1 2015/05/30 14:55:09 polynomial-c Exp $
560
561 EAPI=5
562 PYTHON_COMPAT=( python2_7 )
563 DISTUTILS_OPTIONAL=1
564 WANT_AUTOMAKE="none"
565 GENTOO_DEPEND_ON_PERL="no"
566
567 inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module eutils
568
569 MY_P="${P/_/-}"
570 DESCRIPTION="Advanced version control system"
571 HOMEPAGE="http://subversion.apache.org/"
572 SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2"
573 S="${WORKDIR}/${MY_P}"
574
575 LICENSE="Subversion GPL-2"
576 SLOT="0"
577 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"
578 IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl test vim-syntax"
579
580 COMMON_DEPEND=">=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 app-arch/bzip2
587 berkdb? ( >=sys-libs/db-4.0.14:= )
588 ctypes-python? ( ${PYTHON_DEPS} )
589 gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring )
590 kde? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 >=kde-base/kdelibs-4:4 )
591 perl? ( dev-lang/perl:= )
592 python? ( ${PYTHON_DEPS} )
593 ruby? ( >=dev-lang/ruby-2.0:2.0
594 dev-ruby/rubygems[ruby_targets_ruby20] )
595 sasl? ( dev-libs/cyrus-sasl )
596 http? ( >=net-libs/serf-1.2.1 )"
597 RDEPEND="${COMMON_DEPEND}
598 apache2? ( www-servers/apache[apache2_modules_dav] )
599 java? ( >=virtual/jre-1.5 )
600 kde? ( || ( kde-apps/kwalletd:4 kde-base/kwalletd ) )
601 nls? ( virtual/libintl )
602 perl? ( dev-perl/URI )"
603 # Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once
604 DEPEND="${COMMON_DEPEND}
605 !!<sys-apps/sandbox-1.6
606 ctypes-python? ( dev-python/ctypesgen )
607 doc? ( app-doc/doxygen )
608 gnome-keyring? ( virtual/pkgconfig )
609 http? ( virtual/pkgconfig )
610 java? ( >=virtual/jdk-1.5 )
611 kde? ( virtual/pkgconfig )
612 nls? ( sys-devel/gettext )
613 test? ( ${PYTHON_DEPS} )"
614
615 REQUIRED_USE="
616 ctypes-python? ( ${PYTHON_REQUIRED_USE} )
617 python? ( ${PYTHON_REQUIRED_USE} )
618 test? (
619 ${PYTHON_REQUIRED_USE}
620 !dso
621 )"
622
623 want_apache
624
625 pkg_setup() {
626 if use berkdb ; then
627 local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \
628 | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \
629 | sed 's:.*b::')"
630 einfo
631 if [[ -z "${SVN_BDB_VERSION}" ]] ; then
632 if [[ -n "${apu_bdb_version}" ]] ; then
633 SVN_BDB_VERSION="${apu_bdb_version}"
634 einfo "Matching db version to apr-util"
635 else
636 SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
637 einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
638 fi
639 fi
640 einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
641 einfo
642
643 if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
644 eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
645 eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
646 eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
647 eerror "Aborting to avoid possible run-time crashes."
648 die "Berkeley DB version mismatch"
649 fi
650 fi
651
652 depend.apache_pkg_setup
653
654 java-pkg-opt-2_pkg_setup
655
656 if ! use http ; then
657 ewarn "WebDAV support is disabled. You need WebDAV to"
658 ewarn "access repositories through the HTTP protocol."
659 ewarn "Consider enabling \"http\" USE flag"
660 echo -ne "\a"
661 fi
662
663 if use debug ; then
664 append-cppflags -DSVN_DEBUG -DAP_DEBUG
665 fi
666
667 # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E
668 [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__
669
670 # Allow for custom repository locations.
671 SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}"
672 }
673
674 src_prepare() {
675 epatch "${FILESDIR}"/${PN}-1.5.4-interix.patch \
676 "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch \
677 "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch \
678 "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch \
679 "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch
680 epatch_user
681
682 fperms +x build/transform_libtool_scripts.sh
683
684 sed -i \
685 -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
686 -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
687
688 # this bites us in particular on Solaris
689 sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
690 die "/bin/sh is not POSIX shell!"
691
692 eautoconf
693 elibtoolize
694
695 sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \
696 -i build-outputs.mk || die "sed failed"
697
698 if use python ; then
699 if [[ ${CHOST} == *-darwin* ]] ; then
700 # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C20130614113003.GA19257@××××××.local2%3E
701 # in short, we don't have gnome-keyring stuff here, patch
702 # borrowed from MacPorts
703 epatch "${FILESDIR}"/${PN}-1.8.5-swig-python-no-gnome-keyring.patch
704 fi
705
706 # XXX: make python_copy_sources accept path
707 S=${S}/subversion/bindings/swig/python python_copy_sources
708 rm -r "${S}"/subversion/bindings/swig/python || die
709 fi
710 }
711
712 src_configure() {
713 local myconf
714
715 if use python || use perl || use ruby; then
716 myconf+=" --with-swig"
717 else
718 myconf+=" --without-swig"
719 fi
720
721 if use java ; then
722 myconf+=" --without-junit"
723 fi
724
725 case ${CHOST} in
726 *-aix*)
727 # avoid recording immediate path to sharedlibs into executables
728 append-ldflags -Wl,-bnoipath
729 ;;
730 *-interix*)
731 # loader crashes on the LD_PRELOADs...
732 myconf+=" --disable-local-library-preloading"
733 ;;
734 *-solaris*)
735 # need -lintl to link
736 use nls && append-libs intl
737 # this breaks installation, on x64 echo replacement is 32-bits
738 myconf+=" --disable-local-library-preloading"
739 ;;
740 *-mint*)
741 myconf+=" --enable-all-static --disable-local-library-preloading"
742 ;;
743 *)
744 # inject LD_PRELOAD entries for easy in-tree development
745 myconf+=" --enable-local-library-preloading"
746 ;;
747 esac
748
749 #version 1.7.7 again tries to link against the older installed version and fails, when trying to
750 #compile for x86 on amd64, so workaround this issue again
751 #check newer versions, if this is still/again needed
752 myconf+=" --disable-disallowing-of-undefined-references"
753
754 # for build-time scripts
755 if use ctypes-python || use python || use test; then
756 python_export_best
757 fi
758
759 if use python && [[ ${CHOST} == *-darwin* ]] ; then
760 export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
761 export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
762 export ac_cv_python_compile="$(tc-getCC)"
763 fi
764
765 # force ruby-2.0
766 # allow overriding Python include directory
767 ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby20" "none") \
768 ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc20" "none") \
769 ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \
770 econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
771 $(use_with apache2 apache-libexecdir) \
772 $(use_with apache2 apxs "${APXS}") \
773 $(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
774 $(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \
775 $(use_enable dso runtime-module-search) \
776 $(use_with gnome-keyring) \
777 $(use_enable java javahl) \
778 $(use_with java jdk "${JAVA_HOME}") \
779 $(use_with kde kwallet) \
780 $(use_enable nls) \
781 $(use_with sasl) \
782 $(use_with http serf) \
783 ${myconf} \
784 --with-apr="${EPREFIX}/usr/bin/apr-1-config" \
785 --with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \
786 --disable-experimental-libtool \
787 --without-jikes \
788 --disable-mod-activation \
789 --disable-static
790 }
791
792 src_compile() {
793 emake local-all
794
795 if use ctypes-python ; then
796 # pre-generate .py files
797 use ctypes-python && emake ctypes-python
798
799 pushd subversion/bindings/ctypes-python >/dev/null || die
800 distutils-r1_src_compile
801 popd >/dev/null || die
802 fi
803
804 if use python ; then
805 swig_py_compile() {
806 local p=subversion/bindings/swig/python
807 rm -f ${p} || die
808 ln -s "${BUILD_DIR}" ${p} || die
809
810 python_export PYTHON_INCLUDEDIR
811 emake swig-py \
812 swig_pydir="$(python_get_sitedir)/libsvn" \
813 swig_pydir_extra="$(python_get_sitedir)/svn"
814 }
815
816 # this will give us proper BUILD_DIR for symlinking
817 BUILD_DIR=python \
818 python_foreach_impl swig_py_compile
819 fi
820
821 if use perl ; then
822 emake swig-pl
823 fi
824
825 if use ruby ; then
826 emake swig-rb
827 fi
828
829 if use java ; then
830 emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl
831 fi
832
833 if use extras ; then
834 emake tools
835 fi
836
837 if use doc ; then
838 doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
839
840 if use java; then
841 emake doc-javahl
842 fi
843 fi
844 }
845
846 src_test() {
847 if has_version ~${CATEGORY}/${P} ; then
848 default
849
850 if use ctypes-python ; then
851 python_test() {
852 "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \
853 || die "ctypes-python tests fail with ${EPYTHON}"
854 }
855
856 distutils-r1_src_test
857 fi
858
859 if use python ; then
860 swig_py_test() {
861 pushd "${BUILD_DIR}" >/dev/null || die
862 "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}"
863 popd >/dev/null || die
864 }
865
866 BUILD_DIR=subversion/bindings/swig/python \
867 python_foreach_impl swig_py_test
868 fi
869 else
870 ewarn "The test suite shows errors when there is an older version of"
871 ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*"
872 ewarn "before running the test suite."
873 ewarn "Test suite skipped."
874 fi
875 }
876
877 src_install() {
878 emake -j1 DESTDIR="${D}" local-install
879
880 if use ctypes-python ; then
881 pushd subversion/bindings/ctypes-python >/dev/null || die
882 distutils-r1_src_install
883 popd >/dev/null || die
884 fi
885
886 if use python ; then
887 swig_py_install() {
888 local p=subversion/bindings/swig/python
889 rm -f ${p} || die
890 ln -s "${BUILD_DIR}" ${p} || die
891
892 emake \
893 DESTDIR="${D}" \
894 swig_pydir="$(python_get_sitedir)/libsvn" \
895 swig_pydir_extra="$(python_get_sitedir)/svn" \
896 install-swig-py
897 }
898
899 BUILD_DIR=python \
900 python_foreach_impl swig_py_install
901 fi
902
903 if use perl ; then
904 emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl
905 perl_delete_localpod
906 find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -delete
907 fi
908
909 if use ruby ; then
910 emake DESTDIR="${D}" install-swig-rb
911 fi
912
913 if use java ; then
914 emake DESTDIR="${D}" install-javahl
915 java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*$(get_libname)
916 java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar
917 rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar
918 fi
919
920 # Install Apache module configuration.
921 if use apache2 ; then
922 keepdir "${APACHE_MODULES_CONFDIR}"
923 insinto "${APACHE_MODULES_CONFDIR}"
924 doins "${FILESDIR}/47_mod_dav_svn.conf"
925 fi
926
927 # Install Bash Completion, bug 43179.
928 newbashcomp tools/client-side/bash_completion svn
929 bashcomp_alias svn svn{admin,dumpfilter,look,sync,version}
930 rm -f tools/client-side/bash_completion
931
932 # Install hot backup script, bug 54304.
933 newbin tools/backup/hot-backup.py svn-hot-backup
934 rm -fr tools/backup
935
936 # Install svnserve init-script and xinet.d snippet, bug 43245.
937 newinitd "${FILESDIR}"/svnserve.initd3 svnserve
938 newconfd "${FILESDIR}"/svnserve.confd svnserve
939 insinto /etc/xinetd.d
940 newins "${FILESDIR}"/svnserve.xinetd svnserve
941
942 #adjust default user and group with disabled apache2 USE flag, bug 381385
943 use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \
944 -e "s\GROUP:-apache\GROUP:-svnusers\g" \
945 -i "${ED}"etc/init.d/svnserve || die
946 use apache2 || sed -e "0,/apache/s//svn/" \
947 -e "s:apache:svnusers:" \
948 -i "${ED}"etc/xinetd.d/svnserve || die
949
950 # Install documentation.
951 dodoc CHANGES COMMITTERS README
952 dodoc tools/xslt/svnindex.{css,xsl}
953 rm -fr tools/xslt
954
955 # Install extra files.
956 if use extras ; then
957 cat << EOF > 80subversion-extras
958 PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin"
959 ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin"
960 EOF
961 doenvd 80subversion-extras
962
963 emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools
964
965 find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr
966 rm -fr tools/client-side/svnmucc
967 rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
968 rm -fr tools/{buildbot,dev,diff,po}
969
970 insinto /usr/share/${PN}
971 find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die
972 doins -r tools
973 fi
974
975 if use doc ; then
976 dohtml -r doc/doxygen/html/*
977
978 if use java ; then
979 java-pkg_dojavadoc doc/javadoc
980 fi
981 fi
982
983 prune_libtool_files --all
984
985 cd "${ED}"usr/share/locale
986 for i in * ; do
987 [[ $i == *$LINGUAS* ]] || { rm -r $i || die ; }
988 done
989 }
990
991 pkg_preinst() {
992 # Compare versions of Berkeley DB, bug 122877.
993 if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]] ; then
994 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/")"
995 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/")"
996 if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
997 CHANGED_BDB_VERSION="1"
998 fi
999 fi
1000 }
1001
1002 pkg_postinst() {
1003 if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
1004 ewarn "You upgraded from an older version of Berkeley DB and may experience"
1005 ewarn "problems with your repository. Run the following commands as root to fix it:"
1006 ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
1007 ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
1008 fi
1009
1010 ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches."
1011 }
1012
1013 pkg_postrm() {
1014 :
1015 }
1016
1017 pkg_config() {
1018 # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC}
1019 # already has EPREFIX in it
1020 einfo "Initializing the database in ${SVN_REPOS_LOC}..."
1021 if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then
1022 echo "A Subversion repository already exists and I will not overwrite it."
1023 echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
1024 else
1025 mkdir -p "${SVN_REPOS_LOC}/conf"
1026
1027 einfo "Populating repository directory..."
1028 # Create initial repository.
1029 "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos"
1030
1031 einfo "Setting repository permissions..."
1032 SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
1033 SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
1034 if use apache2 ; then
1035 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
1036 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
1037 else
1038 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
1039 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
1040 fi
1041 chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf"
1042 chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos"
1043 echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet."
1044 echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\""
1045 echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet."
1046 echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\""
1047 echo "to finish the configuration."
1048 fi
1049 }