From 957e31fc8bf8564778273e5ef1f1ffa1d51274d7 Mon Sep 17 00:00:00 2001 From: Nishant Limbachia Date: Fri, 14 Aug 2015 07:27:44 +0700 Subject: graphics/rawstudio: Patched for newer lensfun. Signed-off-by: Willy Sudiarto Raharjo --- graphics/rawstudio/patches/lensfun03.patch | 11 ++++++++ graphics/rawstudio/patches/libpng15.patch | 40 ++++++++++++++++++++++++++++++ graphics/rawstudio/rawstudio.SlackBuild | 28 +++++++++++++++------ graphics/rawstudio/rawstudio.info | 8 +++--- 4 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 graphics/rawstudio/patches/lensfun03.patch create mode 100644 graphics/rawstudio/patches/libpng15.patch (limited to 'graphics/rawstudio') diff --git a/graphics/rawstudio/patches/lensfun03.patch b/graphics/rawstudio/patches/lensfun03.patch new file mode 100644 index 0000000000..ee2f3554e7 --- /dev/null +++ b/graphics/rawstudio/patches/lensfun03.patch @@ -0,0 +1,11 @@ +--- a/plugins/lensfun/lensfun.c ++++ b/plugins/lensfun/lensfun.c +@@ -668,7 +668,7 @@ get_image(RSFilter *filter, const RSFilterRequest *request) + } + + /* Start threads to apply phase 2, Vignetting and CA Correction */ +- if (effective_flags & (LF_MODIFY_VIGNETTING | LF_MODIFY_CCI)) ++ if (effective_flags & LF_MODIFY_VIGNETTING) + { + /* Phase 2 is corrected inplace, so copy input first */ + guint y_offset, y_per_thread, threaded_h; diff --git a/graphics/rawstudio/patches/libpng15.patch b/graphics/rawstudio/patches/libpng15.patch new file mode 100644 index 0000000000..f83e82de85 --- /dev/null +++ b/graphics/rawstudio/patches/libpng15.patch @@ -0,0 +1,40 @@ +diff -wbBur rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp +--- rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp 2011-02-24 01:35:18.000000000 +0300 ++++ rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp 2012-01-23 15:03:22.000000000 +0400 +@@ -102,8 +102,8 @@ + { + *linear_guess = FALSE; + RSColorSpace* profile = NULL; +- const gchar *icc_profile_title; +- const gchar *icc_profile; ++ png_charp icc_profile_title; ++ png_bytep icc_profile; + guint icc_profile_size; + png_structp png_ptr = png_create_read_struct( + PNG_LIBPNG_VER_STRING, +@@ -125,11 +125,11 @@ + + int compression_type; + /* Extract embedded ICC profile */ +- if (info_ptr->valid & PNG_INFO_iCCP) ++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) + { + png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, +- (png_charpp) &icc_profile_title, &compression_type, +- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size); ++ &icc_profile_title, &compression_type, ++ &icc_profile, (png_uint_32*) &icc_profile_size); + if (retval != 0) + { + RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE); +diff -wbBur rawstudio-2.0/plugins/output-pngfile/output-pngfile.c rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c +--- rawstudio-2.0/plugins/output-pngfile/output-pngfile.c 2011-03-26 04:52:29.000000000 +0300 ++++ rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c 2012-01-23 15:04:59.000000000 +0400 +@@ -23,6 +23,7 @@ + #include + #include "config.h" + #include ++#include + + #define RS_TYPE_PNGFILE (rs_pngfile_type) + #define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile)) \ No newline at end of file diff --git a/graphics/rawstudio/rawstudio.SlackBuild b/graphics/rawstudio/rawstudio.SlackBuild index 38abc69ae6..3c16761bc7 100644 --- a/graphics/rawstudio/rawstudio.SlackBuild +++ b/graphics/rawstudio/rawstudio.SlackBuild @@ -3,7 +3,8 @@ # Slackware Package Build Script for rawstudio # Home Page http://rawstudio.org/ -# Copyright (c) 2007-2011, Nishant Limbachia, Hoffman Estates, IL, USA (nishant _AT_ mnspace _DOT_ net) +# Copyright (c) 2007-2015, Nishant Limbachia, Hoffman Estates, IL, USA +# (nishant _AT_ mnspace _DOT_ net) # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -29,7 +30,7 @@ PRGNAM="rawstudio" VERSION=${VERSION:-2.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -64,19 +65,29 @@ set -e rm -fr $TMP/$PRGNAM-$VERSION $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root.root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Add libgthread-2.0.so to linked-in library list find . -name "Makefile.in" -exec \ sed -i "s,@PACKAGE_LIBS@,@PACKAGE_LIBS@ -lgthread-2.0,g" {} \; +# Patches shamelessly copied from Arch Linux PKGBUILD: +# https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/rawstudio + +# Patch to use lensfun > 0.3 +patch -p1 < $CWD/patches/lensfun03.patch + +# Patch to use libpng > 1.5. This patch is only useful on -current and will need to +# be applied once -current releases. Uncomment if you are building on -current +#patch -p1 < $CWD/patches/libpng15.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -85,12 +96,13 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --mandir=/usr/man \ + --enable-static=no \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/graphics/rawstudio/rawstudio.info b/graphics/rawstudio/rawstudio.info index decba94be1..ae0face6fa 100644 --- a/graphics/rawstudio/rawstudio.info +++ b/graphics/rawstudio/rawstudio.info @@ -1,10 +1,10 @@ PRGNAM="rawstudio" VERSION="2.0" -HOMEPAGE="http://rawstudio.org/" -DOWNLOAD="http://rawstudio.org/files/release/rawstudio-2.0.tar.gz" -MD5SUM="b2f86b8ca6b83ad954e3104c4cb89e9b" +HOMEPAGE="http://rawstudio.org" +DOWNLOAD="https://www.dropbox.com/s/9msuzeooe5w7tiq/rawstudio-2.0.tar.xz" +MD5SUM="10c8305dbf73a616f7ab414009fb5455" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="flickcurl lensfun-legacy" +REQUIRES="flickcurl lensfun" MAINTAINER="Nishant Limbachia" EMAIL="nishant@mnspace.net" -- cgit v1.2.3