mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
--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>
This commit is contained in:
parent
a328ae1d6c
commit
a2d5703712
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=248044
@ -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>
|
||||
|
16
x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL
Normal file
16
x11-toolkits/p5-Tk/files/patch-JPEG_Makefile.PL
Normal file
@ -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";
|
22
x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL
Normal file
22
x11-toolkits/p5-Tk/files/patch-PNG_Makefile.PL
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user