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