Sfoglia il codice sorgente

finally reduce to plain Perl 5.6.1

Ralf S. Engelschall 24 anni fa
parent
commit
d0ad4df360
1 ha cambiato i file con 6 aggiunte e 29 eliminazioni
  1. 6 29
      perl/perl.spec

+ 6 - 29
perl/perl.spec

@@ -76,8 +76,10 @@ AutoReqProv:  no
                 v=`/usr/bin/dpkg -l binutils | grep binutils | awk '{ print $3; }'`
             elif [ -f /etc/redhat-release ]; then
                 v=`/bin/rpm -q --qf '%{VERSION}' binutils`
+            elif [ -f /etc/SuSE-release ]; then
+                v=`/bin/rpm -q --qf '%{VERSION}' binutils`
             else
-                v=`(rpm -q --qf '%{VERSION}' binutils) 2>/dev/null`
+                v=`(ld --version | grep "^GNU ld " | sed -e 's;^GNU ld ;;') 2>/dev/null`
             fi
             case "$v" in
                 2.1[1-9].* ) ;;
@@ -110,32 +112,9 @@ AutoReqProv:  no
     #   post-adjustments to installation tree
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version}
 
-# FIXME Remove the following lines maybe, due to modules relocation
-    #   re-adjust configuration for installation of modules
-    $RPM_BUILD_ROOT%{l_prefix}/bin/perl \
-        -pi.orig \
-        -e "s:([\"'])%{l_prefix}/lib:\$1$RPM_BUILD_ROOT%{l_prefix}/lib:g;" \
-        -e "s:([\"'])%{l_prefix}([\"']):\$1$RPM_BUILD_ROOT%{l_prefix}\$2:g;" \
-        $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm
-
-# FIXME Remove the following lines maybe, due to modules relocation
-    #   create a wrapper script which finds the includes
-    eval `grep "^archname=" $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm`
-    perl=$RPM_BUILD_ROOT/perl
-    echo "#!/bin/sh" >$perl
-    echo "exec $RPM_BUILD_ROOT%{l_prefix}/bin/perl \\" >>$perl
-    echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version} \\" >>$perl
-    echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/${archname} \\" >>$perl
-    echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
-    echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version} \\" >>$perl
-    echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version}/${archname} \\" >>$perl
-    echo " \"\$@\"" >>$perl
-    chmod a+x $perl
-
-
-# FIXME Remove the following lines maybe, due to modules relocation
     #   re-adjust configuration as mentioned in Perl's INSTALL document
-    $perl -pi.orig -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \
+    $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \
+        -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \
         $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm \
         `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/ -type f -name ".packlist" -print`
     find $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/ -name "*.orig" -print | xargs rm -f
@@ -144,12 +123,10 @@ AutoReqProv:  no
     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
 
     #   determine installed files
-    %{l_rpmtool} files -v -o$RPM_BUILD_DIR/perl-%{version}/files -r$RPM_BUILD_ROOT %{l_files_std}
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
 %files -f files
 
 %clean
     rm -rf $RPM_BUILD_ROOT
-# FIXME Remove the following line maybe, due to modules relocation
-    rm -rf $RPM_BUILD_DIR/%{name}-%{version}-modules