diff --git a/graphics/ufraw/Makefile b/graphics/ufraw/Makefile index 12aa87d0318d..6a991fb108c0 100644 --- a/graphics/ufraw/Makefile +++ b/graphics/ufraw/Makefile @@ -3,9 +3,8 @@ PORTNAME= ufraw PORTVERSION= 0.22 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= rodrigo@FreeBSD.org COMMENT= Read and manipulate raw images from various digital cameras @@ -14,15 +13,17 @@ LICENSE= GPLv2 LIB_DEPENDS= libtiff.so:graphics/tiff \ libpng.so:graphics/png \ - liblcms2.so:graphics/lcms2 + liblcms2.so:graphics/lcms2 \ + libjasper.so:graphics/jasper \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-extras -USES= desktop-file-utils gettext gmake jpeg pkgconfig +USES= gettext gmake jpeg pkgconfig autoreconf CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -lpthread -L${LOCALBASE}/lib -PC_FALSE= cinepaint OPTIONS_DEFINE= CONTRAST DST EXIV2 LENSFUN FITS GIMP GTK2 GNOME OPTIONS_DEFAULT=CONTRAST EXIV2 LENSFUN GTK2 @@ -33,6 +34,13 @@ DST_DESC= Use local time for timestamps FITS_DESC= FITS output support GIMP_DESC= Install GIMP plugin +USE_GITHUB= yes +GH_ACCOUNT= sergiomb2 +GH_PROJECT= ufraw +GH_TAGNAME= 6d3259a + +USE_GNOME+=glib20 gtk20 cairo gdkpixbuf2 + CONTRAST_CONFIGURE_ENABLE= contrast DST_CONFIGURE_ENABLE= dst-correction EXIV2_LIB_DEPENDS= libexiv2.so:graphics/exiv2 @@ -51,17 +59,12 @@ GNOME_USE= GNOME=gconf2 GNOME_CONFIGURE_ENABLE= mime GNOME_VARS= CATEGORIES+=gnome GCONF_SCHEMAS=${PORTNAME}.schemas -post-patch: - @${REINPLACE_CMD} -e '18s|^$$|#include |' \ - ${WRKSRC}/dcraw.h -# Fix GConf2 schemas installation path; unconditionalize installation of -# .desktop file; avoid conflict with `graphics/dcraw' (rename the binary) - @${REINPLACE_CMD} -e '/@schemasdir/s|datadir|sysconfdir| ; \ - /@app/s|@INSTALL_MIME_TRUE@|| ; \ - s|dcraw\$$(EXEEXT)|${PORTNAME}-&|' ${WRKSRC}/Makefile.in -.for i in ${PC_FALSE} - @${REINPLACE_CMD} -e '/PKG_CONFIG.*${i}/s|$$PKG_CONFIG|${FALSE}|' \ - ${WRKSRC}/configure -.endfor - +#post-patch: +# echo "START REPLACE" ; \ +# ${REINPLACE_CMD} -e '18s|^$$|#include |' \ +# ${WRKSRC}/dcraw.h +## Fix GConf2 schemas installation path; unconditionalize installation of +## .desktop file; avoid conflict with `graphics/dcraw' (rename the binary) +# ${REINPLACE_CMD} -e '/schemasdir/s|datadir|sysconfdir|' ${WRKSRC}/Makefile.am +# .include diff --git a/graphics/ufraw/distinfo b/graphics/ufraw/distinfo index 21babb99a0d9..7f81df2dd09f 100644 --- a/graphics/ufraw/distinfo +++ b/graphics/ufraw/distinfo @@ -1,2 +1,3 @@ -SHA256 (ufraw-0.22.tar.gz) = f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e -SIZE (ufraw-0.22.tar.gz) = 1103554 +TIMESTAMP = 1521620815 +SHA256 (sergiomb2-ufraw-0.22-6d3259a_GH0.tar.gz) = 4a3b415bf86c7cadc71350a8f0a206cef79bb3c22a6a794a9d9894d6bc7ec6dc +SIZE (sergiomb2-ufraw-0.22-6d3259a_GH0.tar.gz) = 870086 diff --git a/graphics/ufraw/files/patch-dcraw.cc b/graphics/ufraw/files/patch-dcraw.cc index 7539306af0a1..14ec6b243335 100644 --- a/graphics/ufraw/files/patch-dcraw.cc +++ b/graphics/ufraw/files/patch-dcraw.cc @@ -1,30 +1,23 @@ ---- dcraw.cc.orig 2015-06-16 03:58:38 UTC +--- dcraw.cc.orig 2018-04-03 22:16:35 UTC +++ dcraw.cc -@@ -9240,13 +9240,13 @@ canon_a5: - filters = 0x16161616; - } - if (make[0] == 'O') { -- i = find_green (12, 32, 1188864, 3576832); -- c = find_green (12, 32, 2383920, 2387016); -- if (abs(i) < abs(c)) { -- SWAP(i,c); -+ float g1 = find_green (12, 32, 1188864, 3576832); -+ float g2 = find_green (12, 32, 2383920, 2387016); -+ if (fabsf(g1) < fabsf(g2)) { -+ SWAP(g1,g2); - load_flags = 24; - } -- if ((int) i < 0) filters = 0x61616161; -+ if (g1 < 0) filters = 0x61616161; - } - } else if (fsize == 5869568) { - if (!timestamp && minolta_z2()) { -@@ -10073,7 +10073,7 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) - strncpy (th->desc, desc, 512); - strncpy (th->make, make, 64); - strncpy (th->model, model, 64); -- strcpy (th->soft, "dcraw v"DCRAW_VERSION); -+ strcpy (th->soft, "dcraw v" DCRAW_VERSION); - t = localtime (×tamp); - sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", - t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); +@@ -2287,7 +2287,7 @@ void CLASS quicktake_100_load_raw() + + void CLASS kodak_radc_load_raw() + { +- static const char src[] = { ++ static const signed char src[] = { + 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, + 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, + 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, +@@ -3017,7 +3017,10 @@ void CLASS smal_decode_segment (unsigned + diff = diff ? -diff : 0x80; + if (ftell(ifp) + 12 >= (int) seg[1][1]) + diff = 0; +- raw_image[pix] = pred[pix & 1] += diff; ++ if(pix>=raw_width*raw_height) ++ derror(); ++ else ++ raw_image[pix] = pred[pix & 1] += diff; + if (!(pix & 1) && HOLE(pix / raw_width)) pix += 2; + } + maximum = 0xff; diff --git a/graphics/ufraw/files/patch-ufraw__conf.c b/graphics/ufraw/files/patch-ufraw__conf.c new file mode 100644 index 000000000000..5b5ae6dd4d74 --- /dev/null +++ b/graphics/ufraw/files/patch-ufraw__conf.c @@ -0,0 +1,11 @@ +--- ufraw_conf.c.orig 2016-11-13 04:00:05 UTC ++++ ufraw_conf.c +@@ -138,7 +138,7 @@ const conf_data conf_default = { + #elif HAVE_GIMP_2_4 + "gimp", /* remoteGimpCommand */ + #else +- "gimp-remote", /* remoteGimpCommand */ ++ "gimp", /* remoteGimpCommand */ + #endif + + /* EXIF data */ diff --git a/graphics/ufraw/pkg-plist b/graphics/ufraw/pkg-plist index 877625230d2a..0f193a8c4a02 100644 --- a/graphics/ufraw/pkg-plist +++ b/graphics/ufraw/pkg-plist @@ -1,10 +1,8 @@ +bin/dcraw bin/nikon-curve +bin/ufraw bin/ufraw-batch -bin/ufraw-dcraw -%%GIMP%%libexec/gimp/2.2/plug-ins/ufraw-gimp man/man1/ufraw.1.gz -share/appdata/ufraw.appdata.xml -share/applications/ufraw.desktop share/locale/ca/LC_MESSAGES/ufraw.mo share/locale/cs/LC_MESSAGES/ufraw.mo share/locale/da/LC_MESSAGES/ufraw.mo @@ -25,4 +23,3 @@ share/locale/sv/LC_MESSAGES/ufraw.mo share/locale/zh_CN/LC_MESSAGES/ufraw.mo share/locale/zh_TW/LC_MESSAGES/ufraw.mo share/pixmaps/ufraw.png -%%GTK2%%bin/ufraw