]> git.pld-linux.org Git - packages/libgdiplus.git/commitdiff
- updated to 3.6 auto/th/libgdiplus-3.6-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 31 Aug 2014 16:26:03 +0000 (18:26 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 31 Aug 2014 16:26:03 +0000 (18:26 +0200)
- removed obsolete link,lt,libpng patches
- added giflib patch (update for giflib 5.1 API)

libgdiplus-giflib.patch [new file with mode: 0644]
libgdiplus-libpng.patch [deleted file]
libgdiplus-link.patch [deleted file]
libgdiplus-lt.patch [deleted file]
libgdiplus.spec

diff --git a/libgdiplus-giflib.patch b/libgdiplus-giflib.patch
new file mode 100644 (file)
index 0000000..d70376d
--- /dev/null
@@ -0,0 +1,184 @@
+--- libgdiplus-3.6/src/gifcodec.c.orig 2014-08-27 18:45:05.000000000 +0200
++++ libgdiplus-3.6/src/gifcodec.c      2014-08-31 18:12:20.853094147 +0200
+@@ -39,9 +39,6 @@
+ #include "gifcodec.h"
+-/* giflib declares this incorrectly as EgifOpen */
+-extern GifFileType *EGifOpen(void *userData, OutputFunc writeFunc);
+-
+ /* Data structure used for callback */
+ typedef struct
+ {
+@@ -105,7 +102,7 @@
+ */
+ static int
+-AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[])
++AddExtensionBlockMono(SavedImage *New, int Function, int Len, BYTE ExtData[])
+ {
+       ExtensionBlock  *ep;
+@@ -121,15 +118,15 @@
+       ep = &New->ExtensionBlocks[New->ExtensionBlockCount++];
++      ep->Function = Function;
+       ep->ByteCount=Len;
+-      ep->Bytes = (char *)GdipAlloc(ep->ByteCount);
++      ep->Bytes = (GifByteType *)GdipAlloc(ep->ByteCount);
+       if (ep->Bytes == NULL) {
+               return (GIF_ERROR);
+       }
+       if (ExtData) {
+               memcpy(ep->Bytes, ExtData, Len);
+-              ep->Function = New->Function;
+       }
+       return (GIF_OK);
+@@ -166,6 +163,7 @@
+ DGifSlurpMono(GifFileType * GifFile, SavedImage *TrailingExtensions)
+ {
+       int             ImageSize;
++      int             Function;
+       GifRecordType   RecordType;
+       SavedImage      *sp;
+       GifByteType     *ExtData;
+@@ -232,20 +230,19 @@
+                       }
+                       case EXTENSION_RECORD_TYPE: {
+-                              if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) {
++                              if (DGifGetExtension(GifFile, &Function, &ExtData) == GIF_ERROR) {
+                                       return (GIF_ERROR);
+                               }
+                               while (ExtData != NULL) {
+                                       /* Create an extension block with our data */
+-                                      if (AddExtensionBlockMono(&temp_save, ExtData[0], &ExtData[1]) == GIF_ERROR) {
++                                      if (AddExtensionBlockMono(&temp_save, Function, ExtData[0], &ExtData[1]) == GIF_ERROR) {
+                                               return (GIF_ERROR);
+                                       }
+                                       if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) {
+                                               return (GIF_ERROR);
+                                       }
+-                                      temp_save.Function = 0;
+                               }
+                               break;
+                       }
+@@ -304,9 +301,9 @@
+       loop_counter = FALSE;
+       if (from_file) {
+-              gif = DGifOpen(stream, &gdip_gif_fileinputfunc);
++              gif = DGifOpen(stream, &gdip_gif_fileinputfunc, NULL);
+       } else {
+-              gif = DGifOpen (stream, &gdip_gif_inputfunc);
++              gif = DGifOpen (stream, &gdip_gif_inputfunc, NULL);
+       }
+       
+       if (gif == NULL) {
+@@ -581,7 +578,7 @@
+       }
+       FreeExtensionMono(&global_extensions);
+-      DGifCloseFile (gif);
++      DGifCloseFile (gif, NULL);
+       *image = result;
+       return Ok;
+@@ -597,7 +594,7 @@
+       if (gif != NULL) {
+               FreeExtensionMono (&global_extensions);
+-              DGifCloseFile (gif);
++              DGifCloseFile (gif, NULL);
+       }
+       *image = NULL;
+@@ -661,9 +658,9 @@
+       }
+       if (from_file) {
+-              fp = EGifOpenFileName (stream, 0);
++              fp = EGifOpenFileName (stream, 0, NULL);
+       } else {
+-              fp = EGifOpen (stream, gdip_gif_outputfunc);
++              fp = EGifOpen (stream, gdip_gif_outputfunc, NULL);
+       }
+               
+       if (!fp) {
+@@ -702,7 +699,7 @@
+                                       goto error; 
+                               }
+-                              cmap = MakeMapObject(cmap_size, 0);
++                              cmap = GifMakeMapObject(cmap_size, 0);
+                               pixbuf = GdipAlloc(pixbuf_size);
+                               if (pixbuf == NULL) {
+@@ -793,7 +790,7 @@
+                               pixbuf = pixbuf_org;
+                       } else {
+                               cmap_size = 256;
+-                              cmap  = MakeMapObject (cmap_size, 0);
++                              cmap  = GifMakeMapObject (cmap_size, 0);
+                               red = GdipAlloc(pixbuf_size);
+                               green = GdipAlloc(pixbuf_size);
+@@ -824,13 +821,13 @@
+                                               v += 4;
+                                       }
+                               }
+-                              if (QuantizeBuffer(bitmap_data->width, bitmap_data->height, &cmap_size, 
++                              if (GifQuantizeBuffer(bitmap_data->width, bitmap_data->height, &cmap_size, 
+                                               red,  green, blue, pixbuf, cmap->Colors) == GIF_ERROR) {
+                                       goto error;
+                               }
+                       }
+-                      cmap->BitsPerPixel = BitSize (cmap_size);
++                      cmap->BitsPerPixel = GifBitSize (cmap_size);
+                       cmap->ColorCount = 1 << cmap->BitsPerPixel;
+                       if ((frame == 0) && (k == 0)) {
+@@ -848,8 +845,10 @@
+                                               Buffer[0] = 1;
+                                               Buffer[1] = ptr[0];
+                                               Buffer[2] = ptr[1];
+-                                              EGifPutExtensionFirst(fp, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0");
+-                                              EGifPutExtensionLast(fp, APPLICATION_EXT_FUNC_CODE, 3, Buffer);
++                                              EGifPutExtensionLeader(fp, APPLICATION_EXT_FUNC_CODE);
++                                              EGifPutExtensionBlock(fp, 11, "NETSCAPE2.0");
++                                              EGifPutExtensionBlock(fp, 3, Buffer);
++                                              EGifPutExtensionTrailer(fp);
+                                       }
+                               }
+@@ -901,7 +900,7 @@
+                               pixbuf += bitmap_data->width;
+                       }
+-                      FreeMapObject (cmap);
++                      GifFreeMapObject (cmap);
+                       if (red != NULL) {
+                               GdipFree (red);
+                       }
+@@ -923,13 +922,13 @@
+               }
+       }
+-      EGifCloseFile (fp);     
++      EGifCloseFile (fp, NULL);       
+       
+       return Ok;
+ error:
+       if (cmap != NULL) {
+-              FreeMapObject (cmap);
++              GifFreeMapObject (cmap);
+       }
+       if (red != NULL) {
diff --git a/libgdiplus-libpng.patch b/libgdiplus-libpng.patch
deleted file mode 100644 (file)
index 31a1c01..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-$NetBSD: patch-aa,v 1.8 2011/01/21 10:21:51 wiz Exp $
-
-Fix build with png-1.5.
-
---- src/pngcodec.c.orig        2010-11-03 16:52:54.000000000 +0000
-+++ src/pngcodec.c
-@@ -116,10 +116,15 @@ gdip_load_png_properties (png_structp pn
-       bitmap_data->dpi_horz = png_get_x_pixels_per_inch(png_ptr, info_ptr);
-       bitmap_data->dpi_vert = png_get_y_pixels_per_inch(png_ptr, info_ptr);
- #elif defined(PNG_pHYs_SUPPORTED)
--      if ((info_ptr->valid & PNG_INFO_pHYs) && (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)) {
--              bitmap_data->image_flags |= ImageFlagsHasRealDPI;
--              bitmap_data->dpi_horz = info_ptr->x_pixels_per_unit * 0.0254;
--              bitmap_data->dpi_vert = info_ptr->y_pixels_per_unit * 0.0254;
-+      if (png_get_valid (png_ptr, info_ptr, PNG_INFO_pHYs)) {
-+              png_uint_32 res_x, res_y;
-+              int unit_type;
-+              png_get_pHYs (png_ptr, info_ptr, &res_x, &res_y, &unit_type);
-+              if (unit_type == PNG_RESOLUTION_METER) {
-+                      bitmap_data->image_flags |= ImageFlagsHasRealDPI;
-+                      bitmap_data->dpi_horz = res_x * 0.0254;
-+                      bitmap_data->dpi_vert = res_y * 0.0254;
-+              }
-       }
- #endif
-       /* default to screen resolution (if nothing was provided or available) */
-@@ -130,7 +135,7 @@ gdip_load_png_properties (png_structp pn
- #if defined(PNG_iCCP_SUPPORTED)
-       {
-               png_charp       name;
--              png_charp       profile;
-+              png_bytep       profile;
-               png_uint_32     proflen;
-               int             compression_type;
-@@ -292,6 +297,11 @@ gdip_load_png_image_from_file_or_stream 
-               ImageFlags      colourspace_flag;
-               int             i;
-               int             j;
-+              png_colorp      png_palette;
-+              int             png_num_palette;
-+              png_bytep       trans_alpha;
-+              int             num_trans;
-+              png_color_16p   trans_color;
-               width = png_get_image_width (png_ptr, info_ptr);
-               height = png_get_image_height (png_ptr, info_ptr);
-@@ -309,6 +319,8 @@ gdip_load_png_image_from_file_or_stream 
-               }
-               /* Copy palette. */
-+              png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette);
-+
-               num_colours = 1 << bit_depth;
-               if (png_get_color_type (png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) {
-@@ -321,8 +333,8 @@ gdip_load_png_image_from_file_or_stream 
-                       colourspace_flag = ImageFlagsColorSpaceRGB;
-                       palette_entries = num_colours;
--                      if (palette_entries > info_ptr->num_palette) {
--                              palette_entries = info_ptr->num_palette;
-+                      if (palette_entries > png_num_palette) {
-+                              palette_entries = png_num_palette;
-                       }
-                       palette = GdipAlloc (sizeof(ColorPalette) + (num_colours - 1) * sizeof(ARGB));
-@@ -331,29 +343,30 @@ gdip_load_png_image_from_file_or_stream 
-                       for (i=0; i < palette_entries; i++) {
-                               set_pixel_bgra (&palette->Entries[i], 0,
--                                              info_ptr->palette[i].blue,
--                                              info_ptr->palette[i].green,
--                                              info_ptr->palette[i].red,
-+                                              png_palette[i].blue,
-+                                              png_palette[i].green,
-+                                              png_palette[i].red,
-                                               0xFF); /* alpha */
-                       }
-               }
-+              png_get_tRNS (png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color);
-               /* Make sure transparency is respected. */
--              if (info_ptr->num_trans > 0) {
-+              if (num_trans > 0) {
-                       palette->Flags |= PaletteFlagsHasAlpha;
-                       colourspace_flag |= ImageFlagsHasAlpha;
--                      if (info_ptr->num_trans > info_ptr->num_palette) {
--                              info_ptr->num_trans = info_ptr->num_palette;
-+                      if (num_trans > png_num_palette) {
-+                              num_trans = png_num_palette;
-                       }
--                      for (i=0; i < info_ptr->num_trans; i++) {
-+                      for (i=0; i < num_trans; i++) {
-                               set_pixel_bgra(&palette->Entries[i], 0,
--                                              info_ptr->palette[i].blue,
--                                              info_ptr->palette[i].green,
--                                              info_ptr->palette[i].red,
-+                                              png_palette[i].blue,
-+                                              png_palette[i].green,
-+                                              png_palette[i].red,
- #if PNG_LIBPNG_VER > 10399
--                                              info_ptr->trans_alpha [i]); /* alpha */
-+                                              trans_alpha [i]); /* alpha */
- #else
-                                               info_ptr->trans[i]); /* alpha */
- #endif
-@@ -398,6 +411,8 @@ gdip_load_png_image_from_file_or_stream 
-               BYTE            bit_depth;
-               int             stride;
-               int             interlace;
-+              png_colorp      png_palette;
-+              int             png_num_palette;
-               png_bytep *row_pointers;
-               BYTE *rawptr;
-               int i, j;
-@@ -490,32 +505,33 @@ gdip_load_png_image_from_file_or_stream 
-                                                       png_byte palette = 0;
-                                                       png_byte pix = *rowp++;
-+                                                      png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette);
-                                                       palette = (pix >> 6) & 0x03;
-                                                       set_pixel_bgra (rawptr, 0,
--                                                              info_ptr->palette[palette].blue,
--                                                              info_ptr->palette[palette].green,
--                                                              info_ptr->palette[palette].red,
-+                                                              png_palette[palette].blue,
-+                                                              png_palette[palette].green,
-+                                                              png_palette[palette].red,
-                                                               0xFF); /* alpha */
-                                                       palette = (pix >> 4) & 0x03;
-                                                       set_pixel_bgra (rawptr, 4,
--                                                              info_ptr->palette[palette].blue,
--                                                              info_ptr->palette[palette].green,
--                                                              info_ptr->palette[palette].red,
-+                                                              png_palette[palette].blue,
-+                                                              png_palette[palette].green,
-+                                                              png_palette[palette].red,
-                                                               0xFF); /* alpha */
-                                                       palette = (pix >> 2) & 0x03;
-                                                       set_pixel_bgra (rawptr, 8,
--                                                              info_ptr->palette[palette].blue,
--                                                              info_ptr->palette[palette].green,
--                                                              info_ptr->palette[palette].red,
-+                                                              png_palette[palette].blue,
-+                                                              png_palette[palette].green,
-+                                                              png_palette[palette].red,
-                                                               0xFF); /* alpha */
-                                                       palette = pix & 0x03;
-                                                       set_pixel_bgra (rawptr, 12,
--                                                              info_ptr->palette[palette].blue,
--                                                              info_ptr->palette[palette].green,
--                                                              info_ptr->palette[palette].red,
-+                                                              png_palette[palette].blue,
-+                                                              png_palette[palette].green,
-+                                                              png_palette[palette].red,
-                                                               0xFF); /* alpha */
-                                                       rawptr += 16;
-                                               }
diff --git a/libgdiplus-link.patch b/libgdiplus-link.patch
deleted file mode 100644 (file)
index 67c3661..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN libgdiplus-1.1.18./cairo/configure.in libgdiplus-1.1.18/cairo/configure.in
---- libgdiplus-1.1.18./cairo/configure.in      2006-10-16 20:09:54.000000000 +0200
-+++ libgdiplus-1.1.18/cairo/configure.in       2006-10-16 20:10:56.746805587 +0200
-@@ -233,7 +233,7 @@
-                    if test "x$no_x" = xyes; then
-                      use_xlib="no (requires X development libraries)"
-                    else
--                     xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
-+                     xlib_NONPKGCONFIG_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
-                      xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
-                    fi])
- ])
diff --git a/libgdiplus-lt.patch b/libgdiplus-lt.patch
deleted file mode 100644 (file)
index dbf5a0f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
---- libgdiplus-1.9/cairo/configure.in.orig     2008-03-21 20:24:11.115153000 +0100
-+++ libgdiplus-1.9/cairo/configure.in  2008-03-21 20:50:21.340632725 +0100
-@@ -22,23 +22,23 @@
- # libtool shared library version
- # Increment if the interface has additions, changes, removals.
--LT_CURRENT=19
-+LTVER_CURRENT=19
- # Increment any time the source changes; set to
- # 0 if you increment CURRENT
--LT_REVISION=5
-+LTVER_REVISION=5
- # Increment if any interfaces have been added; set to 0
- # if any interfaces have been removed. removal has
- # precedence over adding, so set to 0 if both happened.
--LT_AGE=17
-+LTVER_AGE=17
- dnl ===========================================================================
--VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
-+VERSION_INFO="$LTVER_CURRENT:$LTVER_REVISION:$LTVER_AGE"
- AC_SUBST(VERSION_INFO)
--LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
-+LT_CURRENT_MINUS_AGE=`expr $LTVER_CURRENT - $LTVER_AGE`
- AC_SUBST(LT_CURRENT_MINUS_AGE)
- CAIRO_VERSION_MAJOR=cairo_version_major()
index 1b1a1f249852860ce9fddb63257edccc8e4a9122..c99353846522bd6c5f4c3831a423864b3327929c 100644 (file)
@@ -1,34 +1,26 @@
 #
 # Conditional build:
-%bcond_with    internal_cairo  # internal cairo 1.6.4 instead of system one
-%bcond_with    pango           # use pango for text rendering (experimental; system cairo only)
+%bcond_with    pango           # use pango for text rendering (experimental and unsupported)
 #
 # WARNING! libgdiplus will not work if compiled with -fomit-frame-pointer
 #
 Summary:       An Open Source implementation of the GDI+ API
 Summary(pl.UTF-8):     Otwarta implementacja API GDI+
 Name:          libgdiplus
-Version:       2.10.9
-Release:       2
-%if %{with internal_cairo}
-License:       LGPL v2.1 or MPL 1.1
-%else
-License:       MIT X11
-%endif
+Version:       3.6
+Release:       1
+License:       MIT
 Group:         Libraries
-# latest downloads summary at http://ftp.novell.com/pub/mono/sources-stable/
-Source0:       http://download.mono-project.com/sources/libgdiplus/%{name}-%{version}.tar.bz2
-# Source0-md5: b4615c14584b5d73cbb9757c28887654
-Patch0:                %{name}-link.patch
-Patch1:                %{name}-lt.patch
-Patch2:                %{name}-libpng.patch
+Source0:       http://download.mono-project.com/sources/libgdiplus/%{name}-%{version}.tar.gz
+# Source0-md5: c20ae43bdff075acadc7c345b20b7e02
+Patch0:                %{name}-giflib.patch
 URL:           http://www.mono-project.com/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake >= 1:1.7
-%{!?with_internal_cairo:BuildRequires: cairo-devel >= 1.6.4}
+BuildRequires: cairo-devel >= 1.6.4
 BuildRequires: fontconfig-devel
 BuildRequires: freetype-devel >= 2.0
-BuildRequires: giflib-devel
+BuildRequires: giflib-devel >= 5.1
 BuildRequires: glib2-devel >= 1:2.2.3
 BuildRequires: gtk+2-devel
 BuildRequires: libexif-devel
@@ -38,8 +30,9 @@ BuildRequires:        libtiff-devel
 BuildRequires: libtool
 %{?with_pango:BuildRequires:   pango-devel >= 1:1.10}
 BuildRequires: pkgconfig
-BuildRequires: xorg-lib-libXrender-devel
-%{!?with_internal_cairo:Requires:      cairo >= 1.6.4}
+BuildRequires: sed >= 4.0
+BuildRequires: xorg-lib-libX11-devel
+Requires:      cairo >= 1.6.4
 Requires:      glib2 >= 1:2.2.3
 %{?with_pango:Requires:        pango >= 1:1.10}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -61,7 +54,7 @@ Summary:      Development files for libgdiplus
 Summary(pl.UTF-8):     Pliki programistyczne libgdiplus
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-%{!?with_internal_cairo:Requires:      cairo-devel >= 1.4.12}
+Requires:      cairo-devel >= 1.6.4
 Requires:      fontconfig-devel
 Requires:      freetype-devel >= 2.0
 Requires:      giflib-devel
@@ -94,25 +87,17 @@ Statyczna biblioteka libgdiplus.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p0
-%{__sed} -e 's/png14/png/g' -i configure.in
 
-%build
-cd cairo
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-cd -
+# prefer default libpng instead of libpng14 > libpng12 > default
+%{__sed} -e 's/libpng14/libpng/g' -i configure.ac
 
+%build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
-       %{!?with_internal_cairo:--with-cairo=system} \
        %{?with_pango:--with-pango}
 
 %{__make}
This page took 0.152787 seconds and 4 git commands to generate.