Sfoglia il codice sorgente

more regex fixes, but build is still broken

Ralf S. Engelschall 23 anni fa
parent
commit
1eda51cab7
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 3 3
      openpkg-tool/openpkg-build.pl
  2. 1 1
      openpkg-tool/openpkg-index.pl

+ 3 - 3
openpkg-tool/openpkg-build.pl

@@ -356,10 +356,10 @@ sub get_revdep ($) {
 sub parse_options ($) {
     my($l) = @_;
     $l = join("\n", @$l) if ref $l;
-    return if ($l !~ m/(--define|%option)/s);
+    return if ($l !~ m/(--define|%option\s+)/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
+    $l =~ s/--define\s*'(\S+)\s+(\S+?)'/$with->{$1} = $2, ''/sge; # before openpkg-20021230
+    $l =~ s/%option\s+(\S+)\s+(\S+)/$with->{$1} = $2, ''/sge;     # after  openpkg-20021230
     return $with;
 }
 

+ 1 - 1
openpkg-tool/openpkg-index.pl

@@ -130,7 +130,7 @@ sub find_options ($$) {
     my($spec, $descr) = @_;
     my $evar = {};
     $descr =~ s/--define\s*'(\S+)\s*\%\{\1\}'/$evar->{$1} = '%{'.$1.'}', ''/sge; # before openpkg-20021230
-    $spec =~ s/^%option\s*(\S+)\s+\S+/$evar->{$1} = '%{'.$1.'}', ''/mge;         # after  openpkg-20021230
+    $spec =~ s/^%option\s+(\S+)\s+\S+/$evar->{$1} = '%{'.$1.'}', ''/mge;         # after  openpkg-20021230
     return $evar;
 }