mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
update graphics/gd2: 2.0.12 -> 2.0.15
PR: 54101 Submitted by: KATO Tsuguru <tkato@prontomail.com>
This commit is contained in:
parent
dc7638e121
commit
f5d41a577c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84506
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= gd
|
||||
PORTVERSION= 2.0.12
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 2.0.15
|
||||
CATEGORIES+= graphics
|
||||
MASTER_SITES= http://www.boutell.com/gd/http/ \
|
||||
ftp://ftp.boutell.com/pub/boutell/gd/ \
|
||||
@ -17,63 +16,50 @@ MASTER_SITE_SUBDIR= graphics/gd
|
||||
MAINTAINER?= ports@FreeBSD.org
|
||||
COMMENT?= A graphics library for fast creation of images
|
||||
|
||||
LIB_DEPENDS= png:${PORTSDIR}/graphics/png \
|
||||
jpeg:${PORTSDIR}/graphics/jpeg \
|
||||
freetype:${PORTSDIR}/print/freetype2
|
||||
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
|
||||
png.5:${PORTSDIR}/graphics/png \
|
||||
freetype.9:${PORTSDIR}/print/freetype2
|
||||
|
||||
LATEST_LINK= gd2
|
||||
|
||||
.ifndef WITHOUT_XPM
|
||||
# Temporary hack, until X-less XPM building is added to USE_XPM:
|
||||
.ifndef WITHOUT_X11
|
||||
USE_XPM= yes
|
||||
.else
|
||||
MAKE_ENV= WRKSRC="${WRKSRC}"
|
||||
MAKEFILE= ${FILESDIR}/Makefile.bsd
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
.if defined(WITHOUT_X11)
|
||||
PKGNAMESUFFIX= -nox11
|
||||
.if !defined(WITHOUT_XPM)
|
||||
LIB_DEPENDS+= Xpm:${PORTSDIR}/graphics/xpm
|
||||
.endif
|
||||
.else
|
||||
MAKE_ARGS+= -DWITHOUT_XPM
|
||||
USE_XPM= yes
|
||||
.endif
|
||||
|
||||
INSTALLS_SHLIB= yes
|
||||
MAKEFILE= ${FILESDIR}/Makefile.bsd
|
||||
MAKE_ARGS+= -j2
|
||||
.for v in WRKSRC INSTALL_PROGRAM INSTALL_DATA INSTALL_SCRIPT
|
||||
MAKE_ARGS+= $v="${$v}"
|
||||
.endfor
|
||||
|
||||
.if defined(HAVE_UNISYS_LICENSE) || \
|
||||
.if defined(WITH_LZW) || defined(HAVE_UNISYS_LICENSE) || \
|
||||
(defined(USA_RESIDENT) && ${USA_RESIDENT} == "YES")
|
||||
WITH_LZW= yes
|
||||
CFLAGS+= -DLZW_LICENSED
|
||||
.endif
|
||||
|
||||
.if defined(GD_FONTS)
|
||||
USE_PERL5_BUILD= yes
|
||||
SCRIPTS_ENV+= GD_FONTS="${GD_FONTS}"
|
||||
.endif
|
||||
|
||||
pre-everything::
|
||||
.if !defined(WITH_LZW)
|
||||
pre-fetch:
|
||||
@${ECHO_CMD} "************************************************************"
|
||||
@${ECHO_CMD} "* If you live outside US and Canada, you can define *"
|
||||
@${ECHO_CMD} "* WITH_LZW to enable GIF compression support. *"
|
||||
@${ECHO_CMD} "************************************************************"
|
||||
@${ECHO_MSG} "************************************************************"
|
||||
@${ECHO_MSG} "* If you live outside US and Canada, you can define *"
|
||||
@${ECHO_MSG} "* WITH_LZW to enable GIF compression support. *"
|
||||
@${ECHO_MSG} "************************************************************"
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
@${CP} ${FILESDIR}/g* ${WRKSRC}
|
||||
|
||||
post-patch:
|
||||
.if !defined(WITH_LZW)
|
||||
@${MV} ${WRKSRC}/gd_gif_out.c ${WRKSRC}/gd_gif_out.c.nogif && \
|
||||
${SED} -e "s|#define LZW_LICENCED||g" \
|
||||
< ${WRKSRC}/gd_gif_out.c.nogif \
|
||||
> ${WRKSRC}/gd_gif_out.c
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.if defined(GD_FONTS)
|
||||
USE_PERL5_BUILD=yes
|
||||
SCRIPTS_ENV+= GD_FONTS="${GD_FONTS}"
|
||||
${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1 +1 @@
|
||||
MD5 (gd-2.0.12.tar.gz) = de82080fbac781cfcd512c3c299066d7
|
||||
MD5 (gd-2.0.15.tar.gz) = 6ededf633b4fd054662ec123c7825fbb
|
||||
|
@ -1,4 +1,4 @@
|
||||
PROGS!= make -V BIN_PROGRAMS -f ${WRKSRC}/makefile.sample
|
||||
PROGS!= ${MAKE} -V BIN_PROGRAMS -f ${WRKSRC}/makefile.sample
|
||||
PROGS+= gd2togif gdcmpgif giftogd2
|
||||
PROGS+= annotate # new utility, not included in makefile.sample
|
||||
TESTS= gdtest gddemo gd2time gdtestft testac fontsizetest fontwheeltest
|
||||
@ -15,11 +15,11 @@ SHLIB_MAJOR=4
|
||||
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_NAME!= ${MAKE} -V SHLIB_NAME LIB=${LIB} \
|
||||
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 \
|
||||
CFLAGS+=-I${.CURDIR} -I${LOCALBASE}/include/freetype2/freetype \
|
||||
-I${LOCALBASE}/include/freetype2 -I${LOCALBASE}/include \
|
||||
-DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBZ
|
||||
LDADD= -L${LOCALBASE}/lib -lpng -lz -ljpeg -lfreetype -lm
|
||||
|
||||
@ -38,23 +38,23 @@ LDADD+= -lX11
|
||||
all: lib${LIB}.a ${SHLIB_NAME} ${PROGS} # ${TESTS}
|
||||
|
||||
lib${LIB}.a ${SHLIB_NAME}: ${SRCS}
|
||||
make LIB=${LIB} SRCS="${SRCS}" \
|
||||
${MAKE} LIB=${LIB} SRCS="${SRCS}" \
|
||||
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
|
||||
CFLAGS="${CFLAGS}" -ECFLAGS LDADD="${LDADD}" \
|
||||
-f ${MAKEDIR}/bsd.lib.mk ${.TARGET}
|
||||
|
||||
${PROGS} ${TESTS}: ${SHLIB_NAME} lib${LIB}.a
|
||||
make PROG=${.TARGET} NOMAN=1 LDADD="-L. -lgd" \
|
||||
${MAKE} PROG=${.TARGET} NOMAN=1 LDADD="-L${.CURDIR} -lgd" \
|
||||
CFLAGS="${CFLAGS}" -ECFLAGS -f ${MAKEDIR}/bsd.prog.mk
|
||||
|
||||
install:
|
||||
mkdir -p ${PREFIX}/include
|
||||
make LIB=${LIB} LIBDIR=${PREFIX}/lib NOPROFILE=true \
|
||||
${MAKE} LIB=${LIB} LIBDIR=${PREFIX}/lib NOPROFILE=true \
|
||||
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \
|
||||
-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/
|
||||
cd ${.CURDIR} && ${BSD_INSTALL_DATA} ${INCS} ${PREFIX}/include
|
||||
cd ${.CURDIR} && ${BSD_INSTALL_PROGRAM} ${PROGS} ${PREFIX}/bin/
|
||||
${BSD_INSTALL_SCRIPT} ${.CURDIR}/bdftogd ${PREFIX}/bin/
|
||||
|
||||
.if exists(${.CURDIR}/Makefile.fonts)
|
||||
.include "Makefile.fonts"
|
||||
|
@ -8,8 +8,6 @@
|
||||
** Wrapper functions for GIF output.
|
||||
*/
|
||||
|
||||
#define LZW_LICENCED
|
||||
|
||||
void gdImageGifToSink(gdImagePtr im, gdSinkPtr outSink)
|
||||
{
|
||||
gdIOCtx *out = gdNewSSCtx(NULL,outSink);
|
||||
|
@ -1,27 +0,0 @@
|
||||
--- gd.c.orig Sat Mar 29 17:25:42 2003
|
||||
+++ gd.c Wed May 14 16:46:34 2003
|
||||
@@ -2696,6 +2696,16 @@
|
||||
void
|
||||
gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
|
||||
{
|
||||
+ if (!n) {
|
||||
+ return;
|
||||
+ }
|
||||
+ gdImageLine(im, p->x, p->y, p[n-1].x, p[n-1].y, c);
|
||||
+ gdImageOpenPolygon(im, p, n, c);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
|
||||
+{
|
||||
int i;
|
||||
int lx, ly;
|
||||
if (!n)
|
||||
@@ -2710,7 +2720,6 @@
|
||||
|
||||
lx = p->x;
|
||||
ly = p->y;
|
||||
- gdImageLine (im, lx, ly, p[n - 1].x, p[n - 1].y, c);
|
||||
for (i = 1; (i < n); i++)
|
||||
{
|
||||
p++;
|
Loading…
Reference in New Issue
Block a user