* tools/dev/unix-build/Makefile.svn: Add another hack tweaking the generated
Perl buindings Makefile.PL to avoid linking the Perl bindings against
SVN libraries in the /usr/local/lib directory on OpenBSD.
Maybe, hopefully, the svn-bb-openbsd bot will finally go green now?
@@ -1576,6 +1576,17 @@ $(SVN_OBJDIR)/.pre-generated-swig-cleaned:
&& env MAKEFLAGS= make clean-swig
touch $@
+
+# On OpenBSD, Perl's LDDLFLAGS include -L/usr/local/lib, which can cause
+# us to link Perl bindings against the wrong set of SVN libraries.
+# We manually fix up the generated Makefile.PL to work around this issue.
+ifeq ($(UNAME),OpenBSD)
+MAKEFILE_PL_LDDLFLAGS_HACK= sed -i 's@^WriteMakefile@$$config{LDDLFLAGS} =~ s+-L/usr/local/lib++; WriteMakefile@' \
+ $(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL
+else
+MAKEFILE_PL_LDDLFLAGS_HACK=true
+endif
+
$(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-generated-swig-cleaned
cd $(svn_builddir) \
&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
@@ -1584,6 +1595,8 @@ $(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-ge
env PATH=$(PREFIX)/ruby/bin:$$PATH \
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) env MAKEFLAGS= make -j${MAKE_JOBS} swig-rb
if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
+ cd $(svn_builddir) && make $(SVN_SRCDIR)/subversion/bindings/swig/perl/native/Makefile.PL; \
+ $(MAKEFILE_PL_LDDLFLAGS_HACK); \
cd $(svn_builddir) \
&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
env MAKEFLAGS= make -j${MAKE_JOBS} swig-pl; \
