Bug 53107 - Update port: print/cups-pstoraster to 7.07
Summary: Update port: print/cups-pstoraster to 7.07
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 15:20 UTC by tkato
Modified: 2003-07-21 15:28 UTC (History)
0 users

See Also:


Attachments
file.diff (4.58 KB, patch)
2003-06-09 15:20 UTC, tkato
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato 2003-06-09 15:20:18 UTC
- Update to version 7.07

New file:
files/cups.contrib.mak
files/patch-src:gxobj.h
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2003-06-25 12:51:39 UTC
State Changed
From-To: open->feedback

Fails for me with: 

===>  Applying FreeBSD patches for cups-pstoraster-7.07 
/bin/ln -sf /usr/home/tilman/ports/print/cups-pstoraster/work/espgs-7                  devcups.c /usr/home/tilman/ports/print/cups-pstoraster/work/ghostscri 
/bin/cat /usr/home/tilman/ports/print/cups-pstoraster/files/cups.cont                  me/tilman/ports/print/cups-pstoraster/work/ghostscript-7.07/src/contr 
cat: /usr/home/tilman/ports/print/cups-pstoraster/files/cups.contrib.                  or directory
Comment 2 tkato 2003-06-25 13:29:55 UTC
Probably you've added wrong number to "-p" option when
using patch command.

Please make sure that files/ dir isn't empty before
building updated port.
Comment 3 tkato 2003-06-26 14:43:28 UTC
Here is an up-to-date patch:


diff -urN /usr/ports/print/cups-pstoraster/Makefile print/cups-pstoraster/Makefile
--- /usr/ports/print/cups-pstoraster/Makefile	Mon Jun  9 07:15:33 2003
+++ print/cups-pstoraster/Makefile	Thu Jun 26 18:40:39 2003
@@ -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
-
-USE_REINPLACE=	yes
+		--with-gs=espgs
+MAKE_ARGS=	CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
+		DEVICE_DEVS="\$$(DD)cups.dev"
+
+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 @@
 
 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 -urN /usr/ports/print/cups-pstoraster/distinfo print/cups-pstoraster/distinfo
--- /usr/ports/print/cups-pstoraster/distinfo	Wed Feb 12 19:12:32 2003
+++ print/cups-pstoraster/distinfo	Mon Jun  9 08:26:47 2003
@@ -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 -urN /usr/ports/print/cups-pstoraster/files/cups.contrib.mak print/cups-pstoraster/files/cups.contrib.mak
--- /usr/ports/print/cups-pstoraster/files/cups.contrib.mak	Thu Jan  1 09:00:00 1970
+++ print/cups-pstoraster/files/cups.contrib.mak	Mon Jun  9 10:31:01 2003
@@ -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 -urN /usr/ports/print/cups-pstoraster/files/patch-src:gxobj.h print/cups-pstoraster/files/patch-src:gxobj.h
--- /usr/ports/print/cups-pstoraster/files/patch-src:gxobj.h	Thu Jan  1 09:00:00 1970
+++ print/cups-pstoraster/files/patch-src:gxobj.h	Mon Jun  9 10:41:29 2003
@@ -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
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2003-07-04 16:41:53 UTC
State Changed
From-To: feedback->open

New diff and pilot error from myself
Comment 5 Tilman Keskinoz freebsd_committer freebsd_triage 2003-07-21 15:28:51 UTC
State Changed
From-To: open->closed

committed, thanks