aboutsummaryrefslogtreecommitdiffstats
path: root/russian/X.language
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-08-02 20:56:28 +0800
committerache <ache@FreeBSD.org>1998-08-02 20:56:28 +0800
commitc68fed26f300d33d28d3978f5cb3acc11f2531b7 (patch)
tree5094692ee3118c657edfd11912f62555f1a85a53 /russian/X.language
parentfd83ff97e150a0ef9de5eedc6c6a94f277e39225 (diff)
downloadfreebsd-ports-gnome-c68fed26f300d33d28d3978f5cb3acc11f2531b7.tar.gz
freebsd-ports-gnome-c68fed26f300d33d28d3978f5cb3acc11f2531b7.tar.zst
freebsd-ports-gnome-c68fed26f300d33d28d3978f5cb3acc11f2531b7.zip
Install free fonts by default.
Package tweaks
Diffstat (limited to 'russian/X.language')
-rw-r--r--russian/X.language/Makefile43
-rw-r--r--russian/X.language/distinfo3
-rw-r--r--russian/X.language/pkg-install72
-rw-r--r--russian/X.language/pkg-plist18
4 files changed, 106 insertions, 30 deletions
diff --git a/russian/X.language/Makefile b/russian/X.language/Makefile
index 9f4f56534948..27f06bd73b41 100644
--- a/russian/X.language/Makefile
+++ b/russian/X.language/Makefile
@@ -3,13 +3,19 @@
# Date created: 31 Aug 1995
# Whom: ache
#
-# $Id: Makefile,v 1.17 1998/06/27 05:19:26 asami Exp $
+# $Id: Makefile,v 1.18 1998/07/29 16:11:22 ache Exp $
#
DISTNAME= ru-X11-3.3
CATEGORIES= russian x11
MASTER_SITES= ftp://ftp.kiarchive.ru/pub/misc/fonts/cyrillic/xwindows/
-DISTFILES= x6rus-2.2.0-bin.tgz Type1.koi8-r.tgz
+DISTFILES= x6rus-2.2.0-bin.tgz
+
+.if defined(NON_FREE_FONTS)
+DISTFILES += Type1.koi8-r.tgz
+.else
+DISTFILES += Type1.koi8-r.free.tgz
+.endif
MAINTAINER= ache@FreeBSD.ORG
@@ -19,6 +25,7 @@ NO_WRKSUBDIR= YES
NO_BUILD= YES
USE_X11= YES
+PKGTMP = ${X11BASE}/.Xinstmp
XLIB = ${X11BASE}/lib/X11
CYRF = ${XLIB}/fonts/cyrillic
T1DIR = ${XLIB}/fonts/Type1/fonts.dir
@@ -34,22 +41,16 @@ do-install:
-mkdir -p ${CYRF}/misc
cd ${WRKSRC}; \
${INSTALL_DATA} *.pfb ${XLIB}/fonts/Type1
- grep -q cokoi8n ${T1DIR} || { \
- cp ${T1DIR} ${T1DIR}.bak; \
- d_cnt=`grep '^[1-9][0-9]*$$' ${T1DIR}.bak`; \
- d_add=`wc -l < ${WRKSRC}/fonts.dir-scale.add`; \
- d_new=`expr $$d_cnt + $$d_add`; \
- sed 's/^[1-9][0-9]*$$/'$$d_new/ < ${T1DIR}.bak > ${T1DIR}; \
- cat ${WRKSRC}/fonts.dir-scale.add >> ${T1DIR}; \
- }
- grep -q cokoi8n ${T1SCALE} || { \
- cp ${T1SCALE} ${T1SCALE}.bak; \
- d_cnt=`grep '^[1-9][0-9]*$$' ${T1SCALE}.bak`; \
+ for i in ${T1DIR} ${T1SCALE}; do \
+ grep -q cokoi8n $$i || { \
+ cp $$i $$i.bak; \
+ d_cnt=`grep '^[1-9][0-9]*$$' $$i.bak`; \
d_add=`wc -l < ${WRKSRC}/fonts.dir-scale.add`; \
d_new=`expr $$d_cnt + $$d_add`; \
- sed 's/^[1-9][0-9]*$$/'$$d_new/ < ${T1SCALE}.bak > ${T1SCALE}; \
- cat ${WRKSRC}/fonts.dir-scale.add >> ${T1SCALE}; \
- }
+ sed 's/^[1-9][0-9]*$$/'$$d_new/ < $$i.bak > $$i; \
+ cat ${WRKSRC}/fonts.dir-scale.add >> $$i; \
+ }; \
+ done
cd ${WRKSRC}/cyrillic; \
${INSTALL_DATA} xrus.info ${CYRF}; \
for i in 100dpi 75dpi misc; do \
@@ -114,4 +115,14 @@ do-install:
}; \
fi
+pre-package:
+ -mkdir -p ${PKGTMP}
+ cd ${FILESDIR}; \
+ $(CP) nls_dir_list nls_alias_list replace_nls_list ${PKGTMP}
+ cd ${WRKSRC}; \
+ $(CP) fonts.dir-scale.add ${PKGTMP}
+
+post-package:
+ ${RM} -rf ${PKGTMP}
+
.include <bsd.port.mk>
diff --git a/russian/X.language/distinfo b/russian/X.language/distinfo
index b35e735d1941..d675e168d015 100644
--- a/russian/X.language/distinfo
+++ b/russian/X.language/distinfo
@@ -1,2 +1,3 @@
MD5 (x6rus-2.2.0-bin.tgz) = 5694b3148a41d5ab93459df14b0480db
-MD5 (Type1.koi8-r.tgz) = e259c12fb32ebdf17ced45933dde139c
+MD5 (Type1.koi8-r.tgz) = 9cad0ba71823f3979bc83585ac70d53b
+MD5 (Type1.koi8-r.free.tgz) = 7e2ce82f5026d52e437690ecd6bf433c
diff --git a/russian/X.language/pkg-install b/russian/X.language/pkg-install
new file mode 100644
index 000000000000..79d14937346b
--- /dev/null
+++ b/russian/X.language/pkg-install
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+if [ "$2" != POST-INSTALL ] ; then
+ exit 0
+fi
+
+X11BASE=/usr/X11R6
+FILESDIR=${X11BASE}/.Xinstmp
+XLIB=${X11BASE}/lib/X11
+CYRF=${XLIB}/fonts/cyrillic
+T1DIR=${XLIB}/fonts/Type1/fonts.dir
+T1SCALE=${XLIB}/fonts/Type1/fonts.scale
+
+for i in ${T1DIR} ${T1SCALE}; do
+grep -q cokoi8n $i || {
+ cp $i $i.bak;
+ d_cnt=`grep '^[1-9][0-9]*$' $i.bak`;
+ d_add=`wc -l < ${FILESDIR}/fonts.dir-scale.add`;
+ d_new=`expr $d_cnt + $d_add`;
+ sed 's/^[1-9][0-9]*$/'$d_new/ < $i.bak > $i;
+ cat ${FILESDIR}/fonts.dir-scale.add >> $i;
+};
+done
+if [ -f /etc/XF86Config ]; then
+ grep -q ${CYRF}/misc /etc/XF86Config || {
+ cp /etc/XF86Config /etc/XF86Config.old;
+ (echo "/^[ ]*FontPath/i"; \
+ echo " FontPath \"${CYRF}/75dpi\"";
+ echo " FontPath \"${CYRF}/100dpi\"";
+ echo " FontPath \"${CYRF}/misc\"";
+ echo "."; echo "w"; echo "q"; ) > /tmp/ed.$$;
+ ed - /etc/XF86Config < /tmp/ed.$$;
+ rm -f /tmp/ed.$$;
+ };
+fi
+if [ ! -f ${XLIB}/nls/nls.dir ] ; then
+ dl=`wc -l < ${FILESDIR}/nls_dir_list`;
+ echo $dl > ${XLIB}/nls/nls.dir;
+ cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir;
+ chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.dir;
+ chmod 644 ${XLIB}/nls/nls.dir;
+else
+ grep -q KOI8-R ${XLIB}/nls/nls.dir || {
+ cp ${XLIB}/nls/nls.dir ${XLIB}/nls/nls.dir.bak;
+ d_sub=`grep -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | wc -l`;
+ d_cnt=`grep '^[1-9][0-9]*$' ${XLIB}/nls/nls.dir.bak`;
+ d_add=`wc -l < ${FILESDIR}/nls_dir_list`;
+ d_new=`expr $d_cnt + $d_add - $d_sub`;
+ grep -v -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | \
+ sed 's/^[1-9][0-9]*$/'$d_new/ > ${XLIB}/nls/nls.dir;
+ cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir;
+ };
+fi
+if [ ! -f ${XLIB}/nls/nls.alias ] ; then
+ al=`wc -l < ${FILESDIR}/nls_alias_list`;
+ echo $al > ${XLIB}/nls/nls.alias;
+ cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias;
+ chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.alias;
+ chmod 644 ${XLIB}/nls/nls.alias;
+else
+ grep -q KOI8-R ${XLIB}/nls/nls.alias || {
+ a_cnt=`grep '^[1-9][0-9]*$' ${XLIB}/nls/nls.alias`;
+ a_add=`wc -l < ${FILESDIR}/nls_alias_list`;
+ a_new=`expr $a_cnt + $a_add`;
+ cp ${XLIB}/nls/nls.alias ${XLIB}/nls/nls.alias.bak;
+ sed "s/^[1-9][0-9]*$/$a_new/;q" < ${XLIB}/nls/nls.alias.bak > ${XLIB}/nls/nls.alias;
+ cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias;
+ };
+fi
+
+rm -rf ${FILESDIR}
+exit 0
diff --git a/russian/X.language/pkg-plist b/russian/X.language/pkg-plist
index 9acb6c77a160..db0de6aa9b30 100644
--- a/russian/X.language/pkg-plist
+++ b/russian/X.language/pkg-plist
@@ -1,19 +1,7 @@
-lib/X11/fonts/Type1/arial8.pfb
-lib/X11/fonts/Type1/arialbd8.pfb
-lib/X11/fonts/Type1/arialbi8.pfb
-lib/X11/fonts/Type1/ariali8.pfb
lib/X11/fonts/Type1/cokoi8b.pfb
lib/X11/fonts/Type1/cokoi8bi.pfb
lib/X11/fonts/Type1/cokoi8i.pfb
lib/X11/fonts/Type1/cokoi8n.pfb
-lib/X11/fonts/Type1/cour8.pfb
-lib/X11/fonts/Type1/courbd8.pfb
-lib/X11/fonts/Type1/courbi8.pfb
-lib/X11/fonts/Type1/couri8.pfb
-lib/X11/fonts/Type1/times8.pfb
-lib/X11/fonts/Type1/timesbd8.pfb
-lib/X11/fonts/Type1/timesbi8.pfb
-lib/X11/fonts/Type1/timesi8.pfb
lib/X11/fonts/cyrillic/100dpi/crox1c.pcf.gz
lib/X11/fonts/cyrillic/100dpi/crox1cb.pcf.gz
lib/X11/fonts/cyrillic/100dpi/crox1cbo.pcf.gz
@@ -147,5 +135,9 @@ lib/X11/fonts/cyrillic/misc/koi8x13.pcf.gz
lib/X11/fonts/cyrillic/misc/koi9x15.pcf.gz
lib/X11/fonts/cyrillic/misc/koinil2.pcf.gz
lib/X11/fonts/cyrillic/xrus.info
-lib/X11/nls/nls.alias
+lib/X11/nls/C
lib/X11/nls/ru_SU.KOI8-R
+.Xinstmp/fonts.dir-scale.add
+.Xinstmp/nls_dir_list
+.Xinstmp/replace_nls_list
+.Xinstmp/nls_alias_list