On Mon, Aug 25, 2008 at 10:14:34AM +0300, Valery Masiutsin wrote: > Hello ! > > I was in need of subversion update to work with 1.5 repos, so i've made one. > Status - everything builds and packages just fine, svn client works fine, > tested on amd64. > However language bindings, need more attention and clean-up. > Comments are welcome.
Hey Valery, I've been working on an update to the port, too. Maybe we can join forces? :) See attachment, or http://stsp.name/openbsd/ports/subversion-1.5.1-wip.diff I haven't submitted it yet because of problems with the bindings. I've reported those problems and will continue poking the bindings maintainers for answers: http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=142053 Some comments on your patch: > @@ -102,14 +103,13 @@ CONFIGURE_ARGS+=${CONFIGURE_SHARED} \ > --with-neon=${LOCALBASE} \ > --with-apr=${LOCALBASE} \ > --with-apr-util=${LOCALBASE} \ > - --with-zlib \ > - --without-jdk > + --with-zlib=/usr \ > + --without-jdk \ > + --with-jikes=no I don't have --with-jikes, but looks like it's a good idea to have that in case someone has jikes installed. Note that I am planning to look into support for the java bindings with the java-1.7 in -current (no idea if that's gonna work yet). Alas, before the swig bindings work, I'm not gonna bother with the java bindings. > Index: patches/patch-build-outputs_mk > =================================================================== > RCS file: patches/patch-build-outputs_mk > diff -N patches/patch-build-outputs_mk > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-build-outputs_mk 21 Aug 2008 14:30:38 -0000 You patched this file to work around a "file not found" problem when building the bindings, right? There are a few bugs in upstream code when building the bindings out-of-tree. I looked into fixing them, but so far whenever I fixed one problem another one popped up. For now, my port works around this by not setting SEPARATE_BUILD. Eventually I will try to fix the bindings to build out-of-tree correctly, but it's not as easy as I hoped it would be. Also, build-outputs.mk is generated upstream. I can commit my patches upstream, so I'm trying to get them in an acceptable form for that. This implies only creating patches for the OpenBSD port which 1) won't break other systems, like Linux, MacOSx etc. 2) do not touch generated files. Since I'm only patching non-generated files, my port runs ./autogen.sh in ${WRKSRC} right after patching, rebuilding the configure script and the build-outputs.mk Makefile fragment. Eventually, I want Subversion to compile on OpenBSD as shipped, without patches. (Well, apart from the ones that do s/python/python25/ etc.). > Index: patches/patch-configure > =================================================================== > RCS file: /cvs/ports/devel/subversion/patches/patch-configure,v > retrieving revision 1.9 > -@@ -20630,7 +20630,7 @@ rm -f conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > - if test "$ac_cv_search_bindtextdomain" = no; then > - for ac_lib in intl; do > -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" > -+ LIBS="-l$ac_lib -liconv $ac_func_search_save_LIBS" This fixes detection for NLS support. Likewise, I have a patch for the source file which the configure script is generated from that fixes this problem. See patch-configure_ac in my port. > Index: pkg/PLIST-ruby > =================================================================== > RCS file: /cvs/ports/devel/subversion/pkg/PLIST-ruby,v > retrieving revision 1.3 > diff -u -p -u -p -r1.3 PLIST-ruby > --- pkg/PLIST-ruby 18 Jun 2007 06:34:48 -0000 1.3 > +++ pkg/PLIST-ruby 21 Aug 2008 14:30:38 -0000 > @@ -1,29 +1,44 @@ > [EMAIL PROTECTED] $OpenBSD: steven $ > [EMAIL PROTECTED] $OpenBSD: PLIST-ruby,v 1.3 2007/06/18 06:34:48 steven Exp $ > %%SHARED%% > lib/libsvn_swig_ruby-1.a > lib/libsvn_swig_ruby-1.la > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/ > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/client.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/core.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/delta.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/error.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/fs.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/info.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/ra.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/repos.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/util.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/svn/wc.rb > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/client.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/client.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/core.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/core.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/delta.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/delta.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/fs.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/fs.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/ra.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/ra.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/repos.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/repos.la > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/wc.a > -lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/svn/ext/wc.la > +lib/ruby/ > +lib/ruby/site_ruby/ > +lib/ruby/site_ruby/svn/ > +lib/ruby/site_ruby/svn/client.rb > +lib/ruby/site_ruby/svn/commit-mailer.rb > +lib/ruby/site_ruby/svn/core.rb [...] This is wrong. The ruby bindings should install in lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}, not in lib/ruby/site_ruby/ The problem here is that on OpenBSD, a sed command in the configure script fails, apparently because sed is being passed quotes which should instead be munched by the shell or m4 or whatever. It looks somewhat like this: checking where to install Ruby scripts... sed: 1: ""s,^/usr/local/lib/ruby ...: invalid command code " /usr/local/lib/ruby/site_ruby checking where to install Ruby extensions... sed: 1: ""s,^/usr/local/lib/ruby ...: invalid command code " /usr/local/lib/ruby/site_ruby The above is taken from Brad Walker's report on his attempt to create a 1.5.0 port: http://subversion.tigris.org/servlets/ReadMsg?listName=users&msgNo=80039 I'm not sure who to blame here. The failing sed command works as expected when executed directly with OpenBSD's /bin/sh. See my reply to Brad's mail for details: http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=80213 I got this working on OpenBSD by removing a pair of quotes from the sed command. See patch-build_ac-macros_swig_m4 in my port. I'm not sure whether this is the right fix, though. I think the quoting should work, because it does not look wrong. I welcome any hints on how to fix this problem properly, so that the configure script as shipped in our releases works on OpenBSD as it should. Thanks, Stefan