From ac19b5f2e54b440dbb9ecee1773cb1b3fe4bf738 Mon Sep 17 00:00:00 2001 From: alihanozturk Date: Fri, 20 Nov 2015 23:54:11 +0200 Subject: [PATCH] libgdiplus:add pisi-2.0 and v.bump --- .../language/dotnet/libgdiplus/actions.py | 22 +++ .../files/libgdiplus0-giflib5.patch | 137 ++++++++++++++++++ .../language/dotnet/libgdiplus/pspec.xml | 97 +++++++++++++ .../dotnet/libgdiplus/translations.xml | 9 ++ 4 files changed, 265 insertions(+) create mode 100644 programming/language/dotnet/libgdiplus/actions.py create mode 100644 programming/language/dotnet/libgdiplus/files/libgdiplus0-giflib5.patch create mode 100644 programming/language/dotnet/libgdiplus/pspec.xml create mode 100644 programming/language/dotnet/libgdiplus/translations.xml diff --git a/programming/language/dotnet/libgdiplus/actions.py b/programming/language/dotnet/libgdiplus/actions.py new file mode 100644 index 0000000000..d5faefd858 --- /dev/null +++ b/programming/language/dotnet/libgdiplus/actions.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools + +def setup(): + pisitools.dosed("libgdiplus.pc.in", "libdir=@libdir@", "libdir=@libdir@\nlibjpeg_prefix=${exec_prefix}/lib -ljpeg -ljpeg") + autotools.configure() + + #pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.install() + + pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "LICENSE", "NEWS", "README", "TODO") diff --git a/programming/language/dotnet/libgdiplus/files/libgdiplus0-giflib5.patch b/programming/language/dotnet/libgdiplus/files/libgdiplus0-giflib5.patch new file mode 100644 index 0000000000..ccd4aa7fca --- /dev/null +++ b/programming/language/dotnet/libgdiplus/files/libgdiplus0-giflib5.patch @@ -0,0 +1,137 @@ +--- + src/gifcodec.c | 50 +++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 41 insertions(+), 9 deletions(-) + +Index: libgdiplus-2.10.9/src/gifcodec.c +=================================================================== +--- libgdiplus-2.10.9.orig/src/gifcodec.c ++++ libgdiplus-2.10.9/src/gifcodec.c +@@ -105,7 +112,7 @@ gdip_gif_inputfunc (GifFileType *gif, Gi + */ + + static int +-AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[]) ++AddExtensionBlockMono(SavedImage *New, int Len, int func, BYTE ExtData[]) + { + ExtensionBlock *ep; + +@@ -129,7 +136,7 @@ AddExtensionBlockMono(SavedImage *New, i + + if (ExtData) { + memcpy(ep->Bytes, ExtData, Len); +- ep->Function = New->Function; ++ ep->Function = func; + } + + return (GIF_OK); +@@ -232,20 +239,20 @@ DGifSlurpMono(GifFileType * GifFile, Sav + } + + case EXTENSION_RECORD_TYPE: { +- if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) { ++ int func; ++ if (DGifGetExtension(GifFile, &func, &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, func, ExtData[0], &ExtData[1]) == GIF_ERROR) { + return (GIF_ERROR); + } + + if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) { + return (GIF_ERROR); + } +- temp_save.Function = 0; + } + break; + } +@@ -303,12 +310,19 @@ gdip_load_gif_image (void *stream, GpIma + result = NULL; + loop_counter = FALSE; + ++#if GIFLIB_MAJOR < 5 + if (from_file) { + gif = DGifOpen(stream, &gdip_gif_fileinputfunc); + } else { + gif = DGifOpen (stream, &gdip_gif_inputfunc); + } +- ++#else ++ if (from_file) ++ gif = DGifOpen(stream, &gdip_gif_fileinputfunc, NULL); ++ else ++ gif = DGifOpen(stream, &gdip_gif_inputfunc, NULL); ++#endif ++ + if (gif == NULL) { + goto error; + } +@@ -581,7 +595,7 @@ gdip_load_gif_image (void *stream, GpIma + } + + FreeExtensionMono(&global_extensions); +- DGifCloseFile (gif); ++ DGifCloseFile (gif, NULL); + + *image = result; + return Ok; +@@ -597,7 +611,7 @@ error: + + if (gif != NULL) { + FreeExtensionMono (&global_extensions); +- DGifCloseFile (gif); ++ DGifCloseFile (gif, NULL); + } + + *image = NULL; +@@ -660,11 +674,22 @@ gdip_save_gif_image (void *stream, GpIma + return InvalidParameter; + } + ++#if GIFLIB_MAJOR < 5 + if (from_file) { + fp = EGifOpenFileName (stream, 0); + } else { + fp = EGifOpen (stream, gdip_gif_outputfunc); + } ++#else ++ if (from_file) ++ fp = EGifOpenFileName (stream, 0, NULL); ++ else ++ fp = EGifOpen (stream, gdip_gif_outputfunc, NULL); ++#define MakeMapObject GifMakeMapObject ++#define FreeMapObject GifFreeMapObject ++#define QuantizeBuffer GifQuantizeBuffer ++#define BitSize GifBitSize ++#endif + + if (!fp) { + return FileNotFound; +@@ -848,8 +873,15 @@ gdip_save_gif_image (void *stream, GpIma + Buffer[0] = 1; + Buffer[1] = ptr[0]; + Buffer[2] = ptr[1]; ++#if GIFLIB_MAJOR < 5 + EGifPutExtensionFirst(fp, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0"); + EGifPutExtensionLast(fp, APPLICATION_EXT_FUNC_CODE, 3, Buffer); ++#else ++ EGifPutExtensionLeader(fp, APPLICATION_EXT_FUNC_CODE); ++ EGifPutExtensionBlock(fp, 11, "NETSCAPE2.0"); ++ EGifPutExtensionBlock(fp, 3, Buffer); ++ EGifPutExtensionTrailer(fp); ++#endif + } + } + +@@ -923,7 +955,7 @@ gdip_save_gif_image (void *stream, GpIma + } + } + +- EGifCloseFile (fp); ++ EGifCloseFile (fp, NULL); + + return Ok; + diff --git a/programming/language/dotnet/libgdiplus/pspec.xml b/programming/language/dotnet/libgdiplus/pspec.xml new file mode 100644 index 0000000000..7161db7cb9 --- /dev/null +++ b/programming/language/dotnet/libgdiplus/pspec.xml @@ -0,0 +1,97 @@ + + + + + libgdiplus + http://www.mono-project.com + + PisiLinux Community + admins@pisilinux.org + + MIT + library + Library for using System.Drawing with Mono + Libgdiplus is an open source implementation of the GDI+ API. This is part of the Mono project. + http://download.mono-project.com/sources/libgdiplus/libgdiplus-3.12.tar.gz + + glib2-devel + cairo-devel + + + libgdiplus0-giflib5.patch + + + + + libgdiplus + + zlib + cairo + glib2 + libX11 + libpng + freetype + fontconfig + libXrender + + + /usr/lib + /usr/share/doc + + + + + libgdiplus-devel + + libgdiplus + + + /usr/lib/pkgconfig + + + + + + 2015-11-20 + 3.12 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2014-09-29 + 3.8 + Version bump. + Serdar Soytetir + kaptan@pisilinux.org + + + 2014-07-05 + 2.10.9 + split package + Osman Erkan + osman.erkan@gmail.com + + + 2014-05-22 + 2.10.9 + add freetype patch + Kamil Atlı + suvarice@gmail.com + + + 2014-01-29 + 2.10.9 + add giflib patch + Yusuf Aydemir + yusuf.aydemir@pisilinux.org + + + 2012-10-19 + 2.10.9 + First release + Marcin Bojara + marcin@pisilinux.org + + + diff --git a/programming/language/dotnet/libgdiplus/translations.xml b/programming/language/dotnet/libgdiplus/translations.xml new file mode 100644 index 0000000000..cccba9327d --- /dev/null +++ b/programming/language/dotnet/libgdiplus/translations.xml @@ -0,0 +1,9 @@ + + + + libgdiplus + Mono ile System.Drawing kullanmak için gerekli kitaplığı + Librairie pour utiliser System.Drawing avec Mono. + Libgdiplus, GDI+ API'sinin açık kaynak uygulamasıdır ve aynı zamanda Mono Projesi'nin bir parçası olarak geliştirilmektedir. + +