summaryrefslogtreecommitdiffstats
path: root/print/gutenprint/Makefile
blob: d508151d8700fc78e09e580f96634f4d777b75d6 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ports collection makefile for: gimp-print
# Date Created: 2002 01 02
# Whom: dgilbert@velocet.ca
#
# $FreeBSD$
#    $MCom: ports/print/gutenprint/Makefile,v 1.2 2006/01/31 20:36:52 marcus Exp $

PORTNAME=   gutenprint
DISTVERSION=    5.0.0-rc2
PORTREVISION=   1
CATEGORIES= print
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gimp-print

MAINTAINER= ahze@FreeBSD.org
COMMENT=    GutenPrint Printer Driver

CONFLICTS=  gimp-print-[0-9]*

USE_BZIP2=  yes
USE_GETTEXT=    yes
USE_GETOPT_LONG=    yes
USE_GMAKE=  yes
USE_GNOME=  gnomehack gnometarget
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --with-gimp=no --with-gimp2=no
INSTALLS_SHLIB= yes

MAN1=   escputil.1 ijsgutenprint.1

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

.include <bsd.port.pre.mk>

.if ${HAVE_GNOME:Mgtk20} || defined(WITH_GTK2)
USE_GNOME+= gtk20
PLIST_SUB+= GTK=""
.else
PLIST_SUB+= GTK="@comment "
.endif

.if defined(WITH_CUPS) && !defined(WITHOUT_CUPS)
LIB_DEPENDS+=   cups.2:${PORTSDIR}/print/cups-base
RUN_DEPENDS+=   espgs:${PORTSDIR}/print/cups-pstoraster
CONFIGURE_ARGS+=    --with-cups=${PREFIX}
PLIST_SUB+= CUPS=""
MAN8=   cups-calibrate.8 cups-genppd.8 cups-genppdconfig.8 \
    cups-genppdupdate.8
.else
PLIST_SUB+= CUPS="@comment "
CONFIGURE_ARGS+=    --without-cups
.endif

.if defined(WITHOUT_IJS)
PLIST_SUB+= IJS="@comment "
.else
LIB_DEPENDS+=   ijs.1:${PORTSDIR}/print/libijs
CONFIGURE_ARGS+=    --with-ijs=yes
PLIST_SUB+= IJS=""
.endif

.if defined(WITH_FOOMATIC) || exists(${LOCALBASE}/bin/foomatic-combo-xml)
BUILD_DEPENDS+= foomatic-db-engine>=3.0.2:${PORTSDIR}/print/foomatic-db-engine \
        foomatic-db>=20050309:${PORTSDIR}/print/foomatic-db
RUN_DEPENDS+=   foomatic-db-engine>3.0.2:${PORTSDIR}/print/foomatic-db-engine \
        foomatic-db>=20050309:${PORTSDIR}/print/foomatic-db
CONFIGURE_ARGS+=    --with-foomatic3
PLIST_SUB+= FOO=""
.else
CONFIGURE_ARGS+=    --without-foomatic
PLIST_SUB+= FOO="@comment "
.endif

.if defined(NOPORTDOCS)
CONFIGURE_ARGS+=    --with-user-guide=no
.endif

pre-everything::
    @${ECHO_MSG}
    @${ECHO_MSG} "You may use the following build options:"
    @${ECHO_MSG}
    @${ECHO_MSG} "  WITH_CUPS=yes       build with CUPS driver"
    @${ECHO_MSG} "  WITH_FOOMATIC=yes   build with foomatic support"
    @${ECHO_MSG} "  WITHOUT_IJS=yes     build without IJS-based Ghostscript driver"
    @${ECHO_MSG}

.include <bsd.port.post.mk>