summaryrefslogtreecommitdiff
path: root/graphics/sane-backends/Makefile
blob: 6614b32836e9976d0fadb8ffbdc7f616783c0007 (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
# New ports collection makefile for:	sane-backends
# Date created:			Sat Jul 19 16:23:10 MET DST 1997
# Whom:				gary@hotlava.com
#
# $FreeBSD$
#

PORTNAME=	sane-backends
PORTVERSION=	1.0.15
CATEGORIES=	graphics
MASTER_SITES=	ftp://ftp.sane-project.org/pub/sane/%SUBDIR%/ \
		ftp://ftp2.sane-project.org/pub/sane/%SUBDIR%/ \
		ftp://ftp3.sane-project.org/pub/sane/%SUBDIR%/ \
		ftp://gd.tuwien.ac.at/hci/sane/%SUBDIR%/ \
		http://gd.tuwien.ac.at/hci/sane/%SUBDIR%/
MASTER_SITE_SUBDIR=	${PORTNAME}-${PORTVERSION}

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

LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg

USE_GNOME=	gnometarget lthack
USE_GMAKE=	yes
USE_LIBTOOL_VER=15
USE_REINPLACE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ENV=	NOPORTDOCS=${NOPORTDOCS} \
		DOCSDIR="${DOCSDIR}"
INSTALLS_SHLIB=	yes

OPTIONS=	USB "USB support" on \
		NLS "NLS support" on \
		GPHOTO2 "gPhoto2 support" off

.include <bsd.port.pre.mk>

.if defined(WITHOUT_USB)
CONFIGURE_ARGS+=	--disable-libusb
PLIST_SUB+=	USB="@comment "
.else
LIB_DEPENDS+=	usb-0.1.8:${PORTSDIR}/devel/libusb
PLIST_SUB+=	USB=""
.endif

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=	--disable-translations
PLIST_SUB+=	NLS="@comment "
.else
USE_GETTEXT=	yes
PLIST_SUB+=	NLS=""
.endif

.if defined(WITH_GPHOTO2)
LIB_DEPENDS+=	gphoto2.2:${PORTSDIR}/graphics/libgphoto2
PLIST_SUB+=	GPHOTO2=""
.else
CONFIGURE_ARGS+=	--with-gphoto2=no
PLIST_SUB+=	GPHOTO2="@comment "
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|LIBTOOL =.*|LIBTOOL = ${LIBTOOL}|' \
		${WRKSRC}/backend/Makefile.in ${WRKSRC}/frontend/Makefile.in \
		${WRKSRC}/japi/Makefile.in ${WRKSRC}/lib/Makefile.in \
		${WRKSRC}/sanei/Makefile.in ${WRKSRC}/tools/Makefile.in

.include "Makefile.man"
.include <bsd.port.post.mk>