[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] perl bindings: Use non standard Perl version

From: Gerald Richter <richter_at_ecos.de>
Date: 2004-01-13 14:21:31 CET

Hi,

I had to build the perl bindings for a Perl version that is not the default
one which is installed on my system (because default is Perl 5.6.1 and I
can't upgrade to 5.8.0+). Here are two patches: One for
bindings/swig/INSTALL which describes the settings necessary for configure
and one for Makefile.PL which makes sure the correct Perl binary and include
paths are used.

Also I run into a lot of problem with SWIG 1.3.20. I have tried to get it
working, but there were too many problems (I got it to compile by defining
the SWIG_PERL_XXX symbols in swigutil_perl.h, but afterward it didn't work,
because swig append a 'c' to every Perl namespace e.g. SVN::_Corec instead
of SVN::_Core), so I gave up and used SWIG 1.3.19. I have added a hint about
swig version to the INSTALL document also. I case it is already fixed,
please remove this hint.

Gerald

P.S. I am not a native english speaker, so feel free to correct my english
in the INSTALL doc.

--- INSTALL.orig Tue Jan 13 13:42:19 2004
+++ INSTALL Tue Jan 13 14:15:54 2004
@@ -4,7 +4,8 @@

 Step 1: Build & install the proper version of SWIG (which is
- currently swig 1.3.16).
+ currently swig 1.3.19). NOTE: At the time of the writing
+ SWIG 1.3.20+ does _not_ work.

     * Go to http://www.swig.org/, download the sourceball, unpack.

@@ -19,6 +20,14 @@
        to the configure script. You certainly don't want to use any
        version of python older than 2.0.

+ If you plan to build the perl bindings, and have a system
+ with more than one version of perl installed, you may need
+ to pass
+
+ --with-perl5=/path/to/correct/perl/binary
+
+ to the configure script. You need Perl 5.8.0 or above.
+
     * run 'make && make install'

     * To verify you have the goodz installed, check that these things
@@ -44,6 +53,12 @@
   it will build a special glue library to link svn to the swig-python
   bindings: libsvn_swig_py.so (as well as any other languages).

+ If you plan to build the perl bindings, and have a system
+ with more than one version of perl installed, you may need
+ to set the environment variable PERL e.g.
+
+ export PERL=/path/to/correct/perl/binary
+

 Step 3: Install Specific Language Bindings

@@ -87,6 +102,9 @@

    2. Go to subversion/bindings/swig/perl and run
        `env APR_CONFIG=/path/to/apr-config perl Makefile.PL'.
+
+ In case you use a different Perl binary, make sure you use
+ the same one here as you specified during configure (see above)

    3. run `make all test'.

--- perl/Makefile.PL.orig Sun Jan 11 21:13:05 2004
+++ perl/Makefile.PL Sun Jan 11 21:16:54 2004
@@ -20,7 +20,7 @@

 my %config = (
     ABSTRACT => 'Perl bindings for Subversion',
- CCFLAGS => join(' ', $apr_cflags, `perl -MExtUtils::Embed -e ccopts`,
+ CCFLAGS => join(' ', $apr_cflags, `$^X -MExtUtils::Embed -e ccopts`,
        ' -I.. -I../../../include -g'),
     OBJECT => q/$(O_FILES)/,
     dynamic_lib => {
@@ -58,11 +58,12 @@
    package MY ;
    return join('', "all :: modules\ntest :: modules\ninstall ::
modules\n\n",
         "par :: all\n\t",
-

q{perl -MPAR::Dist -e"blib_to_par(name=>'SVN',version=>'`perl -Mblib -MSVN::
Core -e'print $$SVN::Core::VERSION'`')"},"\n\n",
+ q{$(PERL) -MPAR::Dist
+-e"blib_to_par(name=>'SVN',version=>'`$^X -Mblib -MSVN::Core -e'print
$$SVN::Core::VERSION'`')"},"\n\n",
         # h2i
- "ra_plugin.hi: ../../../include/svn_ra.h\n\tperl h2i.pl
../../../include/svn_ra.h svn_ra_plugin_t > \$@\n\n",
- "ra_reporter.hi: ../../../include/svn_ra.h\n\tperl h2i.pl
../../../include/svn_ra.h svn_ra_reporter_t > \$@\n\n",
- "delta_editor.hi: ../../../include/svn_delta.h\n\tperl h2i.pl
../../../include/svn_delta.h svn_delta_editor_t > \$@\n\n",
+ "ra_plugin.hi: ../../../include/svn_ra.h\n\t\$(PERL) h2i.pl
../../../include/svn_ra.h svn_ra_plugin_t > \$@\n\n",
+ "ra_reporter.hi: ../../../include/svn_ra.h\n\t\$(PERL) h2i.pl
../../../include/svn_ra.h svn_ra_reporter_t > \$@\n\n",
+ "delta_editor.hi: ../../../include/svn_delta.h\n\t\$(PERL) h2i.pl
../../../include/svn_delta.h svn_delta_editor_t > \$@\n\n",
         "modules :: ",(map { " svn_$_.c"} @modules),"\n",
         (map {"\tmake -f Makefile.$_\n"} @modules),
         "\t\$(NOECHO) \$(TOUCH) \$\@",

--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 13 14:22:28 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.