# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name subversion # Subports set perl5.branches {5.8 5.10 5.12 5.14 5.16} foreach branch ${perl5.branches} { set p_idx [lsearch ${perl5.branches} ${branch}] set other_perls [lreplace ${perl5.branches} $p_idx $p_idx] subport subversion-perlbindings-${branch} { set perl5.major ${branch} set perl5.bin ${prefix}/bin/perl${perl5.major} foreach c_perl ${other_perls} { conflicts-append subversion-perlbindings-${c_perl} } } } foreach {ver branch} {25 2.5 26 2.6 27 2.7} { subport subversion-python${ver}bindings { set python.version ${ver} set python.branch ${branch} if {${python.version} eq {25}} { set python.prefix ${prefix} } else { set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch} } set python.bin ${python.prefix}/bin/python${python.branch} set python.libdir ${python.prefix}/lib/python${python.branch} } } # General version 1.8.5 categories devel platforms darwin license Apache-2 maintainers geeklair.net:dluke blair long_description Subversion (svn) is a version control system \ designed to be as similar to CVS as possible, \ while fixing many outstanding problems with CVS. homepage http://subversion.apache.org/ switch -regexp -- ${subport} { perl { categories-append perl description Perl ${perl5.major} bindings for the \ Subversion version control system long_description-append These bindings provide access to the \ Subversion API from Perl ${perl5.major}. } python { categories-append python description Python ${python.branch} bindings for \ the Subversion version control system long_description-append These bindings provide access to the \ Subversion API from Python \ ${python.branch}. } default { description A version control system designed to \ be a better CVS } } # Dependencies depends_lib port:apr \ port:apr-util \ port:cyrus-sasl2 \ port:db46 \ port:expat \ port:gettext \ port:libcomerr \ port:libiconv \ port:libmagic \ port:serf1 \ port:sqlite3 \ port:zlib switch -regexp -- ${subport} { perl {depends_lib-append port:${name} port:perl${perl5.major}} python {depends_lib-append port:${name} port:python${python.version}} default {depends_run path:share/curl/curl-ca-bundle.crt:curl-ca-bundle} } # Fetch and checksum master_sites apache:subversion use_bzip2 yes checksums sha1 d21de7daf37d9dd1cb0f777e999a529b96f83082 \ rmd160 739b16c5f1f8a9fe8ca39db1864dff89e0ad743e \ sha256 fd522bf1ecda1c09426ed6c436f0744ab95c31702b0904add089864c73ee7564 # Patch patchfiles add-python-version.patch \ config_impl.h.patch \ patch-swig-perl-native-core.c.diff \ patch-swig-python-core.diff \ use-python-config.patch post-patch { reinplace "s|__PREFIX__|${prefix}|" \ ${worksrcpath}/subversion/libsvn_subr/config_impl.h } switch -regexp -- ${subport} { python { post-patch { reinplace "s/__PYTHON_VERSION__/${python.version}/" \ ${worksrcpath}/build.conf reinplace "s/__PYTHON_BRANCH__/${python.branch}/" \ ${worksrcpath}/Makefile.in } } } # Configure configure.args --disable-keychain \ --with-apr=${prefix}/bin/apr-1-config \ --with-apr-util=${prefix}/bin/apu-1-config \ --with-berkeley-db=:${prefix}/include/db46:${prefix}/lib/db46:db-4.6 \ --with-libmagic=${prefix} \ --with-sasl=${prefix} \ --with-serf=${prefix} \ --with-zlib=${prefix} \ --without-apxs \ --without-gnome-keyring switch -regexp -- ${subport} { perl {configure.args-append PERL=${perl5.bin}} python { configure.args-append PYTHON=${python.bin} pre-configure { # Regenerate build-outputs.mk from patched build.conf. system -W ${worksrcpath} {python gen-make.py --release} } } } # Build switch -regexp -- ${subport} { perl { use_parallel_build no build.target swig-pl } python {build.target swig-py} default {build.target-append tools} } # Destroot switch -regexp -- ${subport} { perl { destroot { system -W ${worksrcpath} \ "${build.cmd} install-swig-pl-lib ${destroot.post_args}" system -W ${worksrcpath}/subversion/bindings/swig/perl/native \ "${build.cmd} pure_install INSTALLDIRS=vendor ${destroot.post_args}" fs-traverse pl ${destroot} { if {[file tail ${pl}] eq {.packlist}} { reinplace "s|${destroot}||" ${pl} ui_info "Fixed packlist '${pl}'" } } } } python { destroot.target install-swig-py post-destroot { set pth ${destroot}${python.libdir}/site-packages/svn-python.pth xinstall -d -m 755 [file dirname ${pth}] set pth_ch [open ${pth} {WRONLY CREAT TRUNC} 0644] puts ${pth_ch} "${prefix}/lib/svn-python${python.branch}" close ${pth_ch} } } default { destroot.target-append install-tools post-destroot { # install global config file so curl-ca-bundle certs are used xinstall -d ${destroot}${prefix}/etc/subversion xinstall -m 644 ${filespath}/servers.default \ ${destroot}${prefix}/etc/subversion # install bash completion file xinstall -d ${destroot}${prefix}/etc/bash_completion.d copy ${worksrcpath}/tools/client-side/bash_completion \ ${destroot}${prefix}/etc/bash_completion.d/subversion } } } # Activate subport ${name} { post-activate { if {![file exists ${prefix}/etc/subversion/servers]} { copy ${prefix}/etc/subversion/servers.default \ ${prefix}/etc/subversion/servers } } } # Test test.run yes switch -regexp -- ${subport} { perl {test.target check-swig-pl} python {test.target check-swig-py} default { test.target check test.env CLEANUP=true pre-test { set libs {} fs-traverse dir ${worksrcpath}/subversion { if {[llength [glob -nocomplain ${dir}/*.dylib]] > 0} { lappend libs ${dir} continue } } test.env-append DYLD_LIBRARY_PATH=[join ${libs} :] } } } # Variants variant no_bdb description {Build without support for BerkeleyDB repositories} { depends_lib-delete port:db46 configure.args-replace --with-berkeley-db=:${prefix}/include/db46:${prefix}/lib/db46:db-4.6 \ --without-berkeley-db } subport ${name} { variant mod_dav_svn description {Install the subversion apache module (mod_dav_svn)} { depends_build path:apache2/bin/apxs:apache2 configure.args-replace --without-apxs \ --with-apxs=${prefix}/apache2/bin/apxs configure.args-append --disable-mod-activation destroot.violate_mtree yes } variant mac_os_x_server_mod_dav_svn description {Unsupported - attempt to build the subversion apache module with apple supplied apache2} { configure.args-replace --without-apxs \ --with-apxs=/opt/apache2/bin/apxs configure.args-append --disable-mod-activation destroot.violate_mtree yes post-install { ui_warn "This variant (+mac_os_x_server_mod_dav_svn) builds against the Apple-supplied apache2 in /opt/apache2 and thus may have problems that the normal variant (+mod_dav_svn) which builds against the macports supplied apache2 will not have." } } variant tools description {Install some optional extra subversion tools} { post-destroot { xinstall -d -m 755 ${destroot}${prefix}/share/${name} eval delete ${worksrcpath}/tools/diff/ \ ${worksrcpath}/tools/server-side/mod_dontdothat \ [glob ${worksrcpath}/tools/server-side/*{.o,.lo,.c}] \ ${worksrcpath}/tools/server-side/fsfs-stats \ ${worksrcpath}/tools/server-side/svn-populate-node-origins-index \ ${worksrcpath}/tools/server-side/svn-rep-sharing-stats \ ${worksrcpath}/tools/server-side/svnauthz-validate copy ${worksrcpath}/tools ${destroot}${prefix}/share/${name}/tools } } # see http://subversion.tigris.org/issues/show_bug.cgi?id=2464 variant unicode_path description {Installs a hack to workaround Mac OS X unicode path issues} { patchfiles-append patch-osx_unicode_precomp.diff post-install { ui_warn "This variant (+unicode_path) implements a hack to deal with composed/decomposed unicode handling on Mac OS X which is different from linux and windows. It is an implementation of solution 1 from http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames which _WILL_ break some setups. Please be sure you understand what you are asking for when you install this variant." } } platform macosx { # Legacy negative variant to be removed after August 2014. variant disable_keychain conflicts osxkeychain description {Legacy compatibility variant} {} variant osxkeychain conflicts disable_keychain description {Enable OS X Keychain support} { configure.args-delete --disable-keychain } if {[variant_isset disable_keychain]} { default_variants -osxkeychain } else { default_variants +osxkeychain } } } # Livecheck if {${subport} eq ${name}} { livecheck.type regex livecheck.url http://svn.apache.org/repos/asf/subversion/tags/ livecheck.regex {(\d+\.\d+\.\d+)/} } else { livecheck.type none }