diff options
-rw-r--r-- | emulators/suse100_fontconfig/Makefile | 14 | ||||
-rw-r--r-- | emulators/suse100_fontconfig/files/generate.awk | 37 | ||||
-rw-r--r-- | emulators/suse100_fontconfig/files/local.conf.in | 11 | ||||
-rw-r--r-- | emulators/suse91_fontconfig/Makefile | 4 | ||||
-rw-r--r-- | emulators/suse91_fontconfig/files/generate.awk | 37 | ||||
-rw-r--r-- | emulators/suse91_fontconfig/files/local.conf.in | 11 |
6 files changed, 110 insertions, 4 deletions
diff --git a/emulators/suse100_fontconfig/Makefile b/emulators/suse100_fontconfig/Makefile index a631f735a3a..de13828a171 100644 --- a/emulators/suse100_fontconfig/Makefile +++ b/emulators/suse100_fontconfig/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.6 2007/07/29 05:18:42 jlam Exp $ +# $NetBSD: Makefile,v 1.7 2007/08/23 20:42:32 jlam Exp $ DISTNAME= suse_fontconfig-${SUSE_VERSION} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= emulators DISTFILES= fontconfig-2.3.2.20050721-10.2.${SUSE_ARCH}.rpm @@ -11,4 +11,14 @@ COMMENT= Linux compatibility package for fontconfig EMUL_MODULES.linux= expat freetype2 .include "../../emulators/suse100_linux/Makefile.common" + +do-build: + ${SETENV} LOCALBASE=${LOCALBASE:Q} X11PREFIX=${X11PREFIX:Q} \ + ${AWK} -f ${FILESDIR}/generate.awk ${FILESDIR}/local.conf.in \ + > ${WRKSRC}/local.conf + +post-install: + ${INSTALL_DATA} ${WRKSRC}/local.conf \ + ${PREFIX}/${EMULSUBDIR}/etc/fonts/local.conf + .include "../../mk/bsd.pkg.mk" diff --git a/emulators/suse100_fontconfig/files/generate.awk b/emulators/suse100_fontconfig/files/generate.awk new file mode 100644 index 00000000000..2560cb1b323 --- /dev/null +++ b/emulators/suse100_fontconfig/files/generate.awk @@ -0,0 +1,37 @@ +# $NetBSD: generate.awk,v 1.1 2007/08/23 20:42:32 jlam Exp $ +# +# AWK script to replace @FONTDIR_ENTRIES@ with a list of <dir></dir> +# entries taken from the "entries" array. We do variable replacement +# for ${LOCALBASE} and ${X11PREFIX} using the values of LOCALBASE and +# X11PREFIX that are passed to the script. +# + +BEGIN { + entries[0] = "${X11PREFIX}/lib/X11/fonts" + entries[1] = "${LOCALBASE}/OpenOffice.org1.1.5/share/fonts" + entries[2] = "${LOCALBASE}/openoffice.org2.2/share/fonts" + entries[3] = "${LOCALBASE}/java/blackdown-1.3.1/lib/fonts" + entries[4] = "${LOCALBASE}/java/scsl-1.5/lib/fonts" + entries[5] = "${LOCALBASE}/java/sun-1.3.1/lib/fonts" + entries[6] = "${LOCALBASE}/java/sun-1.4/lib/fonts" + entries[7] = "${LOCALBASE}/java/sun-1.5/lib/fonts" + entries[8] = "${LOCALBASE}/java/sun-6/lib/fonts" + entries[9] = "${LOCALBASE}/Acrobat4/Resource/CIDFont" + entries[10] = "${LOCALBASE}/Acrobat5/Resource/Font" + entries[11] = "${LOCALBASE}/Acrobat7/Resource/CIDFont" + num_entries = 12 + + LOCALBASE = ENVIRON["LOCALBASE"] ? ENVIRON["LOCALBASE"] : "/usr/pkg" + X11PREFIX = ENVIRON["X11PREFIX"] ? ENVIRON["X11PREFIX"] : "/usr/X11R6" +} + +/^@FONTDIR_ENTRIES@/ { + for (i = 0; i < num_entries; i++) { + entry = entries[i] + sub("[$]{LOCALBASE}", LOCALBASE, entry) + sub("[$]{X11PREFIX}", X11PREFIX, entry) + print " <dir>" entry "</dir>" + } + next +} +{ print } diff --git a/emulators/suse100_fontconfig/files/local.conf.in b/emulators/suse100_fontconfig/files/local.conf.in new file mode 100644 index 00000000000..5eb84aa03f2 --- /dev/null +++ b/emulators/suse100_fontconfig/files/local.conf.in @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $NetBSD: local.conf.in,v 1.1 2007/08/23 20:42:32 jlam Exp $ --> +<!-- /etc/fonts/fonts.conf file to configure system font access --> +<fontconfig> + +<!-- Local font directory list --> + +@FONTDIR_ENTRIES@ + +</fontconfig> diff --git a/emulators/suse91_fontconfig/Makefile b/emulators/suse91_fontconfig/Makefile index e8f661ea773..379b0f04e6e 100644 --- a/emulators/suse91_fontconfig/Makefile +++ b/emulators/suse91_fontconfig/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.8 2007/07/29 05:19:07 jlam Exp $ +# $NetBSD: Makefile,v 1.9 2007/08/23 20:42:32 jlam Exp $ DISTNAME= suse_fontconfig-${SUSE_VERSION} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= emulators MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/emulators/suse91_fontconfig/files/generate.awk b/emulators/suse91_fontconfig/files/generate.awk new file mode 100644 index 00000000000..c8611ce15af --- /dev/null +++ b/emulators/suse91_fontconfig/files/generate.awk @@ -0,0 +1,37 @@ +# $NetBSD: generate.awk,v 1.1 2007/08/23 20:42:33 jlam Exp $ +# +# AWK script to replace @FONTDIR_ENTRIES@ with a list of <dir></dir> +# entries taken from the "entries" array. We do variable replacement +# for ${LOCALBASE} and ${X11PREFIX} using the values of LOCALBASE and +# X11PREFIX that are passed to the script. +# + +BEGIN { + entries[0] = "${X11PREFIX}/lib/X11/fonts" + entries[1] = "${LOCALBASE}/OpenOffice.org1.1.5/share/fonts" + entries[2] = "${LOCALBASE}/openoffice.org2.2/share/fonts" + entries[3] = "${LOCALBASE}/java/blackdown-1.3.1/lib/fonts" + entries[4] = "${LOCALBASE}/java/scsl-1.5/lib/fonts" + entries[5] = "${LOCALBASE}/java/sun-1.3.1/lib/fonts" + entries[6] = "${LOCALBASE}/java/sun-1.4/lib/fonts" + entries[7] = "${LOCALBASE}/java/sun-1.5/lib/fonts" + entries[8] = "${LOCALBASE}/java/sun-6/lib/fonts" + entries[9] = "${LOCALBASE}/Acrobat4/Resource/CIDFont" + entries[10] = "${LOCALBASE}/Acrobat5/Resource/Font" + entries[11] = "${LOCALBASE}/Acrobat7/Resource/CIDFont" + num_entries = 12 + + LOCALBASE = ENVIRON["LOCALBASE"] ? ENVIRON["LOCALBASE"] : "/usr/pkg" + X11PREFIX = ENVIRON["X11PREFIX"] ? ENVIRON["X11PREFIX"] : "/usr/X11R6" +} + +/^@FONTDIR_ENTRIES@/ { + for (i = 0; i < num_entries; i++) { + entry = entries[i] + sub("[$]{LOCALBASE}", LOCALBASE, entry) + sub("[$]{X11PREFIX}", X11PREFIX, entry) + print " <dir>" entry "</dir>" + } + next +} +{ print } diff --git a/emulators/suse91_fontconfig/files/local.conf.in b/emulators/suse91_fontconfig/files/local.conf.in new file mode 100644 index 00000000000..ba496c68a44 --- /dev/null +++ b/emulators/suse91_fontconfig/files/local.conf.in @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $NetBSD: local.conf.in,v 1.1 2007/08/23 20:42:33 jlam Exp $ --> +<!-- /etc/fonts/fonts.conf file to configure system font access --> +<fontconfig> + +<!-- Local font directory list --> + +@FONTDIR_ENTRIES@ + +</fontconfig> |