diff options
author | Benjamin Trigona-Harany <bosth@alumni.sfu.ca> | 2017-01-31 06:46:50 -0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-04 06:59:48 +0700 |
commit | fab305b9726654183f5b6a00f7edb38ccd5f134c (patch) | |
tree | 4123e51d5fd361db535f59a68ea8121909e82c6a | |
parent | 715781980c820d7ed300e853e45fbdd0b560922b (diff) | |
download | slackbuilds-fab305b9726654183f5b6a00f7edb38ccd5f134c.tar.gz |
graphics/exact-image: Updated for version 0.9.2.
Signed-off-by: Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
-rw-r--r-- | graphics/exact-image/exact-image-giflib.patch | 139 | ||||
-rw-r--r-- | graphics/exact-image/exact-image-libpng15.patch | 109 | ||||
-rw-r--r-- | graphics/exact-image/exact-image.SlackBuild | 14 | ||||
-rw-r--r-- | graphics/exact-image/exact-image.info | 6 |
4 files changed, 7 insertions, 261 deletions
diff --git a/graphics/exact-image/exact-image-giflib.patch b/graphics/exact-image/exact-image-giflib.patch deleted file mode 100644 index f15c7ad717..0000000000 --- a/graphics/exact-image/exact-image-giflib.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- exact-image-0.8.9/codecs/gif.cc.orig 2010-03-03 22:04:44.000000000 +0100 -+++ exact-image-0.8.9/codecs/gif.cc 2014-10-20 16:45:48.021255431 +0200 -@@ -17,6 +17,12 @@ - - #include <gif_lib.h> - -+#if (GIFLIB_MAJOR > 5) || (GIFLIB_MINOR >= 1) -+#define Internal_EGifCloseFile(f) EGifCloseFile(f, NULL) -+#else -+#define Internal_EGifCloseFile(f) EGifCloseFile(f) -+#endif -+ - #include "gif.hh" - #include "Colorspace.hh" - -@@ -58,11 +64,11 @@ - GifRecordType RecordType; - GifByteType* Extension; - ColorMapObject *ColorMap = NULL; -- int ExtCode; -+ int ExtCode, GifError; - -- if ((GifFile = DGifOpen (stream, &GIFInputFunc)) == NULL) -+ if ((GifFile = DGifOpen (stream, &GIFInputFunc, &GifError)) == NULL) - { -- PrintGifError(); -+ std::cerr << "Error: " << GifErrorString(GifError) << std::endl; - return false; - } - -@@ -74,7 +80,7 @@ - /* Scan the content of the GIF file and load the image(s) in: */ - do { - if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetRecordType error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - -@@ -83,7 +89,7 @@ - switch (RecordType) { - case IMAGE_DESC_RECORD_TYPE: - if (DGifGetImageDesc(GifFile) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetImageDesc error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - -@@ -104,7 +110,7 @@ - j += InterlacedJumps[i]) { - if (DGifGetLine(GifFile, &image.getRawData()[j*image.stride()+Col], - Width) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetLine error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - } -@@ -113,7 +119,7 @@ - for (int i = 0; i < Height; ++i) { - if (DGifGetLine(GifFile, &image.getRawData()[Row++ * image.stride()+Col], - Width) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetLine error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - } -@@ -122,12 +128,12 @@ - case EXTENSION_RECORD_TYPE: - /* Skip any extension blocks in file: */ - if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetExtension error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - while (Extension != NULL) { - if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) { -- PrintGifError(); -+ std::cerr << "DGifGetExtensionNext error: " << GifErrorString(GifFile->Error) << std::endl; - return false; - } - } -@@ -155,7 +161,7 @@ - // convert colormap to our 16bit "TIFF"format - colorspace_de_palette (image, ColorMap->ColorCount, rmap, gmap, bmap); - -- EGifCloseFile(GifFile); -+ Internal_EGifCloseFile(GifFile); - - return true; - } -@@ -165,17 +171,18 @@ - { - GifFileType* GifFile; - GifByteType* Ptr; -+ int GifError; - -- if ((GifFile = EGifOpen (stream, &GIFOutputFunc)) == NULL) -+ if ((GifFile = EGifOpen (stream, &GIFOutputFunc, &GifError)) == NULL) - { -- std::cerr << "Error preparing GIF file for writing." << std::endl; -+ std::cerr << "Error preparing GIF file for writing: " << GifErrorString(GifError) << std::endl; - return false; - } - - int ColorMapSize = 256; - - // later use our own colormap generation -- ColorMapObject* OutputColorMap = MakeMapObject(ColorMapSize, NULL); -+ ColorMapObject* OutputColorMap = GifMakeMapObject(ColorMapSize, NULL); - if (!OutputColorMap) - return false; - -@@ -203,7 +210,7 @@ - } - - -- if (QuantizeBuffer(image.w, image.h, &ColorMapSize, -+ if (GifQuantizeBuffer(image.w, image.h, &ColorMapSize, - RedBuffer, GreenBuffer, BlueBuffer, - OutputBuffer, OutputColorMap->Colors) == GIF_ERROR) { - return false; -@@ -215,7 +222,7 @@ - if (EGifPutScreenDesc(GifFile, image.w, image.h, - ColorMapSize, 0, OutputColorMap) == GIF_ERROR || - EGifPutImageDesc(GifFile, 0, 0, image.w, image.h, -- FALSE, NULL) == GIF_ERROR) -+ false, NULL) == GIF_ERROR) - { - std::cerr << "Error writing GIF header." << std::endl; - return false; -@@ -234,7 +241,7 @@ - - delete (RedBuffer); delete (GreenBuffer); delete (BlueBuffer); - -- EGifCloseFile(GifFile); -+ Internal_EGifCloseFile(GifFile); - return true; - } - diff --git a/graphics/exact-image/exact-image-libpng15.patch b/graphics/exact-image/exact-image-libpng15.patch deleted file mode 100644 index ba9df19e81..0000000000 --- a/graphics/exact-image/exact-image-libpng15.patch +++ /dev/null @@ -1,109 +0,0 @@ -Description: Fix FTBFS with libpng 1.5 -Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> -Approved: Ralf Treinen <treinen@debian.org> -Bug-Debian: #635745 - ---- exactimage-0.8.5.orig/codecs/png.cc -+++ exactimage-0.8.5/codecs/png.cc -@@ -17,6 +17,7 @@ - - #include <stdlib.h> - #include <png.h> -+#include <zlib.h> - - #include <iostream> - -@@ -58,7 +59,7 @@ int PNGCodec::readImage (std::istream* s - png_structp png_ptr; - png_infop info_ptr; - png_uint_32 width, height; -- int bit_depth, color_type, interlace_type; -+ int bit_depth, color_type, interlace_type, num_trans; - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - NULL /*user_error_ptr*/, -@@ -71,7 +72,7 @@ int PNGCodec::readImage (std::istream* s - /* Allocate/initialize the memory for image information. REQUIRED. */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) { -- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); -+ png_destroy_read_struct(&png_ptr, NULL, NULL); - return 0; - } - -@@ -82,7 +83,7 @@ int PNGCodec::readImage (std::istream* s - - if (setjmp(png_jmpbuf(png_ptr))) { - /* Free all of the memory associated with the png_ptr and info_ptr */ -- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); -+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - /* If we get here, we had a problem reading the file */ - return 0; - } -@@ -99,13 +100,13 @@ int PNGCodec::readImage (std::istream* s - png_read_info (png_ptr, info_ptr); - - png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, -- &interlace_type, int_p_NULL, int_p_NULL); -+ &interlace_type, NULL, NULL); - - image.w = width; - image.h = height; - image.bps = bit_depth; -- image.spp = info_ptr->channels; -- -+ image.spp = png_get_channels(png_ptr, info_ptr); -+ - png_uint_32 res_x, res_y; - res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr); - res_y = png_get_y_pixels_per_meter(png_ptr, info_ptr); -@@ -119,11 +120,13 @@ int PNGCodec::readImage (std::istream* s - * (not useful if you are using png_set_packing). */ - // png_set_packswap(png_ptr); - -+ png_get_tRNS(png_ptr, info_ptr, NULL, &num_trans, NULL); -+ - /* Expand paletted colors into true RGB triplets */ - if (color_type == PNG_COLOR_TYPE_PALETTE) { - png_set_palette_to_rgb(png_ptr); - image.bps = 8; -- if (info_ptr->num_trans) -+ if (num_trans) - image.spp = 4; - else - image.spp = 3; -@@ -196,11 +199,11 @@ int PNGCodec::readImage (std::istream* s - for (int pass = 0; pass < number_passes; ++pass) - for (unsigned int y = 0; y < height; ++y) { - row_pointers[0] = image.getRawData() + y * stride; -- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1); -+ png_read_rows(png_ptr, row_pointers, NULL, 1); - } - - /* clean up after the read, and free any memory allocated - REQUIRED */ -- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); -+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - - /* that's it */ - return true; -@@ -224,7 +227,7 @@ bool PNGCodec::writeImage (std::ostream* - /* Allocate/initialize the memory for image information. REQUIRED. */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) { -- png_destroy_write_struct(&png_ptr, png_infopp_NULL); -+ png_destroy_write_struct(&png_ptr, NULL); - return false; - } - -@@ -244,8 +247,10 @@ bool PNGCodec::writeImage (std::ostream* - else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION; - png_set_compression_level(png_ptr, quality); - -+ /* Need? - png_info_init (info_ptr); -- -+ */ -+ - /* Set up our STL stream output control */ - png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data); - diff --git a/graphics/exact-image/exact-image.SlackBuild b/graphics/exact-image/exact-image.SlackBuild index 3cb540987b..790c5c8631 100644 --- a/graphics/exact-image/exact-image.SlackBuild +++ b/graphics/exact-image/exact-image.SlackBuild @@ -3,13 +3,13 @@ # Written by Benjamin Trigona-Harany <slackbuilds@jaxartes.net> PRGNAM=exact-image -VERSION=${VERSION:-0.9.1} +VERSION=${VERSION:-0.9.2} BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -20,8 +20,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -49,12 +49,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Patch to fix build with libpng16 (-current) (thanks to Debian) -patch -p1 --verbose < $CWD/exact-image-libpng15.patch - -# Patch to fix build with giflib-5.1 (-current) (thanks to PLD Linux) -patch -p1 --verbose < $CWD/exact-image-giflib.patch - # Patch to fix perl path eval $(perl -V:vendorlib) sed "s,@vendorlib@,$vendorlib,g" $CWD/fixup-perl_paths.diff | patch -p1 --verbose diff --git a/graphics/exact-image/exact-image.info b/graphics/exact-image/exact-image.info index 0a6098651e..0992dfa62a 100644 --- a/graphics/exact-image/exact-image.info +++ b/graphics/exact-image/exact-image.info @@ -1,8 +1,8 @@ PRGNAM="exact-image" -VERSION="0.9.1" +VERSION="0.9.2" HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/" -DOWNLOAD="http://dl.exactcode.de/oss/exact-image/exact-image-0.9.1.tar.bz2" -MD5SUM="864eddf488c309a02262f4e07b0fe319" +DOWNLOAD="http://dl.exactcode.de/oss/exact-image/exact-image-0.9.2.tar.bz2" +MD5SUM="bb9c8be82a4b5126be0224529ea7c4c7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="agg" |