aboutsummaryrefslogtreecommitdiff
path: root/graphics/sane-backends/Makefile
blob: d953df1e3358e025a03c726b0166384d6e7ce370 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Created by: gary@hotlava.com
# $FreeBSD$

PORTNAME=	sane-backends
PORTVERSION=	1.0.25
CATEGORIES=	graphics
MASTER_SITES=	https://alioth.debian.org/frs/download.php/file/4146/ \
		http://fossies.org/linux/misc/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	API for access to scanners, digitals camera, frame grabbers etc

LICENSE=	GPLv2 # (or later)

LIB_DEPENDS=	libtiff.so:${PORTSDIR}/graphics/tiff

USES=		gmake libtool localbase pathfix pkgconfig
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-docdir=${DOCSDIR} \
		--disable-latex \
		--disable-locking \
		--enable-pthread \
		--without-systemd
INSTALL_TARGET=	install-strip
USE_LDCONFIG=	yes
USE_RC_SUBR=	saned

SUB_FILES=	pkg-message

USERS=	saned
GROUPS=	saned

PORTDOCS=	*

OPTIONS_DEFINE=		AVAHI DOCS GPHOTO IEEE1284 IPV6 NLS SNMP USB V4L
OPTIONS_DEFAULT=	USB
OPTIONS_SUB=		yes

AVAHI_LIB_DEPENDS=	libavahi-client.so:${PORTSDIR}/net/avahi-app
AVAHI_CONFIGURE_ENABLE=	avahi
GPHOTO_LIB_DEPENDS=	libgphoto2.so:${PORTSDIR}/graphics/libgphoto2
GPHOTO_CONFIGURE_OFF=	--with-gphoto2=no
IEEE1284_DESC=		Parallel port support via libieee1284
IEEE1284_LIB_DEPENDS=	libieee1284.so:${PORTSDIR}/sysutils/libieee1284
IEEE1284_CONFIGURE_ENV_OFF=	sane_cv_use_libieee1284=no
IPV6_CONFIGURE_ENABLE=	ipv6
NLS_USES=		gettext
NLS_CONFIGURE_ENABLE=	translations
SNMP_LIB_DEPENDS=	libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
SNMP_CONFIGURE_WITH=	snmp
USB_DESC=		USB support
USB_CONFIGURE_ON=	--enable-libusb_1_0
USB_CONFIGURE_OFF=	--enable-libusb=no
V4L_LIB_DEPENDS=	libv4l1.so:${PORTSDIR}/multimedia/libv4l
V4L_CONFIGURE_WITH=	v4l

post-patch:
	@${REINPLACE_CMD} -e '/for ac_header in/s|libc.h|sys/endian.h| ; \
		 s|"$${have_linux_ioctl_defines}"|"$${have_libv4l1}"|' \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/^dist_doc_DATA/s|COPYING||' \
		${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e 's|HAVE_LIBC_H|HAVE_SYS_ENDIAN_H|' \
		${WRKSRC}/include/sane/config.h.in
	@${REINPLACE_CMD} -e '/^pkgconfigdir/s|@libdir@|@prefix@/libdata|' \
		${WRKSRC}/tools/Makefile.in
	@${REINPLACE_CMD} -e '/^export PKG_CONFIG_LIBDIR=/s|@libdir@|@prefix@/libdata|' \
		${WRKSRC}/tools/sane-config.in

.include <bsd.port.mk>