- Fix build on 12.0-CURRENT, patch was accepted by upstream:

https://sourceforge.net/p/ufraw/bugs/407/
- Convert to options subs and helpers
- Mark GTK2 option as implied for GIMP, otherwise poudriere build fails

PR:		211735
Submitted by:	myself
Approved by:	maintainer timeout
This commit is contained in:
Pawel Pekala
2016-08-25 14:53:19 +00:00
parent ca3ad096d7
commit 21dd06f93f
3 changed files with 40 additions and 52 deletions

View File

@@ -26,63 +26,30 @@ PC_FALSE= cinepaint
OPTIONS_DEFINE= CONTRAST DST EXIV2 LENSFUN FITS GIMP GTK2 GNOME
OPTIONS_DEFAULT=CONTRAST EXIV2 LENSFUN GTK2
OPTIONS_SUB= yes
CONTRAST_DESC= Enable contrast setting option
DST_DESC= Use local time for timestamps
FITS_DESC= FITS output support
GIMP_DESC= Install GIMP plugin
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCONTRAST}
CONFIGURE_ARGS+= --enable-contrast
.endif
.if ${PORT_OPTIONS:MDST}
CONFIGURE_ARGS+= --enable-dst-correction
.endif
.if ${PORT_OPTIONS:MEXIV2}
LIB_DEPENDS+= libexiv2.so:graphics/exiv2
.else
PC_FALSE+= exiv2
.endif
.if ${PORT_OPTIONS:MLENSFUN}
LIB_DEPENDS+= liblensfun.so:graphics/lensfun
.else
PC_FALSE+= lensfun
.endif
.if ${PORT_OPTIONS:MFITS}
LIB_DEPENDS+= libcfitsio.so:astro/cfitsio
.else
PC_FALSE+= cfitsio
.endif
.if ${PORT_OPTIONS:MGIMP}
LIB_DEPENDS+= libgimp-2.0.so:graphics/gimp-app
PLIST_SUB+= GIMP=""
.else
CONFIGURE_ARGS+=--without-gimp
PC_FALSE+= gimp
PLIST_SUB+= GIMP="@comment "
.endif
.if ${PORT_OPTIONS:MGTK2}
LIB_DEPENDS+= libgtkimageview.so:x11-toolkits/gtkimageview
PLIST_SUB+= MGTK2=""
.else
PLIST_SUB+= MGTK2="@comment "
CONFIGURE_ARGS+=--without-gtk
.endif
.if ${PORT_OPTIONS:MGNOME}
CATEGORIES+= gnome
USE_GNOME= gconf2
CONFIGURE_ARGS+= --enable-mime
GCONF_SCHEMAS= ${PORTNAME}.schemas
.endif
CONTRAST_CONFIGURE_ENABLE= contrast
DST_CONFIGURE_ENABLE= dst-correction
EXIV2_LIB_DEPENDS= libexiv2.so:graphics/exiv2
EXIV2_VARS_OFF= PC_FALSE+=exiv2
LENSFUN_LIB_DEPENDS= liblensfun.so:graphics/lensfun
LENSFUN_VARS_OFF= PC_FALSE+=lensfun
FITS_LIB_DEPENDS= libcfitsio.so:astro/cfitsio
FITS_VARS_OFF= PC_FALSE+=cfitsio
GIMP_LIB_DEPENDS= libgimp-2.0.so:graphics/gimp-app
GIMP_CONFIGURE_WITH= gimp
GIMP_VARS_OFF= PC_FALSE+=gimp
GIMP_IMPLIES= GTK2
GTK2_LIB_DEPENDS= libgtkimageview.so:x11-toolkits/gtkimageview
GTK2_CONFIGURE_WITH= gtk
GNOME_USE= GNOME=gconf2
GNOME_CONFIGURE_ENABLE= mime
GNOME_VARS= CATEGORIES+=gnome GCONF_SCHEMAS=${PORTNAME}.schemas
post-patch:
@${REINPLACE_CMD} -e '18s|^$$|#include <sys/types.h>|' \

View File

@@ -0,0 +1,21 @@
--- dcraw.cc.orig 2015-06-16 03:58:38 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()) {

View File

@@ -25,4 +25,4 @@ 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
%%MGTK2%%bin/ufraw
%%GTK2%%bin/ufraw