فهرست منبع

fix building of gettext module

Ralf S. Engelschall 21 سال پیش
والد
کامیت
d71a41a725
2فایلهای تغییر یافته به همراه34 افزوده شده و 3 حذف شده
  1. 28 0
      perl-locale/perl-locale.patch
  2. 6 3
      perl-locale/perl-locale.spec

+ 28 - 0
perl-locale/perl-locale.patch

@@ -0,0 +1,28 @@
+Index: gettext-1.04/Makefile.PL
+--- gettext-1.04/Makefile.PL.orig	2005-01-31 00:30:22 +0100
++++ gettext-1.04/Makefile.PL	2005-02-06 13:09:56 +0100
+@@ -7,6 +7,7 @@
+ } else {
+ 	$cc = $Config{'cc'};
+ }
++my $incs = '';
+ my $libs = '';
+ 
+ unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) {
+@@ -33,6 +34,7 @@
+ 
+ WriteMakefile(
+     NAME => "Locale::gettext",
++    INC  => ($inc eq '') ? "" : "$incs",
+     LIBS => ($libs eq '') ? [] : [$libs],
+     VERSION_FROM => 'gettext.pm', 
+ );
+@@ -50,7 +52,7 @@
+ 	close TEST;
+ 	open(SAVE, ">&STDERR");
+ 	open(STDERR, ">/dev/null");
+-	system($cc . " -o conftest " . $libs . " conftest.c");
++	system("$cc $incs -o conftest conftest.c $libs");
+ 	my $exitstatus = $?;
+ 	open(STDERR, ">&SAVE");
+ 	if ($exitstatus != 0) {

+ 6 - 3
perl-locale/perl-locale.spec

@@ -34,7 +34,7 @@
 %define       V_locale_po                    0.14
 %define       V_locale_maketext              1.09
 %define       V_locale_maketext_fuzzy        0.02
-%define       V_locale_maketext_lexicon      0.46
+%define       V_locale_maketext_lexicon      0.47
 %define       V_locale_codes                 2.07
 %define       V_locale_subcountry            1.34
 
@@ -49,7 +49,7 @@ Class:        BASE
 Group:        Language
 License:      GPL/Artistic
 Version:      %{V_perl}
-Release:      20050203
+Release:      20050206
 
 #   list of sources
 Source0:      http://www.cpan.org/modules/by-module/I18N/I18N-LangTags-%{V_i18n_langtags}.tar.gz
@@ -64,6 +64,7 @@ Source8:      http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Fuzzy
 Source9:      http://www.cpan.org/modules/by-module/Locale/Locale-Maketext-Lexicon-%{V_locale_maketext_lexicon}.tar.gz
 Source10:     http://www.cpan.org/modules/by-module/Locale/Locale-Codes-%{V_locale_codes}.tar.gz
 Source11:     http://www.cpan.org/modules/by-module/Locale/Locale-SubCountry-%{V_locale_subcountry}.tar.gz
+Patch0:       perl-locale.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -165,6 +166,7 @@ AutoReqProv:  no
     %setup -q -T -D -a 9
     %setup -q -T -D -a 10
     %setup -q -T -D -a 11
+    %patch -p0
 
 %build
 
@@ -189,7 +191,8 @@ AutoReqProv:  no
     ) || exit $?
     ( cd gettext-%{V_gettext}
       %{l_shtool} subst \
-          -e 's;-lintl;%{l_ldflags} -lintl;' \
+          -e 's;\(incs = .\)\(.\);\1%{l_cppflags}\2;' \
+          -e 's;\(libs = .\)\(.\);\1%{l_ldflags} -lintl -liconv\2;' \
           Makefile.PL
       %{l_prefix}/bin/perl-openpkg configure build install
     ) || exit $?