diff options
author | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2009-06-06 15:49:24 +0000 |
---|---|---|
committer | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2009-06-06 15:49:24 +0000 |
commit | 0650be322017ea5f9d27a5a325341f4496d28c78 (patch) | |
tree | e233bb709c959fc59b4832c5fd057b482289eeb5 /devel/p5-Event-Lib | |
parent | 5fd61fbe165c378655a754976ba893460f6fb0b7 (diff) | |
download | ports-0650be322017ea5f9d27a5a325341f4496d28c78.tar.gz ports-0650be322017ea5f9d27a5a325341f4496d28c78.zip |
Notes
Diffstat (limited to 'devel/p5-Event-Lib')
-rw-r--r-- | devel/p5-Event-Lib/files/patch-Makefile.PL | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/devel/p5-Event-Lib/files/patch-Makefile.PL b/devel/p5-Event-Lib/files/patch-Makefile.PL index 5e42b40e1975..6e2bc8fcfbb6 100644 --- a/devel/p5-Event-Lib/files/patch-Makefile.PL +++ b/devel/p5-Event-Lib/files/patch-Makefile.PL @@ -13,3 +13,42 @@ # purge @ARGV of CCFLAGS +--- Makefile.PL ++++ Makefile.PL +@@ -17,8 +17,9 @@ sub have_libevent { + my $LIBS = $args{ LIBS } || "-levent"; + my $INC = $args{ INC } || "-I/usr/include"; + if ($^O eq "freebsd") { +- $LIBS = "$LIBS -L/usr/local/lib"; +- $INC = "$INC -I/usr/local/include"; ++ my $LOCALBASE = $ENV{LOCALBASE} || '/usr/local'; ++ $LIBS .= " -L$LOCALBASE/lib"; ++ $INC .= " -I$LOCALBASE/include"; + } + elsif ($^O eq "darwin") { + $LIBS = "$LIBS -L/sw/lib -L/opt/local/lib"; +@@ -59,8 +60,9 @@ sub get_defines { + my $LIBS = $args{ LIBS } || "-levent"; + my $INC = $args{ INC } || "-I/usr/include"; + if ($^O eq "freebsd") { +- $LIBS = "-L/usr/local/lib $LIBS"; +- $INC = "-I/usr/local/include $INC"; ++ my $LOCALBASE = $ENV{LOCALBASE} || '/usr/local'; ++ $LIBS = "-L$LOCALBASE/lib $LIBS"; ++ $INC = "-I$LOCALBASE/include $INC"; + } + elsif ($^O eq "darwin") { + $LIBS = "-L/sw/lib -L/opt/local/lib $LIBS"; +@@ -100,6 +102,12 @@ EOD + + $args{LIBS} = '-levent -lm' if ! exists $args{LIBS}; + ++if ($^O eq "freebsd") { ++ my $LOCALBASE = $ENV{LOCALBASE} || '/usr/local'; ++ $args{LIBS} .= " -L$LOCALBASE/lib"; ++ $args{INC} .= " -I$LOCALBASE/include"; ++} ++ + my $DEFINES = get_defines( + event_priority_init => { code_pre => '', + code => 'event_priority_init(10)', |