Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 20 years ago
parent
commit
a8e0054bd8
3 changed files with 15 additions and 7 deletions
  1. +6
    -4
      package/import/cpan/hosted_cpan.pl
  2. +1
    -3
      package/import/cpan/preconfig.in
  3. +8
    -0
      scripts/config.func

+ 6
- 4
package/import/cpan/hosted_cpan.pl

@ -28,14 +28,18 @@
my $cpanbase="http://www.cpan.org/modules/by-authors/id";
my %hosted;
my %flags;
open(F, "hosted_cpan.txt") || die $!;
while (<F>) {
chomp;
next if /^#/ or /^\s*$/;
my ($p, $m) = split /\s+/;
die unless /^(\S+)\s+(\S+)(\s+.*\S|)/;
my ($p, $m, $f) = ($1, $2, $3);
$f =~ s/(\S+)/flag $1/g;
$hosted{$m} = $p;
$flags{$m} = $f;
}
close F;
@ -96,9 +100,7 @@ matched:
print S "\t\tsrctar=\"$f\"\n";
print S "\t\t;;\n";
print C "bool 'Building package $mod (cpan-$xmod)' ROCKCFG_PKG_CPAN_$ymod 1\n";
print C "if [ \"\$ROCKCFG_PKG_CPAN_$ymod\" = 1 ]; then pkgfork cpan cpan-$xmod ".
"status X priority $hosted{$key}; fi\n\n";
print C "pkgfork cpan cpan-$xmod status X priority $hosted{$key}$flags{$key}\n";
delete $hosted{$key};
}

package/import/cpan/config.in → package/import/cpan/preconfig.in

@ -5,7 +5,7 @@
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/import/cpan/config.in
# ROCK Linux: rock-src/package/import/cpan/preconfig.in
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
@ -22,9 +22,7 @@
if pkgcheck cpan X
then
menu_begin MENU_CPAN 'CPAN Packages'
. package/import/cpan/hosted_cpan.cfg
pkgremove cpan
menu_end
fi

+ 8
- 0
scripts/config.func

@ -138,6 +138,8 @@ fi
# priority 115.000
# version 0.9.26
# prefix /opt/foobar
# flag CORE
# unflag CORE
#
pkgfork() {
local script="\$5==\"$1\" {print;\$5=\"$1=$2\";"
@ -159,6 +161,12 @@ pkgfork() {
prefix)
script="$script \$7=\"$2\";"
;;
flag)
script="$script sub(\" 0\$\", \" $2 0\");"
;;
unflag)
script="$script sub(\" $2 \", \" \");"
;;
esac
shift; shift;
done

Loading…
Cancel
Save