aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/xsane/Makefile
blob: 4a944113826522a70242c0289e98f1e40e19bd10 (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
# Created by: Dominik Brettnacher <domi@nonsensss.de>
# $FreeBSD$

PORTNAME=   xsane
PORTVERSION=    0.999
PORTREVISION=   1
CATEGORIES= graphics
MASTER_SITES=   http://www.xsane.org/download/

MAINTAINER= nemysis@FreeBSD.org
COMMENT=    Gtk-based X11 frontend for SANE (Scanner Access Now Easy)

LICENSE=    GPLv2

LIB_DEPENDS=    libjpeg.so:${PORTSDIR}/graphics/jpeg \
        libpng15.so:${PORTSDIR}/graphics/png \
        libtiff.so:${PORTSDIR}/graphics/tiff \
        libfreetype.so:${PORTSDIR}/print/freetype2 \
        liblcms.so:${PORTSDIR}/graphics/lcms
BUILD_DEPENDS=  scanimage:${PORTSDIR}/graphics/sane-backends
RUN_DEPENDS:=   ${BUILD_DEPENDS}

USES=       gmake pkgconfig
USE_GNOME=  gtk20 gdkpixbuf2
GNU_CONFIGURE=  yes

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PORTDOCS=   *.html *.jpg

OPTIONS_DEFINE= DOCS GIMP NLS
GIMP_DESC=  GIMP plugin support
OPTIONS_DEFAULT=    GIMP

OPTIONS_SUB=    yes

GIMP_RUN_DEPENDS=   ${LOCALBASE}/bin/gimp:${PORTSDIR}/graphics/gimp-app
GIMP_CONFIGURE_ENABLE=  gimp2 gimp
NLS_CONFIGURE_ENABLE=   nls
NLS_USES=       gettext

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -lintl"
.endif

.if ${PORT_OPTIONS:MGIMP}
SUB_FILES+= pkg-message
.endif

post-patch:
    @${REINPLACE_CMD} -e 's| $$(DESTDIR)$$(sbindir)||' \
        -e 's|$$(DESTDIR)$$(xsanedocdir)||' ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} -e 's|@POSUB@ doc|@POSUB@|' ${WRKSRC}/Makefile.in

post-install:
    ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.man ${STAGEDIR}${MAN1PREFIX}/man/man1/${PORTNAME}.1
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>