ports/142748: [PATCH]x11-toolkits/p5-Tk: miscellaneous fixes
bf
bf1783 at gmail.com
Tue Jan 12 17:00:10 UTC 2010
>Number: 142748
>Category: ports
>Synopsis: [PATCH]x11-toolkits/p5-Tk: miscellaneous fixes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 12 17:00:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: bf
>Release: 9-CURRENT amd64
>Organization:
-
>Environment:
>Description:
--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.)
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ruN p5-Tk.orig/Makefile p5-Tk/Makefile
--- p5-Tk.orig/Makefile 2010-01-12 10:42:31.000000000 -0500
+++ p5-Tk/Makefile 2010-01-12 10:39:02.000000000 -0500
@@ -16,6 +16,8 @@
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 @@
.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 @@
.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 -ruN p5-Tk.orig/files/patch-JPEG_Makefile.PL p5-Tk/files/patch-JPEG_Makefile.PL
--- p5-Tk.orig/files/patch-JPEG_Makefile.PL 1969-12-31 19:00:00.000000000 -0500
+++ p5-Tk/files/patch-JPEG_Makefile.PL 2010-01-12 08:35:18.000000000 -0500
@@ -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 -ruN p5-Tk.orig/files/patch-PNG_Makefile.PL p5-Tk/files/patch-PNG_Makefile.PL
--- p5-Tk.orig/files/patch-PNG_Makefile.PL 1969-12-31 19:00:00.000000000 -0500
+++ p5-Tk/files/patch-PNG_Makefile.PL 2010-01-12 08:35:30.000000000 -0500
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list