Subject: pkg/15976: let converters/ttf2pt1 be compiled with freetype2
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rxg@ms25.url.com.tw>
List: netbsd-bugs
Date: 03/20/2002 15:10:19
>Number: 15976
>Category: pkg
>Synopsis: let converters/ttf2pt1 be compiled with freetype2
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Mar 19 23:13:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Rui-Xiang Guo
>Release: NetBSD 1.5ZC
>Organization:
>Environment:
System: NetBSD rxgpc.sparqnet.net 1.5ZC NetBSD 1.5ZC (HIVE) #0: Wed Mar 20 12:58:08 CST 2002 rxg@rxgpc.sparqnet.net:/usr/src/sys/arch/i386/compile/HIVE i386
Architecture: i386
Machine: i386
>Description:
let converters/ttf2pt1 be compiled with freetype2
>How-To-Repeat:
It is usable for converting.
>Fix:
1. add these two lines in to Makefile
+USE_CONFIG_WRAPPER= yes
+
+.include "../../graphics/freetype2/buildlink.mk"
2. please replace patch-aa with this:
$NetBSD$
--- Makefile.orig Mon Oct 15 10:32:29 2001
+++ Makefile
@@ -20,7 +20,7 @@
#
# Default
-CFLAGS_SYS= -O
+#CFLAGS_SYS= -O
# For GNU C
#
@@ -54,7 +54,7 @@
# This WON'T BUILD with FT2-beta8, use the FreeType release 2.0.
# http://download.sourceforge.net/freetype/freetype-2.0.tar.gz
-CFLAGS_FT=
+CFLAGS_FT= -DUSE_FREETYPE `${FREETYPE_CONFIG} --cflags`
# To enable use of the FreeType-2 library
# (if the include and lib directory do not match your installation,
@@ -65,7 +65,7 @@
#
# The FreeType-2 library flags (disabled by default)
-LIBS_FT=
+LIBS_FT= `${FREETYPE_CONFIG} --libs` -Wl,-R`${FREETYPE_CONFIG} --prefix`/lib
# To enable use of the FreeType-2 library
# (if the include and lib directory do not match your installation,
@@ -87,17 +87,17 @@
CFLAGS_EXTT1ASM=
#CFLAGS_EXTT1ASM= -DEXTERNAL_T1ASM
-CFLAGS= $(CFLAGS_SYS) $(CFLAGS_FT) $(CFLAGS_PREF)
+CFLAGS+= $(CFLAGS_SYS) $(CFLAGS_FT) $(CFLAGS_PREF)
LIBS= $(LIBS_SYS) $(LIBS_FT)
# Installation-related stuff
#
# The base dir for installation and subdirs in it
-INSTDIR = /usr/local
+INSTDIR = ${PREFIX}
# for binaries
BINDIR = $(INSTDIR)/bin
# for binaries of little general interest
-LIBXDIR = $(INSTDIR)/libexec/ttf2pt1
+LIBXDIR = $(INSTDIR)/bin
# for scripts, maps/encodings etc.
SHAREDIR = $(INSTDIR)/share/ttf2pt1
MANDIR = $(INSTDIR)/man
@@ -118,12 +118,12 @@
app/X11/README app/netscape/README
SUBDIRS = app encodings maps scripts other
-TXTFILES = README* FONTS* CHANGES* COPYRIGHT
+TXTFILES = README README.html FONTS* CHANGES* COPYRIGHT
MANS1=ttf2pt1.1 ttf2pt1_convert.1 ttf2pt1_x2gs.1
MANS=$(MANS1) $(MANS5)
-all: t1asm ttf2pt1 docs mans rpm
+all: ttf2pt1 docs mans
docs: $(DOCS)
@@ -202,31 +202,21 @@
scripts/unhtml <FONTS.hpux.html >FONTS.hpux
install: all
- scripts/inst_dir $(BINDIR)
- scripts/inst_dir $(LIBXDIR)
- scripts/inst_dir $(SHAREDIR)
- scripts/inst_dir $(MANDIR)/man1
- scripts/inst_dir $(MANDIR)/man5
- cp -R $(TXTFILES) $(SUBDIRS) $(SHAREDIR)
- chown -R $(OWNER) $(SHAREDIR)
- chgrp -R $(GROUP) $(SHAREDIR)
- chmod -R go-w $(SHAREDIR)
- scripts/inst_file ttf2pt1 $(BINDIR)/ttf2pt1 $(OWNER) $(GROUP) 0755
- [ -f $(BINDIR)/t1asm ] || scripts/inst_file t1asm $(LIBXDIR)/t1asm $(OWNER) $(GROUP) 0755
+ $(BSD_INSTALL_DATA_DIR) $(SHAREDIR)
+ cp -Rf $(TXTFILES) $(SUBDIRS) $(SHAREDIR)
+ $(BSD_INSTALL_PROGRAM) ttf2pt1 $(BINDIR)
sed 's|^TTF2PT1_BINDIR=$$|TTF2PT1_BINDIR=$(BINDIR)|;\
s|^TTF2PT1_LIBXDIR=$$|TTF2PT1_LIBXDIR=$(LIBXDIR)|;\
s|^TTF2PT1_SHAREDIR=$$|TTF2PT1_SHAREDIR=$(SHAREDIR)|;' <scripts/convert >cvt.tmp
- scripts/inst_file cvt.tmp $(BINDIR)/ttf2pt1_convert $(OWNER) $(GROUP) 0755
- scripts/inst_file cvt.tmp $(SHAREDIR)/scripts/convert $(OWNER) $(GROUP) 0755
- rm cvt.tmp
- scripts/inst_file scripts/x2gs $(BINDIR)/ttf2pt1_x2gs $(OWNER) $(GROUP) 0755
+ $(BSD_INSTALL_SCRIPT) cvt.tmp $(BINDIR)/ttf2pt1_convert
+ rm -f cvt.tmp
+ $(BSD_INSTALL_SCRIPT) scripts/x2gs $(BINDIR)/ttf2pt1_x2gs
for i in $(MANS1); do { \
sed 's|TTF2PT1_BINDIR|$(BINDIR)|;\
s|TTF2PT1_LIBXDIR|$(LIBXDIR)|;\
- s|TTF2PT1_SHAREDIR|$(SHAREDIR)|;' <$$i >$(MANDIR)/man1/$$i \
- && chown $(OWNER) $(MANDIR)/man1/$$i \
- && chgrp $(GROUP) $(MANDIR)/man1/$$i \
- && chmod 0644 $(MANDIR)/man1/$$i \
+ s|TTF2PT1_SHAREDIR|$(SHAREDIR)|;' <$$i >$$i.tmp \
+ && $(BSD_INSTALL_MAN) $$i.tmp $(MANDIR)/man1/$$i \
+ && rm -f $$i.tmp \
|| exit 1; \
} done
3. fix the PLIST with this:
--- /usr/pkgsrc/converters/ttf2pt1/PLIST Sat Mar 2 15:31:51 2002
+++ PLIST Mon Jan 14 19:52:02 2002
@@ -13,7 +13,6 @@
share/ttf2pt1/FONTS.hpux.html
share/ttf2pt1/FONTS.html
share/ttf2pt1/README
-share/ttf2pt1/README.FIRST
share/ttf2pt1/README.html
share/ttf2pt1/app/RPM/ttf2pt1.spec.src
share/ttf2pt1/app/X11/README
@@ -101,5 +100,3 @@
@dirrm share/ttf2pt1/app/RPM
@dirrm share/ttf2pt1/app
@dirrm share/ttf2pt1
-@exec ${MKDIR} -p %D/libexec/ttf2pt1
-@dirrm libexec/ttf2pt1
We do not need README.FIRST, it is just a one line file.
We do not need libexec/ttf2pt1, it is the patch for searching t1asm
but our t1utils pkg install it in /usr/pkg/bin
>Release-Note:
>Audit-Trail:
>Unformatted: