libgdiplus:add pisi-2.0 and v.bump
This commit is contained in:
@@ -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")
|
||||||
@@ -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;
|
||||||
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||||
|
<PISI>
|
||||||
|
<Source>
|
||||||
|
<Name>libgdiplus</Name>
|
||||||
|
<Homepage>http://www.mono-project.com</Homepage>
|
||||||
|
<Packager>
|
||||||
|
<Name>PisiLinux Community</Name>
|
||||||
|
<Email>admins@pisilinux.org</Email>
|
||||||
|
</Packager>
|
||||||
|
<License>MIT</License>
|
||||||
|
<IsA>library</IsA>
|
||||||
|
<Summary>Library for using System.Drawing with Mono</Summary>
|
||||||
|
<Description>Libgdiplus is an open source implementation of the GDI+ API. This is part of the Mono project.</Description>
|
||||||
|
<Archive sha1sum="7f7d2b82c0d755bb854fd76d0d62120cdde35d8c" type="targz">http://download.mono-project.com/sources/libgdiplus/libgdiplus-3.12.tar.gz</Archive>
|
||||||
|
<BuildDependencies>
|
||||||
|
<Dependency>glib2-devel</Dependency>
|
||||||
|
<Dependency>cairo-devel</Dependency>
|
||||||
|
</BuildDependencies>
|
||||||
|
<Patches>
|
||||||
|
<Patch level="1">libgdiplus0-giflib5.patch</Patch>
|
||||||
|
</Patches>
|
||||||
|
</Source>
|
||||||
|
|
||||||
|
<Package>
|
||||||
|
<Name>libgdiplus</Name>
|
||||||
|
<RuntimeDependencies>
|
||||||
|
<Dependency>zlib</Dependency>
|
||||||
|
<Dependency>cairo</Dependency>
|
||||||
|
<Dependency>glib2</Dependency>
|
||||||
|
<Dependency>libX11</Dependency>
|
||||||
|
<Dependency>libpng</Dependency>
|
||||||
|
<Dependency>freetype</Dependency>
|
||||||
|
<Dependency>fontconfig</Dependency>
|
||||||
|
<Dependency>libXrender</Dependency>
|
||||||
|
</RuntimeDependencies>
|
||||||
|
<Files>
|
||||||
|
<Path fileType="library">/usr/lib</Path>
|
||||||
|
<Path fileType="doc">/usr/share/doc</Path>
|
||||||
|
</Files>
|
||||||
|
</Package>
|
||||||
|
|
||||||
|
<Package>
|
||||||
|
<Name>libgdiplus-devel</Name>
|
||||||
|
<RuntimeDependencies>
|
||||||
|
<Dependency release="current">libgdiplus</Dependency>
|
||||||
|
</RuntimeDependencies>
|
||||||
|
<Files>
|
||||||
|
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||||
|
</Files>
|
||||||
|
</Package>
|
||||||
|
|
||||||
|
<History>
|
||||||
|
<Update release="6">
|
||||||
|
<Date>2015-11-20</Date>
|
||||||
|
<Version>3.12</Version>
|
||||||
|
<Comment>Version bump.</Comment>
|
||||||
|
<Name>Alihan Öztürk</Name>
|
||||||
|
<Email>alihan@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
|
<Update release="5">
|
||||||
|
<Date>2014-09-29</Date>
|
||||||
|
<Version>3.8</Version>
|
||||||
|
<Comment>Version bump.</Comment>
|
||||||
|
<Name>Serdar Soytetir</Name>
|
||||||
|
<Email>kaptan@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
|
<Update release="4">
|
||||||
|
<Date>2014-07-05</Date>
|
||||||
|
<Version>2.10.9</Version>
|
||||||
|
<Comment>split package</Comment>
|
||||||
|
<Name>Osman Erkan</Name>
|
||||||
|
<Email>osman.erkan@gmail.com</Email>
|
||||||
|
</Update>
|
||||||
|
<Update release="3">
|
||||||
|
<Date>2014-05-22</Date>
|
||||||
|
<Version>2.10.9</Version>
|
||||||
|
<Comment>add freetype patch</Comment>
|
||||||
|
<Name>Kamil Atlı</Name>
|
||||||
|
<Email>suvarice@gmail.com</Email>
|
||||||
|
</Update>
|
||||||
|
<Update release="2">
|
||||||
|
<Date>2014-01-29</Date>
|
||||||
|
<Version>2.10.9</Version>
|
||||||
|
<Comment>add giflib patch</Comment>
|
||||||
|
<Name>Yusuf Aydemir</Name>
|
||||||
|
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
|
<Update release="1">
|
||||||
|
<Date>2012-10-19</Date>
|
||||||
|
<Version>2.10.9</Version>
|
||||||
|
<Comment>First release</Comment>
|
||||||
|
<Name>Marcin Bojara</Name>
|
||||||
|
<Email>marcin@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
|
</History>
|
||||||
|
</PISI>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<PISI>
|
||||||
|
<Source>
|
||||||
|
<Name>libgdiplus</Name>
|
||||||
|
<Summary xml:lang="tr">Mono ile System.Drawing kullanmak için gerekli kitaplığı</Summary>
|
||||||
|
<Summary xml:lang="fr">Librairie pour utiliser System.Drawing avec Mono.</Summary>
|
||||||
|
<Description xml:lang="tr">Libgdiplus, GDI+ API'sinin açık kaynak uygulamasıdır ve aynı zamanda Mono Projesi'nin bir parçası olarak geliştirilmektedir.</Description>
|
||||||
|
</Source>
|
||||||
|
</PISI>
|
||||||
Reference in New Issue
Block a user