ports/175007: [PATCH] graphics/xsane: OptionsNG, ajdust dependencies, take maintainership
nemysis
nemysis at gmx.ch
Sat Jan 5 13:50:00 UTC 2013
>Number: 175007
>Category: ports
>Synopsis: [PATCH] graphics/xsane: OptionsNG, ajdust dependencies, take maintainership
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 05 13:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: nemysis
>Release: FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC
>Description:
- Take maintainership
Makefile changed:
-#SUB_FILES+= pkg-message <-- removed not used sub files
+OPTIONS_DEFINE= GTK2 GIMP
+.include <bsd.port.options.mk>
Changed and refined:
+LIB_DEPENDS=
+BUILD_DEPENDS= scanimage:${PORTSDIR}/graphics/sane-backends
+RUN_DEPENDS:= ${BUILD_DEPENDS}
post-install:
files/pkg-message.in
Generated and tested manually, tested with port test, sent with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
Have used patch for graphics/sane-backends to clean install XSane
ports/174961: graphics/xsane fails to compile
portlint -A
WARN: Makefile: [65]: use ${VARIABLE}, instead of $(VARIABLE).
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
0 fatal errors and 3 warnings found.
WARN: Makefile: [65]: because is used
-i "" -e 's|\$$(DESTDIR)\$$(sbindir)||g'
port test: clean
>Fix:
--- xsane-0.998_3.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/graphics/xsane/Makefile ./Makefile
--- /usr/ports/graphics/xsane/Makefile 2012-12-29 12:16:53.000000000 +0100
+++ ./Makefile 2013-01-05 14:38:47.000000000 +0100
@@ -3,19 +3,20 @@
PORTNAME= xsane
PORTVERSION= 0.998
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics
MASTER_SITES= http://www.xsane.org/download/ \
http://gd.tuwien.ac.at/hci/sane/xsane/ \
ftp://ftp.mostang.com/pub/sane/xsane/
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= nemysis at gmx.ch
COMMENT= Gtk-based X11 frontend for SANE (Scanner Access Now Easy)
-LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png \
- tiff.4:${PORTSDIR}/graphics/tiff \
- sane.1:${PORTSDIR}/graphics/sane-backends
+ tiff:${PORTSDIR}/graphics/tiff
+BUILD_DEPENDS= scanimage:${PORTSDIR}/graphics/sane-backends
+RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -25,40 +26,37 @@
MAN1= xsane.1
-#SUB_FILES+= pkg-message
+OPTIONS_DEFINE= GTK2 GIMP
-OPTIONS= GTK2 "Enable GTK2 support (use GTK1 if turned off)" on \
- GIMP "Enable GIMP plugin support" off \
- NLS "Enable Native Language Support" on
+OPTIONS_DEFAULT= GTK2
-.include <bsd.port.pre.mk>
+GIMP_DESC= Enable GIMP plugin support
-.if defined(WITHOUT_NLS)
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.else
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
-PLIST_SUB+= NLS=""
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -lintl"
+PLIST_SUB+= NLS=""
+.else
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB+= NLS="@comment "
.endif
-.if defined(WITHOUT_GTK2)
-USE_GNOME= gtk12
-CONFIGURE_ARGS+= --disable-gtk2
-.else
+.if ${PORT_OPTIONS:MGTK2}
USE_GNOME= gtk20
+CONFIGURE_ARGS+=--enable-gtk2
+.else
+USE_GNOME= gtk12
+CONFIGURE_ARGS+=--disable-gtk2
.endif
-.if defined(WITH_GIMP)
+.if ${PORT_OPTIONS:MGIMP}
SUB_FILES+= pkg-message
-.if defined(WITHOUT_GTK2)
-LIB_DEPENDS+= gimp:${PORTSDIR}/graphics/gimp1
-CONFIGURE_ARGS+= --disable-gimp2
-.else
LIB_DEPENDS+= gimp:${PORTSDIR}/graphics/gimp-app
-.endif # WITHOUT_GTK2
+CONFIGURE_ARGS+=--enable-gimp2
.else
-CONFIGURE_ARGS+= --disable-gimp
+CONFIGURE_ARGS+=--disable-gimp
.endif
pre-patch:
@@ -66,8 +64,10 @@
-i "" -e 's|\$$(DESTDIR)\$$(sbindir)||g'
post-install:
-.if defined(WITH_GIMP)
+.if ${PORT_OPTIONS:MGIMP}
+ @${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/graphics/xsane/files/pkg-message.in ./files/pkg-message.in
--- /usr/ports/graphics/xsane/files/pkg-message.in 2012-12-05 00:40:06.000000000 +0100
+++ ./files/pkg-message.in 2013-01-05 12:20:15.000000000 +0100
@@ -1,10 +1,14 @@
-Congratulations, XSane is now installed.
+===============================================================================
+
+XSane has been installed.
To install XSane as a GIMP plug-in, please type:
-ln -sf ${LOCALBASE}/bin/xsane ~/.gimp-n.n/plug-ins/xsane
+ ln -sf ${LOCALBASE}/bin/xsane ~/.gimp-*/plug-ins/xsane
Then run the GIMP, and a new "XSane" menu item should appear in the
-"File->Acquire" menu. Use this to access your scanner.
+"File->Acquire" menu. Use this to access your scanner.
Have fun!
+
+===============================================================================
--- xsane-0.998_3.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list