Subject: pkg/9980: build of ghostscript5[-x11] may fail
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 04/25/2000 06:12:13
>Number:         9980
>Category:       pkg
>Synopsis:       build of ghostscript5[-x11] may fail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 25 06:13:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Thilo Manske
>Release:        *
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>Environment:
	
System: NetBSD WintelKiller 1.4X NetBSD 1.4X (WintelKiller) #214: Wed Apr 19 23:55:23 MEST 2000 thilo@WintelKiller:/usr/src/sys/arch/i386/compile/WintelKiller i386


>Description:

If you have graphics/jpeg-6b installed but wiped its work directory (or
installed it as binary package), building of ghostscript* fails with:
"don't know how to make jpeg/jpeglib.h" (typed from memory)

The reason for this is a symlink make by the Makefile.common pointing in the
nonexistent work directory of graphics/jpeg

>How-To-Repeat:
cd /usr/pkgsrc/graphics/jpeg
make install
make cleandir
cd /usr/pkgsrc/print/ghostscript5
make

>Fix:
Dunno.
Extract a private copy of jpeg into ghostscript's worksrc und
use that?

At least ghostscript should print out a warning if graphics/jpeg's workdir
doesn't exist or run a make extract there instead of failing with strange
messages.

Here's a quick and dirty patch for the latter:

--- Makefile.common.old	Fri Apr 21 13:57:32 2000
+++ Makefile.common	Tue Apr 25 14:52:25 2000
@@ -71,6 +71,9 @@
 post-extract:
 	cd ${WRKSRC}; ${PAX} -rf ${WRKDIR}/hpdj-${HPDJ_VER}/hpdj.tar
 	${RM} -f ${WRKSRC}/jpeg
+.if !exists(${BUILD_ROOT}/graphics/jpeg/${WRKDIR:T}/jpeg-6b)
+	cd ${BUILD_ROOT}/graphics/jpeg;${MAKE} extract
+.endif
 	${LN} -s ${BUILD_ROOT}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ${WRKSRC}/jpeg
 	cd ${WRKSRC}; ${LOCALBASE}/bin/unzip -uLa ${_DISTDIR}/${HP850_DRV}
 	${RM} -f ${WRKSRC}/${PDF_SEC}
>Release-Note:
>Audit-Trail:
>Unformatted: