summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-03-16 07:20:59 +0000
committerpat <pat@FreeBSD.org>2002-03-16 07:20:59 +0000
commitf59986de91ed0c2ec5f222d6fd892c649b08d337 (patch)
tree764377df5b06b5635c33440c1adc1c5a6cdb6cb0 /graphics
parent910dfe99b7d59d3c7401a64770e85c55de84791d (diff)
downloadFreeBSD-ports-f59986de91ed0c2ec5f222d6fd892c649b08d337.zip
FreeBSD-ports-f59986de91ed0c2ec5f222d6fd892c649b08d337.tar.gz
Add WITH_GPHOTO2 knob
PR: 35961 Submitted by: KATO Tsuguru <tkato@prontomail.com>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/sane-backends/Makefile21
-rw-r--r--graphics/sane-backends/pkg-plist4
2 files changed, 24 insertions, 1 deletions
diff --git a/graphics/sane-backends/Makefile b/graphics/sane-backends/Makefile
index 0b95fe2..651cce8 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 <bsd.port.mk>
diff --git a/graphics/sane-backends/pkg-plist b/graphics/sane-backends/pkg-plist
index 4a8ed6f..0135d22 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
OpenPOWER on IntegriCloud