pkgsrc/print/bg5ps/patches/patch-ac
shell 4cb61f8992 Initial import of bg5ps-1.3.0 (PR#15017)
convert Big5/GB encoded files to postscript
---
bg5ps is a Python script that generates Postscript from Chinese
Big5/GB encoded files, using ttf fonts.
2002-06-15 08:22:17 +00:00

34 lines
1.5 KiB
Text

$NetBSD: patch-ac,v 1.1.1.1 2002/06/15 08:22:18 shell Exp $
--- bg5ps.orig Tue Feb 15 04:46:43 2000
+++ bg5ps
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
################################################################################
# bg5ps.py which use the ttf2ps program to convert the Big5 Coding chinese #
# text into printable postscript file. Since it uses true type font, the #
@@ -11,7 +11,7 @@
#
# Revision 1.5 2000/02/14 20:40:04 platin
#
-# Change default config file to /etc/chinese/bg5ps.conf
+# Change default config file to %%ETCDIR%%/bg5ps.conf
#
# Revision 1.4 2000/02/14 20:28:35 platin
# Automatic selection of fontName in echo Encoding.
@@ -443,10 +443,10 @@
exec l
cf.close()
else:
- sys.stderr.write("\n~/.bg5ps.conf not found.\n Trying /etc/chinese/bg5ps.conf.")
- if os.path.isfile("/etc/chinese/bg5ps.conf"):
- sys.stderr.write("\n /etc/chinese/bg5ps.conf found. Use configuration file /etc/chinese/bg5ps.conf")
- cf=open("/etc/chinese/bg5ps.conf","r")
+ sys.stderr.write("\n~/.bg5ps.conf not found.\n Trying %%ETCDIR%%/bg5ps.conf.")
+ if os.path.isfile("%%ETCDIR%%/bg5ps.conf"):
+ sys.stderr.write("\n %%ETCDIR%%/bg5ps.conf found. Use configuration file %%ETCDIR%%/bg5ps.conf")
+ cf=open("%%ETCDIR%%/bg5ps.conf","r")
for l in cf.readlines():
exec l
cf.close()