Hi Dscho,
I eventually managed to build the perl bindings of subversion and I
could run "git-svn" to the help output and part of the test suite.
That's the good news.
The "not so good" news is that I'm still not sure how to organize that
build in the ./release.sh form. Instead, I still have a long manual
recipe... whatever. Here it is:
* I started with the temp/msys branch of msysgit (hence, I did *not* use
the work/msysfull branch)
* I compiled libtool-1.5.22: ./configure --prefix=
--build=i686-pc-mingw32 && make && make install
* I got a zlib1.dll, moved this to /bin/zlib1.dll, and created the
corresponding /lib/libz.dll.a as described in my earlier email; the
existing /lib/libz.a I removed or renamed.
* Then I compiled subversion by hand (for whatever reason ./release.sh
didn't work yet): Unpacking both tarballs. Then
# Applying all patches, including the new one that is attached
git init
git add .
git commit -m initial
git am ../patches/0*
# Now let the build system be regenerated
./autogen.sh
# Some more options to configure
./configure --disable-static --enable-shared --build=i686-pc-mingw32
# Here is repeatedly hung when detecting zlib, but this wasn't because
of a missing zlib - instead, it was because of a bad variable
@NEON_LIBS@ or similar in the configure file. Eventually, this
disappeared after starting from a clean tarball plus the patches and
autogen.sh.
make LDFLAGS="-no-undefined -Wl,-enable-auto-import -L/lib"
# This runs until some tests which can be ignored
make install
# Now we have the svn binary and DLLs already.
make swig-pl-lib LDFLAGS="-no-undefined -Wl,-enable-auto-import
-L/lib" LIBS="-L/lib/perl5/5.8.8/msys/CORE -lperl"
make install-swig-pl-lib
# We're getting closer.
make swig-pl CCFLAGS="-Dstrtoll=strtol" LDFLAGS="-Wl,-enable-auto-import"
# The "trick" was to learn the Makefile.PL syntax and add all the
required DLLs to be linked into. Along the way, I didn't find out *why*
the Makefiles were installed in the weird location, but through the
FIRST_MAKEFILE argument I could specify the correct one. See attached patch.
make install-swig-pl
# That's it. Yippi-yay-yeah!
The test output is below as well. This was all built with MSYSTEM=MSYS,
despite the --build argument of configure. And indeed all resulting DLLs
will link against "MSYS-1.0.DLL", including e.g.
bin/libsvn_client-1-0.dll and the perl modules like SVN/_Core/_Core.dll etc.
I'm short on time these days, but I might try again to integrate this
into ./release.sh, starting from a clean temp/msys tree. But unless
anyone else starts to do this, it might take me 2-3 weeks until I can
come up with something working here.
Cheers!
Christian
####################################
## Output of "t9100-git-svn-basic.sh -i -v":
define NO_SVN_TESTS to skip git-svn tests
* expecting success:
mkdir import &&
cd import &&
echo foo > foo &&
ln -s foo foo.link
mkdir -p dir/a/b/c/d/e &&
echo 'deep dir' > dir/a/b/c/d/e/file &&
mkdir bar &&
echo 'zzz' > bar/zzz &&
echo '#!/bin/sh' > exec.sh &&
chmod +x exec.sh &&
svn import -m 'import for git-svn' . file:///git/t/trash/svnrepo
>/dev/null &&
cd .. &&
rm -rf import &&
git-svn init file:///git/t/trash/svnrepo
* ok 1: initialize git-svn
* expecting success: git-svn fetch
Use of uninitialized value in string eq at /git/t/../git-svn line 1280.
Use of uninitialized value in string eq at /git/t/../git-svn line 1280.
Can't have both 'noMetadata' and 'useSvmProps' options set!
* FAIL 2: import an SVN revision into git
git-svn fetch
>From 1576c26f63c034abce1f150c0e3a56aa356db384 Mon Sep 17 00:00:00 2001
From: Christian Stimming <[EMAIL PROTECTED]>
Date: Tue, 29 Jan 2008 22:40:34 +0100
Subject: [PATCH] Fix swig-pl Makefile
---
.../bindings/swig/perl/native/Makefile.PL.in | 26 ++++++++-----------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/subversion/bindings/swig/perl/native/Makefile.PL.in
b/subversion/bindings/swig/perl/native/Makefile.PL.in
index d20c7a8..8d0795e 100644
--- a/subversion/bindings/swig/perl/native/Makefile.PL.in
+++ b/subversion/bindings/swig/perl/native/Makefile.PL.in
@@ -10,6 +10,7 @@ if ($^O ne 'VMS') {
my $top_builddir = '@top_builddir@';
my $top_srcdir = '@top_srcdir@';
+my $abs_builddir = '@abs_builddir@';
my $svnlib_srcdir = "${top_srcdir}/subversion";
my $svnlib_builddir = "${top_builddir}/subversion";
my $swig_srcdir = "${svnlib_srcdir}/bindings/swig";
@@ -17,13 +18,9 @@ my $swig_builddir = "${svnlib_builddir}/bindings/swig";
my @modules = qw/client delta fs ra repos wc/;
my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
- map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules, qw/diff subr
- ra_local
- ra_svn
- ra_dav
- fs_base
- fs_fs/));
-my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
+ map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules,
+ qw/client delta diff fs
fs_fs ra ra_dav ra_local ra_svn repos subr wc/));
+my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/client delta diff fs fs_fs ra
ra_dav ra_local ra_svn repos subr wc/);
my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
my $apr_cflags = '@SVN_APR_INCLUDES@';
@@ -31,8 +28,8 @@ my $apu_cflags = '@SVN_APRUTIL_INCLUDES@';
# According to the log of r7937, the flags guarded by the conditional break
# the build on FreeBSD if not conditionalized.
-my $apr_ldflags = '@SVN_APR_EXPORT_LIBS@'
- if $^O eq 'darwin' or $^O eq 'cygwin' or $^O eq 'msys';
+my $apr_ldflags = "-L$top_builddir/apr/.libs -L$top_builddir/apr-util/.libs
@SVN_APR_EXPORT_LIBS@ -lapr-0-0 -lapr-util-0 -lapr-util-0-0"
+ if 1;
chomp $apr_shlib_path_var;
@@ -45,9 +42,8 @@ my %config = (
" -I$swig_srcdir -g"),
OBJECT => q/$(O_FILES)/,
LIBS => [join(' ', $apr_ldflags,
- (map {$_ = abs_path($_); "-L$_"} @ldpaths),
- @ldmodules, '-lsvn_swig_perl-1',
- `$swig -perl -ldflags`)],
+ (map {"-L$_"} @ldpaths),
+ @ldmodules, '-lsvn_swig_perl-1')],
test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
);
@@ -58,6 +54,7 @@ sub perlish {
}
WriteMakefile(%config, NAME => 'SVN::_Core', C => ['core.c'],
+ FIRST_MAKEFILE=> "$abs_builddir/Makefile",
PM => {map { ("$swig_srcdir/perl/native/$_.pm" =>
"\$(INST_LIBDIR)/$_.pm") }
map { perlish $_ }
@@ -72,7 +69,7 @@ WriteMakefile(%config, NAME => 'SVN::_Core', C => ['core.c'],
for (@modules) {
WriteMakefile(%config,
- MAKEFILE=> "Makefile.$_",
+ FIRST_MAKEFILE=> "$abs_builddir/Makefile.$_",
NAME => "SVN::_".perlish($_),
C => ["svn_$_.c"],
);
@@ -86,7 +83,7 @@ sub MY::postamble {
my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"}
@modules);
- my $fullperlrun = "$apr_shlib_path_var=" . join(':',@ldpaths);
+# my $fullperlrun = "$apr_shlib_path_var=" . join(':',@ldpaths);
return <<"EOPOST";
all :: modules
@@ -99,7 +96,6 @@ par :: all
modules :: $module_c_files
$module_make_commands\t\$(NOECHO) \$(TOUCH) \$\@
-FULLPERLRUN=$fullperlrun \$(FULLPERL)
EOPOST
--
mingw.v1.5.2.4.534.gdfd188