mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-30 09:22:57 +02:00
libgdiplus: update to 4.2
This commit is contained in:
parent
688e7a409d
commit
6aaa3f55af
2 changed files with 5 additions and 136 deletions
|
@ -1,131 +0,0 @@
|
||||||
--- src/gifcodec.c
|
|
||||||
+++ 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;
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'libgdiplus'
|
# Template file for 'libgdiplus'
|
||||||
pkgname=libgdiplus
|
pkgname=libgdiplus
|
||||||
version=3.12
|
version=4.2
|
||||||
revision=1
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-cairo=system"
|
configure_args="--with-cairo=system"
|
||||||
|
@ -8,14 +8,14 @@ hostmakedepends="pkg-config"
|
||||||
makedepends="tiff-devel cairo-devel giflib-devel glib-devel libexif-devel libpng-devel"
|
makedepends="tiff-devel cairo-devel giflib-devel glib-devel libexif-devel libpng-devel"
|
||||||
short_desc="An Open Source Implementation of the GDI+ API"
|
short_desc="An Open Source Implementation of the GDI+ API"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="http://www.go-mono.org"
|
homepage="http://www.mono-project.com/"
|
||||||
license="LGPL-2, MPL"
|
license="LGPL-2.1, MPL-1.1, MIT"
|
||||||
distfiles="http://download.mono-project.com/sources/${pkgname}/$pkgname-$version.tar.gz"
|
distfiles="http://download.mono-project.com/sources/${pkgname}/$pkgname-$version.tar.gz"
|
||||||
checksum=e61c4dc1bc2ba993e4f79029472efcf5760eb9e60eb20d9cd31f0ebe9113bfc9
|
checksum=f332b9b8b44fd1c50b8d8d01a7296360b806c790b8297614739b3de1edbadfeb
|
||||||
|
|
||||||
libgdiplus-devel_package() {
|
libgdiplus-devel_package() {
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
depends="libgdiplus>=${version}_${revision}"
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
# the .so symlink is needed at runtime
|
# the .so symlink is needed at runtime
|
||||||
vmove "usr/lib/*.a"
|
vmove "usr/lib/*.a"
|
||||||
|
|
Loading…
Add table
Reference in a new issue