summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-18 00:48:25 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-01-18 00:48:25 +0000
commita2d5703712b8d879c0ad1de932e870f4006bc295 (patch)
treea48d38b2376951ace32c4e955e923bd7db87ee48
parent. Update to Build 79. (diff)
--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>
Notes
Notes: svn path=/head/; revision=248044
-rw-r--r--x11-toolkits/p5-Tk/Makefile14
-rw-r--r--x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL16
-rw-r--r--x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL22
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