diff options
author | wiz <wiz@pkgsrc.org> | 2015-08-25 13:23:02 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2015-08-25 13:23:02 +0000 |
commit | fb84cd065429493145a071b94afe98ca9288b846 (patch) | |
tree | e87496addb5b7e8fc85fe1c820cdd78a30f341f7 /graphics | |
parent | 88de618b4576ad12463cd0667be6e5844840077d (diff) | |
download | pkgsrc-fb84cd065429493145a071b94afe98ca9288b846.tar.gz |
Re-Import graphics/gegl as graphics/gegl0.2 to make space for gegl-0.3.0.
GEGL (Generic Graphics Library) is a graph based image processing
framework.
GEGL provides infrastructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gegl0.2/DESCR | 9 | ||||
-rw-r--r-- | graphics/gegl0.2/Makefile | 46 | ||||
-rw-r--r-- | graphics/gegl0.2/PLIST | 172 | ||||
-rw-r--r-- | graphics/gegl0.2/buildlink3.mk | 23 | ||||
-rw-r--r-- | graphics/gegl0.2/distinfo | 7 | ||||
-rw-r--r-- | graphics/gegl0.2/hacks.mk | 30 | ||||
-rw-r--r-- | graphics/gegl0.2/options.mk | 14 | ||||
-rw-r--r-- | graphics/gegl0.2/patches/patch-CVE-2012-4433 | 108 | ||||
-rw-r--r-- | graphics/gegl0.2/patches/patch-aa | 12 |
9 files changed, 421 insertions, 0 deletions
diff --git a/graphics/gegl0.2/DESCR b/graphics/gegl0.2/DESCR new file mode 100644 index 00000000000..955e928984a --- /dev/null +++ b/graphics/gegl0.2/DESCR @@ -0,0 +1,9 @@ +GEGL (Generic Graphics Library) is a graph based image processing +framework. + +GEGL provides infrastructure to do demand based cached non destructive +image editing on larger than RAM buffers. Through babl it provides +support for a wide range of color models and pixel storage formats for +input and output. + +This package contains the 0.2 version of the library. diff --git a/graphics/gegl0.2/Makefile b/graphics/gegl0.2/Makefile new file mode 100644 index 00000000000..b9db431a4ba --- /dev/null +++ b/graphics/gegl0.2/Makefile @@ -0,0 +1,46 @@ +# $NetBSD: Makefile,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +DISTNAME= gegl-0.2.0 +PKGREVISION= 19 +CATEGORIES= graphics +MASTER_SITES= # +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= adam@NetBSD.org +HOMEPAGE= http://gegl.org/ +COMMENT= Graph based image processing framework (0.2 version) +LICENSE= gnu-gpl-v3 + +USE_LANGUAGES= c c++ +USE_LIBTOOL= yes +USE_TOOLS+= gmake pkg-config intltool msgfmt +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --disable-docs +CONFIGURE_ENV+= ac_cv_path_ASCIIDOC=no +CONFIGURE_ENV+= ac_cv_path_ENSCRIPT=no +CONFIGURE_ENV+= ac_cv_path_SDL_CONFIG=no +CONFIGURE_ENV+= ac_cv_prog_RUBY=no + +PKGCONFIG_OVERRIDE+= gegl.pc.in + +.include "../../mk/bsd.prefs.mk" + +PLIST_VARS+= v4l + +.if ${OPSYS} == "Linux" && exists(/usr/include/linux/videodev.h) +PLIST.v4l= yes +.endif + +CFLAGS.SunOS+= -std=c99 + +.include "options.mk" + +BUILDLINK_API_DEPENDS.babl+= babl>=0.1.4 +.include "../../graphics/babl/buildlink3.mk" +.include "../../mk/jpeg.buildlink3.mk" +.include "../../graphics/jasper/buildlink3.mk" +.include "../../graphics/openexr/buildlink3.mk" +.include "../../graphics/png/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/graphics/gegl0.2/PLIST b/graphics/gegl0.2/PLIST new file mode 100644 index 00000000000..5f29dc8d18d --- /dev/null +++ b/graphics/gegl0.2/PLIST @@ -0,0 +1,172 @@ +@comment $NetBSD: PLIST,v 1.1 2015/08/25 13:23:02 wiz Exp $ +bin/gegl +include/gegl-0.2/gegl-buffer-backend.h +include/gegl-0.2/gegl-buffer-iterator.h +include/gegl-0.2/gegl-buffer.h +include/gegl-0.2/gegl-chant.h +include/gegl-0.2/gegl-color.h +include/gegl-0.2/gegl-curve.h +include/gegl-0.2/gegl-enums.h +include/gegl-0.2/gegl-lookup.h +include/gegl-0.2/gegl-matrix.h +include/gegl-0.2/gegl-paramspecs.h +include/gegl-0.2/gegl-path.h +include/gegl-0.2/gegl-plugin.h +include/gegl-0.2/gegl-tile-backend.h +include/gegl-0.2/gegl-tile-source.h +include/gegl-0.2/gegl-tile.h +include/gegl-0.2/gegl-types.h +include/gegl-0.2/gegl-utils.h +include/gegl-0.2/gegl-version.h +include/gegl-0.2/gegl.h +include/gegl-0.2/opencl/cl.h +include/gegl-0.2/opencl/cl_d3d10.h +include/gegl-0.2/opencl/cl_ext.h +include/gegl-0.2/opencl/cl_gl.h +include/gegl-0.2/opencl/cl_gl_ext.h +include/gegl-0.2/opencl/cl_platform.h +include/gegl-0.2/opencl/gegl-cl-color.h +include/gegl-0.2/opencl/gegl-cl-init.h +include/gegl-0.2/opencl/gegl-cl-types.h +include/gegl-0.2/opencl/gegl-cl.h +include/gegl-0.2/opencl/opencl.h +include/gegl-0.2/operation/gegl-operation-area-filter.h +include/gegl-0.2/operation/gegl-operation-composer.h +include/gegl-0.2/operation/gegl-operation-composer3.h +include/gegl-0.2/operation/gegl-operation-filter.h +include/gegl-0.2/operation/gegl-operation-meta.h +include/gegl-0.2/operation/gegl-operation-point-composer.h +include/gegl-0.2/operation/gegl-operation-point-composer3.h +include/gegl-0.2/operation/gegl-operation-point-filter.h +include/gegl-0.2/operation/gegl-operation-point-render.h +include/gegl-0.2/operation/gegl-operation-sink.h +include/gegl-0.2/operation/gegl-operation-source.h +include/gegl-0.2/operation/gegl-operation-temporal.h +include/gegl-0.2/operation/gegl-operation.h +lib/gegl-0.2/add.la +lib/gegl-0.2/bilateral-filter.la +lib/gegl-0.2/box-blur.la +lib/gegl-0.2/brightness-contrast.la +lib/gegl-0.2/buffer-sink.la +lib/gegl-0.2/buffer-source.la +lib/gegl-0.2/c2g.la +lib/gegl-0.2/checkerboard.la +lib/gegl-0.2/clear.la +lib/gegl-0.2/clone.la +lib/gegl-0.2/color-burn.la +lib/gegl-0.2/color-dodge.la +lib/gegl-0.2/color-temperature.la +lib/gegl-0.2/color-to-alpha.la +lib/gegl-0.2/color.la +lib/gegl-0.2/contrast-curve.la +lib/gegl-0.2/convert-format.la +lib/gegl-0.2/crop.la +lib/gegl-0.2/darken.la +lib/gegl-0.2/difference-of-gaussians.la +lib/gegl-0.2/difference.la +lib/gegl-0.2/display.la +lib/gegl-0.2/divide.la +lib/gegl-0.2/dropshadow.la +lib/gegl-0.2/dst-atop.la +lib/gegl-0.2/dst-in.la +lib/gegl-0.2/dst-out.la +lib/gegl-0.2/dst-over.la +lib/gegl-0.2/dst.la +lib/gegl-0.2/edge-laplace.la +lib/gegl-0.2/edge-sobel.la +lib/gegl-0.2/exclusion.la +lib/gegl-0.2/exp-combine.la +lib/gegl-0.2/exr-load.la +lib/gegl-0.2/exr-save.la +lib/gegl-0.2/fattal02.la +lib/gegl-0.2/fractal-explorer.la +lib/gegl-0.2/gamma.la +lib/gegl-0.2/gaussian-blur.la +lib/gegl-0.2/gegl-buffer-load-op.la +lib/gegl-0.2/gegl-buffer-save-op.la +lib/gegl-0.2/grey.la +lib/gegl-0.2/grid.la +lib/gegl-0.2/hard-light.la +lib/gegl-0.2/introspect.la +lib/gegl-0.2/invert.la +lib/gegl-0.2/jp2-load.la +lib/gegl-0.2/jpg-load.la +lib/gegl-0.2/jpg-save.la +lib/gegl-0.2/layer.la +lib/gegl-0.2/lens-distortion.la +lib/gegl-0.2/levels.la +lib/gegl-0.2/lighten.la +lib/gegl-0.2/load.la +lib/gegl-0.2/magick-load.la +lib/gegl-0.2/mantiuk06.la +lib/gegl-0.2/map-absolute.la +lib/gegl-0.2/map-relative.la +lib/gegl-0.2/matting-global.la +lib/gegl-0.2/mblur.la +lib/gegl-0.2/mirrors.la +lib/gegl-0.2/mono-mixer.la +lib/gegl-0.2/motion-blur.la +lib/gegl-0.2/multiply.la +lib/gegl-0.2/noise-reduction.la +lib/gegl-0.2/noise.la +lib/gegl-0.2/nop.la +lib/gegl-0.2/opacity.la +lib/gegl-0.2/open-buffer.la +lib/gegl-0.2/over.la +lib/gegl-0.2/overlay.la +lib/gegl-0.2/path.la +lib/gegl-0.2/pixbuf.la +lib/gegl-0.2/pixelize.la +lib/gegl-0.2/plus.la +lib/gegl-0.2/png-load.la +lib/gegl-0.2/png-save.la +lib/gegl-0.2/polar-coordinates.la +lib/gegl-0.2/posterize.la +lib/gegl-0.2/ppm-load.la +lib/gegl-0.2/ppm-save.la +lib/gegl-0.2/raw-load.la +lib/gegl-0.2/rectangle.la +lib/gegl-0.2/reinhard05.la +lib/gegl-0.2/remap.la +lib/gegl-0.2/rgbe-load.la +lib/gegl-0.2/rgbe-save.la +lib/gegl-0.2/ripple.la +lib/gegl-0.2/save-pixbuf.la +lib/gegl-0.2/save.la +lib/gegl-0.2/screen.la +lib/gegl-0.2/snn-mean.la +lib/gegl-0.2/soft-light.la +lib/gegl-0.2/src-atop.la +lib/gegl-0.2/src-in.la +lib/gegl-0.2/src-out.la +lib/gegl-0.2/src-over.la +lib/gegl-0.2/src.la +lib/gegl-0.2/stress.la +lib/gegl-0.2/stretch-contrast.la +lib/gegl-0.2/subtract.la +lib/gegl-0.2/svg-huerotate.la +${PLIST.svg}lib/gegl-0.2/svg-load.la +lib/gegl-0.2/svg-luminancetoalpha.la +lib/gegl-0.2/svg-matrix.la +lib/gegl-0.2/svg-multiply.la +lib/gegl-0.2/svg-saturate.la +lib/gegl-0.2/text.la +lib/gegl-0.2/threshold.la +lib/gegl-0.2/transformops.la +lib/gegl-0.2/unsharp-mask.la +${PLIST.v4l}lib/gegl-0.2/v4l.la +lib/gegl-0.2/value-invert.la +lib/gegl-0.2/vector-fill.la +lib/gegl-0.2/vector-stroke.la +lib/gegl-0.2/vignette.la +lib/gegl-0.2/waves.la +lib/gegl-0.2/weighted-blend.la +lib/gegl-0.2/write-buffer.la +lib/gegl-0.2/xor.la +lib/libgegl-0.2.la +lib/pkgconfig/gegl-0.2.pc +share/locale/es/LC_MESSAGES/gegl-0.2.mo +share/locale/fr/LC_MESSAGES/gegl-0.2.mo +share/locale/pl/LC_MESSAGES/gegl-0.2.mo +share/locale/ru/LC_MESSAGES/gegl-0.2.mo +share/locale/sl/LC_MESSAGES/gegl-0.2.mo diff --git a/graphics/gegl0.2/buildlink3.mk b/graphics/gegl0.2/buildlink3.mk new file mode 100644 index 00000000000..76fdc09a1d8 --- /dev/null +++ b/graphics/gegl0.2/buildlink3.mk @@ -0,0 +1,23 @@ +# $NetBSD: buildlink3.mk,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +BUILDLINK_TREE+= gegl + +.if !defined(GEGL_BUILDLINK3_MK) +GEGL_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.gegl+= gegl>=0.2.0<0.3.0 +BUILDLINK_ABI_DEPENDS.gegl+= gegl>=0.2.0nb19 +BUILDLINK_PKGSRCDIR.gegl?= ../../graphics/gegl0.2 + +pkgbase := gegl +.include "../../mk/pkg-build-options.mk" + +.if !empty(PKG_BUILD_OPTIONS.gegl:Msvg) +.include "../../graphics/librsvg/buildlink3.mk" +.endif + +.include "../../graphics/babl/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.endif # GEGL_BUILDLINK3_MK + +BUILDLINK_TREE+= -gegl diff --git a/graphics/gegl0.2/distinfo b/graphics/gegl0.2/distinfo new file mode 100644 index 00000000000..7348bc0c350 --- /dev/null +++ b/graphics/gegl0.2/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +SHA1 (gegl-0.2.0.tar.bz2) = 764cc66cb3c7b261b8fc18a6268a0e264a91d573 +RMD160 (gegl-0.2.0.tar.bz2) = cc10365cff27dd42b002bf305f82de54d8c158fa +Size (gegl-0.2.0.tar.bz2) = 7502040 bytes +SHA1 (patch-CVE-2012-4433) = 0dd9f9714f92a511469433dcde1195371fcce580 +SHA1 (patch-aa) = 0f46061f7b0c213abfe422124839eec29780d039 diff --git a/graphics/gegl0.2/hacks.mk b/graphics/gegl0.2/hacks.mk new file mode 100644 index 00000000000..ac646d94fa3 --- /dev/null +++ b/graphics/gegl0.2/hacks.mk @@ -0,0 +1,30 @@ +# $NetBSD: hacks.mk,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +.if !defined(GEGL_HACKS_MK) +GEGL_HACKS_MK= # defined + +### [Wed Dec 12 12:47:17 JST 2012 : pho] +### GEGL tries to use OpenCL in a really weird way. It has (and +### installs!) a local copy of OpenCL headers and then tries to find +### implementation by dlopen'ing "libOpenCL.so". The problem is that +### it fails to compile on Darwin < 10 by trying to include +### non-existent native OpenCL headers too, which is in fact only +### optional. + +.if !empty(MACHINE_PLATFORM:Darwin-[0-9].*-*) +PKG_HACKS+= darwin-opencl + +SUBST_CLASSES+= non-darwin +SUBST_STAGE.non-darwin= pre-build +SUBST_MESSAGE.non-darwin= Pretending as if we were not on Darwin. +SUBST_FILES.non-darwin= gegl/opencl/*.h +SUBST_SED.non-darwin= -e 's,\#ifdef __APPLE__,\#if 0,g' + +SUBST_CLASSES+= no-altivec +SUBST_STAGE.no-altivec= pre-build +SUBST_MESSAGE.no-altivec= Pretending as if we did not have altivec. +SUBST_FILES.no-altivec= gegl/opencl/*.h +SUBST_SED.no-altivec= -e 's,\#if defined( __VEC__ ),\#if 0,g' +.endif + +.endif diff --git a/graphics/gegl0.2/options.mk b/graphics/gegl0.2/options.mk new file mode 100644 index 00000000000..3af0d25a65d --- /dev/null +++ b/graphics/gegl0.2/options.mk @@ -0,0 +1,14 @@ +# $NetBSD: options.mk,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.gegl +PKG_SUPPORTED_OPTIONS= svg +PKG_SUGGESTED_OPTIONS= svg + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= svg + +.if !empty(PKG_OPTIONS:Msvg) +.include "../../graphics/librsvg/buildlink3.mk" +PLIST.svg= yes +.endif diff --git a/graphics/gegl0.2/patches/patch-CVE-2012-4433 b/graphics/gegl0.2/patches/patch-CVE-2012-4433 new file mode 100644 index 00000000000..9872d213ff2 --- /dev/null +++ b/graphics/gegl0.2/patches/patch-CVE-2012-4433 @@ -0,0 +1,108 @@ +$NetBSD: patch-CVE-2012-4433,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +see https://bugzilla.redhat.com/show_bug.cgi?id=856300 + +--- operations/external/ppm-load.c.orig 2012-03-29 20:05:50.000000000 +0000 ++++ operations/external/ppm-load.c +@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), " + #include "gegl-chant.h" + #include <stdio.h> + #include <stdlib.h> ++#include <errno.h> + + typedef enum { + PIXMAP_ASCII = 51, +@@ -44,8 +45,8 @@ typedef enum { + + typedef struct { + map_type type; +- gint width; +- gint height; ++ glong width; ++ glong height; + gsize numsamples; /* width * height * channels */ + gsize bpc; /* bytes per channel */ + guchar *data; +@@ -82,12 +83,33 @@ ppm_load_read_header(FILE *fp, + } + + /* Get Width and Height */ +- img->width = strtol (header,&ptr,0); +- img->height = atoi (ptr); +- img->numsamples = img->width * img->height * CHANNEL_COUNT; ++ errno = 0; ++ img->width = strtol (header,&ptr,10); ++ if (errno) ++ { ++ g_warning ("Error reading width: %s", strerror(errno)); ++ return FALSE; ++ } ++ else if (img->width < 0) ++ { ++ g_warning ("Error: width is negative"); ++ return FALSE; ++ } ++ ++ img->height = strtol (ptr,&ptr,10); ++ if (errno) ++ { ++ g_warning ("Error reading height: %s", strerror(errno)); ++ return FALSE; ++ } ++ else if (img->width < 0) ++ { ++ g_warning ("Error: height is negative"); ++ return FALSE; ++ } + + fgets (header,MAX_CHARS_IN_ROW,fp); +- maxval = strtol (header,&ptr,0); ++ maxval = strtol (header,&ptr,10); + + if ((maxval != 255) && (maxval != 65535)) + { +@@ -109,6 +131,16 @@ ppm_load_read_header(FILE *fp, + g_warning ("%s: Programmer stupidity error", G_STRLOC); + } + ++ /* Later on, img->numsamples is multiplied with img->bpc to allocate ++ * memory. Ensure it doesn't overflow. */ ++ if (!img->width || !img->height || ++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc) ++ { ++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height); ++ return FALSE; ++ } ++ img->numsamples = img->width * img->height * CHANNEL_COUNT; ++ + return TRUE; + } + +@@ -229,12 +261,24 @@ process (GeglOperation *operation, + if (!ppm_load_read_header (fp, &img)) + goto out; + +- rect.height = img.height; +- rect.width = img.width; +- + /* Allocating Array Size */ ++ ++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the ++ * error signalled by returning FALSE isn't properly acted upon. Therefore ++ * g_malloc() is used here which aborts if the requested memory size can't be ++ * allocated causing a controlled crash. */ + img.data = (guchar*) g_malloc (img.numsamples * img.bpc); + ++ /* No-op without g_try_malloc(), see above. */ ++ if (! img.data) ++ { ++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc)); ++ goto out; ++ } ++ ++ rect.height = img.height; ++ rect.width = img.width; ++ + switch (img.bpc) + { + case 1: diff --git a/graphics/gegl0.2/patches/patch-aa b/graphics/gegl0.2/patches/patch-aa new file mode 100644 index 00000000000..c19ceb20448 --- /dev/null +++ b/graphics/gegl0.2/patches/patch-aa @@ -0,0 +1,12 @@ +$NetBSD: patch-aa,v 1.1 2015/08/25 13:23:02 wiz Exp $ + +--- gegl/gegl-init.c.orig 2009-01-22 20:26:07.000000000 +0100 ++++ gegl/gegl-init.c +@@ -68,6 +68,7 @@ pid_is_running (gint pid) + + #include <sys/types.h> + #include <signal.h> ++#include <locale.h> + + static inline gboolean + pid_is_running (gint pid) |