From bb51979903c24a7aece81c404e688ba1f2cdb408 Mon Sep 17 00:00:00 2001 From: Patrick Li Date: Sat, 16 Mar 2002 07:20:59 +0000 Subject: Add WITH_GPHOTO2 knob PR: 35961 Submitted by: KATO Tsuguru --- graphics/sane-backends/Makefile | 21 ++++++++++++++++++++- graphics/sane-backends/pkg-plist | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'graphics/sane-backends') diff --git a/graphics/sane-backends/Makefile b/graphics/sane-backends/Makefile index 0b95fe2facb2..651cce823d8d 100644 --- a/graphics/sane-backends/Makefile +++ b/graphics/sane-backends/Makefile @@ -23,7 +23,6 @@ USE_GMAKE= yes USE_LIBTOOL= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -DHAVE_UNION_SEMUN" \ LIBS="-L${LOCALBASE}/lib" -CONFIGURE_ARGS= --with-gphoto2=no MAKE_ENV= NOPORTDOCS=${NOPORTDOCS} INSTALLS_SHLIB= yes @@ -40,4 +39,24 @@ MAN5= sane-abaton.5 sane-agfafocus.5 sane-apple.5 sane-artec.5 sane-as6e.5 \ sane-usb.5 sane-v4l.5 MAN7= sane.7 +.if defined(WITH_GPHOTO2) +LIB_DEPENDS+= gphoto2.2:${PORTSDIR}/graphics/gphoto2 +CONFIGURE_ARGS+= --with-gphoto2=yes +PLIST_SUB+= GPHOTO2="" +.else +PLIST_SUB+= GPHOTO2="@comment " +.endif + +pre-everything:: +.if !defined(WITH_GPHOTO2) + @${ECHO_MSG} + @${ECHO_MSG} "If you want to compile with gPhoto2 support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_GPHOTO2=yes\"" + @${ECHO_MSG} +.endif + +post-patch: + @${PERL} -pi -e 's| -I/usr/local/include||g ; \ + s|2.0beta5dev1|2.0|g' ${WRKSRC}/configure + .include diff --git a/graphics/sane-backends/pkg-plist b/graphics/sane-backends/pkg-plist index 4a8ed6f1095d..0135d228b204 100644 --- a/graphics/sane-backends/pkg-plist +++ b/graphics/sane-backends/pkg-plist @@ -15,6 +15,7 @@ etc/sane.d/dc25.conf etc/sane.d/dll.conf etc/sane.d/dmc.conf etc/sane.d/epson.conf +%%GPHOTO2%%etc/sane.d/gphoto2.conf etc/sane.d/hp.conf etc/sane.d/m3096g.conf etc/sane.d/microtek.conf @@ -87,6 +88,9 @@ lib/sane/libsane-dmc.so.1 lib/sane/libsane-epson.a lib/sane/libsane-epson.so lib/sane/libsane-epson.so.1 +%%GPHOTO2%%lib/sane/libsane-gphoto2.a +%%GPHOTO2%%lib/sane/libsane-gphoto2.so +%%GPHOTO2%%lib/sane/libsane-gphoto2.so.1 lib/sane/libsane-hp.a lib/sane/libsane-hp.so lib/sane/libsane-hp.so.1 -- cgit v1.2.3