|
|
@@ -32,7 +32,7 @@ Packager: rse@openpkg.org
|
|
|
Distribution: OpenPKG
|
|
|
License: Artistic or GPL
|
|
|
Version: 5.6.1
|
|
|
-Release: 12
|
|
|
+Release: 13
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.cpan.org/CPAN/src/%{name}-%{version}.tar.gz
|
|
|
@@ -84,20 +84,50 @@ AutoReqProv: no
|
|
|
%setup -q
|
|
|
|
|
|
%build
|
|
|
+ # Eval hack for obsolete Linux versions (like Debian 2.2) with too old
|
|
|
+ # bintutils where our GCC 3.0 makes trouble on Perl loading DSO based modules.
|
|
|
+ # In order to avoid having to require the user to update to binutils 2.11,
|
|
|
+ # we have to force Perl to use the system-supplied compiler... :-(
|
|
|
+ cc="%{l_cc}"
|
|
|
+ cflags="%{l_cflags -O}"
|
|
|
+ case "%{l_target}" in
|
|
|
+ *-linux* )
|
|
|
+ v=unknown
|
|
|
+ if [ -f /etc/debian_version ]; then
|
|
|
+ v=`/usr/bin/dpkg -l binutils | grep binutils | awk '{ print $3; }'`
|
|
|
+ elif [ -f /etc/redhat-release ]; then
|
|
|
+ v=`/bin/rpm -q --qf '%{VERSION}' binutils`
|
|
|
+ else
|
|
|
+ v=`(rpm -q --qf '%{VERSION}' binutils) 2>/dev/null`
|
|
|
+ fi
|
|
|
+ case "$v" in
|
|
|
+ 2.10.* | 2.11.* ) ;;
|
|
|
+ * ) cc=`%{l_shtool} path -p/bin:/usr/bin:$PATH cc`; cflags="-O" ;;
|
|
|
+ esac
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ # configure the Perl package
|
|
|
./Configure \
|
|
|
-d -e -s \
|
|
|
-Dprefix=%{l_prefix} \
|
|
|
-Dinstallprefix=$RPM_BUILD_ROOT%{l_prefix} \
|
|
|
- -Dcc="%{l_cc}" -Doptimize="%{l_cflags -O}" \
|
|
|
+ -Dcc="$cc" -Doptimize="$cflags" \
|
|
|
-Dlocincpth="%{l_prefix}/include" \
|
|
|
+ -Dldflags="-L%{l_prefix}/lib" \
|
|
|
-Dlibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \
|
|
|
-Uinstallusrbinperl
|
|
|
+
|
|
|
+ # build the Perl package
|
|
|
%{l_make} %{l_mflags -O} -f Makefile
|
|
|
|
|
|
%install
|
|
|
- # install in separate directory
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+ # install the Perl package via standard procedure
|
|
|
%{l_make} %{l_mflags} -f Makefile install
|
|
|
+
|
|
|
+ # post-adjustments to installation tree
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version}
|
|
|
|
|
|
# re-adjust configuration for installation of modules
|
|
|
@@ -120,7 +150,7 @@ AutoReqProv: no
|
|
|
echo " \"\$@\"" >>$perl
|
|
|
chmod a+x $perl
|
|
|
|
|
|
- # add modules
|
|
|
+ # add additional third-party modules
|
|
|
rm -rf $RPM_BUILD_DIR/%{name}-%{version}-modules
|
|
|
mkdir $RPM_BUILD_DIR/%{name}-%{version}-modules
|
|
|
cd $RPM_BUILD_DIR/%{name}-%{version}-modules
|