From 78d8421b49600081fe52126eb6e363716cd9d70d Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Feb 11 2018 22:48:14 +0000 Subject: Rebuild (giflib) --- diff --git a/MagicPoint.spec b/MagicPoint.spec index 23614bb..e7e42ef 100644 --- a/MagicPoint.spec +++ b/MagicPoint.spec @@ -1,6 +1,6 @@ Name: MagicPoint Version: 1.13a -Release: 19%{?dist} +Release: 20%{?dist} Summary: X based presentation software Group: Applications/Productivity License: BSD @@ -14,8 +14,12 @@ Patch4: magicpoint-1.13a-xwintoppm.patch Patch5: magicpoint-1.13a-m17n.patch Patch6: magicpoint-1.13a-mng.patch Patch7: magicpoint-1.13a-honor-cflags-for-unimap.patch +# giflib-5.x compatibility +Patch8: magicpoint-1.13a-giflib5.patch +# libpng > 1.5.0 compatibility +Patch9: magicpoint-1.13a-libpng.patch BuildRequires: giflib-devel libpng-devel libmng-devel fontconfig-devel -BuildRequires: imlib-devel libXmu-devel libXft-devel m17n-lib-devel +BuildRequires: imlib2-devel libXmu-devel libXft-devel m17n-lib-devel BuildRequires: imake bison flex perl-interpreter perl-generators sharutils Requires: sharutils Obsoletes: mgp < %{version}-%{release}, magicpoint < %{version}-%{release} @@ -37,6 +41,8 @@ create presentation files quickly with your favorite editor. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build @@ -64,6 +70,10 @@ rm sample/.cvsignore sample/*akefile* %changelog +* Sun Feb 11 2018 Sandro Mani - 1.13a-20 +- Rebuild (giflib) +- Switch to imlib2 + * Wed Feb 07 2018 Fedora Release Engineering - 1.13a-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/magicpoint-1.13a-giflib5.patch b/magicpoint-1.13a-giflib5.patch new file mode 100644 index 0000000..3d2c04c --- /dev/null +++ b/magicpoint-1.13a-giflib5.patch @@ -0,0 +1,105 @@ +diff -rupN magicpoint-1.13a/image/gif.c magicpoint-1.13a-new/image/gif.c +--- magicpoint-1.13a/image/gif.c 2018-01-23 00:03:20.104053476 +0100 ++++ magicpoint-1.13a-new/image/gif.c 2018-02-11 23:45:01.983204432 +0100 +@@ -32,6 +32,14 @@ static int InterlacedOffset[] = { 0, 4, + /* be read - offsets and jumps... */ + static int InterlacedJumps[] = { 8, 8, 4, 2 }; + ++static void printGifError(int errorCode) ++{ ++ const char* giflib_error_str = (const char*) GifErrorString(errorCode); ++ if (giflib_error_str == NULL) ++ giflib_error_str = "Unknown error"; ++ fprintf(stderr, "GIFLIB: %s\n", giflib_error_str); ++} ++ + Image * + gifLoad(fullname, name, verbose) + char *fullname, *name; +@@ -50,7 +58,7 @@ gifLoad(fullname, name, verbose) + ColorMapObject *ColorMap; + GifColorType *ColorMapEntry; + +- GifFile = DGifOpenFileName(fullname); ++ GifFile = DGifOpenFileName(fullname, NULL); + if (GifFile == NULL) + return NULL; + +@@ -87,13 +95,13 @@ gifLoad(fullname, name, verbose) + /* Scan the content of the GIF file and load the image(s) in: */ + do { + if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + switch (RecordType) { + case IMAGE_DESC_RECORD_TYPE: + if (DGifGetImageDesc(GifFile) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + Row = GifFile->Image.Top; /* Image Position relative to Screen. */ +@@ -113,7 +121,7 @@ gifLoad(fullname, name, verbose) + j += InterlacedJumps[i]) { + if (DGifGetLine(GifFile, &ScreenBuffer[j][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + } +@@ -122,7 +130,7 @@ gifLoad(fullname, name, verbose) + for (i = 0; i < Height; i++) { + if (DGifGetLine(GifFile, &ScreenBuffer[Row++][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + } +@@ -131,7 +139,7 @@ gifLoad(fullname, name, verbose) + case EXTENSION_RECORD_TYPE: + /* Skip any extension blocks in file: */ + if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + /* very adhoc transparency support */ +@@ -141,7 +149,7 @@ gifLoad(fullname, name, verbose) + } + while (Extension != NULL) { + if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ printGifError(GifFile->Error); + exit(-1); + } + } +@@ -179,8 +187,8 @@ gifLoad(fullname, name, verbose) + pixline[x] = GifRow[x]; + } + +- if (DGifCloseFile(GifFile) == GIF_ERROR) { +- PrintGifError(); ++ if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) { ++ printGifError(GifFile->Error); + exit(-1); + } + +@@ -196,12 +204,12 @@ gifIdent(fullname, name) + GifFileType *gifp; + int ret; + +- gifp = DGifOpenFileName(fullname); ++ gifp = DGifOpenFileName(fullname, NULL); + if (gifp == NULL) + ret = 0; + else { + tellAboutImage(name, gifp); +- DGifCloseFile(gifp); ++ DGifCloseFile(gifp, NULL); + ret = 1; + } + return ret; diff --git a/magicpoint-1.13a-libpng.patch b/magicpoint-1.13a-libpng.patch new file mode 100644 index 0000000..1618574 --- /dev/null +++ b/magicpoint-1.13a-libpng.patch @@ -0,0 +1,21 @@ +diff -rupN magicpoint-1.13a/image/png.c magicpoint-1.13a-new/image/png.c +--- magicpoint-1.13a/image/png.c 2018-01-23 00:03:20.105053476 +0100 ++++ magicpoint-1.13a-new/image/png.c 2018-02-11 23:25:03.603270718 +0100 +@@ -86,7 +86,7 @@ pngLoad(fullname, name, verbose) + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + fclose(fp); + return NULL; +@@ -134,7 +134,7 @@ pngLoad(fullname, name, verbose) + } + + if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 8){ +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + } + + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)){