summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2016-01-13 13:04:28 +0800
committerIan Delaney <idella4@gentoo.org>2016-01-13 13:05:03 +0800
commit4330b52986b655353b9aa63d7479537a9beee9f1 (patch)
treefbda5ab4f0cd148a90bbc5a5a3d77fb52b034ded /app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch
parentgames-fps/ut2004-action: EAPI=5 (diff)
downloadgentoo-4330b52986b655353b9aa63d7479537a9beee9f1.tar.gz
gentoo-4330b52986b655353b9aa63d7479537a9beee9f1.tar.bz2
gentoo-4330b52986b655353b9aa63d7479537a9beee9f1.zip
app-office/magicpoint: bump to vn. 1.13a_p20121015, a snapshot
ebuild prepared, with support, by user Peter Stuge, now entered as the proxy maintainer under the proxy-maintainers herd in metadata. Also new use flag 'contrib' added to metadata, ebuild and patches submitted all vua the gentoo bug, though the package remains pmasked for removal. Yet to be negotiated with pertinent devs Gentoo bug: #486248 Package-Manager: portage-2.2.26
Diffstat (limited to 'app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch')
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch140
1 files changed, 140 insertions, 0 deletions
diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch
new file mode 100644
index 000000000000..0e7903a8dcf0
--- /dev/null
+++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch
@@ -0,0 +1,140 @@
+--- kit.orig/image/gif.c 2000-03-07 07:59:56.000000000 +0100
++++ kit/image/gif.c 2016-01-12 17:35:49.792443794 +0100
+@@ -18,6 +18,18 @@
+ #include "image.h"
+ #include <gif_lib.h>
+
++static void stderrGifError(GifFileType *gifp, int e) {
++#if defined(GIFLIB_MAJOR) /* added in 4.2.0 along with GifError{,String}() */
++# if GIFLIB_MAJOR >= 5
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString(gifp ? gifp->Error : e));
++# else
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
++# endif
++#else
++ PrintGifError();
++#endif
++}
++
+ static void
+ tellAboutImage(name, gifp)
+ char *name;
+@@ -49,10 +61,17 @@
+ GifFileType *GifFile;
+ ColorMapObject *ColorMap;
+ GifColorType *ColorMapEntry;
++ int gerr = 0;
+
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ GifFile = DGifOpenFileName(fullname, &gerr);
++#else
+ GifFile = DGifOpenFileName(fullname);
+- if (GifFile == NULL)
++#endif
++ if (GifFile == NULL) {
++ stderrGifError(GifFile, gerr);
+ return NULL;
++ }
+
+ if ((ScreenBuffer = (GifRowType *)
+ malloc(GifFile->SHeight * sizeof(GifRowType *))) == NULL) {
+@@ -87,13 +106,13 @@
+ /* Scan the content of the GIF file and load the image(s) in: */
+ do {
+ if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ switch (RecordType) {
+ case IMAGE_DESC_RECORD_TYPE:
+ if (DGifGetImageDesc(GifFile) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ Row = GifFile->Image.Top; /* Image Position relative to Screen. */
+@@ -113,7 +132,7 @@
+ j += InterlacedJumps[i]) {
+ if (DGifGetLine(GifFile, &ScreenBuffer[j][Col],
+ Width) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ }
+@@ -122,7 +141,7 @@
+ for (i = 0; i < Height; i++) {
+ if (DGifGetLine(GifFile, &ScreenBuffer[Row++][Col],
+ Width) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ }
+@@ -131,7 +150,7 @@
+ case EXTENSION_RECORD_TYPE:
+ /* Skip any extension blocks in file: */
+ if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ /* very adhoc transparency support */
+@@ -141,7 +160,7 @@
+ }
+ while (Extension != NULL) {
+ if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) {
+- PrintGifError();
++ stderrGifError(GifFile, 0);
+ exit(-1);
+ }
+ }
+@@ -179,8 +198,21 @@
+ pixline[x] = GifRow[x];
+ }
+
++#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
++ if (DGifCloseFile(GifFile, &gerr) == GIF_ERROR) {
++ stderrGifError(NULL, gerr);
++#else
+ if (DGifCloseFile(GifFile) == GIF_ERROR) {
+- PrintGifError();
++# if defined(GIFLIB_MAJOR)
++# if GIFLIB_MAJOR >= 5
++ stderrGifError(GifFile, 0);
++# else
++ stderrGifError(NULL, GifError());
++# endif
++# else
++ stderrGifError(NULL, 0);
++# endif
++#endif
+ exit(-1);
+ }
+
+@@ -195,12 +227,22 @@
+ {
+ GifFileType *gifp;
+ int ret;
++ int gerr = 0;
+
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ gifp = DGifOpenFileName(fullname, &gerr);
++#else
+ gifp = DGifOpenFileName(fullname);
+- if (gifp == NULL)
++#endif
++ if (gifp == NULL) {
++ stderrGifError(gifp, gerr);
+ ret = 0;
+- else {
++ } else {
++#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
++ DGifCloseFile(gifp, &gerr);
++#else
+ DGifCloseFile(gifp);
++#endif
+ tellAboutImage(name);
+ ret = 1;
+ }