[Midnightbsd-cvs] mports [16803] gd 2.1.0
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Sep 5 02:07:59 EDT 2014
Revision: 16803
http://svnweb.midnightbsd.org/mports/?rev=16803
Author: laffer1
Date: 2014-09-05 02:07:58 -0400 (Fri, 05 Sep 2014)
Log Message:
-----------
gd 2.1.0
Modified Paths:
--------------
trunk/graphics/gd/Makefile
trunk/graphics/gd/distinfo
trunk/graphics/gd/files/patch-bdftogd
trunk/graphics/gd/files/patch-gd_png.c
trunk/graphics/gd/files/patch-gdtest.c
trunk/graphics/gd/pkg-plist
Added Paths:
-----------
trunk/graphics/gd/files/makefonts
Removed Paths:
-------------
trunk/graphics/gd/files/patch-cve-2009-3546
trunk/graphics/gd/files/patch-gd_gif_out.c
Property Changed:
----------------
trunk/graphics/gd/files/Makefile.bsd
trunk/graphics/gd/files/configure
trunk/graphics/gd/files/patch-bdftogd
trunk/graphics/gd/files/patch-gd_png.c
trunk/graphics/gd/files/patch-gdtest.c
Modified: trunk/graphics/gd/Makefile
===================================================================
--- trunk/graphics/gd/Makefile 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/Makefile 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,14 +1,12 @@
# $MidnightBSD$
-PORTNAME= gd
-PORTVERSION= 2.0.35
-PORTREVISION?= 10
+PORTNAME= libgd
+PORTVERSION= 2.1.0
+PORTREVISION?= 4
PORTEPOCH= 1
CATEGORIES+= graphics
-MASTER_SITES= http://www.libgd.org/releases/ \
- ${MASTER_SITE_RINGSERVER}
-MASTER_SITE_SUBDIR= graphics/gd
-PKGNAMESUFFIX?= ${NOX11_SUFFIX}${PKGNAMESUFFIX2}
+MASTER_SITES= https://bitbucket.org/libgd/gd-libgd/downloads/ \
+ http://cdn.bitbucket.org/libgd/gd-libgd/downloads/
MAINTAINER?= ports at MidnightBSD.org
COMMENT?= Graphics library for fast creation of images
@@ -15,62 +13,51 @@
LICENSE= agg
-LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
- png15:${PORTSDIR}/graphics/png \
- freetype:${PORTSDIR}/print/freetype2
+LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libtiff.so:${PORTSDIR}/graphics/tiff \
+ libpng15.so:${PORTSDIR}/graphics/png \
+ libfreetype.so:${PORTSDIR}/print/freetype2
CONFLICTS= bazaar-1.*
-USE_BZIP2= yes
-SCRIPTDIR= ${FILESDIR}
-MAKE_ENV= WRKSRC="${WRKSRC}"
-MAKEFILE= ${FILESDIR}/Makefile.bsd
-CPPFLAGS+= -DHAVE_ERRNO_H -DHAVE_FT2BUILD_H -DHAVE_LIBFREETYPE -DHAVE_LIBJPEG -DHAVE_LIBPNG \
- -DHAVE_LIBZ -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDLIB_H
-LDFLAGS+= -L${WRKSRC}
-LDFLAGS2= -L${PREFIX}/lib -L${LOCALBASE}/lib
-FEATURES= GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
+USES= tar:xz pkgconfig pathfix libtool:keepla shebangfix
+SHEBANG_FILES= ${WRKSRC}/src/bdftogd
+GNU_CONFIGURE= yes
USE_LDCONFIG= yes
FAKE_OPTS= trueprefix
WANT_PERL= yes
-OPTIONS_DEFINE= FONTCONFIG ICONV XPM
+OPTIONS_DEFINE= FONTCONFIG ICONV VPX XPM
OPTIONS_DEFAULT=FONTCONFIG
NO_OPTIONS_SORT=yes
+FONTCONFIG_LIB_DEPENDS+= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
+FONTCONFIG_CONFIGURE_OFF= --with-fontconfig=no
+ICONV_USES= iconv
+ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
+VPX_LIB_DEPENDS= libvpx.so:${PORTSDIR}/multimedia/libvpx
+VPX_CONFIGURE_OFF= --without-vpx
+XPM_USE= xorg=xpm,x11
+XPM_CONFIGURE_ON= --with-x
+XPM_CONFIGURE_OFF= --with-xpm=no
.include <bsd.mport.options.mk>
-.if ${PORT_OPTIONS:MFONTCONFIG}
-LIB_DEPENDS+= fontconfig:${PORTSDIR}/x11-fonts/fontconfig
-CPPFLAGS+= -I${LOCALBASE}/include -DHAVE_LIBFONTCONFIG -DHAVE_PTHREAD ${PTHREAD_CFLAGS}
-LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib -lfontconfig
-LDFLAGS2+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
-FEATURES+= GD_FONTCONFIG
-.endif
+# force gdlib-config --ldflags
+LDFLAGS+= -L${LOCALBASE}/lib
-.if ${PORT_OPTIONS:MICONV}
-USES+= iconv
-CPPFLAGS+= -DHAVE_ICONV -DHAVE_ICONV_H -DHAVE_ICONV_T_DEF
-LDFLAGS+= -L${LOCALBASE}/lib -liconv
-.endif
-
-# honor global WITHOUT_X11
-.if !defined(WITHOUT_X11)
-.if ${PORT_OPTIONS:MXPM}
-USE_XORG= xpm x11
-CPPFLAGS+= -I${LOCALBASE}/include/X11 -I${LOCALBASE}/include -DHAVE_LIBXPM
-LDFLAGS+= -L${LOCALBASE}/lib -lXpm -lX11
-LDFLAGS2+= -L${LOCALBASE}/lib
-FEATURES+= GD_XPM
-.endif
-.endif
-
-FONTBASE= ${LOCALBASE}/lib/X11/fonts
-
-# supprt for bitmap fonts
+# The GD_FONTS environment variable can be set to specify the gzipped
+# tar-ball containing the fonts in bdf format and the bdf file names.
+# The tarball is the first argument, the tiny, small, medium-bold,
+# large, and giant fonts follow.
+#
+# For example:
+# GD_FONTS="/usr/ports/distfiles/x-koi8u.tgz koi6x10.bdf koi8x13.bdf \
+# koi9x15.bdf koi12x24.bdf koi10x20.bdf"
+#
.if defined(GD_FONTS)
-USE_PERL5_BUILD= yes
-SCRIPTS_ENV+= GD_FONTS="${GD_FONTS}"
+USES+= perl5
+USE_PERL5= build
+WRKFONTS= ${WRKSRC}/src
.endif
pre-extract::
@@ -78,30 +65,44 @@
@${ECHO_MSG} "GD_FONTS can be set to specify an alternative list of .bdf files"
@${ECHO_MSG} ""
-post-configure:
- ${SED} -e 's|@libdir@|${PREFIX}/lib|' \
- -e 's|@includedir@|${PREFIX}/include|' \
- -e 's|@VERSION@|${PORTVERSION}|' \
- -e 's|@GDLIB_MAJOR@|${PORTVERSION:C/([0-9]*).*/\1/1}|' \
- -e 's|@GDLIB_MINOR@|${PORTVERSION:C/[0-9]*[.]([0-9]).*/\1/1}|' \
- -e 's|@GDLIB_REVISION@|${PORTVERSION:C/.*[.]([0-9]*)/\1/1}|' \
- -e 's|@LDFLAGS@|${LDFLAGS2}|' \
- -e 's|@LIBS@|-lgd|' \
- -e 's|@LIBICONV@|${LIBICONV}|' \
- -e 's|@FEATURES@|${FEATURES}|' \
- ${WRKSRC}/config/gdlib-config.in \
- > ${WRKDIR}/gdlib-config
+post-extract:
+.if defined(GD_FONTS)
+ cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts extract ${GD_FONTS}
+.endif
+
+pre-configure:
+.if defined(GD_FONTS)
+ cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts configure ${GD_FONTS}
+.endif
+ # bump shlib version
${REINPLACE_CMD} \
- -e 's|#define DEFAULT_FONTPATH .*|#define DEFAULT_FONTPATH "${FONTBASE}/TTF:${FONTBASE}/Type1:${FONTBASE}"|' \
- ${WRKSRC}/gd.h
+ -e 's|GDLIB_CURRENT=.*|GDLIB_CURRENT=5|' \
+ ${WRKSRC}/configure
+ # workaround for broken configure
+.if ! ${PORT_OPTIONS:MICONV}
+ ${REINPLACE_CMD} \
+ -e 's|iconv|noiconv|' \
+ ${WRKSRC}/configure
+.endif
+.if ! ${PORT_OPTIONS:MXPM}
+ ${REINPLACE_CMD} \
+ -e 's|xpm|noxpm|' \
+ ${WRKSRC}/configure
+.endif
+.if ! ${PORT_OPTIONS:MFONTCONFIG}
+ ${REINPLACE_CMD} \
+ -e 's|fontconfig|nofontconfig|' \
+ ${WRKSRC}/configure
+.endif
-post-install:
- ${INSTALL_DATA} ${WRKSRC}/gdfx.h ${WRKSRC}/gdhelpers.h \
- ${PREFIX}/include/
- ${INSTALL_SCRIPT} ${WRKDIR}/gdlib-config ${PREFIX}/bin/
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR}
+.if defined(GD_FONTS)
+pre-build:
+ cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts build ${GD_FONTS}
.endif
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/src/gdhelpers.h \
+ ${STAGEDIR}${PREFIX}/include/
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgd.so.5
+
.include <bsd.port.mk>
Modified: trunk/graphics/gd/distinfo
===================================================================
--- trunk/graphics/gd/distinfo 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/distinfo 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,2 +1,2 @@
-SHA256 (gd-2.0.35.tar.bz2) = bf222490749d2a9a9ac3593b01eb55aed98461ff81202414707f61b42aa300f9
-SIZE (gd-2.0.35.tar.bz2) = 1212730
+SHA256 (libgd-2.1.0.tar.xz) = fa6665dfe3d898019671293c84d77067a3d2ede50884dbcb6df899d508370e5a
+SIZE (libgd-2.1.0.tar.xz) = 2004304
Index: trunk/graphics/gd/files/Makefile.bsd
===================================================================
--- trunk/graphics/gd/files/Makefile.bsd 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/Makefile.bsd 2014-09-05 06:07:58 UTC (rev 16803)
Property changes on: trunk/graphics/gd/files/Makefile.bsd
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Index: trunk/graphics/gd/files/configure
===================================================================
--- trunk/graphics/gd/files/configure 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/configure 2014-09-05 06:07:58 UTC (rev 16803)
Property changes on: trunk/graphics/gd/files/configure
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/graphics/gd/files/makefonts
===================================================================
--- trunk/graphics/gd/files/makefonts (rev 0)
+++ trunk/graphics/gd/files/makefonts 2014-09-05 06:07:58 UTC (rev 16803)
@@ -0,0 +1,31 @@
+#!/bin/sh
+# $FreeBSD: head/graphics/gd/files/makefonts 340872 2014-01-24 00:14:07Z mat $
+
+target="${1}"
+shift
+tarball="${1}"
+shift
+fonts="Tiny Small MediumBold Large Giant"
+case "${target}" in
+extract)
+ tar -xvzpf "${tarball}" $@
+ ;;
+configure)
+ for font in ${fonts}
+ do
+ f=`echo "${font}" | tr -d [[:lower:]] | tr [[:upper:]] [[:lower:]]`
+ mv -v "gdfont${f}.c" "gdfont${f}.c.dist"
+ mv -v "gdfont${f}.h" "gdfont${f}.h.dist"
+ done
+ ;;
+build)
+ set -x
+ for font in ${fonts}
+ do
+ f=`echo "${font}" | tr -d [[:lower:]] | tr [[:upper:]] [[:lower:]]`
+ perl ./bdftogd "gdFont${font}" "font${f}" < "${1}"
+ shift
+ done
+ ;;
+esac
+# eof
Modified: trunk/graphics/gd/files/patch-bdftogd
===================================================================
--- trunk/graphics/gd/files/patch-bdftogd 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/patch-bdftogd 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,5 +1,5 @@
---- bdftogd.orig Fri Feb 2 18:41:00 2007
-+++ bdftogd Tue Feb 13 19:55:02 2007
+--- src/bdftogd.orig 2013-06-25 11:58:23.000000000 +0200
++++ src/bdftogd 2013-08-15 21:03:29.000000000 +0200
@@ -24,6 +24,9 @@
my $filename = shift;
$filename = 'gd' . $filename unless $filename =~ /^gd/i;
@@ -10,12 +10,23 @@
if (-f "$filename.c") { die "File $filename.c already exists, won't overwrite\n"; }
if (-f "$filename.h") { die "File $filename.h already exists, won't overwrite\n"; }
-@@ -177,28 +180,40 @@
+@@ -139,6 +142,10 @@
+
+ $info
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include "$filename.h"
+
+ char ${gdname}Data[] = {
+@@ -177,28 +184,40 @@
${gdname}Data
};
-gdFontPtr ${gdname} = &${gdname}Rep;
-+BGD_EXPORT_DATA_IMPL gdFontPtr ${gdname} = &${gdname}Rep;
++BGD_EXPORT_DATA_PROT gdFontPtr ${gdname} = &${gdname}Rep;
-/* This file has not been truncated. */
+BGD_DECLARE(gdFontPtr)
@@ -44,8 +55,8 @@
#include "gd.h"
-extern gdFontPtr $gdname;
-+ BGD_EXPORT_DATA_PROT gdFontPtr $gdname;
-+ BGD_DECLARE(gdFontPtr) $gdfunc(void);
++extern BGD_EXPORT_DATA_PROT gdFontPtr $gdname;
++BGD_DECLARE(gdFontPtr) $gdfunc(void);
+#ifdef __cplusplus
+}
Property changes on: trunk/graphics/gd/files/patch-bdftogd
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: trunk/graphics/gd/files/patch-cve-2009-3546
===================================================================
--- trunk/graphics/gd/files/patch-cve-2009-3546 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/patch-cve-2009-3546 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,15 +0,0 @@
-Adopted-From: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_2/ext/gd/libgd/gd_gd.c?r1=289557&r2=289556&pathrev=289557&view=patch
-
---- gd_gd.c.orig 2006-04-05 19:52:22.000000000 +0400
-+++ gd_gd.c 2009-11-06 18:06:50.000000000 +0300
-@@ -44,6 +44,10 @@
- {
- goto fail1;
- }
-+ if (im->colorsTotal > gdMaxColors)
-+ {
-+ goto fail1;
-+ }
- }
- /* Int to accommodate truecolor single-color transparency */
- if (!gdGetInt (&im->transparent, in))
Deleted: trunk/graphics/gd/files/patch-gd_gif_out.c
===================================================================
--- trunk/graphics/gd/files/patch-gd_gif_out.c 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/patch-gd_gif_out.c 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,24 +0,0 @@
---- gd_gif_out.c~ 2007-01-04 15:44:31.000000000 +0300
-+++ gd_gif_out.c 2013-06-13 17:11:11.000000000 +0400
-@@ -586,9 +586,9 @@
- int InitCodeSize;
- int i;
- GifCtx ctx;
-+ memset(&ctx, 0, sizeof(ctx));
- ctx.Interlace = GInterlace;
- ctx.in_count = 1;
-- memset(&ctx, 0, sizeof(ctx));
- ColorMapSize = 1 << BitsPerPixel;
-
- RWidth = ctx.Width = GWidth;
-@@ -735,9 +735,9 @@
- int InitCodeSize;
- int i;
- GifCtx ctx;
-+ memset(&ctx, 0, sizeof(ctx));
- ctx.Interlace = GInterlace;
- ctx.in_count = 1;
-- memset(&ctx, 0, sizeof(ctx));
- ColorMapSize = 1 << BitsPerPixel;
-
- if (LeftOfs < 0) LeftOfs = 0;
Modified: trunk/graphics/gd/files/patch-gd_png.c
===================================================================
--- trunk/graphics/gd/files/patch-gd_png.c 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/patch-gd_png.c 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,28 +1,17 @@
---- gd_png.c.orig 2007-06-14 21:51:41.000000000 +0200
-+++ gd_png.c 2010-03-28 11:23:08.000000000 +0200
-@@ -149,7 +149,7 @@
- return NULL;
- }
+--- src/gd_png.c.orig 2013-06-25 11:58:23.000000000 +0200
++++ src/gd_png.c 2013-08-01 07:08:18.000000000 +0200
+@@ -196,6 +196,14 @@
+ png_read_info (png_ptr, info_ptr); /* read all PNG info up to image data */
-- if (!png_check_sig (sig, 8)) { /* bad signature */
-+ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
- return NULL; /* bad signature */
- }
-
-@@ -193,6 +193,16 @@
- png_read_info (png_ptr, info_ptr); /* read all PNG info up to image data */
-
- png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL);
-+
-+ if (overflow2(sizeof (int), width))
-+ {
-+ return NULL;
-+ }
-+ if (overflow2(sizeof (int) * width, height))
-+ {
-+ return NULL;
-+ }
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL);
+
- if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) {
- im = gdImageCreateTrueColor ((int) width, (int) height);
- } else {
++ if (overflow2(sizeof (int), width)) {
++ return NULL;
++ }
++ if (overflow2(sizeof (int) * width, height)) {
++ return NULL;
++ }
++
+ if ((color_type == PNG_COLOR_TYPE_RGB) || (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+ im = gdImageCreateTrueColor ((int) width, (int) height);
Property changes on: trunk/graphics/gd/files/patch-gd_png.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Modified: trunk/graphics/gd/files/patch-gdtest.c
===================================================================
--- trunk/graphics/gd/files/patch-gdtest.c 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/files/patch-gdtest.c 2014-09-05 06:07:58 UTC (rev 16803)
@@ -1,17 +1,17 @@
---- gdtest.c.orig Sat Feb 3 02:41:00 2007
-+++ gdtest.c Sat Feb 17 14:09:35 2007
-@@ -36,6 +36,8 @@
- gdSink imgsnk;
- int foreground;
- int i;
-+ gdIOCtx *ctx;
+--- src/gdtest.c.orig 2013-06-25 11:58:23.000000000 +0200
++++ src/gdtest.c 2013-08-01 07:12:08.000000000 +0200
+@@ -35,6 +35,8 @@
+ gdSink imgsnk;
+ int foreground;
+ int i;
++ gdIOCtx *ctx;
+
- if (argc != 2)
- {
- fprintf (stderr, "Usage: gdtest filename.png\n");
-@@ -58,6 +60,35 @@
+ if (argc != 2) {
+ fprintf(stderr, "Usage: gdtest filename.png\n");
+ exit (1);
+@@ -55,6 +57,35 @@
- CompareImages ("Initial Versions", ref, im);
+ CompareImages ("Initial Versions", ref, im);
+ /* */
+ /* Send to GIF File then Ptr */
@@ -43,16 +43,16 @@
+ gdImageDestroy(im2);
+ ctx->gd_free(ctx);
- /* */
- /* Send to PNG File then Ptr */
+ /* */
+ /* Send to PNG File then Ptr */
@@ -268,6 +299,10 @@
+ printf ("[Merged Image has %d colours]\n", im2->colorsTotal);
+ CompareImages ("Merged (gdtest.png, gdtest_merge.png)", im2, im3);
- printf ("[Merged Image has %d colours]\n", im2->colorsTotal);
- CompareImages ("Merged (gdtest.png, gdtest_merge.png)", im2, im3);
++ out = fopen ("test/gdtest_merge_out.png", "wb");
++ gdImagePng(im2, out);
++ fclose(out);
+
-+ out = fopen ("test/gdtest_merge_out.png", "wb");
-+ gdImagePng(im2, out);
-+ fclose(out);
+ gdImageDestroy (im2);
+ gdImageDestroy (im3);
- gdImageDestroy (im2);
- gdImageDestroy (im3);
Property changes on: trunk/graphics/gd/files/patch-gdtest.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Modified: trunk/graphics/gd/pkg-plist
===================================================================
--- trunk/graphics/gd/pkg-plist 2014-09-05 05:58:45 UTC (rev 16802)
+++ trunk/graphics/gd/pkg-plist 2014-09-05 06:07:58 UTC (rev 16803)
@@ -13,6 +13,8 @@
bin/webpng
include/entities.h
include/gd.h
+include/gd_color_map.h
+include/gd_errors.h
include/gd_io.h
include/gdcache.h
include/gdfontg.h
@@ -22,8 +24,9 @@
include/gdfontt.h
include/gdfx.h
include/gdhelpers.h
+include/gdpp.h
lib/libgd.a
+lib/libgd.la
lib/libgd.so
-lib/libgd.so.4
-%%PORTDOCS%%%%DOCSDIR%%/index.html
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+lib/libgd.so.5
+libdata/pkgconfig/gdlib.pc
More information about the Midnightbsd-cvs
mailing list