diff options
author | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-06-11 21:40:50 +0000 |
---|---|---|
committer | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-06-11 21:40:50 +0000 |
commit | 28dd78b9d4acb98293945ad99061cd6e9146473f (patch) | |
tree | 1f7c461625e9c8bd5d7fae3167fa8909d96d5314 /graphics/xsane | |
parent | c44086e59f18d1999fc000bb383a65e5ce80cca9 (diff) | |
download | ports-28dd78b9d4acb98293945ad99061cd6e9146473f.tar.gz ports-28dd78b9d4acb98293945ad99061cd6e9146473f.zip |
- Introduced OPTIONS.
- Made WITH_GIMP configurable via OPTIONS.
- Added WITH_GTK2.
- cleaned up PKGMESSAGE.
- Bumped PORTREVISION.
The original patch was a courtesy of Stefan Thurner <thurners@nicsys.de>.
PR: ports/97556
Submitted by: maintainer
Approved by: lawrance (mentor, implicit)
Notes
Notes:
svn path=/head/; revision=165147
Diffstat (limited to 'graphics/xsane')
-rw-r--r-- | graphics/xsane/Makefile | 44 | ||||
-rw-r--r-- | graphics/xsane/files/pkg-message.in (renamed from graphics/xsane/pkg-message) | 5 |
2 files changed, 27 insertions, 22 deletions
diff --git a/graphics/xsane/Makefile b/graphics/xsane/Makefile index d6570e4fd5c8..443d59ed61c3 100644 --- a/graphics/xsane/Makefile +++ b/graphics/xsane/Makefile @@ -24,44 +24,50 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ USE_GMAKE= yes USE_X_PREFIX= yes GNU_CONFIGURE= yes +WANT_GNOME= yes +USE_GETTEXT= 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 +#SUB_FILES+= pkg-message -.if defined(WITH_GTK2) -USE_GNOME= gtk20 -.else +OPTIONS= GTK2 "Enable GTK2 support (use GTK1 if turned off)" on \ + GIMP "Enable GIMP plugin support" off + +.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) +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 +.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: - @${SED} 's:/usr/X11R6:${PREFIX}:' ${PKGMESSAGE} +.if defined(WITH_GIMP) + @${CAT} ${PKGMESSAGE} +.endif .include <bsd.port.post.mk> diff --git a/graphics/xsane/pkg-message b/graphics/xsane/files/pkg-message.in index 248d8ef13f14..c2955f8b2521 100644 --- a/graphics/xsane/pkg-message +++ b/graphics/xsane/files/pkg-message.in @@ -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 ${X11BASE}/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. |