summaryrefslogtreecommitdiff
path: root/devel/subversion-devel/files/patch-svnperl-noruntime
blob: 26ada812435bae692920a459591604c7742f03ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--- subversion/bindings/swig/perl/Base.pm  (revision 10173)
+++ subversion/bindings/swig/perl/Base.pm  (revision 10174)
@@ -60,6 +60,7 @@ sub import {
 package SVN::_$pkg;
 require DynaLoader;
 bootstrap SVN::_$pkg;
+sub dl_load_flags { 0x01 }
 1;
     ' or die $@;
     };
--- subversion/bindings/swig/perl/Makefile.PL  (revision 10173)
+++ subversion/bindings/swig/perl/Makefile.PL  (revision 10174)
@@ -1,4 +1,5 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
+use strict;
 use ExtUtils::MakeMaker;
 use Cwd 'abs_path';
 use Config;
@@ -8,6 +9,12 @@ if ($^O ne 'VMS') {
   $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
 }
 
+my $top_builddir = '../../../..';
+my $top_srcdir = '@top_srcdir@';
+my $svnlib_srcdir = "${top_srcdir}/subversion";
+my $swig_srcdir = "${svnlib_srcdir}/bindings/swig";
+
+
 my $swig_version;
 open TOPMAKE, "<../../../../Makefile";
 while (<TOPMAKE>) {
@@ -50,8 +57,7 @@ my %config = (
     OBJECT => q/$(O_FILES)/,
     LIBS => [join(' ', $apr_ldflags,
                   (map {$_ = abs_path($_); "-L$_"} @ldpaths),
-                  @ldmodules, '-lsvn_swig_perl-1',
-                  `swig -perl -ldflags`)],
+                  @ldmodules)],
 );
 
 sub perlish {
@@ -64,6 +70,7 @@ WriteMakefile(%config, NAME => 'SVN::_Co
 	      PM => {map { ("$_.pm" => "\$(INST_LIBDIR)/$_.pm") }
 		     map { perlish $_ }
 		     ('base', 'core', @modules)},
+              LDFROM => '$(O_FILES) '."../.libs/libsvn_swig_perl-1.a",
 	      clean => { FILES => "*.hi *.c *.bs".
                          join(' Makefile.','',@modules) }
 	     );
@@ -84,15 +91,19 @@ sub MY::postamble {
    my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
    my $module_make_commands = join ('',map {"\tmake -f Makefile.$_\n"} @modules);
 
-   my $flags;
+   my ($flags, $flags_runtime);
    if ($swig_version >= 103020) {
      $flags = '-noruntime -noproxy';
+     $flags_runtime = '-runtime -noproxy';
    } else {
+     # XXX: prehaps deprecated
      $flags = '-c';
    }
    
-   my $swig_command = "swig $flags -nopm -perl " .
-                      "-I.. -I../../../include $apr_cflags";
+   my ($swig_command, $swig_command_runtime) =
+       map {"swig $_ -nopm -perl " .
+            "-I.. -I../../../include $apr_cflags" }
+	   ($flags, $flags_runtime);
 
    my $swig_modules_command = join ('',
                                     map {"\nsvn_$_.c : ../svn_$_.i ".
@@ -127,7 +138,7 @@ modules :: $module_c_files
 $module_make_commands\t\$(NOECHO) \$(TOUCH) \$\@
 
 core.c :: ../core.i
-\t$swig_command -module SVN::_Core -o core.c ../core.i
+\t$swig_command_runtime -module SVN::_Core -o core.c ../core.i
 
 $swig_modules_command