Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 May 2006 14:42:11 +0200 (CEST)
From:      Dominik Brettnacher <domi@saargate.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/97556: xsane add options for GTK1/GTK2 and GIMP
Message-ID:  <200605211242.k4LCgBWi041963@debussy.brettnacher.org>
Resent-Message-ID: <200605211250.k4LCoHrv047056@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         97556
>Category:       ports
>Synopsis:       xsane add options for GTK1/GTK2 and GIMP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 12:50:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Dominik Brettnacher
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD debussy.brettnacher.org 6.1-RELEASE FreeBSD 6.1-RELEASE #5: Sat May 20 16:18:48 CEST 2006 domi@debussy.brettnacher.org:/usr/obj/usr/src/sys/DEBUSSY i386


>Description:
	Introduced OPTIONS. Made WITH_GIMP configurable via OPTIONS.
	Added WITH_GTK2 to OPTIONS. Bumped PORTREVISION and cleaned up
	PKGMESSAGE.

	The original patch was a courtesy of Stefan Thurner 
	<thurners@nicsys.de>.
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/graphics/xsane/Makefile xsane/Makefile
--- /usr/ports/graphics/xsane/Makefile	Tue Mar  7 09:26:40 2006
+++ xsane/Makefile	Sun May 21 14:30:44 2006
@@ -24,44 +24,46 @@
 USE_GMAKE=	yes
 USE_X_PREFIX=	yes
 GNU_CONFIGURE=	yes
+WANT_GNOME=	yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LIBS="-L${LOCALBASE}/lib -lintl"
 
 MAN1=		xsane.1
 
-.if defined(WITH_GIMP)
-LIB_DEPENDS+=	gimp:${PORTSDIR}/graphics/gimp1
-CONFIGURE_ARGS+=	--enable-gimp
-.else
-CONFIGURE_ARGS+=	--disable-gimp
-.endif
+OPTIONS=	GTK2 "Enable GTK2 support (use GTK1 if turned off)" on \
+		GIMP "Enable GIMP plugin support" off
 
-.if defined(WITH_GTK2)
-USE_GNOME=	gtk20
-.else
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_GTK2)
 USE_GNOME=	gtk12
 CONFIGURE_ARGS+=	--disable-gtk2
+.else
+USE_GNOME=	gtk20
 .endif
 
-.include <bsd.port.pre.mk>
+.if defined(WITH_GIMP)
+.if defined(WITHOUT_GTK2)
+LIB_DEPENDS+=	gimp:${PORTSDIR}/graphics/gimp1
+CONFIGURE_ARGS+=	--disable-gimp2
+.else
+LIB_DEPENDS+=	gimp:${PORTSDIR}/graphics/gimp
+.endif # WITHOUT_GTK2
+.else
+CONFIGURE_ARGS+=	--disable-gimp
+.endif 
 
 .if ${OSVERSION} < 500035
 CONFIGURE_ENV+=	CFLAGS="${CFLAGS:C/-O[0-9]*//g}"
 .endif
 
-pre-everything::
-.if !defined(WITH_GIMP)
-	@${ECHO_MSG} "*** Note: XSane can be built with a standalone"
-	@${ECHO_MSG} "*** X scanner interface as well as a GIMP plug-in."
-	@${ECHO_MSG} "*** If you wish to do this, hit Ctrl-C now and use"
-	@${ECHO_MSG} "*** \"WITH_GIMP=yes\""
-.endif
-
 pre-patch:
 	@${FIND} ${WRKSRC} -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} \
 		-i "" -e 's|\$$(sbindir)||g'
 
 post-install:
+.if defined(WITH_GIMP)
 	@${SED} 's:/usr/X11R6:${PREFIX}:' ${PKGMESSAGE}
+.endif
 
 .include <bsd.port.post.mk>
diff -urN /usr/ports/graphics/xsane/pkg-message xsane/pkg-message
--- /usr/ports/graphics/xsane/pkg-message	Sat May 19 22:23:18 2001
+++ xsane/pkg-message	Sun May 21 14:26:41 2006
@@ -1,9 +1,8 @@
 Congratulations, XSane is now installed.
 
-If you built it with WITH_GIMP set to yes, you can use
-XSane as a GIMP plug-in. To do this, type:
+To install XSane as a GIMP plug-in, please type:
 
-ln -sf /usr/X11R6/bin/xsane ~/.gimp-1.2/plug-ins/xsane
+ln -sf /usr/X11R6/bin/xsane ~/.gimp-n.n/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.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605211242.k4LCgBWi041963>