aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2002-06-09 19:24:22 +0800
committerdougb <dougb@FreeBSD.org>2002-06-09 19:24:22 +0800
commit20820b30864061dd41ef000f46525f0fa49603db (patch)
treeebcd955088136dca823e3cf725f9667c7339afeb
parent3d73e52582eac034c7d6df9bcb65b266bb7a4d7c (diff)
downloadfreebsd-ports-gnome-20820b30864061dd41ef000f46525f0fa49603db.tar.gz
freebsd-ports-gnome-20820b30864061dd41ef000f46525f0fa49603db.tar.zst
freebsd-ports-gnome-20820b30864061dd41ef000f46525f0fa49603db.zip
Update to better handle life as it is now in -current.
Approved by: tobez (MAINTAINER)
-rw-r--r--lang/perl5.10/files/use.perl35
-rw-r--r--lang/perl5.12/files/use.perl35
-rw-r--r--lang/perl5.14/files/use.perl35
-rw-r--r--lang/perl5.16/files/use.perl35
-rw-r--r--lang/perl5.6/files/use.perl35
-rw-r--r--lang/perl5.8/files/use.perl35
-rw-r--r--lang/perl5/files/use.perl35
7 files changed, 182 insertions, 63 deletions
diff --git a/lang/perl5.10/files/use.perl b/lang/perl5.10/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.10/files/use.perl
+++ b/lang/perl5.10/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5.12/files/use.perl b/lang/perl5.12/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.12/files/use.perl
+++ b/lang/perl5.12/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5.14/files/use.perl b/lang/perl5.14/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.14/files/use.perl
+++ b/lang/perl5.14/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5.16/files/use.perl b/lang/perl5.16/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.16/files/use.perl
+++ b/lang/perl5.16/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5.6/files/use.perl b/lang/perl5.6/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.6/files/use.perl
+++ b/lang/perl5.6/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5.8/files/use.perl b/lang/perl5.8/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5.8/files/use.perl
+++ b/lang/perl5.8/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;
diff --git a/lang/perl5/files/use.perl b/lang/perl5/files/use.perl
index 08cef70c7ab3..557e38b52311 100644
--- a/lang/perl5/files/use.perl
+++ b/lang/perl5/files/use.perl
@@ -14,6 +14,11 @@ EOF
exit 2;
}
+my $port_perl = '%%PREFIX%%/bin/perl';
+$port_perl =~ tr|/|/|s;
+
+my $ident = `/usr/bin/ident /usr/bin/perl5`;
+
@ARGV == 1 or usage();
if ($ARGV[0] eq 'port') {
switch_to_port();
@@ -24,18 +29,25 @@ if ($ARGV[0] eq 'port') {
}
exit 0;
+# Both functions depend on the idea that switch_to_port leaves
+# perl5 alone. If the wrapper is installed on a -current system,
+# /usr/bin/perl5 will also be the wrapper.
+
sub switch_to_system
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
unlink '/usr/bin/perl', '/usr/bin/suidperl',
'/usr/bin/perl%%PERL_VERSION%%';
link '/usr/bin/perl5', '/usr/bin/perl';
- link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%';
+
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ link '/usr/bin/perl5', '/usr/bin/suidperl';
+ } else {
+ link '/usr/bin/sperl5', '/usr/bin/suidperl';
+ }
}
open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!";
@@ -47,6 +59,7 @@ sub switch_to_system
.undef PERL_VERSION
.undef PERL_ARCH
.undef NOPERL
+.undef NO_PERL
EOF
close MK;
@@ -54,13 +67,15 @@ EOF
sub switch_to_port
{
- my $port_perl = '%%PREFIX%%/bin/perl';
- $port_perl =~ tr|/|/|s;
-
# protect against cases where people use PREFIX=/usr
if ($port_perl ne '/usr/bin/perl') {
- unlink '/usr/bin/perl', '/usr/bin/suidperl',
- '/usr/bin/perl%%PERL_VERSION%%';
+ if ($ident =~ m#src/usr.bin/perl/perl.c#) {
+ rename '/usr/bin/perl', '/usr/bin/perl-wrapper';
+ } else {
+ unlink '/usr/bin/perl';
+ }
+
+ unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%';
symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl';
symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl';
@@ -76,6 +91,8 @@ PERL_VER=%%PERL_VER%%
PERL_VERSION=%%PERL_VERSION%%
PERL_ARCH=%%PERL_ARCH%%
NOPERL=yo
+NO_PERL=yo
+NO_PERL_WRAPPER=yo
EOF
close MK;