Update print/foomatic-db to version 20161105
[dports.git] / print / openprinting / Makefile
1 # Created by: Bruce M Simpson <bms@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       openprinting
5 PORTVERSION=    1.0
6 PORTREVISION=   5
7 CATEGORIES=     print net
8 MASTER_SITES=   SF/openprinting/papi/1.0%20Beta
9 DISTNAME=       papi-${PORTVERSION}_beta
10 DIST_SUBDIR=    ${PORTNAME}
11
12 MAINTAINER=     ports@FreeBSD.org
13 COMMENT=        Sun's implementation of the OpenPrinting API (PAPI)
14
15 WRKSRC=         ${WRKDIR}/papi-${PORTVERSION}_beta
16
17 USES=           gettext gmake iconv libtool tar:bzip2
18 USE_LDCONFIG=   yes
19 GNU_CONFIGURE=  yes
20 INSTALL_TARGET= install-strip
21 MAKE_JOBS_UNSAFE=       yes
22
23 CPPFLAGS+=      -I${LOCALBASE}/include
24 LIBS+=          -L${LOCALBASE}/lib -lintl
25
26 # TODO: Get mod_ipp to actually work; Sun's example seems to be broken
27 # under both Apache 1.3/2.0, this could be a papi issue; does not build
28 # w/Apache 2.2.
29 # TODO: Fix Apache module install target to instead use APXS
30 # from this file; it is intended only as an example.
31 # TODO: CUPS integration is broken in distfiles (missing papi_int.h).
32 #OPTIONS=\
33 #       MOD_IPP         "Build example mod_ipp.so for Apache" Off
34 #       PSM_CUPS        "Build psm_cups.so for printing to CUPS" Off
35
36 .include <bsd.port.options.mk>
37
38 # NOTE: This has only been tested with www/apache20, with integrated APR.
39 .if defined(WITH_MOD_IPP)
40 IGNORE= no supported apache versions available
41 #USE_APACHE=    20
42 #CONFIGURE_ARGS+=--with-apache=${LOCALBASE}
43 .else
44 CONFIGURE_ARGS+=--without-apache
45 .endif
46
47 .if defined(WITH_PSM_CUPS)
48 LIB_DEPENDS+=   libcups.so:print/cups
49 CONFIGURE_ARGS+=--with-cups=${LOCALBASE}
50 .else
51 CONFIGURE_ARGS+=--without-cups
52 .endif
53
54 PLIST_FILES+=\
55         include/debug.h \
56         include/http-private.h \
57         include/http.h \
58         include/ipp-listener.h \
59         include/ipp.h \
60         include/papi.h \
61         lib/libipp-core.so \
62         lib/libipp-core.so.0 \
63         lib/libipp-core.so.0.0.0 \
64         lib/libipp-listener.so \
65         lib/libipp-listener.so.0 \
66         lib/libipp-listener.so.0.0.0 \
67         lib/libpapi-common.so \
68         lib/libpapi-common.so.0 \
69         lib/libpapi-common.so.0.0.0 \
70         lib/libpapi.so \
71         lib/libpapi.so.0 \
72         lib/libpapi.so.0.0.0 \
73         libexec/lpd-port \
74         libexec/psm-ipp.so \
75         libexec/psm-lpd.so \
76         man/man5/psm-ipp.5.gz
77
78 .if defined(WITH_PSM_CUPS)
79 PLIST_FILES+=   libexec/psm-cups.so
80 .endif
81
82 .if defined(WITH_MOD_IPP)
83 PLIST_FILES+=   lib/mod_ipp.so
84 .endif
85
86 post-patch:
87         @${REINPLACE_CMD} '/^LIBS =/s,$$, ../libpapi-common/libpapi-common.la @LIBS@,' \
88                 ${WRKSRC}/source/bsd-sysv-commands/Makefile.in \
89                 ${WRKSRC}/source/examples/Makefile.in
90         @${REINPLACE_CMD} -e 's/-ldl//' -e 's/-lnsl//' \
91                 ${WRKSRC}/source/libpapi-cups/Makefile.in \
92                 ${WRKSRC}/source/libpapi-dynamic/Makefile.in
93
94 post-install:
95 .for unneeded in bin sbin man/man1 man/mani share
96         @${RM} -r ${STAGEDIR}${PREFIX}/${unneeded}
97 .endfor
98
99 .include <bsd.port.mk>