aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p5-Locale-gettext/files/patch-Makefile.PL
blob: 8434dcba63c5d6b45824d4707d6fd708974e2a14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- Makefile.PL.orig	2015-09-19 14:35:20.790089000 +0300
+++ Makefile.PL	2015-09-19 14:41:53.575311000 +0300
@@ -11,8 +11,8 @@ my $libs = '';
 
 unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) {
 	# try with -lintl
-	$libs = "-lintl";
-	unless (conftest("char *x = gettext(\"foo\");", "gettext", 0)) {
+	$libs = "-L$ENV{LOCALBASE}/lib -lintl -I$ENV{LOCALBASE}/include";
+	unless (conftest("#include <libintl.h>\nchar *x = gettext(\"foo\");", "gettext", 0)) {
 		unlink("conftest.c");
 		unlink("conftest");
 		die "gettext function not found. Please install libintl";
@@ -33,7 +33,8 @@ unlink("conftest");
 
 WriteMakefile(
     NAME => "Locale::gettext",
-    LIBS => ($libs eq '') ? [] : [$libs],
+    LIBS => ($libs eq '') ? [] : ["-L$ENV{LOCALBASE}/lib -lintl"],
+    INC => "-I$ENV{LOCALBASE}/include",
     VERSION_FROM => 'gettext.pm', 
     META_MERGE => {
         resources => {