mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-22 04:17:44 +00:00
Perform plist substitution for -L.
Fix bug in origin determination.
This commit is contained in:
parent
6e6ca62578
commit
80b65796e7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112953
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= porteasy
|
||||
PORTVERSION= 2.7.15
|
||||
PORTVERSION= 2.7.16
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -33,7 +33,7 @@ use strict;
|
||||
use Fcntl;
|
||||
use Getopt::Long;
|
||||
|
||||
my $VERSION = "2.7.15";
|
||||
my $VERSION = "2.7.16";
|
||||
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
|
||||
"All rights reserved.";
|
||||
|
||||
@ -532,7 +532,8 @@ sub get_installed() {
|
||||
or bsd::err(1, "can't read database directory");
|
||||
foreach $port (readdir(DIR)) {
|
||||
next if ($port eq "." || $port eq ".." || ! -d "$dbdir/$port");
|
||||
if (!defined($origin = get_origin($port))) {
|
||||
$origin = get_origin($port);
|
||||
if (!defined($origin) || !$origin) {
|
||||
bsd::warnx("$port has no known origin");
|
||||
} else {
|
||||
if ($installed{$origin}) {
|
||||
@ -869,14 +870,20 @@ sub show_port_plist($) {
|
||||
local *FILE; # File handle
|
||||
my $file; # File name
|
||||
my %files; # Files to list
|
||||
my %plist_sub; # Substitution list
|
||||
my $prefix; # Prefix
|
||||
|
||||
foreach (split(' ', capture(\&make, ($port, "-VPLIST_SUB")))) {
|
||||
next unless m/^(\w+)=\"?(.*?)\"?$/;
|
||||
$plist_sub{$1} = $2;
|
||||
}
|
||||
$prefix = capture(\&make, ($port, "-VPREFIX"));
|
||||
chomp($prefix);
|
||||
sysopen(FILE, find_port_file($port, "pkg-plist"), O_RDONLY)
|
||||
or bsd::err(1, "can't read packing list for $port");
|
||||
while (<FILE>) {
|
||||
chomp();
|
||||
s/\%\%(\w+)\%\%/$plist_sub{$1}/g;
|
||||
$file = undef;
|
||||
if (m/^[^\@]/) {
|
||||
$file = $_;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= porteasy
|
||||
PORTVERSION= 2.7.15
|
||||
PORTVERSION= 2.7.16
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -33,7 +33,7 @@ use strict;
|
||||
use Fcntl;
|
||||
use Getopt::Long;
|
||||
|
||||
my $VERSION = "2.7.15";
|
||||
my $VERSION = "2.7.16";
|
||||
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
|
||||
"All rights reserved.";
|
||||
|
||||
@ -532,7 +532,8 @@ sub get_installed() {
|
||||
or bsd::err(1, "can't read database directory");
|
||||
foreach $port (readdir(DIR)) {
|
||||
next if ($port eq "." || $port eq ".." || ! -d "$dbdir/$port");
|
||||
if (!defined($origin = get_origin($port))) {
|
||||
$origin = get_origin($port);
|
||||
if (!defined($origin) || !$origin) {
|
||||
bsd::warnx("$port has no known origin");
|
||||
} else {
|
||||
if ($installed{$origin}) {
|
||||
@ -869,14 +870,20 @@ sub show_port_plist($) {
|
||||
local *FILE; # File handle
|
||||
my $file; # File name
|
||||
my %files; # Files to list
|
||||
my %plist_sub; # Substitution list
|
||||
my $prefix; # Prefix
|
||||
|
||||
foreach (split(' ', capture(\&make, ($port, "-VPLIST_SUB")))) {
|
||||
next unless m/^(\w+)=\"?(.*?)\"?$/;
|
||||
$plist_sub{$1} = $2;
|
||||
}
|
||||
$prefix = capture(\&make, ($port, "-VPREFIX"));
|
||||
chomp($prefix);
|
||||
sysopen(FILE, find_port_file($port, "pkg-plist"), O_RDONLY)
|
||||
or bsd::err(1, "can't read packing list for $port");
|
||||
while (<FILE>) {
|
||||
chomp();
|
||||
s/\%\%(\w+)\%\%/$plist_sub{$1}/g;
|
||||
$file = undef;
|
||||
if (m/^[^\@]/) {
|
||||
$file = $_;
|
||||
|
Loading…
Reference in New Issue
Block a user