summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/gd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/gd')
-rw-r--r--media-libs/gd/Manifest2
-rw-r--r--media-libs/gd/files/gd-2.0.35-fontconfig.patch25
-rw-r--r--media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch113
-rw-r--r--media-libs/gd/files/gd-2.0.35-libpng14.patch16
-rw-r--r--media-libs/gd/files/gd-2.0.35-maxcolors.patch17
-rw-r--r--media-libs/gd/files/gd-2.1.1-headers.patch30
-rw-r--r--media-libs/gd/files/gd-2.1.1-webp-pre.patch28
-rw-r--r--media-libs/gd/files/gd-2.1.1-webp.patch409
-rw-r--r--media-libs/gd/gd-2.0.35-r3.ebuild69
-rw-r--r--media-libs/gd/gd-2.0.35-r4.ebuild101
-rw-r--r--media-libs/gd/gd-2.1.1-r1.ebuild62
-rw-r--r--media-libs/gd/gd-2.1.1.ebuild59
-rw-r--r--media-libs/gd/metadata.xml33
13 files changed, 964 insertions, 0 deletions
diff --git a/media-libs/gd/Manifest b/media-libs/gd/Manifest
new file mode 100644
index 000000000000..8fc786d72e27
--- /dev/null
+++ b/media-libs/gd/Manifest
@@ -0,0 +1,2 @@
+DIST gd-2.0.35.tar.bz2 1212730 SHA256 bf222490749d2a9a9ac3593b01eb55aed98461ff81202414707f61b42aa300f9 SHA512 eef8150adc040bed920155337211864a41ae3c4532e852ad443a3a3b9ffdc7fd3130698041b7b19b0b1207e78a80c263c6da26eba7208cdeeff78283c7d0d281 WHIRLPOOL 9eca23a184106652ef5c19ee3b5c18e23d742e21103c66907bf829910b95aa92eea7620c5579bf493c14730bc0327a4d662ffaf9bf9a5538127b8c10cc9c6b84
+DIST libgd-2.1.1.tar.xz 2039132 SHA256 9ada1ed45594abc998ebc942cef12b032fbad672e73efc22bc9ff54f5df2b285 SHA512 48f444402a4b89e412870f9091b92eb26136c5c0d795722262ad973c7d4103476204a2de36133a2634b8f410d6bccdcf60afb829a74ac2fddfb96aff2cd2567b WHIRLPOOL a38cf1f060db35d247b54038e731484e6230cd8a9da263a8c4823aaf6b3ce455c0747bbbde60f131d85a48340e39a5c8d6273fa51366cbe2436530520211a238
diff --git a/media-libs/gd/files/gd-2.0.35-fontconfig.patch b/media-libs/gd/files/gd-2.0.35-fontconfig.patch
new file mode 100644
index 000000000000..ca313024870e
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-fontconfig.patch
@@ -0,0 +1,25 @@
+fix from upstream
+
+http://bugs.gentoo.org/363367
+
+# HG changeset patch
+# User tabe
+# Date 1239812355 0
+# Node ID 3ea283efcdafcb2acc1dd0ace1d3d48da6d8cec8
+# Parent 4f29a877875f63cee5a64e7bea406a61882a565e
+fixed FS#199
+
+199, Fixed useFontConfig() to work as documented (Ethan Merritt)
+
+diff -r 4f29a877875f -r 3ea283efcdaf src/gdft.c
+--- a/src/gdft.c Sat Apr 04 12:00:37 2009 +0000
++++ b/src/gdft.c Wed Apr 15 16:19:15 2009 +0000
+@@ -1688,7 +1688,7 @@
+ BGD_DECLARE(int) gdFTUseFontConfig(int flag)
+ {
+ #ifdef HAVE_LIBFONTCONFIG
+- fontConfigFlag = 1;
++ fontConfigFlag = flag;
+ return 1;
+ #else
+ return 0;
diff --git a/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch b/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch
new file mode 100644
index 000000000000..4b8971f1e302
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-libpng-pkg-config.patch
@@ -0,0 +1,113 @@
+use libpng's pkg-config files rather than the ugly xxx-config scripts
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,6 +47,7 @@ AC_PROG_LIBTOOL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ #AC_PROG_RANLIB
++PKG_PROG_PKG_CONFIG
+
+ dnl may be required for freetype and Xpm
+ AC_PATH_X
+@@ -340,74 +341,26 @@ AC_CHECK_LIB(z,deflate,
+ dnl libpng is required
+ AC_ARG_WITH(png,dnl
+ [ --with-png=DIR where to find the png library],,
+- withval=yes)
+-
+-# libpng12.so is a nightmare. We have to test separately for
+-# libpng12-config and libpng-config. If we find libpng12-config,
+-# we don't look for the other, which will just be a symlink to it,
+-# confusing autoconf into thinking the library itself will be named -lpng,
+-# which it won't be. Awful. This code will suffice unless the libpng
+-# authors decide to do this AGAIN. Which I really hope they won't. TBB
+-
+-if test "$withval" != no; then
+- AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config])
+- AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
+- if test -n "$LIBPNG12_CONFIG"; then
+- libpng_CPPFLAGS=`libpng12-config --cflags`
+- # should be --ldopts, but it's currently broken
+- libpng_LDFLAGS=`libpng12-config --ldflags`
+- libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
+- elif test -n "$LIBPNG_CONFIG"; then
+- libpng_CPPFLAGS=`libpng-config --cflags`
+- # should be --ldopts, but it's currently broken
+- libpng_LDFLAGS=`libpng-config --ldflags`
+- libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
+- elif test -d "$withval"; then
+- libpng_CPPFLAGS="-I$withval/include"
+- libpng_LDFLAGS="-L$withval/lib"
+- fi
+-
+- AC_CHECK_HEADERS(png.h,,
+- [AC_CHECK_HEADERS(libpng/png.h,
+- [CPPFLAGS="$CPPFLAGS $libpng_CPPFLAGS/libpng"],
+- [CPPFLAGS="$_cppflags"])])
+-
+- _ldflags="$LDFLAGS"
+- LDFLAGS="$libpng_LDFLAGS $LDFLAGS"
+-
+- if test -n "$LIBPNG12_CONFIG"; then
+- AC_CHECK_LIB(png12,png_create_read_struct,
+- [LIBS="-lpng12 $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- elif test -n "$LIBPNG_CONFIG"; then
+- AC_CHECK_LIB(png,png_create_read_struct,
+- [LIBS="-lpng $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- else
+- AC_CHECK_LIB(png,png_create_read_struct,
+- [LIBS="-lpng $LIBS"
+- FEATURES="GD_PNG $FEATURES"
+- AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
+- [LDFLAGS="$_ldflags"
+- AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])])
+- fi
+-else
+- ac_cv_lib_png_png_create_read_struct=no
++ with_png=detect)
++
++if test "$with_png" != no; then
++ PKG_CHECK_MODULES([LIBPNG], libpng, [
++ FEATURES="GD_PNG $FEATURES"
++ AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])
++ CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS"
++ LDFLAGS="$LDFLAGS $LIBPNG_LIBS"
++ with_png=yes
++ ],[
++ if test "$with_png" = yes; then
++ AC_MSG_ERROR([png support requested, but not found])
++ fi
++ with_png=no
++ ])
++fi
++if test "$with_png" = no; then
+ AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])
+ fi
+
+-#TBB: png12's png_create_read_struct is just as good
+-#2.0.23: should be = not ==
+-if test "$ac_cv_lib_png12_png_create_read_struct" = yes; then
+- ac_cv_lib_png_png_create_read_struct=yes
+-fi
+-
+ dnl FreeType configure tests snarfed from libwmf ..
+ AC_ARG_WITH(freetype,dnl
+ [ --with-freetype=DIR where to find the freetype 2.x library],
+@@ -528,7 +481,7 @@ dnl report configuration
+ AC_MSG_RESULT([
+ ** Configuration summary for $PACKAGE $VERSION:
+
+- Support for PNG library: $ac_cv_lib_png_png_create_read_struct
++ Support for PNG library: $with_png
+ Support for JPEG library: $ac_cv_lib_jpeg_jpeg_set_defaults
+ Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
+ Support for Fontconfig library: $ac_cv_lib_fontconfig_FcInit
diff --git a/media-libs/gd/files/gd-2.0.35-libpng14.patch b/media-libs/gd/files/gd-2.0.35-libpng14.patch
new file mode 100644
index 000000000000..46e621e7755a
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-libpng14.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/305101
+http://repos.archlinux.org/wsvn/packages/gd/trunk/libpng14.patch
+
+patch in upstream repo already
+
+--- gd_png.c
++++ gd_png.c
+@@ -149,7 +149,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL; /* bad signature */
+ }
+
diff --git a/media-libs/gd/files/gd-2.0.35-maxcolors.patch b/media-libs/gd/files/gd-2.0.35-maxcolors.patch
new file mode 100644
index 000000000000..7d6852ecc095
--- /dev/null
+++ b/media-libs/gd/files/gd-2.0.35-maxcolors.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/292130
+
+fix in usptream repo already
+
+--- gd-2.0.35/gd_gd.c
++++ gd-2.0.35/gd_gd.c
+@@ -44,6 +44,10 @@
+ {
+ goto fail1;
+ }
++ if (im->colorsTotal > gdMaxColors)
++ {
++ goto fail1;
++ }
+ }
+ /* Int to accommodate truecolor single-color transparency */
+ if (!gdGetInt (&im->transparent, in))
diff --git a/media-libs/gd/files/gd-2.1.1-headers.patch b/media-libs/gd/files/gd-2.1.1-headers.patch
new file mode 100644
index 000000000000..089e52f8fff1
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-headers.patch
@@ -0,0 +1,30 @@
+From 92f5a4b113deca14e80c218e6bcd06835c3e059f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 28 Feb 2015 17:17:52 -0500
+Subject: [PATCH] tests: fix header inclusion
+
+gdnametest uses string funcs, so pull in string.h. It also can't pull
+in test_config.h directly as it breaks when building out of tree. Use
+the -I paths to find it.
+
+URL: https://bugs.gentoo.org/540376
+
+diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c
+index dd8f019..f2bb8a6 100644
+--- a/tests/gdimagefile/gdnametest.c
++++ b/tests/gdimagefile/gdnametest.c
+@@ -1,9 +1,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ #include "gd.h"
+ #include "gdtest.h"
+-#include "../test_config.h"
++#include "test_config.h"
+
+ #define WIDTH 60
+ #define HEIGHT 50
+--
+2.3.1
+
diff --git a/media-libs/gd/files/gd-2.1.1-webp-pre.patch b/media-libs/gd/files/gd-2.1.1-webp-pre.patch
new file mode 100644
index 000000000000..766a4cbda24e
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-webp-pre.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/545956
+
+From c7e5dc617c7466c44935cdefbe7e79de319f98ca Mon Sep 17 00:00:00 2001
+From: Pierre Joye <pierre.php@gmail.com>
+Date: Sat, 17 Jan 2015 08:20:17 +0100
+Subject: [PATCH] fix #111, invalid default quantization
+
+---
+ src/gd_webp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/gd_webp.c b/src/gd_webp.c
+index fae3861..a3ae1ac 100644
+--- a/src/gd_webp.c
++++ b/src/gd_webp.c
+@@ -185,6 +185,9 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
+ gd_error("gd-webp error: cannot allocate Y buffer");
+ return;
+ }
++ if (quantization == -1) {
++ quantization = 80;
++ }
+ vp8_quality = mapQualityToVP8QP(quantization);
+
+ U = Y + width * height;
+--
+2.3.5
+
diff --git a/media-libs/gd/files/gd-2.1.1-webp.patch b/media-libs/gd/files/gd-2.1.1-webp.patch
new file mode 100644
index 000000000000..93d91552fe45
--- /dev/null
+++ b/media-libs/gd/files/gd-2.1.1-webp.patch
@@ -0,0 +1,409 @@
+https://bugs.gentoo.org/545956
+
+From a79232c5fa692c3b6e3f5bc95ecfc455424c3f54 Mon Sep 17 00:00:00 2001
+From: Pierre Joye <pierre.php@gmail.com>
+Date: Tue, 20 Jan 2015 04:55:11 +0100
+Subject: [PATCH] fix #129, drop VPX usage in favor of libwebp
+
+---
+ configure.ac | 80 +++++------------
+ src/gd_webp.c | 231 +++++++++++++++++++++-----------------------------
+ tests/Makefile.am | 2 +-
+ tests/webp/bug00111.c | 2 +-
+ 4 files changed, 122 insertions(+), 193 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1024a3a..8923186 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -317,63 +317,6 @@ if test "$with_xpm" != no; then
+ fi
+ AM_CONDITIONAL([HAVE_LIBXPM], test "$with_xpm" = yes)
+
+-dnl check for libvpx by default
+-AC_ARG_WITH(vpx,dnl
+-[ --with-vpx=DIR where to find the vpx library])
+-
+-case $with_vpx in
+-no) ;;
+-yes|"")
+- PKG_CHECK_MODULES([LIBVPX], vpx, [with_vpx=yes],
+- [
+- PKG_CHECK_MODULES([LIBVPX], libvpx, [with_vpx=yes],
+- [
+- if test "$with_vpx" = yes; then
+- AC_MSG_ERROR([VPX support requested, but not found])
+- fi
+- with_vpx=no
+- ])
+- ])
+- ;;
+-*)
+- save_LIBS="$LIBS"
+- save_CPPFLAGS="$CPPFLAGS"
+-
+- if test -d "$with_vpx"; then
+- LIBVPX_CFLAGS="-I$with_vpx/include"
+- LIBVPX_LIBS="-L$with_vpx/lib -lvpx"
+- fi
+-
+- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
+- LIBS="$LIBS $LIBVPX_LIBS"
+-
+- AC_CHECK_LIB(vpx,vpx_codec_destroy,
+- [
+- if test -z "$LIBVPX_LIBS"; then
+- LIBVPX_LIBS="-lvpx"
+- fi
+- with_vpx=yes
+- ],[
+- if test "$with_vpx" != ""; then
+- AC_MSG_ERROR([vpx support requested, but not found])
+- else
+- with_vpx=no
+- fi
+- ])
+-
+- CPPFLAGS="$save_CPPFLAGS"
+- LIBS="$save_LIBS"
+- ;;
+-esac
+-
+-if test "$with_vpx" != no; then
+- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
+- LIBS="$LIBS $LIBVPX_LIBS"
+- FEATURES="GD_VPX $FEATURES"
+- AC_DEFINE(HAVE_LIBVPX, 1, [ Define if you have the VPX library. ])
+-fi
+-AM_CONDITIONAL([HAVE_LIBVPX], test "$with_vpx" = yes)
+-
+ dnl check for libtiff by default
+ AC_ARG_WITH(tiff,dnl
+ [ --with-tiff=DIR where to find the TIFF library])
+@@ -437,6 +380,27 @@ if test "$mingw_cv_win32_host" = yes; then
+ AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
+ fi
+
++
++dnl check for libwebp by default
++AC_ARG_WITH(webp,dnl
++[ --with-webp=DIR where to find the webp library],
++ [if test -d "$withval"; then
++ LDFLAGS="$LDFLAGS -L$withval/lib"
++ CFLAGS="$CFLAGS -I$withval/include"
++ fi],
++ withval=yes)
++
++if test "$withval" != no; then
++ AC_CHECK_LIB(webp,WebPGetInfo,
++ [LIBS="-lwebp $LIBS"
++ FEATURES="GD_WEBP $FEATURES"
++ AC_DEFINE(HAVE_LIBWEBP, 1, [ Define if you have the webp library. ])])
++ with_webp=yes
++else
++ with_webp=no
++fi
++AM_CONDITIONAL([HAVE_LIBWEBP], test "$with_webp" = yes)
++
+ dnl report configuration
+ AC_MSG_RESULT([
+ ** Configuration summary for $PACKAGE $VERSION:
+@@ -444,7 +408,7 @@ AC_MSG_RESULT([
+ Support for Zlib: $with_zlib
+ Support for PNG library: $with_png
+ Support for JPEG library: $ac_cv_lib_jpeg_jpeg_set_defaults
+- Support for VPX library: $with_vpx
++ Support for WebP library: $with_webp
+ Support for TIFF library: $with_tiff
+ Support for Freetype 2.x library: $with_freetype
+ Support for Fontconfig library: $with_fontconfig
+diff --git a/src/gd_webp.c b/src/gd_webp.c
+index a3ae1ac..c44bd80 100644
+--- a/src/gd_webp.c
++++ b/src/gd_webp.c
+@@ -2,33 +2,21 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+
++
++#ifdef HAVE_LIBWEBP
+ #include <stdio.h>
+ #include <math.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include "gd.h"
+ #include "gd_errors.h"
+-
+-#ifdef HAVE_LIBVPX
+-#include "webpimg.h"
+ #include "gdhelpers.h"
++#include "webp/decode.h"
++#include "webp/encode.h"
+
+-extern void gd_YUV420toRGBA(uint8* Y,
+- uint8* U,
+- uint8* V,
+- gdImagePtr im);
+-
+-extern void gd_RGBAToYUV420(gdImagePtr im2,
+- uint8* Y,
+- uint8* U,
+- uint8* V);
+-
+-const char * gdWebpGetVersionString()
+-{
+- return "not defined";
+-}
++#define GD_WEBP_ALLOC_STEP (4*1024)
+
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
++gdImagePtr gdImageCreateFromWebp (FILE * inFile)
+ {
+ gdImagePtr im;
+ gdIOCtx *in = gdNewFileCtx(inFile);
+@@ -38,42 +26,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
+ return im;
+ }
+
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data)
++gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
+ {
+- int width, height, ret;
+- unsigned char *Y = NULL;
+- unsigned char *U = NULL;
+- unsigned char *V = NULL;
+- gdImagePtr im;
+-
+- ret = WebPDecode(data, size, &Y, &U, &V, &width, &height);
+- if (ret != webp_success) {
+- if (Y) free(Y);
+- if (U) free(U);
+- if (V) free(V);
+- gd_error("WebP decode: fail to decode input data");
+- return NULL;
+- }
+- im = gdImageCreateTrueColor(width, height);
+- if (!im) {
+- return NULL;
+- }
+- gd_YUV420toRGBA(Y, U, V, im);
+- return im;
+-}
+-
+-#define GD_WEBP_ALLOC_STEP (4*1024)
+-
+-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
+-{
+- int width, height, ret;
+- unsigned char *filedata = NULL;
++ int width, height;
++ uint8_t *filedata = NULL;
++ uint8_t *argb = NULL;
+ unsigned char *read, *temp;
+- unsigned char *Y = NULL;
+- unsigned char *U = NULL;
+- unsigned char *V = NULL;
+ size_t size = 0, n;
+ gdImagePtr im;
++ int x, y;
++ uint8_t *p;
+
+ do {
+ temp = gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP);
+@@ -89,23 +51,97 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
+ }
+
+ n = gdGetBuf(read, GD_WEBP_ALLOC_STEP, infile);
+- size += n;
+- } while (n>0);
++ if (n>0 && n!=EOF) {
++ size += n;
++ }
++ } while (n>0 && n!=EOF);
+
+- ret = WebPDecode(filedata, size, &Y, &U, &V, &width, &height);
+- gdFree(filedata);
+- if (ret != webp_success) {
+- if (Y) free(Y);
+- if (U) free(U);
+- if (V) free(V);
+- gd_error("WebP decode: fail to decode input data");
++ if (WebPGetInfo(filedata,size, &width, &height) == 0) {
++ gd_error("gd-webp cannot get webp info");
+ return NULL;
+ }
++
+ im = gdImageCreateTrueColor(width, height);
+- gd_YUV420toRGBA(Y, U, V, im);
++ if (!im) {
++ return NULL;
++ }
++ argb = WebPDecodeARGB(filedata, size, &width, &height);
++ if (!argb) {
++ gd_error("gd-webp cannot allocate temporary buffer");
++ gdFree(argb);
++ return NULL;
++ }
++ for (y = 0, p = argb; y < height; y++) {
++ for (x = 0; x < width; x++) {
++ register uint8_t a = gdAlphaMax - (*(p++) >> 1);
++ register uint8_t r = *(p++);
++ register uint8_t g = *(p++);
++ register uint8_t b = *(p++);
++ im->tpixels[y][x] = gdTrueColorAlpha(r, g, b, a);
++ }
++ }
++ gdFree(filedata);
++ free(argb);
++ im->saveAlphaFlag = 1;
+ return im;
+ }
+
++void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
++{
++ uint8_t *argb;
++ int x, y;
++ uint8_t *p;
++ uint8_t *out;
++ size_t out_size;
++
++ if (im == NULL) {
++ return;
++ }
++
++ if (!gdImageTrueColor(im)) {
++ gd_error("Paletter image not supported by webp");
++ return;
++ }
++
++ if (quantization == -1) {
++ quantization = 80;
++ }
++
++ argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
++ if (!argb) {
++ return;
++ }
++ p = argb;
++ for (y = 0; y < gdImageSY(im); y++) {
++ for (x = 0; x < gdImageSX(im); x++) {
++ register int c;
++ register char a;
++ c = im->tpixels[y][x];
++ a = gdTrueColorGetAlpha(c);
++ if (a == 127) {
++ a = 0;
++ } else {
++ a = 255 - ((a << 1) + (a >> 6));
++ }
++ *(p++) = gdTrueColorGetRed(c);
++ *(p++) = gdTrueColorGetGreen(c);
++ *(p++) = gdTrueColorGetBlue(c);
++ *(p++) = a;
++ }
++ }
++ out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out);
++ printf("outsize: %i\n", out_size);
++ if (out_size == 0) {
++ gd_error("gd-webp encoding failed");
++ goto freeargb;
++ }
++ gdPutBuf(out, out_size, outfile);
++ free(out);
++
++freeargb:
++ gdFree(argb);
++}
++
+ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
+ {
+ gdIOCtx *out = gdNewFileCtx(outFile);
+@@ -116,7 +152,7 @@ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization
+ BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
+ {
+ gdIOCtx *out = gdNewFileCtx(outFile);
+- gdImageWebpCtx(im, out, -1);
++ gdImageWebpCtx(im, out, -1);
+ out->gd_free(out);
+ }
+
+@@ -140,75 +176,4 @@ BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization
+ out->gd_free(out);
+ return rv;
+ }
+-
+-/*
+- * Maps normalized QP (quality) to VP8 QP
+- */
+-int mapQualityToVP8QP(int quality) {
+-#define MIN_QUALITY 0
+-#define MAX_QUALITY 100
+-#define MIN_VP8QP 1
+-#define MAX_VP8QP 63
+- const float scale = MAX_VP8QP - MIN_VP8QP;
+- const float vp8qp =
+- scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP;
+- if (quality < MIN_QUALITY || quality > MAX_QUALITY) {
+- gd_error("Wrong quality value %d.", quality);
+- return -1;
+- }
+-
+- return (int)(vp8qp + 0.5);
+-}
+-
+-/* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
+- * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
+- * (http://www.cdrom.com/pub/png/pngbook.html).
+- */
+-BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
+-{
+- int width = im->sx;
+- int height = im->sy;
+-
+- int yuv_width, yuv_height, yuv_nbytes, ret;
+- int vp8_quality;
+- unsigned char *Y = NULL,
+- *U = NULL,
+- *V = NULL;
+- unsigned char *filedata = NULL;
+-
+- /* Conversion to Y,U,V buffer */
+- yuv_width = (width + 1) >> 1;
+- yuv_height = (height + 1) >> 1;
+- yuv_nbytes = width * height + 2 * yuv_width * yuv_height;
+-
+- if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) {
+- gd_error("gd-webp error: cannot allocate Y buffer");
+- return;
+- }
+- if (quantization == -1) {
+- quantization = 80;
+- }
+- vp8_quality = mapQualityToVP8QP(quantization);
+-
+- U = Y + width * height;
+- V = U + yuv_width * yuv_height;
+- gd_RGBAToYUV420(im, Y, U, V);
+-
+- /* Encode Y,U,V and write data to file */
+- ret = WebPEncode(Y, U, V, width, height, width, yuv_width, yuv_height, yuv_width,
+- vp8_quality, &filedata, &yuv_nbytes, NULL);
+- gdFree(Y);
+-
+- if (ret != webp_success) {
+- if (filedata) {
+- free(filedata);
+- }
+- gd_error("gd-webp error: WebP Encoder failed");
+- return;
+- }
+-
+- gdPutBuf (filedata, yuv_nbytes, outfile);
+- free(filedata);
+-}
+-
+-#endif /* HAVE_LIBVPX */
++#endif /* HAVE_LIBWEBP */
+--
+2.3.5
+
diff --git a/media-libs/gd/gd-2.0.35-r3.ebuild b/media-libs/gd/gd-2.0.35-r3.ebuild
new file mode 100644
index 000000000000..6363cfa5c299
--- /dev/null
+++ b/media-libs/gd/gd-2.0.35-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="http://libgd.org/releases/${P}.tar.bz2"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="fontconfig jpeg png static-libs truetype xpm zlib"
+
+RDEPEND="fontconfig? ( media-libs/fontconfig )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.2:0 )
+ truetype? ( >=media-libs/freetype-2.1.5 )
+ xpm? ( x11-libs/libXpm x11-libs/libXt )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng14.patch #305101
+ epatch "${FILESDIR}"/${P}-maxcolors.patch #292130
+ epatch "${FILESDIR}"/${P}-fontconfig.patch #363367
+ epatch "${FILESDIR}"/${P}-libpng-pkg-config.patch
+
+ # Avoid programs we never install
+ local make_sed=( -e '/^noinst_PROGRAMS/s:noinst:check:' )
+ use png || make_sed+=( -e '/_PROGRAMS/s:(gdparttopng|gdtopng|gd2topng|pngtogd|pngtogd2|webpng)::g' )
+ use zlib || make_sed+=( -e '/_PROGRAMS/s:(gd2topng|gd2copypal|gd2togif|giftogd2|gdparttopng|pngtogd2)::g' )
+ sed -i -r "${make_sed[@]}" Makefile.am || die
+
+ # bug 466996
+ sed -i 's/AM_PROG_CC_STDC/AC_PROG_CC/' configure.ac || die
+
+ cat <<-EOF > acinclude.m4
+ m4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[:])])
+ EOF
+
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_lib_z_deflate=$(usex zlib)
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with xpm)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc INSTALL README*
+ dohtml -r ./
+ use static-libs || rm -f "${D}"/usr/*/libgd.la
+}
diff --git a/media-libs/gd/gd-2.0.35-r4.ebuild b/media-libs/gd/gd-2.0.35-r4.ebuild
new file mode 100644
index 000000000000..6fbbc35b637d
--- /dev/null
+++ b/media-libs/gd/gd-2.0.35-r4.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="http://libgd.org/releases/${P}.tar.bz2"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype xpm zlib"
+
+#fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gdlib-config
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng14.patch #305101
+ epatch "${FILESDIR}"/${P}-maxcolors.patch #292130
+ epatch "${FILESDIR}"/${P}-fontconfig.patch #363367
+ epatch "${FILESDIR}"/${P}-libpng-pkg-config.patch
+
+ # Avoid programs we never install
+ local make_sed=( -e '/^noinst_PROGRAMS/s:noinst:check:' )
+ use png || make_sed+=( -e '/_PROGRAMS/s:(gdparttopng|gdtopng|gd2topng|pngtogd|pngtogd2|webpng)::g' )
+ use zlib || make_sed+=( -e '/_PROGRAMS/s:(gd2topng|gd2copypal|gd2togif|giftogd2|gdparttopng|pngtogd2)::g' )
+ sed -i -r "${make_sed[@]}" Makefile.am || die
+
+ # bug 466996
+ sed -i 's/AM_PROG_CC_STDC/AC_PROG_CC/' configure.ac || die
+
+ cat <<-EOF > acinclude.m4
+ m4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[AC_SUBST(LIBICONV)])])
+ EOF
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # setup a default FONT path that has a chance of existing using corefonts,
+ # as to make it more useful with e.g. gnuplot
+ local fontpath="${EPREFIX}/usr/share/fonts/corefonts"
+ # like with fontconfig, try to use fonts from the host OS, because that's
+ # beneficial for the user
+ use prefix && case ${CHOST} in
+ *-darwin*)
+ fontpath+=":/Library/Fonts:/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ fontpath+=":/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ fontpath+=":/usr/X/lib/X11/fonts/Type1"
+ # OpenIndiana
+ [[ -d /usr/share/fonts/X11/Type1 ]] && \
+ fontpath+=":/usr/share/fonts/X11/Type1"
+ ;;
+ *-linux-gnu)
+ [[ -d /usr/share/fonts/truetype ]] && \
+ fontpath+=":/usr/share/fonts/truetype"
+ ;;
+ esac
+ append-cppflags "-DDEFAULT_FONTPATH=\\\"${fontpath}\\\""
+
+ export ac_cv_lib_z_deflate=$(usex zlib)
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with xpm)
+}
+
+multilib_src_install_all() {
+ dodoc INSTALL README*
+ dohtml -r ./
+ prune_libtool_files
+}
diff --git a/media-libs/gd/gd-2.1.1-r1.ebuild b/media-libs/gd/gd-2.1.1-r1.ebuild
new file mode 100644
index 000000000000..5e62731d649f
--- /dev/null
+++ b/media-libs/gd/gd-2.1.1-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit libtool multilib-minimal eutils autotools
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="mirror://bitbucket/libgd/gd-libgd/downloads/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype webp xpm zlib"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-headers.patch" #540376
+ epatch "${FILESDIR}/${P}-webp-pre.patch" #545956
+ epatch "${FILESDIR}/${P}-webp.patch" #545956
+
+ #elibtoolize # for shared library on Solaris
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with webp) \
+ $(use_with xpm) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ dodoc NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/gd/gd-2.1.1.ebuild b/media-libs/gd/gd-2.1.1.ebuild
new file mode 100644
index 000000000000..a888450fb255
--- /dev/null
+++ b/media-libs/gd/gd-2.1.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit libtool multilib-minimal eutils
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="mirror://bitbucket/libgd/gd-libgd/downloads/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs truetype webp xpm zlib"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ webp? ( <media-libs/libvpx-1.4.0[${MULTILIB_USEDEP}] )
+ xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-headers.patch" #540376
+
+ elibtoolize # for shared library on Solaris
+}
+
+multilib_src_configure() {
+ # we aren't actually {en,dis}abling X here ... the configure
+ # script uses it just to add explicit -I/-L paths which we
+ # don't care about on Gentoo systems.
+ ECONF_SOURCE=${S} \
+ econf \
+ --without-x \
+ $(use_enable static-libs static) \
+ $(use_with fontconfig) \
+ $(use_with png) \
+ $(use_with truetype freetype) \
+ $(use_with jpeg) \
+ $(use_with webp vpx) \
+ $(use_with xpm) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ dodoc NEWS README
+ prune_libtool_files
+}
diff --git a/media-libs/gd/metadata.xml b/media-libs/gd/metadata.xml
new file mode 100644
index 000000000000..96855a007ecb
--- /dev/null
+++ b/media-libs/gd/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+<longdescription>
+gd is a graphics library. It allows your code to quickly draw images complete
+with lines, arcs, text, multiple colors, cut and paste from other images, and
+flood fills, and write out the result as a PNG or JPEG file. This is particularly
+useful in World Wide Web applications, where PNG and JPEG are two of the formats
+accepted for inline images by most browsers.
+
+gd is not a paint program. If you are looking for a paint program, you are
+looking in the wrong place. If you are not a programmer, you are looking in the
+wrong place, unless you are installing a required library in order to run an
+application.
+
+gd does not provide for every possible desirable graphics operation. It is not
+necessary or desirable for gd to become a kitchen-sink graphics package, but
+version 2.0 does include most frequently requested features, including both
+truecolor and palette images, resampling (smooth resizing of truecolor images)
+and so forth.
+</longdescription>
+<upstream>
+ <remote-id type="github">libgd/libgd</remote-id>
+ <bugs-to>https://github.com/libgd/libgd/issues</bugs-to>
+</upstream>
+<use>
+ <flag name='webp'>Enable support for the webp format</flag>
+</use>
+</pkgmetadata>