SOURCES: apache1-apxs-DESTDIR.patch (NEW) - add -S DESTDIR support...

glen glen at pld-linux.org
Thu Apr 13 10:42:46 CEST 2006


Author: glen                         Date: Thu Apr 13 08:42:46 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add -S DESTDIR support to apxs for installing to RPM_BUILD_ROOT

---- Files affected:
SOURCES:
   apache1-apxs-DESTDIR.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/apache1-apxs-DESTDIR.patch
diff -u /dev/null SOURCES/apache1-apxs-DESTDIR.patch:1.1
--- /dev/null	Thu Apr 13 10:42:46 2006
+++ SOURCES/apache1-apxs-DESTDIR.patch	Thu Apr 13 10:42:41 2006
@@ -0,0 +1,46 @@
+--- apache_1.3.34/src/support/apxs.pl	2006-04-13 11:33:42.264267119 +0300
++++ /usr/sbin/apxs1	2006-04-12 18:43:04.710095895 +0300
+@@ -39,6 +39,7 @@
+ my $CFG_INCLUDEDIR    = q(@includedir@);        # substituted via APACI install
+ my $CFG_LIBEXECDIR    = q(@libexecdir@);        # substituted via APACI install
+ my $CFG_SYSCONFDIR    = q(@sysconfdir@);        # substituted via APACI install
++my $CFG_DESTDIR       = '';
+ 
+ ##
+ ##  Cleanup the above stuff
+@@ -170,7 +171,7 @@
+         if ($opt_S =~ m/^([^=]+)=(.*)$/) {
+             my ($var, $val) = ($1, $2);
+             my $oldval = eval "\$CFG_$var";
+-            unless ($var and $oldval) {
++            unless ($var and defined($oldval)) {
+                 print STDERR "apxs:Error: no config variable $var\n";
+                 &usage;
+             }
+@@ -264,7 +265,7 @@
+         my $name;
+         foreach $name (qw(
+             TARGET CC CFLAGS CFLAGS_SHLIB LD_SHLIB LDFLAGS_SHLIB LIBS_SHLIB
+-            PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR
++            PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR DESTDIR
+         )) {
+             if ($arg eq $name or $arg eq lc($name)) {
+                 my $val = eval "\$CFG_$name";
+@@ -425,14 +426,14 @@
+         if ($^O ne "MSWin32") {
+             $t =~ s|^.+/([^/]+)$|$1|;
+             if ($opt_i) {
+-                push(@cmds, "cp -f $f $CFG_LIBEXECDIR/$t");
+-                push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
++                push(@cmds, "cp -f $f $CFG_DESTDIR$CFG_LIBEXECDIR/$t");
++                push(@cmds, "chmod 755 $CFG_DESTDIR$CFG_LIBEXECDIR/$t");
+             }
+         }
+ 	else {
+             $t =~ s|^.+[/\\]([^/\\]+)$|$1|;
+             if ($opt_i) {
+-                push(@cmds, "copy \"$f\" \"$CFG_LIBEXECDIR/$t\"");
++                push(@cmds, "copy \"$f\" \"$CFG_DESTDIR$CFG_LIBEXECDIR/$t\"");
+             }
+         }
+         
================================================================


More information about the pld-cvs-commit mailing list