Ralf S. Engelschall 23 лет назад
Родитель
Сommit
477d2b7f81
2 измененных файлов с 11 добавлено и 9 удалено
  1. 6 4
      openpkg-tool/openpkg-build.pl
  2. 5 5
      openpkg-tool/openpkg-tool.spec

+ 6 - 4
openpkg-tool/openpkg-build.pl

@@ -355,10 +355,12 @@ sub get_revdep ($) {
 
 sub parse_options ($) {
     my($l) = @_;
-    $l = join("\n",@$l) if ref $l;
-    return unless $l =~ s/.*Options//;
-    my(%with) = $l =~ /--define\s*'(\S+)\s+(\S+?)'/g;
-    return \%with;
+    $l = join("\n", @$l) if ref $l;
+    return if ($l !~ m/(--define|%option)/s);
+    my $with = {};
+    $l =~ s/--define\s*'(\S+)\s+(\S+?)'/$with->{$1} = $2, ''/ge; # before openpkg-20021230
+    $l =~ s/%option\s*(\S+)\s+(\S+)/$with->{$1} = $2, ''/ge;     # after  openpkg-20021230
+    return $with;
 }
 
 sub override_options ($$$) {

+ 5 - 5
openpkg-tool/openpkg-tool.spec

@@ -32,8 +32,8 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [EVAL]
 Group:        Bootstrapping
 License:      GPL
-Version:      20021226
-Release:      20021226
+Version:      20021230
+Release:      20021230
 
 #   list of sources
 Source0:      openpkg.sh
@@ -46,15 +46,15 @@ Source5:      Makefile
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206
-PreReq:       OpenPKG, openpkg >= 20020206
+BuildPreReq:  OpenPKG, openpkg >= 20021230
+PreReq:       OpenPKG, openpkg >= 20021230
 AutoReq:      no
 AutoReqProv:  no
 
 %description
     The OpenPKG tool is a helper utility for managing an OpenPKG instance.
 
-    Options: none
+    %options
 
 %prep