# Subversion - Enterprise-class centralized version control for the masses
# http://subversion.apache.org/

[buildout]
extends =
  ../apache/buildout.cfg
  ../libexpat/buildout.cfg
  ../libuuid/buildout.cfg
  ../neon/buildout.cfg
  ../openssl/buildout.cfg
  ../patch/buildout.cfg
  ../perl/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../serf/buildout.cfg
  ../sqlite3/buildout.cfg
  ../zlib/buildout.cfg
  ../swig/buildout.cfg
parts =
  subversion

[subversion]
recipe = slapos.recipe.cmmi
shared = true
url = http://apache.mirrors.tds.net/subversion/subversion-1.8.14.tar.bz2
md5sum = fe476ba26d6835eba4393780ea907361
# Patch available thanks to gentoo developpers
# https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-vcs/subversion/files/subversion-fix-parallel-build-support-for-perl-bindings.patch
patches =
  ${:_profile_base_location_}/subversion-fix-parallel-build-support-for-perl-bindings.patch#fd69f4c932b4882ed98c59eb102be64a
configure-options =
  --disable-static
  --with-apr=${apache:location}/bin/apr-1-config
  --with-apr-util=${apache:location}/bin/apu-1-config
  --with-serf=yes
  --without-apxs
  --with-zlib=${zlib:location}
  --with-sqlite=${sqlite3:location}
  --without-berkeley-db
  --without-sasl
  --without-apr_memcache
  --without-gpg-agent
  --without-gnome-keyring
  --without-libmagic
  --without-kwallet
  --without-jdk
  --without-jikes
  --without-swig
  --without-junit
  --without-ctypesgen
  --without-ruby-sitedir
  --without-ruby-test-verbose
  --disable-nls
make-targets = install -j1
environment =
  PATH=${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl-1.0:location}/lib/pkgconfig:${serf:location}/lib/pkgconfig
  CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
  LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${openssl-1.0:location}/lib

[subversion-1.9]
recipe = hexagonit.recipe.cmmi
shared = true
url = http://www.apache.org/dist/subversion/subversion-1.7.9.tar.gz
md5sum = dfb083e8bfac88aa28d606168b08e4ff
configure-options =
  --disable-static
  --with-apr=${apache:location}/bin/apr-1-config
  --with-apr-util=${apache:location}/bin/apu-1-config
  --with-apxs=${apache:location}/bin/apxs
  --with-zlib=${zlib:location}
  --with-sqlite=${sqlite3:location}
  --with-neon=${neon:location}
  --with-swig=${swig:location}/bin/swig
  --without-berkeley-db
  --without-sasl
  --without-apr_memcache
  --without-gnome-keyring
  --without-kwallet
  --without-jdk
  --without-jikes
  --without-junit
  --without-ctypesgen
  --without-ruby-sitedir
  --without-ruby-test-verbose
  --disable-nls

# it seems that parallel build sometimes fails.
make-options =
  -j1

make-targets = 
  install
  swig-py
  install-swig-py

environment =
  PATH=${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl-1.0:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
  CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
  LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${openssl-1.0:location}/lib
