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