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.5.4.ebuild subversion-1.5.0.ebuild
Date: Sat, 25 Oct 2008 12:48:47
Message-Id: E1KtiZR-0006e2-5c@stork.gentoo.org
1 hollow 08/10/25 12:48:45
2
3 Modified: ChangeLog
4 Added: subversion-1.5.4.ebuild
5 Removed: subversion-1.5.0.ebuild
6 Log:
7 version bump wrt #241398, fixes emacs support wrt #237528
8 (Portage version: 2.1.4.5)
9
10 Revision Changes Path
11 1.333 dev-util/subversion/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.333&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.333&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.332&r2=1.333
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v
20 retrieving revision 1.332
21 retrieving revision 1.333
22 diff -u -r1.332 -r1.333
23 --- ChangeLog 18 Oct 2008 15:12:32 -0000 1.332
24 +++ ChangeLog 25 Oct 2008 12:48:45 -0000 1.333
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-util/subversion
27 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.332 2008/10/18 15:12:32 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.333 2008/10/25 12:48:45 hollow Exp $
30 +
31 +*subversion-1.5.4 (25 Oct 2008)
32 +
33 + 25 Oct 2008; Benedikt Böhm <hollow@g.o>
34 + -files/1.5.0/http-library.patch, -subversion-1.5.0.ebuild,
35 + +subversion-1.5.4.ebuild:
36 + version bump wrt #241398, fixes emacs support wrt #237528
37
38 18 Oct 2008; Raúl Porcel <armin76@g.o> subversion-1.5.2.ebuild:
39 ia64 stable wrt #241584
40
41
42
43 1.1 dev-util/subversion/subversion-1.5.4.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.5.4.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.5.4.ebuild?rev=1.1&content-type=text/plain
47
48 Index: subversion-1.5.4.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.5.4.ebuild,v 1.1 2008/10/25 12:48:45 hollow Exp $
53
54 EAPI="1"
55 WANT_AUTOMAKE="none"
56
57 inherit autotools bash-completion confutils depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
58
59 DESCRIPTION="Advanced version control system"
60 HOMEPAGE="http://subversion.tigris.org/"
61 SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2"
62
63 LICENSE="Subversion"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
66 IUSE="apache2 berkdb debug doc +dso emacs extras java nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf"
67 RESTRICT="test"
68
69 CDEPEND=">=dev-libs/apr-1.2.8
70 >=dev-libs/apr-util-1.2.8
71 dev-libs/expat
72 sys-libs/zlib
73 berkdb? ( =sys-libs/db-4* )
74 emacs? ( virtual/emacs )
75 ruby? ( >=dev-lang/ruby-1.8.2 )
76 sasl? ( dev-libs/cyrus-sasl )
77 webdav-neon? ( >=net-misc/neon-0.28 )
78 webdav-serf? ( net-libs/serf )"
79
80 RDEPEND="${CDEPEND}
81 java? ( >=virtual/jre-1.5 )
82 nls? ( virtual/libintl )
83 perl? ( dev-perl/URI )"
84
85 DEPEND="${CDEPEND}
86 doc? ( app-doc/doxygen )
87 java? ( >=virtual/jdk-1.5 )
88 nls? ( sys-devel/gettext )"
89
90 want_apache
91
92 S="${WORKDIR}"/${P/_/-}
93
94 # Allow for custom repository locations.
95 # This can't be in pkg_setup because the variable needs to be available to
96 # pkg_config.
97 : ${SVN_REPOS_LOC:=/var/svn}
98
99 pkg_setup() {
100 confutils_use_depend_built_with_all berkdb dev-libs/apr-util berkdb
101 java-pkg-opt-2_pkg_setup
102
103 if ! use webdav-neon && ! use webdav-serf; then
104 ewarn
105 ewarn "WebDAV support is disabled. You need WebDAV to"
106 ewarn "access repositories through the HTTP protocol."
107 ewarn
108 ewarn "WebDAV support needs one of the following USE flags enabled:"
109 ewarn " webdav-neon webdav-serf"
110 ewarn
111 ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:"
112 ewarn " =${CATEGORY}/${PF} webdav-neon webdav-serf"
113 ewarn
114 ebeep
115 fi
116 }
117
118 src_unpack() {
119 unpack ${A}
120 cd "${S}"
121
122 epatch "${FILESDIR}"/1.5.0/disable-unneeded-linking.patch
123
124 sed -i \
125 -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
126 -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
127
128 sed -e 's:@bindir@/svn-contrib:@libdir@/subversion/bin:' \
129 -e 's:@bindir@/svn-tools:@libdir@/subversion/bin:' \
130 -i Makefile.in
131
132 eautoconf
133 elibtoolize
134 }
135
136 src_compile() {
137 local myconf
138
139 if use python || use perl || use ruby; then
140 myconf="${myconf} --with-swig"
141 else
142 myconf="${myconf} --without-swig"
143 fi
144
145 if use debug; then
146 append-cppflags -DSVN_DEBUG -DAP_DEBUG
147 fi
148
149 append-flags -fno-strict-aliasing
150
151 econf ${myconf} \
152 $(use_with apache2 apxs "${APXS}") \
153 $(use_with berkdb berkeley-db) \
154 $(use_enable dso runtime-module-search) \
155 $(use_enable java javahl) \
156 $(use_with java jdk "${JAVA_HOME}") \
157 $(use_enable nls) \
158 $(use_with sasl) \
159 $(use_with webdav-neon neon /usr) \
160 $(use_with webdav-serf serf /usr) \
161 --with-apr=/usr/bin/apr-1-config \
162 --with-apr-util=/usr/bin/apu-1-config \
163 --disable-experimental-libtool \
164 --without-jikes \
165 --without-junit \
166 --disable-mod-activation
167
168 emake local-all || die "Building of core Subversion failed"
169
170 if use python; then
171 emake swig-py || die "Building of Subversion Python bindings failed"
172 fi
173
174 if use perl; then
175 emake -j1 swig-pl || die "Building of Subversion Perl bindings failed"
176 fi
177
178 if use ruby; then
179 emake swig-rb || die "Building of Subversion Ruby bindings failed"
180 fi
181
182 if use java; then
183 make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
184 || die "Building of Subversion JavaHL library failed"
185 fi
186
187 if use emacs; then
188 elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el \
189 doc/svn-doc.el doc/tools/svnbook.el \
190 || die "Compilation of Emacs modules failed"
191 fi
192
193 if use extras; then
194 emake contrib || die "Building of contrib failed"
195 emake tools || die "Building of tools failed"
196 fi
197
198 if use doc; then
199 doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
200
201 if use java; then
202 emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
203 fi
204 fi
205 }
206
207 src_install() {
208 python_version
209 PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}
210
211 emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed"
212
213 if use python; then
214 emake -j1 DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \
215 || die "Installation of Subversion Python bindings failed"
216
217 # Move Python bindings.
218 dodir "${PYTHON_DIR}/site-packages"
219 mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages"
220 mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages"
221 rm -Rf "${D}"/usr/$(get_libdir)/svn-python
222 fi
223
224 if use perl; then
225 emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion Perl bindings failed"
226 fixlocalpod
227 fi
228
229 if use ruby; then
230 emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion Ruby bindings failed"
231 fi
232
233 if use java; then
234 emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
235 java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so
236 java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar
237 rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar
238 fi
239
240 # Install Apache module configuration.
241 if use apache2; then
242 dodir "${APACHE_MODULES_CONFDIR}"
243 cat <<EOF >"${D}/${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
244 <IfDefine SVN>
245 LoadModule dav_svn_module modules/mod_dav_svn.so
246 <IfDefine SVN_AUTHZ>
247 LoadModule authz_svn_module modules/mod_authz_svn.so
248 </IfDefine>
249
250 # Example configuration:
251 #<Location /svn/repos>
252 # DAV svn
253 # SVNPath ${SVN_REPOS_LOC}/repos
254 # AuthType Basic
255 # AuthName "Subversion repository"
256 # AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
257 # Require valid-user
258 #</Location>
259 </IfDefine>
260 EOF
261 fi
262
263 # Install Bash Completion, bug 43179.
264 dobashcompletion tools/client-side/bash_completion subversion
265 rm -f tools/client-side/bash_completion
266
267 # Install hot backup script, bug 54304.
268 newbin tools/backup/hot-backup.py svn-hot-backup
269 rm -fr tools/backup
270
271 # Install svn_load_dirs.pl.
272 if use perl; then
273 newbin contrib/client-side/svn_load_dirs/svn_load_dirs.pl svn-load-dirs
274 fi
275 rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl
276
277 # Install svnserve init-script and xinet.d snippet, bug 43245.
278 newinitd "${FILESDIR}"/svnserve.initd svnserve
279 if use apache2; then
280 newconfd "${FILESDIR}"/svnserve.confd svnserve
281 else
282 newconfd "${FILESDIR}"/svnserve.confd2 svnserve
283 fi
284 insinto /etc/xinetd.d
285 newins "${FILESDIR}"/svnserve.xinetd svnserve
286
287 # Install documentation.
288 dodoc CHANGES COMMITTERS README
289 dohtml www/hacking.html
290 dodoc tools/xslt/svnindex.{css,xsl}
291 rm -fr tools/xslt
292
293 # Install Vim syntax files.
294 if use vim-syntax; then
295 insinto /usr/share/vim/vimfiles/syntax
296 doins contrib/client-side/vim/svn.vim
297 fi
298 rm -f contrib/client-side/vim/svn.vim
299
300 # Install Emacs Lisps.
301 if use emacs; then
302 elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} \
303 doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} \
304 || die "Installation of Emacs modules failed"
305 elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} \
306 || die "Installation of Emacs modules failed"
307 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
308 elisp-site-file-install "${FILESDIR}"/1.5.0/70svn-gentoo.el \
309 || die "Installation of Emacs site-init file failed"
310 fi
311 rm -fr contrib/client-side/emacs
312
313 # Install extra files.
314 if use extras; then
315 doenvd "${FILESDIR}"/1.5.0/80subversion-extras
316
317 emake DESTDIR="${D}" install-contrib || die "Installation of contrib failed"
318 emake DESTDIR="${D}" install-tools || die "Installation of tools failed"
319
320 find contrib tools '(' -name "*.bat" -o -name "*.in" -o -name ".libs" ')' -print0 | xargs -0 rm -fr
321 rm -fr contrib/client-side/{svn-push,svnmucc}
322 rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
323 rm -fr tools/{buildbot,dev,diff,po}
324
325 insinto /usr/share/${PN}
326 doins -r contrib tools
327 fi
328
329 if use doc; then
330 dohtml doc/doxygen/html/*
331
332 insinto /usr/share/doc/${PF}
333 doins -r notes
334 ecompressdir /usr/share/doc/${PF}/notes
335
336 if use java; then
337 java-pkg_dojavadoc doc/javadoc
338 fi
339 fi
340 }
341
342 pkg_preinst() {
343 # Compare versions of Berkeley DB, bug 122877.
344 if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]] ; then
345 OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
346 NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
347 if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
348 CHANGED_BDB_VERSION=1
349 fi
350 fi
351 }
352
353 pkg_postinst() {
354 use emacs && elisp-site-regen
355 use perl && perl-module_pkg_postinst
356
357 elog "Subversion Server Notes"
358 elog "-----------------------"
359 elog
360 elog "If you intend to run a server, a repository needs to be created using"
361 elog "svnadmin (see man svnadmin) or the following command to create it in"
362 elog "${SVN_REPOS_LOC}:"
363 elog
364 elog " emerge --config =${CATEGORY}/${PF}"
365 elog
366 elog "Subversion has multiple server types, take your pick:"
367 elog
368 elog " - svnserve daemon: "
369 elog " 1. Edit /etc/conf.d/svnserve"
370 elog " 2. Start daemon: /etc/init.d/svnserve start"
371 elog " 3. Make persistent: rc-update add svnserve default"
372 elog
373 elog " - svnserve via xinetd:"
374 elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)"
375 elog " 2. Restart xinetd.d: /etc/init.d/xinetd restart"
376 elog
377 elog " - svn over ssh:"
378 elog " 1. Fix the repository permissions:"
379 elog " groupadd svnusers"
380 elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos/"
381 elog " chmod -R g-w ${SVN_REPOS_LOC}/repos"
382 elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/db"
383 elog " chmod -R g+rw ${SVN_REPOS_LOC}/repos/locks"
384 elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you"
385 elog " want, for example:"
386 elog " #!/bin/bash"
387 elog " . /etc/conf.d/svnserve"
388 elog " umask 002"
389 elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
390 elog
391
392 if use apache2; then
393 elog " - http-based server:"
394 elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
395 elog " 2. Create an htpasswd file:"
396 elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
397 elog
398 fi
399
400 elog "If you intend to use svn-hot-backup, you can specify the number of"
401 elog "backups to keep per repository by specifying an environment variable."
402 elog "If you want to keep e.g. 2 backups, do the following:"
403 elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
404 elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion"
405 elog
406
407 if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
408 ewarn "You upgraded from an older version of Berkeley DB and may experience"
409 ewarn "problems with your repository. Run the following commands as root to fix it:"
410 ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
411 ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
412 fi
413 }
414
415 pkg_postrm() {
416 use emacs && elisp-site-regen
417 use perl && perl-module_pkg_postrm
418 }
419
420 pkg_config() {
421 if [[ ! -x "${ROOT}usr/bin/svnadmin" ]] ; then
422 die "You seem to only have built the Subversion client"
423 fi
424
425 einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
426 if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]] ; then
427 echo "A Subversion repository already exists and I will not overwrite it."
428 echo "Delete ${ROOT}${SVN_REPOS_LOC}/repos first if you're sure you want to have a clean version."
429 else
430 mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
431
432 einfo ">>> Populating repository directory ..."
433 # Create initial repository.
434 "${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
435
436 einfo ">>> Setting repository permissions ..."
437 SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_USER}")"
438 SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_GROUP}")"
439 if use apache2 ; then
440 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
441 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
442 else
443 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
444 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
445 enewgroup "${SVNSERVE_GROUP}"
446 enewuser "${SVNSERVE_USER}" -1 -1 ${SVN_REPOS_LOC} "${SVNSERVE_GROUP}"
447 fi
448 chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
449 chmod -Rf 755 "${ROOT}${SVN_REPOS_LOC}/repos"
450 fi
451 }