Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/subversion: ChangeLog subversion-1.4.6-r1.ebuild
Date: Sun, 02 Mar 2008 11:26:29
Message-Id: E1JVmKo-0001A4-AN@stork.gentoo.org
1 hollow 08/03/02 11:26:26
2
3 Modified: ChangeLog
4 Added: subversion-1.4.6-r1.ebuild
5 Log:
6 add support for neon 0.28.0 wrt #210535
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.295 dev-util/subversion/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.295&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.295&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.294&r2=1.295
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v
19 retrieving revision 1.294
20 retrieving revision 1.295
21 diff -u -r1.294 -r1.295
22 --- ChangeLog 17 Feb 2008 12:45:15 -0000 1.294
23 +++ ChangeLog 2 Mar 2008 11:26:25 -0000 1.295
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-util/subversion
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.294 2008/02/17 12:45:15 angelos Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.295 2008/03/02 11:26:25 hollow Exp $
29 +
30 +*subversion-1.4.6-r1 (02 Mar 2008)
31 +
32 + 02 Mar 2008; Benedikt Böhm <hollow@g.o>
33 + +files/subversion-1.4.6-neon-0.28.patch, +subversion-1.4.6-r1.ebuild:
34 + add support for neon 0.28.0 wrt #210535
35
36 17 Feb 2008; Christoph Mende <angelos@g.o> subversion-1.4.6.ebuild:
37 Stable on amd64, bug #207572
38
39
40
41 1.1 dev-util/subversion/subversion-1.4.6-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.4.6-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.4.6-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: subversion-1.4.6-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.4.6-r1.ebuild,v 1.1 2008/03/02 11:26:25 hollow Exp $
51
52 inherit autotools bash-completion depend.apache flag-o-matic elisp-common eutils java-pkg-opt-2 libtool multilib perl-module python
53
54 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
55
56 DESCRIPTION="A compelling replacement for CVS."
57 HOMEPAGE="http://subversion.tigris.org/"
58 SRC_URI="http://subversion.tigris.org/downloads/${P/_rc/-rc}.tar.bz2"
59
60 LICENSE="Subversion"
61 SLOT="0"
62 IUSE="apache2 berkdb debug doc emacs extras java nls nowebdav perl python ruby svnserve vim-syntax"
63 RESTRICT="test"
64
65 COMMONDEPEND=">=dev-libs/apr-util-1.2.8
66 berkdb? ( =sys-libs/db-4* )
67 doc? ( app-doc/doxygen )
68 emacs? ( virtual/emacs )
69 nls? ( sys-devel/gettext )
70 !nowebdav? ( >=net-misc/neon-0.26.4 )
71 ruby? ( >=dev-lang/ruby-1.8.2 dev-lang/swig )
72 perl? ( >=dev-lang/perl-5.8.8 dev-lang/swig )
73 python? ( >=dev-lang/python-2.0 dev-lang/swig )"
74
75 RDEPEND="${COMMONDEPEND}
76 java? ( >=virtual/jre-1.4 )
77 perl? ( dev-perl/URI )"
78
79 DEPEND="${COMMONDEPEND}
80 java? ( >=virtual/jdk-1.4 )
81 >=sys-devel/autoconf-2.59"
82
83 want_apache
84
85 S="${WORKDIR}"/${P/_rc/-rc}
86
87 # Allow for custom repository locations.
88 # This can't be in pkg_setup because the variable needs to be available to
89 # pkg_config.
90 : ${SVN_REPOS_LOC:=/var/svn}
91
92 pkg_setup() {
93 if use berkdb ; then
94 if ! built_with_use 'dev-libs/apr-util' berkdb ; then
95 eerror "dev-libs/apr-util is missing USE=berkdb"
96 die "dev-libs/apr-util is missing USE=berkdb"
97 fi
98
99 if has_version '<dev-util/subversion-0.34.0' && [[ -z ${SVN_DUMPED} ]] ; then
100 echo
101 ewarn "Presently you have $(best_version dev-util/subversion) installed."
102 ewarn "Subversion has changed the repository filesystem schema from 0.34.0."
103 ewarn "So you MUST dump your repositories before upgrading."
104 ewarn
105 ewarn 'After doing so call emerge with SVN_DUMPED=1 emerge !*'
106 ewarn
107 ewarn "More details on dumping:"
108 ewarn "http://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO"
109 echo
110 die "Ensure that you dump your repository first"
111 fi
112 fi
113
114 java-pkg-opt-2_pkg_setup
115 }
116
117 src_unpack() {
118 unpack ${A}
119 cd "${S}"
120
121 # assure we don't use the included libs by accident
122 rm -Rf neon apr apr-util
123
124 epatch "${FILESDIR}"/subversion-1.4-db4.patch
125 epatch "${FILESDIR}"/subversion-1.1.1-perl-vendor.patch
126 epatch "${FILESDIR}"/subversion-hotbackup-config.patch
127 epatch "${FILESDIR}"/subversion-apr_cppflags.patch
128 epatch "${FILESDIR}"/subversion-1.4.3-debug-config.patch
129 epatch "${FILESDIR}"/subversion-1.4.6-neon-0.28.patch
130
131 sed -e 's/\(NEON_ALLOWED_LIST=.* 0.26.4\)"/\1 0.27.2 0.28.0"/' \
132 -i configure.in
133
134 sed -e "s:apr-config:apr-1-config:g" \
135 -e "s:apu-config:apu-1-config:g" \
136 -i build/ac-macros/{find_,}ap*
137
138 eautoreconf
139
140 sed -i -e 's,\(subversion/svnversion/svnversion.*\)\(>.*svn-revision.txt\),echo "exported" \2,' Makefile.in
141
142 elibtoolize
143
144 use emacs && cp "${FILESDIR}"/vc-svn.el "${S}"/contrib/client-side/vc-svn.el
145 }
146
147 src_compile() {
148 local myconf=
149
150 myconf="${myconf} $(use_enable java javahl)"
151 use java && myconf="${myconf} --without-jikes --with-jdk=${JAVA_HOME}"
152
153 if use python || use perl || use ruby ; then
154 myconf="${myconf} --with-swig"
155 else
156 myconf="${myconf} --without-swig"
157 fi
158
159 if use nowebdav ; then
160 myconf="${myconf} --without-neon"
161 else
162 myconf="${myconf} --with-neon=/usr"
163 fi
164
165 append-flags $(/usr/bin/apr-1-config --cppflags)
166
167 econf ${myconf} \
168 --with-apr=/usr/bin/apr-1-config \
169 --with-apr-util=/usr/bin/apu-1-config \
170 $(use_with apache2 apxs ${APXS}) \
171 $(use_with berkdb berkeley-db) \
172 $(use_enable debug maintainer-mode) \
173 $(use_enable nls) \
174 --disable-experimental-libtool \
175 --disable-mod-activation \
176 || die "econf failed"
177
178 # Respect the user LDFLAGS
179 export SWIG_LDFLAGS="${LDFLAGS}"
180
181 # Build subversion, but do it in a way that is safe for parallel builds.
182 # Also apparently the included apr has a libtool that doesn't like -L flags.
183 # So not specifying it at all when not building apache modules and only
184 # specify it for internal parts otherwise.
185 ( emake external-all && emake LT_LDFLAGS="-L${D}/usr/$(get_libdir)" local-all ) || die "Compilation of ${PN} failed"
186
187 if use python ; then
188 # Building fails without the apache apr-util as includes are wrong.
189 emake swig-py || die "Compilation of ${PN} Python bindings failed"
190 fi
191
192 if use perl ; then
193 # Work around a buggy Makefile.PL, bug 64634
194 mkdir -p subversion/bindings/swig/perl/native/blib/arch/auto/SVN/{_Client,_Delta,_Fs,_Ra,_Repos,_Wc}
195 emake -j1 swig-pl || die "Compilation of ${PN} Perl bindings failed"
196 fi
197
198 if use ruby ; then
199 emake swig-rb || die "Compilation of ${PN} Ruby bindings failed"
200 fi
201
202 if use java ; then
203 # ensure that the destination dir exists, else some compilation fails
204 mkdir -p "${S}"/subversion/bindings/java/javahl/classes
205 # Compile javahl
206 make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "make javahl failed"
207 fi
208
209 if use emacs ; then
210 einfo "Compiling emacs support"
211 elisp-compile "${S}"/contrib/client-side/psvn/psvn.el || die "emacs modules failed"
212 elisp-compile "${S}"/contrib/client-side/vc-svn.el || die "emacs modules failed"
213 elisp-compile "${S}"/doc/svn-doc.el || die "emacs modules failed"
214 elisp-compile "${S}"/doc/tools/svnbook.el || die "emacs modules failed"
215 fi
216
217 if use doc ; then
218 doxygen doc/doxygen.conf || die "doxygen failed"
219 fi
220 }
221
222 src_install () {
223 python_version
224 PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}
225
226 make DESTDIR="${D}" install || die "Installation of ${PN} failed"
227
228 if use python ; then
229 make DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \
230 || die "Installation of ${PN} Python bindings failed"
231
232 # move python bindings
233 dodir "${PYTHON_DIR}/site-packages"
234 mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages"
235 mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages"
236 rm -Rf "${D}"/usr/$(get_libdir)/svn-python
237 fi
238
239 if use perl ; then
240 make DESTDIR="${D}" install-swig-pl || die "Installation of ${PN} Perl bindings failed"
241 fixlocalpod
242 fi
243
244 if use ruby ; then
245 make DESTDIR="${D}" install-swig-rb || die "Installation of ${PN} Ruby bindings failed"
246 fi
247
248 if use java ; then
249 make DESTDIR="${D}" install-javahl || die "make install-javahl failed"
250 java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so
251 java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar
252 rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar
253 fi
254
255 # Install apache2 module config
256 if use apache2 ; then
257 MOD="${APACHE_MODULESDIR/${APACHE_BASEDIR}\//}"
258 dodir "${APACHE_MODULES_CONFDIR}"
259 cat <<EOF >"${D}/${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
260 <IfDefine SVN>
261 <IfModule !mod_dav_svn.c>
262 LoadModule dav_svn_module ${MOD}/mod_dav_svn.so
263 </IfModule>
264 <IfDefine SVN_AUTHZ>
265 <IfModule !mod_authz_svn.c>
266 LoadModule authz_svn_module ${MOD}/mod_authz_svn.so
267 </IfModule>
268 </IfDefine>
269
270 # example configuration:
271 #<Location /svn/repos>
272 # DAV svn
273 # SVNPath ${SVN_REPOS_LOC}/repos
274 # AuthType Basic
275 # AuthName "Subversion repository"
276 # AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
277 # Require valid-user
278 #</Location>
279 </IfDefine>
280 EOF
281 fi
282
283 # Bug 43179 - Install bash-completion if user wishes
284 dobashcompletion tools/client-side/bash_completion subversion
285 rm -f tools/client-side/bash_completion
286
287 # Install hot backup script, bug 54304
288 newbin tools/backup/hot-backup.py svn-hot-backup
289 rm -fr tools/backup
290
291 # The svn_load_dirs script is installed by Debian and looks like a good
292 # candidate for us to install as well
293 if use perl ; then
294 newbin contrib/client-side/svn_load_dirs.pl svn-load-dirs
295 fi
296 rm -f contrib/client-side/svn_load_dirs.pl
297
298 # Install svnserve init-script and xinet.d snippet, bug 43245
299 if use svnserve; then
300 newinitd "${FILESDIR}"/svnserve.initd svnserve
301 if use apache2 ; then
302 newconfd "${FILESDIR}"/svnserve.confd svnserve
303 else
304 newconfd "${FILESDIR}"/svnserve.confd2 svnserve
305 fi
306 insinto /etc/xinetd.d
307 newins "${FILESDIR}"/svnserve.xinetd svnserve
308 fi
309
310 # Install documentation
311 dodoc BUGS CHANGES COMMITTERS HACKING INSTALL README TRANSLATING
312 dodoc tools/xslt/svnindex.{css,xsl}
313 rm -fr tools/xslt
314
315 if use doc ; then
316 dohtml doc/doxygen/html/*
317 cp -R notes "${D}usr/share/doc/${PF}"
318 ecompressdir "/usr/share/doc/${PF}/notes"
319 fi
320
321 # Install Vim syntax files.
322 if use vim-syntax ; then
323 insinto /usr/share/vim/vimfiles/syntax
324 doins contrib/client-side/svn.vim
325 fi
326 rm -f contrib/client-side/svn.vim
327
328 # Install emacs lisps
329 if use emacs ; then
330 elisp-install ${PN} contrib/client-side/psvn/psvn.el*
331 elisp-install ${PN}/compat contrib/client-side/vc-svn.el*
332 elisp-install ${PN} doc/svn-doc.el*
333 elisp-install ${PN} doc/tools/svnbook.el*
334 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
335
336 elisp-site-file-install "${FILESDIR}"/70svn-gentoo.el
337 fi
338 rm -fr contrib/client-side/psvn/
339 rm -f contrib/client-side/vc-svn.el*
340
341 # Install extra files
342 if use extras ; then
343 find contrib tools '(' -name "*.bat" -o -name "*.in" ')' -print0 | xargs -0 rm -f
344 rm -fr tools/{dev,po}
345 dodir "/usr/share/${PN}"
346 cp -R contrib tools "${D}usr/share/${PN}"
347 fi
348 }
349
350 pkg_preinst() {
351 # Compare versions of Berkeley DB.
352 if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]] ; then
353 OLD_BDB_VERSION="$(scanelf -qn "${ROOT}usr/lib/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
354 NEW_BDB_VERSION="$(scanelf -qn "${D}usr/lib/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
355 if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
356 CHANGED_BDB_VERSION=1
357 fi
358 fi
359 }
360
361 pkg_postinst() {
362 use emacs && elisp-site-regen
363 use perl && perl-module_pkg_postinst
364
365 elog "Subversion Server Notes"
366 elog "-----------------------"
367 elog
368 elog "If you intend to run a server, a repository needs to be created using"
369 elog "svnadmin (see man svnadmin) or the following command to create it in"
370 elog "${SVN_REPOS_LOC}:"
371 elog
372 elog " emerge --config =${CATEGORY}/${PF}"
373 elog
374 elog "Subversion has multiple server types, take your pick:"
375 elog
376 if use svnserve; then
377 elog " - svnserve daemon: "
378 elog " 1. edit /etc/conf.d/svnserve"
379 elog " 2. start daemon: /etc/init.d/svnserve start"
380 elog " 3. make persistent: rc-update add svnserve default"
381 elog
382 elog " - svnserve via xinetd:"
383 elog " 1. edit /etc/xinetd.d/svnserve (remove disable line)"
384 elog " 2. restart xinetd.d: /etc/init.d/xinetd restart"
385 elog
386 fi
387 elog " - svn over ssh:"
388 elog " 1. Fix the repository permissions:"
389 elog " groupadd svnusers"
390 elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos/"
391 elog " chmod -R g-w ${SVN_REPOS_LOC}/repos"
392 elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/db"
393 elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/locks"
394 elog " 2. create an svnserve wrapper in /usr/local/bin to set the umask you"
395 elog " want, for example:"
396 elog " #!/bin/bash"
397 elog " . /etc/conf.d/svnserve"
398 elog " umask 002"
399 elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
400 elog
401 if use apache2; then
402 elog " - http-based server:"
403 elog " 1. edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
404 elog " 2. create an htpasswd file:"
405 elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
406 elog
407 fi
408
409 elog "If you intend to use svn-hot-backup, you can specify the number of"
410 elog "backups to keep per repository by specifying an environment variable."
411 elog "If you want to keep e.g. 2 backups, do the following:"
412 elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
413 elog "echo 'SVN_HOTBACKUP_NUM_BACKUPS=2' >> /etc/env.d/80subversion"
414 elog
415
416 if [[ -n "${CHANGED_BDB_VERSION}" ]]; then
417 ewarn "You upgraded from an older version of Berkely DB and may experience"
418 ewarn "problems with your repository. Run the following commands as root to fix it:"
419 ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
420 ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
421 fi
422 }
423
424 pkg_postrm() {
425 use emacs && elisp-site-regen
426 use perl && perl-module_pkg_postrm
427 }
428
429 pkg_config() {
430 if [[ ! -x "${ROOT}usr/bin/svnadmin" ]] ; then
431 die "You seem to only have built the Subversion client"
432 fi
433
434 einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
435 if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]] ; then
436 echo "A subversion repository already exists and I will not overwrite it."
437 echo "Delete ${ROOT}${SVN_REPOS_LOC}/repos first if you're sure you want to have a clean version."
438 else
439 mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
440
441 einfo ">>> Populating repository directory ..."
442 # create initial repository
443 "${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
444
445 einfo ">>> Setting repository permissions ..."
446 if use svnserve; then
447 SVNSERVE_USER="$(. ${ROOT}etc/conf.d/svnserve ; echo ${SVNSERVE_USER})"
448 SVNSERVE_GROUP="$(. ${ROOT}etc/conf.d/svnserve ; echo ${SVNSERVE_GROUP})"
449 fi
450 if use apache2 ; then
451 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
452 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
453 else
454 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
455 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
456 enewgroup "${SVNSERVE_GROUP}"
457 enewuser "${SVNSERVE_USER}" -1 -1 ${SVN_REPOS_LOC} "${SVNSERVE_GROUP}"
458 fi
459 chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
460 chmod -Rf 755 "${ROOT}${SVN_REPOS_LOC}/repos"
461 fi
462 }
463
464
465
466 --
467 gentoo-commits@l.g.o mailing list