diff options
author | mbr <mbr@FreeBSD.org> | 2004-02-22 17:29:12 +0800 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-02-22 17:29:12 +0800 |
commit | 7630b7e2f1d14e8882c5c40b78f4ed405051b141 (patch) | |
tree | 9fb0de67b49a59bea9403c5b50f288ab78c3c48e | |
parent | a3b7e955b3fc66fb5943384bbb6e1305ae39a0f7 (diff) | |
download | freebsd-ports-gnome-7630b7e2f1d14e8882c5c40b78f4ed405051b141.tar.gz freebsd-ports-gnome-7630b7e2f1d14e8882c5c40b78f4ed405051b141.tar.zst freebsd-ports-gnome-7630b7e2f1d14e8882c5c40b78f4ed405051b141.zip |
Try to use $WORSRC instead /tmp and just $CWD.
-rw-r--r-- | www/mod_frontpage/files/patch-Makefile.PL | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/www/mod_frontpage/files/patch-Makefile.PL b/www/mod_frontpage/files/patch-Makefile.PL index d128a46b3d69..46a25a1bbbef 100644 --- a/www/mod_frontpage/files/patch-Makefile.PL +++ b/www/mod_frontpage/files/patch-Makefile.PL @@ -1,6 +1,6 @@ --- Makefile.PL.orig Tue Mar 12 22:07:07 2002 -+++ Makefile.PL Sun Feb 22 10:05:56 2004 -@@ -9,14 +9,32 @@ ++++ Makefile.PL Sun Feb 22 10:26:40 2004 +@@ -9,14 +9,39 @@ # FP extensions 5.0 from Martin Blapp <mbr@freebsd.org> # @@ -18,15 +18,22 @@ + $prefix = $1; + } +} + +-if ($flavor eq "FreeBSD") { $thechoice="/usr/local/sbin/httpd"; +-} elsif ($flavor eq "Mandrake") { $thechoice="/usr/sbin/httpd"; ++$worksrc= $ENV{WRKSRC}; ++if (!$worksrc) { ++ $worksrc = "./"; ++} elsif ($worksrc eq "\.") { ++ $worksrc = "./"; ++} + +$ostype=`uname`; +chop $ostype; +if (-e "/etc/mandrake-release") { + $flavor="Mandrake"; +} - --if ($flavor eq "FreeBSD") { $thechoice="/usr/local/sbin/httpd"; --} elsif ($flavor eq "Mandrake") { $thechoice="/usr/sbin/httpd"; ++ +if ($ostype eq "FreeBSD" && -e "$prefix/sbin/httpd") { + $thechoice="$prefix/sbin/httpd"; +} elsif ($ostype eq "Linux" && -e "/usr/sbin/httpd") { @@ -38,7 +45,24 @@ print "If you don't know, enter the word 'findit'. I will try to look\n"; print "for you... but it will take a few minutes.\n"; print "Your choice: "; -@@ -109,20 +127,33 @@ +@@ -66,7 +91,7 @@ + print "Libexecdir: $libexecdir\n"; + print "\n"; + +-$tmpfile="/tmp/frontpage.$$"; ++$tmpfile="$worksrc/../tmpfrontpage.$$"; + #Mandrake now has two config files, one main and one included + #if we build on another distro, it ignores it + `cat $confdir/httpd.conf $confdir/commonhttpd.conf > $tmpfile 2>/dev/null`; +@@ -95,7 +120,6 @@ + } + } + close(FILE); +-`rm -f $tmpfile`; + + print "Apache user: $user, group: $group\n"; + print "Userdir: $userdir\n"; +@@ -109,20 +133,33 @@ $errorlog="$serverroot/$errorlog"; print "$errorlog\n"; } @@ -80,7 +104,18 @@ } else { $defaultid=99; } if ($uid < $defaultid) { -@@ -158,11 +189,40 @@ +@@ -138,8 +175,8 @@ + ### Create Makefile + $install=`which install`; + chop $install; +-open(MTMP,"Makefile.in") or die "Can't find Makefile.tmpl\n"; +-open(MAKF,"> Makefile") or die "Can't create Makefile\n"; ++open(MTMP,"$worksrc/Makefile.in") or die "Can't find $worksrc/Makefile.in\n"; ++open(MAKF,"> $worksrc/Makefile") or die "Can't create $worksrc/Makefile\n"; + print "Creating Makefile\n"; + while(<MTMP>) { + $_=~ s|\$\(apxs\)|$apxs|; +@@ -158,11 +195,40 @@ $_=~ s|\$\(fpexec_logexec\)|$errorlog|; $_=~ s|\$\(fpexec_userdir\)|$userdir|; $_=~ s|\$\(fpexec_docroot\)|$documentroot|; |