aboutsummaryrefslogtreecommitdiff
path: root/print/splix/Makefile
blob: d3d98fecabc0e76889ee787a803c81a30305f276 (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
# $FreeBSD$

PORTNAME=	splix
PORTVERSION=	2.0.0
PORTREVISION=	4
CATEGORIES?=	print
MASTER_SITES=	SF

MAINTAINER=	ports@FreeBSD.org
COMMENT=	CUPS printer drivers for Samsung Printer Language printers

BUILD_DEPENDS=	cups-config:${PORTSDIR}/print/cups-base
RUN_DEPENDS:=	${BUILD_DEPENDS}

USE_GMAKE=	yes
USE_BZIP2=	yes

MODELS=		DELL SAMSUNG XEROX
PPD_DELL=	1100 1110
PPD_SAMSUNG=	clp500 clp510 clp550 clp610 \
		ml1510 ml1520 ml1610 ml1630 ml1640 ml1710 ml1740 ml1750 \
		ml2010 ml2150 ml2250 ml2251 ml2510 ml2550 \
		ml3050 ml3560 \
		scx4200 scx4500
PPD_XEROX=	ph3115 ph3116 ph3117 ph3120 ph3121 ph3122 ph3130 ph3150 \
		ph3420 ph3425 ph5500 ph6100 wc3119 ph3160
PPD_SAMSUNG_JBIG=	clp200 clp300 clp600 clx216x clx2170 clx3160
PPD_XEROX_JBIG=		ph6110

FILTER_FILE=	rastertoqpdl pstoqpdl
CUPS_CONFIG=	${PREFIX}/bin/cups-config
BIN_DEST_DIR=	`${CUPS_CONFIG} --serverbin | ${SED} \
		's|${LOCALBASE}|${PREFIX}|'`/filter
CUPS_DATA_DIR=	`${CUPS_CONFIG} --datadir | ${SED} \
		's|${LOCALBASE}|${PREFIX}|'`
DEST_DIR_DELL=	${CUPS_DATA_DIR}/model/dell
DEST_DIR_SAMSUNG=	${CUPS_DATA_DIR}/model/samsung
DEST_DIR_XEROX=	${CUPS_DATA_DIR}/model/xerox

OPTIONS_DEFINE=	JBIG BLACKOPTIM
JBIG_DESC=	Enable use of JBIG algorithm (pattented)
BLACKOPTIM_DESC=	Enable black correction algorithm
OPTIONS_DEFAULT=	JBIG BLACKOPTIM

NO_STAGE=	yes
.include "bsd.port.options.mk"

post-patch:
	@${REINPLACE_CMD} -e '/^CC.*:= gcc/d' -e '/^CXX.*:= g++/d' \
		-e 's/make/gmake/' ${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e 's/g++/$$(CXX)/' ${WRKSRC}/rules.mk

post-configure:

.if ${PORT_OPTIONS:MJBIG}
PPD_SAMSUNG+=	${PPD_SAMSUNG_JBIG}
PPD_XEROX+=	${PPD_XEROX_JBIG}
LIB_DEPENDS+=	jbig:${PORTSDIR}/graphics/jbigkit
.else
MAKE_ARGS+=	DISABLE_JBIG=1
.endif

.if empty(PORT_OPTIONS:MBLACKOPTIM)
MAKE_ARGS+=	DISABLE_BLACKOPTIM=1
.endif

.if defined(CACHESIZE)
MAKE_ARGS+=	CACHESIZE=${CACHESIZE}
.endif

do-install:
.for MODEL in ${MODELS}
	${MKDIR} ${DEST_DIR_${MODEL}}
.for PPD in $(PPD_${MODEL})
	${INSTALL_DATA} ${WRKSRC}/ppd/${PPD}.ppd $(DEST_DIR_${MODEL})
.endfor
.endfor

.for FILTER in ${FILTER_FILE}
	${INSTALL_PROGRAM} ${WRKSRC}/optimized/${FILTER} ${BIN_DEST_DIR}
.endfor

.include <bsd.port.mk>