summaryrefslogtreecommitdiffstats
path: root/misc/porteasy
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-07-05 11:48:35 +0000
committerdes <des@FreeBSD.org>2004-07-05 11:48:35 +0000
commit8e5c0757597c9e80bb38d9b9cb14e82a0589da8e (patch)
tree5aa8b0d19081073aa3f8337668b6b45ab8bd066a /misc/porteasy
parent65a86d506703ae9d7a887ef922d09fad9c49c15c (diff)
downloadFreeBSD-ports-8e5c0757597c9e80bb38d9b9cb14e82a0589da8e.zip
FreeBSD-ports-8e5c0757597c9e80bb38d9b9cb14e82a0589da8e.tar.gz
Perform plist substitution for -L.
Fix bug in origin determination.
Diffstat (limited to 'misc/porteasy')
-rw-r--r--misc/porteasy/Makefile2
-rw-r--r--misc/porteasy/src/porteasy.pl11
2 files changed, 10 insertions, 3 deletions
diff --git a/misc/porteasy/Makefile b/misc/porteasy/Makefile
index 7f9415e..f51b03d 100644
--- a/misc/porteasy/Makefile
+++ b/misc/porteasy/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
-PORTVERSION= 2.7.15
+PORTVERSION= 2.7.16
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/misc/porteasy/src/porteasy.pl b/misc/porteasy/src/porteasy.pl
index 1dfbf82..ecbb905 100644
--- a/misc/porteasy/src/porteasy.pl
+++ b/misc/porteasy/src/porteasy.pl
@@ -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 = $_;
OpenPOWER on IntegriCloud