Subject: pkg/17535: Problem with print/bg5ps Makefile
To: None <gnats-bugs@gnats.netbsd.org>
From: Ruibiao Qiu <ruibiao@miami.arl.wustl.edu>
List: netbsd-bugs
Date: 07/09/2002 11:36:44
>Number:         17535
>Category:       pkg
>Synopsis:       Package print/bg5ps fails to build
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 09 09:27:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ruibiao Qiu
>Release:        All
>Organization:
	Washington University in St. Louis
>Environment:
System: NetBSD miami.arl.wustl.edu 1.5.2 NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST 2001 he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386


>Description:
	The ttf2psm entry of the Makefile of the package print/bg5ps has the $(LIBS)
    before $(OBJS), making the build to fail.
>How-To-Repeat:
	Just try build the package.
>Fix:
	Move the $(LIBS) after $(OBJS) in the ttf2psm entry of the Makefile of 
    the package print/bg5ps can resolve it.
    The following modified patches/patch-aa can be used:

$NetBSD: patch-aa,v 1.1 2002/06/15 08:22:17 shell Exp $

--- Makefile.orig	Tue Feb 15 04:41:27 2000
+++ Makefile
@@ -17,15 +17,16 @@
 
 OBJS = ttf2psm.o b5tou8.o b5_in.o gb_in.o gbtou8.o
 
-CC = gcc
+#CC = gcc
 INSTALL = install
-CFLAGS =
-LIBS = -lttf -lm
-INCLUDEDIR = 
+#CFLAGS =
+LDFLAGS = -Wl,-R${LOCALBASE}/lib
+LIBS = -lttf -lm -lintl
+INCLUDEDIR = -L/usr/lib -L${LOCALBASE}/lib
 
-prefix = /usr
-BINDIR = $(prefix)/bin
-ETCDIR = /etc/chinese/
+#prefix = /usr
+BINDIR = ${PREFIX}/bin
+ETCDIR = ${PKG_SYSCONFDIR}
 
 all: ttf2psm
 
@@ -33,13 +34,13 @@
 	$(CC) -c $(CFLAGS) $(INCLUDEDIR) $< -o $@
 
 ttf2psm: $(OBJS)
-	$(CC) $(CFLAGS) $(INCLUDEDIR) $(LIBS) -o ttf2psm $(OBJS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDEDIR) -o ttf2psm $(OBJS) $(LIBS)
 
 install: all bg5ps bg5ps.conf
 	mkdir -p $(ETCDIR)
 	mkdir -p $(BINDIR)
 	$(INSTALL) -m644 bg5ps.conf $(ETCDIR)/bg5ps.conf
-	$(INSTALL) -m755 bg5ps $(BINDIR)
+	$(INSTALL) -m755 bg5ps.new $(BINDIR)/bg5ps
 	$(INSTALL) -m755 ttf2psm $(BINDIR)
 
 clean:
>Release-Note:
>Audit-Trail:
>Unformatted: