summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2003-10-03 18:20:40 +0000
committerhubertf <hubertf@pkgsrc.org>2003-10-03 18:20:40 +0000
commit68332c02d1b22a4f8c4be1b0efc20cdc81aed4d9 (patch)
tree610f6e15f8c131ad38183bacc9ba15599c99342e
parented1504117a58e149feef53048d282b8aca3575fc (diff)
downloadpkgsrc-68332c02d1b22a4f8c4be1b0efc20cdc81aed4d9.tar.gz
Import chkfontpath-1.9.7: Command line tool to manage X server's font path
This is a simple terminal mode program for configuring the directories in the X font server's path. It is mostly intended to be used `internally' by RPM when packages with fonts are added or removed, but it may be useful as a stand-alone utility in some instances. XXX hey, *I* didn't make this up... of course xset would have done the XXX job just well, but now programs (openoffice 1.1.0) want to call this, XXX what can we do. :(
-rw-r--r--fonts/chkfontpath/DESCR4
-rw-r--r--fonts/chkfontpath/Makefile30
-rw-r--r--fonts/chkfontpath/PLIST3
-rw-r--r--fonts/chkfontpath/distinfo6
-rw-r--r--fonts/chkfontpath/patches/patch-aa16
-rw-r--r--fonts/chkfontpath/patches/patch-ab49
6 files changed, 108 insertions, 0 deletions
diff --git a/fonts/chkfontpath/DESCR b/fonts/chkfontpath/DESCR
new file mode 100644
index 00000000000..009f9ef2059
--- /dev/null
+++ b/fonts/chkfontpath/DESCR
@@ -0,0 +1,4 @@
+This is a simple terminal mode program for configuring the directories
+in the X font server's path. It is mostly intended to be used
+`internally' by RPM when packages with fonts are added or removed, but
+it may be useful as a stand-alone utility in some instances.
diff --git a/fonts/chkfontpath/Makefile b/fonts/chkfontpath/Makefile
new file mode 100644
index 00000000000..e52946cbcec
--- /dev/null
+++ b/fonts/chkfontpath/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+#
+
+DISTNAME= chkfontpath-1.9.7
+CATEGORIES= fonts
+MASTER_SITES= ftp://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/SRPMS/
+EXTRACT_SUFX= -1.src.rpm
+
+MAINTAINER= hubertf@netbsd.org
+COMMENT= Command line tool to manage X server's font path
+
+BUILD_DEPENDS+= rpm2cpio>=1.1:../../converters/rpm2cpio
+
+MAKE_ENV+= VERSION=${PKGVERSION}
+USE_BUILDLINK2= yes
+USE_GMAKE= yes
+
+# Might as well make this a general scheme for .src.rpm files... - HF
+do-extract:
+ cd ${WRKDIR} ; \
+ ${PREFIX}/bin/rpm2cpio.pl ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
+ | ${PAX} -r ; \
+ ${GTAR} zxf ${DISTNAME}.tar.gz
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/chkfontpath ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/man/en/chkfontpath.8 ${PREFIX}/man/man8
+
+.include "../../devel/popt/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fonts/chkfontpath/PLIST b/fonts/chkfontpath/PLIST
new file mode 100644
index 00000000000..47b5247774a
--- /dev/null
+++ b/fonts/chkfontpath/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+bin/chkfontpath
+man/man8/chkfontpath.8
diff --git a/fonts/chkfontpath/distinfo b/fonts/chkfontpath/distinfo
new file mode 100644
index 00000000000..c8319b983ea
--- /dev/null
+++ b/fonts/chkfontpath/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+
+SHA1 (chkfontpath-1.9.7-1.src.rpm) = 678c96d1e6e0a0c27397d205b45581055c5db7bc
+Size (chkfontpath-1.9.7-1.src.rpm) = 13352 bytes
+SHA1 (patch-aa) = fa54e0d9e096b41fa78c010edecfa6fe658fb935
+SHA1 (patch-ab) = 209948e625493a769671b17ee2fc2696de42c73d
diff --git a/fonts/chkfontpath/patches/patch-aa b/fonts/chkfontpath/patches/patch-aa
new file mode 100644
index 00000000000..e32d09a3555
--- /dev/null
+++ b/fonts/chkfontpath/patches/patch-aa
@@ -0,0 +1,16 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+
+--- Makefile.orig Mon Feb 10 17:22:32 2003
++++ Makefile
+@@ -1,9 +1,9 @@
+ PROGNAME = chkfontpath
+-VERSION=$(shell rpm -q --qf '%{version}\n' --specfile $(PROGNAME).spec | head -1)
++#HF#VERSION=$(shell rpm -q --qf '%{version}\n' --specfile $(PROGNAME).spec | head -1)
+ CVSTAG = r$(subst .,-,$(VERSION))
+ CVSROOT = $(shell cat CVS/Root 2>/dev/null || :)
+
+-CFLAGS +=$(RPM_OPT_FLAGS) -Wall -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE
++CFLAGS +=$(RPM_OPT_FLAGS) -Wall -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE -DX11BASE=\"${X11BASE}\"
+
+ LOADLIBES = -lpopt
+ SUBDIRS = man
diff --git a/fonts/chkfontpath/patches/patch-ab b/fonts/chkfontpath/patches/patch-ab
new file mode 100644
index 00000000000..9d3b739c7a2
--- /dev/null
+++ b/fonts/chkfontpath/patches/patch-ab
@@ -0,0 +1,49 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/10/03 18:20:40 hubertf Exp $
+
+--- chkfontpath.c.orig Thu Jan 18 22:27:13 2001
++++ chkfontpath.c
+@@ -44,7 +44,7 @@ void readFontPath()
+ int catFlag = 0;
+ int noFirstLine = 0;
+
+- f = fopen("/etc/X11/fs/config", "r");
++ f = fopen(X11BASE "/lib/X11/fs/config", "r");
+ if (!f) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config\n", progName);
+@@ -136,9 +136,9 @@ void writeNewConfig()
+ int catFlag = 0, i;
+ struct stat sb;
+
+- stat("/etc/X11/fs/config", &sb);
++ stat(X11BASE "/lib/X11/fs/config", &sb);
+
+- f = fopen("/etc/X11/fs/config", "r");
++ f = fopen(X11BASE "/lib/X11/fs/config", "r");
+ if (!f) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config for reading\n",
+@@ -147,7 +147,7 @@ void writeNewConfig()
+ } else
+ exit(0);
+ }
+- f1 = fopen("/etc/X11/fs/config-", "w");
++ f1 = fopen(X11BASE "/lib/X11/fs/config-", "w");
+ if (!f1) {
+ if (!quiet) {
+ fprintf(stderr, "%s: error opening /etc/X11/fs/config- for writing\n",
+@@ -202,11 +202,11 @@ void writeNewConfig()
+
+ fclose(f);
+ fclose(f1);
+- unlink("/etc/X11/fs/config");
+- rename("/etc/X11/fs/config-", "/etc/X11/fs/config");
++ unlink(X11BASE "/lib/X11/fs/config");
++ rename(X11BASE "/lib/X11/fs/config-", X11BASE "/lib/X11/fs/config");
+
+ /* fix up permissions on the new file */
+- chmod("/etc/X11/fs/config", sb.st_mode);
++ chmod(X11BASE "/lib/X11/fs/config", sb.st_mode);
+ }
+
+ void addDir(const char *newDir)