Avoid using Perl in the default case, and BUILD_DEPEND on it if

the alternative fonts are specified. Using USE_PERL seems to cause
run-time dependency as well, which is bogus in this case.

Also, use explicit PATH to bsd.*.mk -- for some reasons, just
make -f bsd.prog.mk no longer works... See the PR's history.

PR:	ports/40479
This commit is contained in:
Mikhail Teterin 2002-07-16 18:19:27 +00:00
parent d268a4dad4
commit 2f7b4d7b2b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=63099
2 changed files with 10 additions and 5 deletions

View file

@ -53,7 +53,10 @@ post-extract:
post-patch:
.if !defined(WITH_LZW)
@${PERL} -pi -e "s|#define LZW_LICENCED||g" ${WRKSRC}/gd_gif_out.c
${MV} ${WRKSRC}/gd_gif_out.c ${WRKSRC}/gd_gif_out.c.gif && \
${SED} -e "s|#define LZW_LICENCED||g" \
< ${WRKSRC}/gd_gif_out.c.nogif \
> ${WRKSRC}/gd_gif_out.c
.endif
post-install:
@ -63,6 +66,7 @@ post-install:
.endif
.if defined(GD_FONTS)
BUILD_DEPENDS= perl:${PORTSDIR}/lang/perl5
SCRIPTS_ENV+= GD_FONTS="${GD_FONTS}"
.endif

View file

@ -1,6 +1,7 @@
PROGS!= make -V BIN_PROGRAMS -f ${WRKSRC}/Makefile
TESTS!= make -V TEST_PROGRAMS -f ${WRKSRC}/Makefile
OBJS!= make -V LIBOBJS -f ${WRKSRC}/Makefile
MAKEDIR=/usr/share/mk
SRCS= ${OBJS:.o=.c}
LIB=gd
SHLIB_MAJOR=4
@ -8,7 +9,7 @@ SHLIB_MINOR=0
INCS= gd.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h \
gdfonts.h gdfontt.h
SHLIB_NAME!= make -V SHLIB_NAME LIB=${LIB} \
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} -f bsd.lib.mk
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} -f ${MAKEDIR}/bsd.lib.mk
CFLAGS+=-I${.CURDIR} -I${LOCALBASE}/include/freetype2/ \
-I${LOCALBASE}/include/freetype2/freetype -I${LOCALBASE}/include \
@ -33,17 +34,17 @@ lib${LIB}.a ${SHLIB_NAME}: ${SRCS}
make LIB=${LIB} SRCS="${SRCS}" \
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
CFLAGS="${CFLAGS}" -ECFLAGS LDADD="${LDADD}" \
-f bsd.lib.mk ${.TARGET}
-f ${MAKEDIR}/bsd.lib.mk ${.TARGET}
${PROGS} ${TESTS}: ${SHLIB_NAME} lib${LIB}.a
make PROG=${.TARGET} NOMAN=1 LDADD="-L. -lgd" \
CFLAGS="${CFLAGS}" -ECFLAGS -f bsd.prog.mk
CFLAGS="${CFLAGS}" -ECFLAGS -f ${MAKEDIR}/bsd.prog.mk
install:
mkdir -p ${PREFIX}/include
make LIB=${LIB} LIBDIR=${PREFIX}/lib NOPROFILE=true \
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
-f bsd.lib.mk install
-f ${MAKEDIR}/bsd.lib.mk install
cd ${.CURDIR} && ${INSTALL_DATA} ${INCS} ${PREFIX}/include
cd ${.CURDIR} && ${INSTALL_PROGRAM} ${PROGS} ${PREFIX}/bin/
${INSTALL_SCRIPT} ${.CURDIR}/bdftogd ${PREFIX}/bin/