diff options
author | pgollucci <pgollucci@FreeBSD.org> | 2010-01-18 08:48:25 +0800 |
---|---|---|
committer | pgollucci <pgollucci@FreeBSD.org> | 2010-01-18 08:48:25 +0800 |
commit | 601fb870a6088ef4d246a47bb4616951ea9d7934 (patch) | |
tree | 3f3f9aecc5ce4e7810af05707f7a4c74507c5bd0 | |
parent | 2d8cfe6d22a78b0b6ebee0a5157990162bd037a8 (diff) | |
download | freebsd-ports-gnome-601fb870a6088ef4d246a47bb4616951ea9d7934.tar.gz freebsd-ports-gnome-601fb870a6088ef4d246a47bb4616951ea9d7934.tar.zst freebsd-ports-gnome-601fb870a6088ef4d246a47bb4616951ea9d7934.zip |
--rely on jpeg, zlib, and png libraries from ports and the base system,
rather than building bundled sources.
--respect CC, LDFLAGS, AR, etc. (This fixes the build for recent versions
of GCC.)
PR: ports/142748
Submittede by: bf <bf1783@gmail.com>
-rw-r--r-- | x11-toolkits/p5-Tk/Makefile | 14 | ||||
-rw-r--r-- | x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL | 16 | ||||
-rw-r--r-- | x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL | 22 |
3 files changed, 48 insertions, 4 deletions
diff --git a/x11-toolkits/p5-Tk/Makefile b/x11-toolkits/p5-Tk/Makefile index 26457de00718..c86c9f76b78f 100644 --- a/x11-toolkits/p5-Tk/Makefile +++ b/x11-toolkits/p5-Tk/Makefile @@ -16,6 +16,8 @@ COMMENT= A re-port of a perl5 interface to Tk8.4 MAKE_JOBS_UNSAFE= yes +LIB_DEPENDS= jpeg.10:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png PERL_CONFIGURE= 5.8.0+ USE_XORG= x11 CONFIGURE_ARGS= X11LIB=${LOCALBASE}/lib X11INC=${LOCALBASE}/include @@ -146,7 +148,7 @@ MAN3= Tie::Watch.3 \ .if defined(WITH_XFT) CONFIGURE_ARGS= XFT=1 -LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft +USE_XORG+= xft .endif .if !defined(WITH_XFT) @@ -159,13 +161,17 @@ pre-everything:: .endif post-patch: - @${PERL} -i -p -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ - ${WRKSRC}/pTk/Makefile.PL + @${PERL} -i -p -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/pTk/Makefile.PL \ + ${WRKSRC}/JPEG/Makefile.PL \ + ${WRKSRC}/PNG/Makefile.PL post-configure: @${PERL} -i -p \ -e 's|^(CC = ).*|$$1 ${CC}|;' \ - -e 's|^(CCFLAGS = ).*|$$1 ${CFLAGS}|' \ + -e 's|^(CCFLAGS = ).*|$$1 ${CFLAGS}|;' \ + -e 's|^(LD = ).*|$$1 ${CC} ${CFLAGS} ${LDFLAGS}|;' \ + -e 's|^(FULL_AR = ).*|$$1 ${AR}|' \ `${FIND} ${WRKSRC} -name Makefile` .include <bsd.port.post.mk> diff --git a/x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL b/x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL new file mode 100644 index 000000000000..882bfeb6c56b --- /dev/null +++ b/x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL @@ -0,0 +1,16 @@ +--- JPEG/Makefile.PL.orig 2010-01-12 08:28:55.000000000 -0500 ++++ JPEG/Makefile.PL 2010-01-12 08:32:23.000000000 -0500 +@@ -13,10 +13,10 @@ + + use Tk::MMtry; + +-if ($Tk::MMtry::VERSION ge '4.007' && try_run("jpeg/has_jpeg.c",['-I/usr/local/include'],['-ljpeg'])) ++if ($Tk::MMtry::VERSION ge '4.007' && try_run("jpeg/has_jpeg.c",['-I%%LOCALBASE%%/include'],['-L%%LOCALBASE%%/lib -ljpeg'])) + { +- push(@args, LIBS => ['-ljpeg'], +- INC => '-I/usr/local/include', ++ push(@args, LIBS => ['-L%%LOCALBASE%%/lib -ljpeg'], ++ INC => '-I%%LOCALBASE%%/include', + DEFINE => '-DHAVE_JPEGLIB_H', + ); + warn "Using system's -ljpeg\n"; diff --git a/x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL b/x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL new file mode 100644 index 000000000000..491f93a52257 --- /dev/null +++ b/x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL @@ -0,0 +1,22 @@ +--- PNG/Makefile.PL.orig 2010-01-12 08:23:36.000000000 -0500 ++++ PNG/Makefile.PL 2010-01-12 08:26:18.000000000 -0500 +@@ -16,7 +16,7 @@ + } + + if ($Tk::MMtry::VERSION ge '4.007' && +- try_run("config/has_png.c",['-I/usr/local/include'],['-lpng -lz -lm'])) ++ try_run("config/has_png.c",['-I%%LOCALBASE%%/include'],['-L%%LOCALBASE%%/lib -lpng -lz -lm'])) + { + Tk::MMutil::TkExtMakefile( + NAME => 'Tk::PNG', +@@ -24,8 +24,8 @@ + XS_VERSION => $Tk::Config::VERSION, + dist => { COMPRESS => 'gzip -f9', SUFFIX => '.gz' }, + OBJECT => '$(O_FILES)', +- INC => '-I/usr/local/include', +- LIBS => ['-lpng -lz -lm'], ++ INC => '-I%%LOCALBASE%%/include', ++ LIBS => ['-L%%LOCALBASE%%/lib -lpng -lz -lm'], + ); + } + else |