From 08fe220df8de3367ef450dd5d7c43d6b287850d7 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sun, 15 Jul 2007 18:09:45 +0000 Subject: Fix regression of bug #158891. Package-Manager: portage-2.1.3_rc8 --- dev-util/subversion/ChangeLog | 8 +- dev-util/subversion/Manifest | 32 +- .../subversion/files/digest-subversion-1.4.4-r2 | 3 - .../subversion/files/digest-subversion-1.4.4-r3 | 3 + dev-util/subversion/subversion-1.4.4-r2.ebuild | 374 --------------------- dev-util/subversion/subversion-1.4.4-r3.ebuild | 374 +++++++++++++++++++++ 6 files changed, 405 insertions(+), 389 deletions(-) delete mode 100644 dev-util/subversion/files/digest-subversion-1.4.4-r2 create mode 100644 dev-util/subversion/files/digest-subversion-1.4.4-r3 delete mode 100644 dev-util/subversion/subversion-1.4.4-r2.ebuild create mode 100644 dev-util/subversion/subversion-1.4.4-r3.ebuild (limited to 'dev-util') diff --git a/dev-util/subversion/ChangeLog b/dev-util/subversion/ChangeLog index 22e99fbbe379..69aa030a88d6 100644 --- a/dev-util/subversion/ChangeLog +++ b/dev-util/subversion/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/subversion # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.270 2007/06/27 20:04:21 pylon Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.271 2007/07/15 18:09:45 ulm Exp $ + +*subversion-1.4.4-r3 (15 Jul 2007) + + 15 Jul 2007; Ulrich Mueller -subversion-1.4.4-r2.ebuild, + +subversion-1.4.4-r3.ebuild: + Fix regression of bug #158891, see entry from 03 Mar 2007. 27 Jun 2007; Lars Weiler subversion-1.3.2-r4.ebuild: Stable on ppc; bug #178264. diff --git a/dev-util/subversion/Manifest b/dev-util/subversion/Manifest index 2cf8d16013ad..e41ae3edcc3d 100644 --- a/dev-util/subversion/Manifest +++ b/dev-util/subversion/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 70svn-gentoo.el 331 RMD160 1de1310ae7e4bdbecef3c685ef8d7ff95b9aab87 SHA1 48eb99e9d494a4a674de32e599914df234b627cd SHA256 c0d733bd3f7c75c47acaea4fd0c816d45ee2cd765da70dc494666f38c91e3d87 MD5 23c250f0b440c1df1bc142a7d76b4c62 files/70svn-gentoo.el 331 RMD160 1de1310ae7e4bdbecef3c685ef8d7ff95b9aab87 files/70svn-gentoo.el 331 @@ -86,14 +89,14 @@ EBUILD subversion-1.3.2-r4.ebuild 11937 RMD160 afc37f3f18275a89fcc144b6bc17fd2a1 MD5 7181af298477ad78bc1c487f2643acbb subversion-1.3.2-r4.ebuild 11937 RMD160 afc37f3f18275a89fcc144b6bc17fd2a13373fe5 subversion-1.3.2-r4.ebuild 11937 SHA256 4ef247bcff92c10bba149598d6d4582b38d9c34d9658340b5df714c9f2caf7ba subversion-1.3.2-r4.ebuild 11937 -EBUILD subversion-1.4.4-r2.ebuild 11942 RMD160 368a42a025475d07c6c181c4db8de352c7d0acf5 SHA1 2e83eb53f57eca2d0bf1a6078203394e0c86a460 SHA256 c1a33970306948b0bcdb245ddd14ac6bcb7dd0091e11aecc22eddb82fb365dd1 -MD5 5c50fc7325702e306eb0d9ba274b4eeb subversion-1.4.4-r2.ebuild 11942 -RMD160 368a42a025475d07c6c181c4db8de352c7d0acf5 subversion-1.4.4-r2.ebuild 11942 -SHA256 c1a33970306948b0bcdb245ddd14ac6bcb7dd0091e11aecc22eddb82fb365dd1 subversion-1.4.4-r2.ebuild 11942 -MISC ChangeLog 47097 RMD160 921807d79b475b3a41b2caa3221c5b1f1d1e44a5 SHA1 4920da4674df375301a53a0afd54d65ab688ea0a SHA256 02d1e8de416635d3ea0cbd24b334f4aaa3590b470af4fdee8de533737a5b0459 -MD5 ee4bbec75164d5c5354bd4f9f0c157c2 ChangeLog 47097 -RMD160 921807d79b475b3a41b2caa3221c5b1f1d1e44a5 ChangeLog 47097 -SHA256 02d1e8de416635d3ea0cbd24b334f4aaa3590b470af4fdee8de533737a5b0459 ChangeLog 47097 +EBUILD subversion-1.4.4-r3.ebuild 11959 RMD160 27092b193ef0a942055bf724fcc16f8b0d1874f3 SHA1 a8f8d98e67b1622352b58e9e435301e9bc747188 SHA256 d6d7012a22329e5a97dba006ad6733830dc3161b76a73dcb9fc5004ab88480f8 +MD5 6ec9b1f42084913048a2a545eae6ba4d subversion-1.4.4-r3.ebuild 11959 +RMD160 27092b193ef0a942055bf724fcc16f8b0d1874f3 subversion-1.4.4-r3.ebuild 11959 +SHA256 d6d7012a22329e5a97dba006ad6733830dc3161b76a73dcb9fc5004ab88480f8 subversion-1.4.4-r3.ebuild 11959 +MISC ChangeLog 47300 RMD160 34520b4513a12ebddee880542b43a9d449603fb1 SHA1 1f6adb63f90e769465f5fa7433dd4f349e41f578 SHA256 162d3db3045cc333b048c8ac3da4c18a34fa7c368b0943a1e2421d19a5af8444 +MD5 c4e4adf850855d5b8efdb83412b5f4bd ChangeLog 47300 +RMD160 34520b4513a12ebddee880542b43a9d449603fb1 ChangeLog 47300 +SHA256 162d3db3045cc333b048c8ac3da4c18a34fa7c368b0943a1e2421d19a5af8444 ChangeLog 47300 MISC metadata.xml 224 RMD160 5da25d639360542842990baf18b1ae0f0837c0fd SHA1 e096d8a898bd3b957d86654e0e7fb835e2a6a0df SHA256 e6df82c1a36b5df70e15425e6059fb9f486fd31dc453404dfdd2f6b90b7f8aec MD5 9d26ecca44906061085842dba1505615 metadata.xml 224 RMD160 5da25d639360542842990baf18b1ae0f0837c0fd metadata.xml 224 @@ -110,6 +113,13 @@ SHA256 b77de6fcac8e868c91fb08f21a08d8e45e26d50f7efa510c9940722746b37cc5 files/di MD5 f451fb992815e387265f7dd7afb3ddb6 files/digest-subversion-1.3.2-r4 256 RMD160 2f2fa8d1f158c558014773611365d6488f55ea09 files/digest-subversion-1.3.2-r4 256 SHA256 b77de6fcac8e868c91fb08f21a08d8e45e26d50f7efa510c9940722746b37cc5 files/digest-subversion-1.3.2-r4 256 -MD5 576f84ed7a5fe7a243604aa6c516d496 files/digest-subversion-1.4.4-r2 256 -RMD160 35c635369a31ed9e54e627d5bca04b2f1154c2ff files/digest-subversion-1.4.4-r2 256 -SHA256 affa1aa33296aa4c7537a386e05b71801ba31437fe10b59dbdab602193315d22 files/digest-subversion-1.4.4-r2 256 +MD5 576f84ed7a5fe7a243604aa6c516d496 files/digest-subversion-1.4.4-r3 256 +RMD160 35c635369a31ed9e54e627d5bca04b2f1154c2ff files/digest-subversion-1.4.4-r3 256 +SHA256 affa1aa33296aa4c7537a386e05b71801ba31437fe10b59dbdab602193315d22 files/digest-subversion-1.4.4-r3 256 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.7 (GNU/Linux) + +iD8DBQFGmmLnOeoy/oIi7uwRAmBtAJ9Ij58sZQzwlgf3UDeGoXHWASY0XQCgqcDY +/D3SepQeF/sWVJ1Wh9yvZVs= +=yJYO +-----END PGP SIGNATURE----- diff --git a/dev-util/subversion/files/digest-subversion-1.4.4-r2 b/dev-util/subversion/files/digest-subversion-1.4.4-r2 deleted file mode 100644 index e3c9fe8133a5..000000000000 --- a/dev-util/subversion/files/digest-subversion-1.4.4-r2 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 d4aa5aeb09acb3307841022d279ab895 subversion-1.4.4.tar.bz2 4723349 -RMD160 24ec3733d337206a3106be434c4505f5cc2e20ec subversion-1.4.4.tar.bz2 4723349 -SHA256 91769f992e142eaeb5017e9ec95be52505a056ef05f93427868a3c0c89e2e966 subversion-1.4.4.tar.bz2 4723349 diff --git a/dev-util/subversion/files/digest-subversion-1.4.4-r3 b/dev-util/subversion/files/digest-subversion-1.4.4-r3 new file mode 100644 index 000000000000..e3c9fe8133a5 --- /dev/null +++ b/dev-util/subversion/files/digest-subversion-1.4.4-r3 @@ -0,0 +1,3 @@ +MD5 d4aa5aeb09acb3307841022d279ab895 subversion-1.4.4.tar.bz2 4723349 +RMD160 24ec3733d337206a3106be434c4505f5cc2e20ec subversion-1.4.4.tar.bz2 4723349 +SHA256 91769f992e142eaeb5017e9ec95be52505a056ef05f93427868a3c0c89e2e966 subversion-1.4.4.tar.bz2 4723349 diff --git a/dev-util/subversion/subversion-1.4.4-r2.ebuild b/dev-util/subversion/subversion-1.4.4-r2.ebuild deleted file mode 100644 index 0b60cd183637..000000000000 --- a/dev-util/subversion/subversion-1.4.4-r2.ebuild +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.4.4-r2.ebuild,v 1.2 2007/06/22 15:19:39 chtekk Exp $ - -inherit elisp-common libtool python eutils multilib bash-completion flag-o-matic depend.apache perl-module java-pkg-opt-2 - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" - -DESCRIPTION="A compelling replacement for CVS." -HOMEPAGE="http://subversion.tigris.org/" -SRC_URI="http://subversion.tigris.org/downloads/${P/_rc/-rc}.tar.bz2" - -LICENSE="Apache-1.1" -SLOT="0" -IUSE="apache2 berkdb emacs java nls nowebdav perl python ruby" -RESTRICT="test" - -COMMONDEPEND="apache2? ( ${APACHE2_DEPEND} ) - >=dev-libs/apr-util-1.2.8 - perl? ( >=dev-lang/perl-5.8.6-r6 !=dev-lang/perl-5.8.7 ) - python? ( >=dev-lang/python-2.0 ) - ruby? ( >=dev-lang/ruby-1.8.2 ) - !nowebdav? ( >=net-misc/neon-0.26 ) - berkdb? ( =sys-libs/db-4* ) - emacs? ( virtual/emacs )" - -RDEPEND="${COMMONDEPEND} - java? ( >=virtual/jre-1.4 )" - -DEPEND="${COMMONDEPEND} - java? ( >=virtual/jdk-1.4 ) - >=sys-devel/autoconf-2.59" - -S=${WORKDIR}/${P/_rc/-rc} - -# Allow for custion repository locations. -# This can't be in pkg_setup because the variable needs to be available to -# pkg_config. -: ${SVN_REPOS_LOC:=/var/svn} - -discover_apr_suffix() { - if use apache2 ; then - if has_version '=net-www/apache-2.0*' \ - && has_version '=dev-libs/apr-util-0.9*' ; then - aprsuffix="" - else - aprsuffix="-1" - fi - else - aprsuffix="-1" - fi - - echo "${aprsuffix}" -} - -pkg_setup() { - if use berkdb && has_version '.*svn-revision.txt\),echo "exported" \2,' Makefile.in - - elibtoolize - - use emacs && cp "${FILESDIR}"/vc-svn.el "${S}"/contrib/client-side/vc-svn.el -} - -src_compile() { - local myconf="" - - myconf="${myconf} $(use_enable java javahl)" - use java && myconf="${myconf} --without-jikes --with-jdk=${JAVA_HOME}" - - if use python || use perl || use ruby ; then - myconf="${myconf} --with-swig" - else - myconf="${myconf} --without-swig" - fi - - if use nowebdav ; then - myconf="${myconf} --without-neon" - else - myconf="${myconf} --with-neon=/usr" - fi - - use apache2 && myconf="${myconf} --with-apxs=${APXS2}" - use apache2 || myconf="${myconf} --without-apxs" - - apr_suffix="$(discover_apr_suffix)" - myconf="${myconf} --with-apr=/usr/bin/apr${apr_suffix}-config --with-apr-util=/usr/bin/apu${apr_suffix}-config" - append-flags $(/usr/bin/apr${apr_suffix}-config --cppflags) - - econf ${myconf} \ - $(use_with berkdb berkeley-db) \ - $(use_with python) \ - $(use_enable nls) \ - --disable-experimental-libtool \ - --disable-mod-activation \ - || die "econf failed" - - # Respect the user LDFLAGS - export EXTRA_LDFLAGS="${LDFLAGS}" - - # Build subversion, but do it in a way that is safe for parallel builds. - # Also apparently the included apr has a libtool that doesn't like -L flags. - # So not specifying it at all when not building apache modules and only - # specify it for internal parts otherwise. - ( emake external-all && emake LT_LDFLAGS="-L${D}/usr/$(get_libdir)" local-all ) || die "Compilation of ${PN} failed" - - if use python ; then - # Building fails without the apache apr-util as includes are wrong. - emake swig-py || die "Compilation of ${PN} Python bindings failed" - fi - - if use perl ; then - # Work around a buggy Makefile.PL, bug 64634 - mkdir -p subversion/bindings/swig/perl/native/blib/arch/auto/SVN/{_Client,_Delta,_Fs,_Ra,_Repos,_Wc} - make swig-pl || die "Compilation of ${PN} Perl bindings failed" - fi - - if use ruby ; then - make swig-rb || die "Compilation of ${PN} Ruby bindings failed" - fi - - if use java ; then - # ensure that the destination dir exists, else some compilation fails - mkdir -p "${S}"/subversion/bindings/java/javahl/classes - # Compile javahl - make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "make javahl failed" - fi - - if use emacs ; then - einfo "Compiling emacs support" - elisp-compile "${S}"/contrib/client-side/psvn/psvn.el || die "emacs modules failed" - elisp-compile "${S}"/contrib/client-side/vc-svn.el || die "emacs modules failed" - fi -} - -src_install () { - python_version - PYTHON_DIR=/usr/$(get_libdir)/python${PYVER} - - make DESTDIR="${D}" install || die "Installation of ${PN} failed" - - if use python ; then - make DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \ - || die "Installation of ${PN} Python bindings failed" - - # move python bindings - mkdir -p "${D}${PYTHON_DIR}/site-packages" - mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages" - mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages" - rm -Rf "${D}"/usr/$(get_libdir)/svn-python - fi - - if use perl ; then - make DESTDIR="${D}" install-swig-pl || die "Installation of ${PN} Perl bindings failed" - fixlocalpod - fi - - if use ruby ; then - make DESTDIR="${D}" install-swig-rb || die "Installation of ${PN} Ruby bindings failed" - fi - - if use java ; then - make DESTDIR="${D}" install-javahl || die "make install-javahl failed" - java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so - java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar - rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar - fi - - # Install apache2 module config - if use apache2 ; then - MOD="${APACHE2_MODULESDIR/${APACHE2_BASEDIR}\//}" - mkdir -p "${D}/${APACHE2_MODULES_CONFDIR}" - cat <"${D}/${APACHE2_MODULES_CONFDIR}"/47_mod_dav_svn.conf - - - LoadModule dav_svn_module ${MOD}/mod_dav_svn.so - - - DAV svn - SVNPath ${SVN_REPOS_LOC}/repos - AuthType Basic - AuthName "Subversion repository" - AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers - Require valid-user - - - - LoadModule authz_svn_module ${MOD}/mod_authz_svn.so - - - -EOF - fi - - # Bug 43179 - Install bash-completion if user wishes - dobashcompletion tools/client-side/bash_completion subversion - - # Install hot backup script, bug 54304 - newbin tools/backup/hot-backup.py svn-hot-backup - - # The svn_load_dirs script is installed by Debian and looks like a good - # candidate for us to install as well - newbin contrib/client-side/svn_load_dirs.pl svn-load-dirs - - # Install svnserve init-script and xinet.d snippet, bug 43245 - newinitd "${FILESDIR}"/svnserve.initd svnserve - if use apache2 ; then - newconfd "${FILESDIR}"/svnserve.confd svnserve - else - newconfd "${FILESDIR}"/svnserve.confd2 svnserve - fi - insinto /etc/xinetd.d ; newins "${FILESDIR}"/svnserve.xinetd svnserve - - # Install documentation - dodoc BUGS COMMITTERS COPYING HACKING INSTALL README - dodoc CHANGES - dodoc tools/xslt/svnindex.css tools/xslt/svnindex.xsl - find contrib tools -name \*.in -print0 | xargs -0 rm -f - mkdir -p "${D}/usr/share/doc/${PF}/" - cp -R tools/{client-side,examples,hook-scripts} "${D}/usr/share/doc/${PF}/" - cp -R contrib/hook-scripts "${D}/usr/share/doc/${PF}/" - - docinto notes - for f in notes/* - do - [[ -f ${f} ]] && dodoc ${f} - done - - # Install emacs lisps - if use emacs ; then - insinto /usr/share/emacs/site-lisp/subversion - doins contrib/client-side/psvn/psvn.el* - doins contrib/client-side/vc-svn.el* - - elisp-site-file-install "${FILESDIR}"/70svn-gentoo.el - fi -} - -src_test() { - ewarn "Testing disabled for ${PN}" -} - -pkg_postinst() { - use emacs && elisp-site-regen - use perl && perl-module_pkg_postinst - - elog "Subversion Server Notes" - elog "-----------------------" - elog - - elog "If you intend to run a server, a repository needs to be created using" - elog "svnadmin (see man svnadmin) or the following command to create it in" - elog "/var/svn:" - elog - elog " emerge --config =${CATEGORY}/${PF}" - elog - elog "If you upgraded from an older version of berkely db and experience" - elog "problems with your repository then run the following commands as root:" - elog " db4_recover -h ${SVN_REPOS_LOC}/repos" - elog " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" - elog - elog "Subversion has multiple server types, take your pick:" - elog - elog " - svnserve daemon: " - elog " 1. edit /etc/conf.d/svnserve" - elog " 2. start daemon: /etc/init.d/svnserve start" - elog " 3. make persistent: rc-update add svnserve default" - elog - elog " - svnserve via xinetd:" - elog " 1. edit /etc/xinetd.d/svnserve (remove disable line)" - elog " 2. restart xinetd.d: /etc/init.d/xinetd restart" - elog - elog " - svn over ssh:" - elog " 1. Fix the repository permissions:" - elog " groupadd svnusers" - elog " chown -R root:svnusers /var/svn/repos/" - elog " chmod -R g-w /var/svn/repos" - elog " chmod -R g+rw /var/svn/repos/db" - elog " chmod -R g+rw /var/svn/repos/locks" - elog " 2. create an svnserve wrapper in /usr/local/bin to set the umask you" - elog " want, for example:" - elog " #!/bin/bash" - elog " umask 002" - elog " exec /usr/bin/svnserve \"\$@\"" - elog - - if use apache2 ; then - elog " - http-based server:" - elog " 1. edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" - elog " 2. create an htpasswd file:" - elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" - elog - fi - - elog "If you intend to use svn-hot-backup, you can specify the number of" - elog "backups to keep per repository by specifying an environment variable." - elog "If you want to keep e.g. 2 backups, do the following:" - elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" - elog "echo 'SVN_HOTBACKUP_NUM_BACKUPS=2' >> /etc/env.d/80subversion" - elog -} - -pkg_postrm() { - has_version virtual/emacs && elisp-site-regen - use perl && perl-module_pkg_postrm -} - -pkg_config() { - if [[ ! -x /usr/bin/svnadmin ]] ; then - die "You seem to only have built the ${PN} client" - fi - - einfo ">>> Initializing the database in ${SVN_REPOS_LOC} ..." - if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then - echo "A subversion repository already exists and I will not overwrite it." - echo "Delete ${SVN_REPOS_LOC}/repos first if you're sure you want to have a clean version." - else - mkdir -p "${SVN_REPOS_LOC}/conf" - - einfo ">>> Populating repository directory ..." - # create initial repository - /usr/bin/svnadmin create "${SVN_REPOS_LOC}/repos" - - einfo ">>> Setting repository permissions ..." - if use apache2 ; then - chown -Rf apache:apache "${SVN_REPOS_LOC}/repos" - else - enewgroup svnusers - enewuser svn -1 -1 /var/svn svnusers - chown -Rf svn:svnusers "${SVN_REPOS_LOC}/repos" - fi - chmod -Rf 755 "${SVN_REPOS_LOC}/repos" - fi -} diff --git a/dev-util/subversion/subversion-1.4.4-r3.ebuild b/dev-util/subversion/subversion-1.4.4-r3.ebuild new file mode 100644 index 000000000000..b4568e8ec8d9 --- /dev/null +++ b/dev-util/subversion/subversion-1.4.4-r3.ebuild @@ -0,0 +1,374 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.4.4-r3.ebuild,v 1.1 2007/07/15 18:09:45 ulm Exp $ + +inherit elisp-common libtool python eutils multilib bash-completion flag-o-matic depend.apache perl-module java-pkg-opt-2 + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" + +DESCRIPTION="A compelling replacement for CVS." +HOMEPAGE="http://subversion.tigris.org/" +SRC_URI="http://subversion.tigris.org/downloads/${P/_rc/-rc}.tar.bz2" + +LICENSE="Apache-1.1" +SLOT="0" +IUSE="apache2 berkdb emacs java nls nowebdav perl python ruby" +RESTRICT="test" + +COMMONDEPEND="apache2? ( ${APACHE2_DEPEND} ) + >=dev-libs/apr-util-1.2.8 + perl? ( >=dev-lang/perl-5.8.6-r6 !=dev-lang/perl-5.8.7 ) + python? ( >=dev-lang/python-2.0 ) + ruby? ( >=dev-lang/ruby-1.8.2 ) + !nowebdav? ( >=net-misc/neon-0.26 ) + berkdb? ( =sys-libs/db-4* ) + emacs? ( virtual/emacs )" + +RDEPEND="${COMMONDEPEND} + java? ( >=virtual/jre-1.4 )" + +DEPEND="${COMMONDEPEND} + java? ( >=virtual/jdk-1.4 ) + >=sys-devel/autoconf-2.59" + +S=${WORKDIR}/${P/_rc/-rc} + +# Allow for custion repository locations. +# This can't be in pkg_setup because the variable needs to be available to +# pkg_config. +: ${SVN_REPOS_LOC:=/var/svn} + +discover_apr_suffix() { + if use apache2 ; then + if has_version '=net-www/apache-2.0*' \ + && has_version '=dev-libs/apr-util-0.9*' ; then + aprsuffix="" + else + aprsuffix="-1" + fi + else + aprsuffix="-1" + fi + + echo "${aprsuffix}" +} + +pkg_setup() { + if use berkdb && has_version '.*svn-revision.txt\),echo "exported" \2,' Makefile.in + + elibtoolize + + use emacs && cp "${FILESDIR}"/vc-svn.el "${S}"/contrib/client-side/vc-svn.el +} + +src_compile() { + local myconf="" + + myconf="${myconf} $(use_enable java javahl)" + use java && myconf="${myconf} --without-jikes --with-jdk=${JAVA_HOME}" + + if use python || use perl || use ruby ; then + myconf="${myconf} --with-swig" + else + myconf="${myconf} --without-swig" + fi + + if use nowebdav ; then + myconf="${myconf} --without-neon" + else + myconf="${myconf} --with-neon=/usr" + fi + + use apache2 && myconf="${myconf} --with-apxs=${APXS2}" + use apache2 || myconf="${myconf} --without-apxs" + + apr_suffix="$(discover_apr_suffix)" + myconf="${myconf} --with-apr=/usr/bin/apr${apr_suffix}-config --with-apr-util=/usr/bin/apu${apr_suffix}-config" + append-flags $(/usr/bin/apr${apr_suffix}-config --cppflags) + + econf ${myconf} \ + $(use_with berkdb berkeley-db) \ + $(use_with python) \ + $(use_enable nls) \ + --disable-experimental-libtool \ + --disable-mod-activation \ + || die "econf failed" + + # Respect the user LDFLAGS + export EXTRA_LDFLAGS="${LDFLAGS}" + + # Build subversion, but do it in a way that is safe for parallel builds. + # Also apparently the included apr has a libtool that doesn't like -L flags. + # So not specifying it at all when not building apache modules and only + # specify it for internal parts otherwise. + ( emake external-all && emake LT_LDFLAGS="-L${D}/usr/$(get_libdir)" local-all ) || die "Compilation of ${PN} failed" + + if use python ; then + # Building fails without the apache apr-util as includes are wrong. + emake swig-py || die "Compilation of ${PN} Python bindings failed" + fi + + if use perl ; then + # Work around a buggy Makefile.PL, bug 64634 + mkdir -p subversion/bindings/swig/perl/native/blib/arch/auto/SVN/{_Client,_Delta,_Fs,_Ra,_Repos,_Wc} + make swig-pl || die "Compilation of ${PN} Perl bindings failed" + fi + + if use ruby ; then + make swig-rb || die "Compilation of ${PN} Ruby bindings failed" + fi + + if use java ; then + # ensure that the destination dir exists, else some compilation fails + mkdir -p "${S}"/subversion/bindings/java/javahl/classes + # Compile javahl + make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "make javahl failed" + fi + + if use emacs ; then + einfo "Compiling emacs support" + elisp-compile "${S}"/contrib/client-side/psvn/psvn.el || die "emacs modules failed" + elisp-compile "${S}"/contrib/client-side/vc-svn.el || die "emacs modules failed" + fi +} + +src_install () { + python_version + PYTHON_DIR=/usr/$(get_libdir)/python${PYVER} + + make DESTDIR="${D}" install || die "Installation of ${PN} failed" + + if use python ; then + make DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \ + || die "Installation of ${PN} Python bindings failed" + + # move python bindings + mkdir -p "${D}${PYTHON_DIR}/site-packages" + mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages" + mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages" + rm -Rf "${D}"/usr/$(get_libdir)/svn-python + fi + + if use perl ; then + make DESTDIR="${D}" install-swig-pl || die "Installation of ${PN} Perl bindings failed" + fixlocalpod + fi + + if use ruby ; then + make DESTDIR="${D}" install-swig-rb || die "Installation of ${PN} Ruby bindings failed" + fi + + if use java ; then + make DESTDIR="${D}" install-javahl || die "make install-javahl failed" + java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so + java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar + rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar + fi + + # Install apache2 module config + if use apache2 ; then + MOD="${APACHE2_MODULESDIR/${APACHE2_BASEDIR}\//}" + mkdir -p "${D}/${APACHE2_MODULES_CONFDIR}" + cat <"${D}/${APACHE2_MODULES_CONFDIR}"/47_mod_dav_svn.conf + + + LoadModule dav_svn_module ${MOD}/mod_dav_svn.so + + + DAV svn + SVNPath ${SVN_REPOS_LOC}/repos + AuthType Basic + AuthName "Subversion repository" + AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers + Require valid-user + + + + LoadModule authz_svn_module ${MOD}/mod_authz_svn.so + + + +EOF + fi + + # Bug 43179 - Install bash-completion if user wishes + dobashcompletion tools/client-side/bash_completion subversion + + # Install hot backup script, bug 54304 + newbin tools/backup/hot-backup.py svn-hot-backup + + # The svn_load_dirs script is installed by Debian and looks like a good + # candidate for us to install as well + newbin contrib/client-side/svn_load_dirs.pl svn-load-dirs + + # Install svnserve init-script and xinet.d snippet, bug 43245 + newinitd "${FILESDIR}"/svnserve.initd svnserve + if use apache2 ; then + newconfd "${FILESDIR}"/svnserve.confd svnserve + else + newconfd "${FILESDIR}"/svnserve.confd2 svnserve + fi + insinto /etc/xinetd.d ; newins "${FILESDIR}"/svnserve.xinetd svnserve + + # Install documentation + dodoc BUGS COMMITTERS COPYING HACKING INSTALL README + dodoc CHANGES + dodoc tools/xslt/svnindex.css tools/xslt/svnindex.xsl + find contrib tools -name \*.in -print0 | xargs -0 rm -f + mkdir -p "${D}/usr/share/doc/${PF}/" + cp -R tools/{client-side,examples,hook-scripts} "${D}/usr/share/doc/${PF}/" + cp -R contrib/hook-scripts "${D}/usr/share/doc/${PF}/" + + docinto notes + for f in notes/* + do + [[ -f ${f} ]] && dodoc ${f} + done + + # Install emacs lisps + if use emacs ; then + elisp-install ${PN} contrib/client-side/psvn/psvn.el* + elisp-install ${PN}/compat contrib/client-side/vc-svn.el* + touch "${D}${SITELISP}/${PN}/compat/.nosearch" + + elisp-site-file-install "${FILESDIR}"/70svn-gentoo.el + fi +} + +src_test() { + ewarn "Testing disabled for ${PN}" +} + +pkg_postinst() { + use emacs && elisp-site-regen + use perl && perl-module_pkg_postinst + + elog "Subversion Server Notes" + elog "-----------------------" + elog + + elog "If you intend to run a server, a repository needs to be created using" + elog "svnadmin (see man svnadmin) or the following command to create it in" + elog "/var/svn:" + elog + elog " emerge --config =${CATEGORY}/${PF}" + elog + elog "If you upgraded from an older version of berkely db and experience" + elog "problems with your repository then run the following commands as root:" + elog " db4_recover -h ${SVN_REPOS_LOC}/repos" + elog " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" + elog + elog "Subversion has multiple server types, take your pick:" + elog + elog " - svnserve daemon: " + elog " 1. edit /etc/conf.d/svnserve" + elog " 2. start daemon: /etc/init.d/svnserve start" + elog " 3. make persistent: rc-update add svnserve default" + elog + elog " - svnserve via xinetd:" + elog " 1. edit /etc/xinetd.d/svnserve (remove disable line)" + elog " 2. restart xinetd.d: /etc/init.d/xinetd restart" + elog + elog " - svn over ssh:" + elog " 1. Fix the repository permissions:" + elog " groupadd svnusers" + elog " chown -R root:svnusers /var/svn/repos/" + elog " chmod -R g-w /var/svn/repos" + elog " chmod -R g+rw /var/svn/repos/db" + elog " chmod -R g+rw /var/svn/repos/locks" + elog " 2. create an svnserve wrapper in /usr/local/bin to set the umask you" + elog " want, for example:" + elog " #!/bin/bash" + elog " umask 002" + elog " exec /usr/bin/svnserve \"\$@\"" + elog + + if use apache2 ; then + elog " - http-based server:" + elog " 1. edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" + elog " 2. create an htpasswd file:" + elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" + elog + fi + + elog "If you intend to use svn-hot-backup, you can specify the number of" + elog "backups to keep per repository by specifying an environment variable." + elog "If you want to keep e.g. 2 backups, do the following:" + elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" + elog "echo 'SVN_HOTBACKUP_NUM_BACKUPS=2' >> /etc/env.d/80subversion" + elog +} + +pkg_postrm() { + use emacs && elisp-site-regen + use perl && perl-module_pkg_postrm +} + +pkg_config() { + if [[ ! -x /usr/bin/svnadmin ]] ; then + die "You seem to only have built the ${PN} client" + fi + + einfo ">>> Initializing the database in ${SVN_REPOS_LOC} ..." + if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then + echo "A subversion repository already exists and I will not overwrite it." + echo "Delete ${SVN_REPOS_LOC}/repos first if you're sure you want to have a clean version." + else + mkdir -p "${SVN_REPOS_LOC}/conf" + + einfo ">>> Populating repository directory ..." + # create initial repository + /usr/bin/svnadmin create "${SVN_REPOS_LOC}/repos" + + einfo ">>> Setting repository permissions ..." + if use apache2 ; then + chown -Rf apache:apache "${SVN_REPOS_LOC}/repos" + else + enewgroup svnusers + enewuser svn -1 -1 /var/svn svnusers + chown -Rf svn:svnusers "${SVN_REPOS_LOC}/repos" + fi + chmod -Rf 755 "${SVN_REPOS_LOC}/repos" + fi +} -- cgit v1.2.3-65-gdbad