Subject: pkg/17325: ghostscript build on ZOULARIS fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 06/19/2002 11:18:44
>Number:         17325
>Category:       pkg
>Synopsis:       ghostscript-nox11 build fails on ZOULARIS
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 19 09:19:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Eric Schnoebelen
>Release:        pkgsrc 2002-06-18, ZOULARIS 20000522
>Organization:
Central Iowa (Model) Railroad, Plano, TX, US
>Environment:
System: NetBSD egsner 1.5.3 NetBSD 1.5.3 (GENERIC) #0: Thu May 9 23:12:47 CDT 2002 eric@egsner:/work/eric/NetBSD-1.5/src/sys/arch/i386/compile/GENERIC i386

System: SunOS netra4918.cirr.com 5.8 Generic_108528-08 sun4u sparc

>Description:
	Attempting to build ghostscript-nox11 fails during the configure
	phase on ZOULARIS 20000522.

	The culprit is gimpprint-configure using ${GREP} with an
	${EGREP} style pattern.  Solaris' grep doesn't support egrep
	style patterns.

	Additionally, ghostscript-x11 6.0 requires the C++ libraries,
	which are not installed as part of ZOULARIS 20000522.  Thus, a
	build dependency on ../../lang/gcc was added in the case of
	OPSYS being SunOS.

	Final note, the `@' signs in Makefile.common were changed to
	${_PKG_SILENT} so they could be enabled/disabled using
	PKG_DEBUG.

>How-To-Repeat:
	Build print/ghostscript-nox11 on Solaris using ZOULARIS.
>Fix:

The following has been tested on ZOULARIS 20000522, running on Solaris
8, and on NetBSD 1.5.x/i386.  It works as expected on both platforms.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	m.c.diffs
#
echo x - m.c.diffs
sed 's/^X//' >m.c.diffs << 'END-of-m.c.diffs'
XIndex: Makefile.common
X===================================================================
XRCS file: /cvsroot/pkgsrc/print/ghostscript-nox11/Makefile.common,v
Xretrieving revision 1.33
Xdiff -b -u -w -r1.33 Makefile.common
X+++ Makefile.common	2002/06/19 14:41:24
X@@ -144,6 +144,7 @@
X MAKE_FLAGS+=		XLIBS="${XLIBS}"
X 
X .if ${OPSYS} == "SunOS"
X+BUILD_DEPENDS+=		gcc>=2.95.3:../../lang/gcc
X LDFLAGS+=		-L${LOCALBASE}/bsd/lib -Wl,-R${LOCALBASE}/bsd/lib
X .endif
X 
X@@ -203,7 +204,7 @@
X 
X GS_CONF_PREREQ+=	hpijs-configure
X hpijs-configure:
X-	@cd ${HPIJS_WRKSRC} &&						\
X+	${_PKG_SILENT}cd ${HPIJS_WRKSRC} &&						\
X 	${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}"	\
X 		${CONFIGURE_ENV}					\
X 		${CONFIGURE_SCRIPT} ${HPIJS_CONFIGURE_ARGS} &&		\
X@@ -213,16 +214,16 @@
X 
X GS_BUILD_PREREQ+=	hpijs-build
X hpijs-build:
X-	@cd ${HPIJS_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} all
X+	${_PKG_SILENT}cd ${HPIJS_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} all
X 
X GS_INSTALL_PREREQ+=	hpijs-install
X hpijs-install:
X-	@cd ${HPIJS_WRKSRC} &&						\
X+	${_PKG_SILENT}cd ${HPIJS_WRKSRC} &&						\
X 	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} install docdir=${HTMLDIR}/hpijs
X 
X GS_CONF_PREREQ+=	gimpprint-configure
X gimpprint-configure:
X-	@cd ${GIMPPRINT_WRKSRC} &&					\
X+	${_PKG_SILENT}cd ${GIMPPRINT_WRKSRC} &&					\
X 	${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}"	\
X 		${GIMPPRINT_CONFIGURE_ENV}				\
X 		${CONFIGURE_SCRIPT} ${GIMPPRINT_CONFIGURE_ARGS} &&	\
X@@ -230,7 +231,7 @@
X 	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} all-local &&		\
X 	( ${ECHO} '#ifndef GIMPPRINT_VERSION_FIX';			\
X 	  ${ECHO} '#define GIMPPRINT_VERSION_FIX';			\
X-	  ${GREP} "#define \(VERSION\|RELEASE_DATE\)" ../../config.h;	\
X+	  ${EGREP} '#define (VERSION|RELEASE_DATE)' ../../config.h;	\
X 	  ${ECHO} '#endif /* GIMPPRINT_VERSION_FIX */';			\
X 	) >> gdevstp-print.h;						\
X 	${CP} *.c *.h ${WRKSRC}/src &&					\
END-of-m.c.diffs
exit

>Release-Note:
>Audit-Trail:
>Unformatted: