aboutsummaryrefslogtreecommitdiffstats
path: root/math/octave-forge-base
diff options
context:
space:
mode:
authorstephen <stephen@FreeBSD.org>2011-11-14 21:34:22 +0800
committerstephen <stephen@FreeBSD.org>2011-11-14 21:34:22 +0800
commit4e864f291c18585dade9f64e9fb0662b3d16e49f (patch)
tree23dba026ad04099abc3b06ea5b9149da2337bafb /math/octave-forge-base
parent179b77bef4c9717dc9a9b485e45cfe729b41d9c5 (diff)
downloadfreebsd-ports-gnome-4e864f291c18585dade9f64e9fb0662b3d16e49f.tar.gz
freebsd-ports-gnome-4e864f291c18585dade9f64e9fb0662b3d16e49f.tar.zst
freebsd-ports-gnome-4e864f291c18585dade9f64e9fb0662b3d16e49f.zip
- Update to 1.2.
Accomodate x.y and x.y.0 representing the same octave forge package. Approved by: portmgr Feature safe: yes
Diffstat (limited to 'math/octave-forge-base')
-rw-r--r--math/octave-forge-base/Makefile3
-rw-r--r--math/octave-forge-base/files/load-octave-pkg.in48
2 files changed, 29 insertions, 22 deletions
diff --git a/math/octave-forge-base/Makefile b/math/octave-forge-base/Makefile
index 441e108d317d..3af1079e1be8 100644
--- a/math/octave-forge-base/Makefile
+++ b/math/octave-forge-base/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= octave-forge-base
-PORTVERSION= 1.1
-PORTREVISION= 2
+PORTVERSION= 1.2
CATEGORIES= math
MASTER_SITES= #none
DISTFILES= #none
diff --git a/math/octave-forge-base/files/load-octave-pkg.in b/math/octave-forge-base/files/load-octave-pkg.in
index d4e48dc32040..6e71ae6e08ed 100644
--- a/math/octave-forge-base/files/load-octave-pkg.in
+++ b/math/octave-forge-base/files/load-octave-pkg.in
@@ -120,10 +120,14 @@ while (my $p = <$install_prefix/*>) {
%to_remove = ();
$nr_to_remove = 0;
-foreach (keys %is_installed) {
- if (defined($is_installed{$_}) && !defined($in_tarballs{$_})) {
- $to_remove{$_} = $is_installed{$_};
- $nr_to_remove++;
+foreach my $p (keys %is_installed) {
+ if (defined($is_installed{$p})) {
+ my $altp = $p; # so that 3.5.0 and 3.5 are the same package numbers
+ $altp =~ s/(\-\d+\.\d+)\.0(\.tar\.gz)$/$1$2/;
+ if (!defined($in_tarballs{$p}) && !defined($in_tarballs{$altp})) {
+ $to_remove{$p} = $is_installed{$p};
+ $nr_to_remove++;
+ }
}
}
@@ -178,26 +182,30 @@ while (my $p = <$install_prefix/*>) {
# %is_tarballs by checking the dependencies.
%to_install = ();
-foreach (keys %in_tarballs) {
- if (defined($in_tarballs{$_}) && !defined($is_installed{$_})) {
- my $tar = Archive::Tar->new("$tardir/$_",COMPRESS_GZIP);
- die if !defined($tar);
- my @list_of_files = grep /^.*\/DESCRIPTION$/, $tar->list_files();
- die if $#list_of_files!=0;
- my $descr = $tar->get_content($list_of_files[0]);
- foreach my $l (split /\n/,$descr) {
- if ($l=~s/Depends:\s*//) {
- foreach my $ll (split ",",$l) {
- $ll = lc($ll);
- $ll =~ s/^\s+//;
- $ll =~ s/\s.*//;
- if ($ll ne "octave") {
- $to_install{$_} .= (defined($to_install{$_})?"|":"").(defined($long_form{$ll})?$long_form{$ll}:$ll);
+foreach my $n (keys %in_tarballs) {
+ my $altn = $n; # so that 3.5 and 3.5.0 are the same package numbers
+ $altn =~ s/(\-\d+\.\d+)(\.tar\.gz)$/$1\.0$2/;
+ if (defined($in_tarballs{$n})) {
+ if (!defined($is_installed{$n}) && !defined($is_installed{$altn})) {
+ my $tar = Archive::Tar->new("$tardir/$n",COMPRESS_GZIP);
+ die if !defined($tar);
+ my @list_of_files = grep /^.*\/DESCRIPTION$/, $tar->list_files();
+ die if $#list_of_files!=0;
+ my $descr = $tar->get_content($list_of_files[0]);
+ foreach my $l (split /\n/,$descr) {
+ if ($l=~s/Depends:\s*//) {
+ foreach my $ll (split ",",$l) {
+ $ll = lc($ll);
+ $ll =~ s/^\s+//;
+ $ll =~ s/\s.*//;
+ if ($ll ne "octave") {
+ $to_install{$n} .= (defined($to_install{$n})?"|":"").(defined($long_form{$ll})?$long_form{$ll}:$ll);
+ }
}
}
}
+ $to_install{$n} .= "";
}
- $to_install{$_} .= "";
}
}