aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print/cups-pstoraster/Makefile41
-rw-r--r--print/cups-pstoraster/distinfo3
-rw-r--r--print/cups-pstoraster/files/cups.contrib.mak11
-rw-r--r--print/cups-pstoraster/files/patch-src:gxobj.h17
4 files changed, 58 insertions, 14 deletions
diff --git a/print/cups-pstoraster/Makefile b/print/cups-pstoraster/Makefile
index c71cae3cce6d..9f688b74b7b3 100644
--- a/print/cups-pstoraster/Makefile
+++ b/print/cups-pstoraster/Makefile
@@ -6,34 +6,49 @@
#
PORTNAME= cups-pstoraster
-PORTVERSION= 7.05.6
+PORTVERSION= 7.07
PORTREVISION= 0
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://ftp.easysw.com/pub/ghostscript/
-MASTER_SITE_SUBDIR= espgs
-DISTNAME= espgs-${PORTVERSION}-source
+MASTER_SITE_SUBDIR= ghostscript espgs
+DISTFILES= ghostscript-${PORTVERSION}${EXTRACT_SUFX} \
+ espgs-7.05.6-source${EXTRACT_SUFX}
+DIST_SUBDIR= ghostscript
MAINTAINER= ports@FreeBSD.org
COMMENT= GNU Postscript interpreter for CUPS printing to non-PS printers
-LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
-RUN_DEPENDS+= ${LOCALBASE}/share/ghostscript/fonts/fonts.scale:${PORTSDIR}/print/ghostscript-gnu
+LIB_DEPENDS= cups.2:${PORTSDIR}/print/cups-base
+RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/${PORTVERSION}/lib/gs_init.ps:${PORTSDIR}/print/ghostscript-gnu
-WRKSRC= ${WRKDIR}/espgs-${PORTVERSION}
+WRKSRC= ${WRKDIR}/ghostscript-${PORTVERSION}
USE_BZIP2= yes
+USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --without-x --without-ijs --without-gimp-print \
- --with-drivers=cups --with-gs=espgs \
- --with-fontpath=${LOCALBASE}/share/ghostscript/fonts \
- --enable-compiled-inits --without-omni
+ --with-gs=espgs
+MAKE_ARGS= CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
+ DEVICE_DEVS="\$$(DD)cups.dev"
-USE_REINPLACE= yes
+ESPGS_WRKSRC= ${WRKDIR}/espgs-7.05.6/pstoraster
+
+post-patch:
+ ${LN} -sf ${ESPGS_WRKSRC}/gdevcups.c ${WRKSRC}/src
+ ${CAT} ${FILESDIR}/cups.contrib.mak >> ${WRKSRC}/src/contrib.mak
+ ${SED} -e 's:@prefix@:${PREFIX}:g ; \
+ s:@exec_prefix@:${PREFIX}:g ; \
+ s:@bindir@:${PREFIX}/bin:g ; \
+ s:@GS@:espgs:g' \
+ ${ESPGS_WRKSRC}/pstoraster.in > ${ESPGS_WRKSRC}/pstoraster
+ ${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
+ s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
+ s|^DEVICE_DEVS|#DEVICE_DEVS|g' ${WRKSRC}/Makefile.in
pre-build:
${MKDIR} ${WRKSRC}/bin
@@ -41,9 +56,9 @@ pre-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/espgs ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/pstoraster/pstoraster.convs \
+ ${INSTALL_DATA} ${ESPGS_WRKSRC}/pstoraster.convs \
${PREFIX}/etc/cups
- ${INSTALL_SCRIPT} ${WRKSRC}/pstoraster/pstoraster \
+ ${INSTALL_SCRIPT} ${ESPGS_WRKSRC}/pstoraster \
${PREFIX}/libexec/cups/filter
${CHOWN} -R ${CUPSOWN}:${CUPSGRP} \
${PREFIX}/etc/cups ${PREFIX}/libexec/cups/filter
diff --git a/print/cups-pstoraster/distinfo b/print/cups-pstoraster/distinfo
index 25adfd43d654..d739cb351c09 100644
--- a/print/cups-pstoraster/distinfo
+++ b/print/cups-pstoraster/distinfo
@@ -1 +1,2 @@
-MD5 (espgs-7.05.6-source.tar.bz2) = 991cbd7bafc6917a19abf9df3ecad58e
+MD5 (ghostscript/ghostscript-7.07.tar.bz2) = 85fd16cdc8232e5e3679a3a7e30a3359
+MD5 (ghostscript/espgs-7.05.6-source.tar.bz2) = 991cbd7bafc6917a19abf9df3ecad58e
diff --git a/print/cups-pstoraster/files/cups.contrib.mak b/print/cups-pstoraster/files/cups.contrib.mak
new file mode 100644
index 000000000000..71ec8fd85900
--- /dev/null
+++ b/print/cups-pstoraster/files/cups.contrib.mak
@@ -0,0 +1,11 @@
+### ----------------- CUPS Ghostscript Driver ---------------------- ###
+
+cups_= $(GLOBJ)gdevcups.$(OBJ)
+
+$(DD)cups.dev: $(cups_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cups $(cups_)
+ $(ADDMOD) $(DD)cups -lib cupsimage -lib cups
+
+$(GLOBJ)gdevcups.$(OBJ): $(GLSRC)gdevcups.c $(PDEVH)
+ $(GLCC) $(GLO_)gdevcups.$(OBJ) $(C_) $(GLSRC)gdevcups.c
+
diff --git a/print/cups-pstoraster/files/patch-src:gxobj.h b/print/cups-pstoraster/files/patch-src:gxobj.h
new file mode 100644
index 000000000000..4e11eb416f39
--- /dev/null
+++ b/print/cups-pstoraster/files/patch-src:gxobj.h
@@ -0,0 +1,17 @@
+--- src/gxobj.h.orig Fri Feb 22 19:45:59 2002
++++ src/gxobj.h Thu Dec 19 00:16:57 2002
+@@ -99,10 +99,14 @@
+ * The final | is because back pointer values are divided by obj_back_scale,
+ * so objects must be aligned at least 0 mod obj_back_scale.
+ */
++#if !defined(__ia64__)
+ #define obj_align_mod\
+ (((arch_align_long_mod - 1) | (arch_align_ptr_mod - 1) |\
+ (arch_align_double_mod - 1) | (align_bitmap_mod - 1) |\
+ (obj_back_scale - 1)) + 1)
++#else
++#define obj_align_mod 16
++#endif
+ /* The only possible values for obj_align_mod are 4, 8, or 16.... */
+ #if obj_align_mod == 4
+ # define log2_obj_align_mod 2