forked from opnsense/ports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (60 loc) · 2.48 KB
/
Makefile
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
# Created by: [email protected]
# $FreeBSD$
PORTNAME= cups-pstoraster
PORTVERSION= 8.15.4
PORTREVISION= 8
CATEGORIES= print
MASTER_SITES= EASYSW/ghostscript/${PORTVERSION}
DISTNAME= espgs-${ESPGS_VER}-source
DIST_SUBDIR= ghostscript
MAINTAINER= [email protected]
COMMENT= Postscript interpreter for CUPS printing to non-PS printers
LICENSE= GPLv2
LIB_DEPENDS= libcupsimage.so:${PORTSDIR}/print/cups-image
ESPGS_VER= ${PORTVERSION}
GS_VERSION= 8.15
WRKSRC= ${WRKDIR}/espgs-${PORTVERSION}
DATADIR= ${PREFIX}/share/espgs
# We just need the ghostscript fonts, nothing more
USES= ghostscript:run gmake iconv tar:bzip2
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --without-x --with-gs=espgs
MAKE_ARGS= CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
DEVICE_DEVS="\$$(DD)cups.dev \$$(DD)pxlcolor.dev \$$(DD)pxlmono.dev"
PLIST_SUB= GS_VERSION="${GS_VERSION}"
OPTIONS_DEFINE= CJK
CJK_DESC= Japanese PostScript documents processing
CJK_RUN_DEPENDS= ${LOCALBASE}/share/fonts/std.ja_JP/Ryumin-Light:${PORTSDIR}/japanese/font-std \
${LOCALBASE}/share/ghostscript/fonts/a010013l.pfb:${PORTSDIR}/print/gsfonts
CJK_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-lib_cidfmap
MAKE_JOBS_UNSAFE= yes
pre-configure:
${RM} -f ${WRKSRC}/ijs/config.guess ${WRKSRC}/ijs/missing ${WRKSRC}/ijs/config.sub ${WRKSRC}/ijs/install-sh ${WRKSRC}/ijs/ltmain.sh
${RM} -f ${WRKSRC}/trunk/ijs/config.guess ${WRKSRC}/trunk/ijs/missing ${WRKSRC}/trunk/ijs/config.sub ${WRKSRC}/trunk/ijs/install-sh ${WRKSRC}/trunk/ijs/ltmain.sh
post-patch:
${LN} -sf ${WRKSRC}/pstoraster/gdevcups.c ${WRKSRC}/src
${CAT} ${FILESDIR}/cups.contrib.mak >> ${WRKSRC}/src/contrib.mak
${FIND} ${WRKSRC} -name "*.mak" -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|$$(install_prefix)|$$(DESTDIR)$$(install_prefix)|g'
.for file in pstopxl pstoraster
${REINPLACE_CMD} -e 's:@prefix@:${PREFIX}:g ; \
s:@exec_prefix@:${PREFIX}:g ; \
s:@bindir@:${PREFIX}/bin:g ; \
s:@GS@:espgs:g ; \
s|^GS_LIB="|GS_LIB="${PREFIX}/share/ghostscript/fonts:|' \
${WRKSRC}/pstoraster/${file}.in
.endfor
${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
s|^DEVICE_DEVS|#DEVICE_DEVS|g ; \
s|^gssharedir = @libdir@/ghostscript|gssharedir = @libdir@/espgs| ; \
s|^gsdir = @datadir@/ghostscript|gsdir = @datadir@/espgs|' \
${WRKSRC}/Makefile.in
pre-build:
${MKDIR} ${WRKSRC}/bin
${MKDIR} ${WRKSRC}/obj
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/espgs
.include <bsd.port.mk>