summaryrefslogtreecommitdiffstats
path: root/media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild')
-rw-r--r--media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild114
1 files changed, 114 insertions, 0 deletions
diff --git a/media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild b/media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild
new file mode 100644
index 0000000..1d2660e
--- /dev/null
+++ b/media-fonts/ds-fonts/ds-fonts-1.0-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+EAPI=5
+inherit font eutils
+
+DESCRIPTION="DarkSoft Fonts (Bitmap,Type1,TrueType)"
+SLOT="0"
+SRC_URI="http://darksoft.org/files/darklin/ds-xfonts.tar.bz2
+ http://darksoft.org/files/darklin/ds-ttffonts.tar.bz2
+ http://darksoft.org/files/darklin/ds-type1fonts.tar.bz2
+ http://darksoft.org/files/darklin/uming.ttf.bz2"
+KEYWORDS="alpha amd64 ppc sparc x86"
+DEPEND="dev-lang/perl
+ x11-base/xorg-x11"
+
+# Old crap
+FONT_ROOT=/usr/share/fonts/DarkLin
+# This we need
+FONT_DIR=/usr/share/fonts/ds-fonts
+
+S="${WORKDIR}"
+
+src_unpack() {
+ einfo "Unpacking sources..."
+ unpack uming.ttf.bz2
+}
+
+src_install() {
+ GS_VER=`gs -v | perl -pe '$_ =~ m/([7-9]\.\d{1,3})(.\d{1,3})?/;print $1;s/.*\n//'`
+
+ mkdir -p ${D}/${FONT_ROOT}
+ tar xjf ${DISTDIR}/ds-xfonts.tar.bz2 -C ${D}/${FONT_ROOT}
+ tar xjf ${DISTDIR}/ds-ttffonts.tar.bz2 -C ${D}/${FONT_ROOT}
+ tar xjf ${DISTDIR}/ds-type1fonts.tar.bz2 -C ${D}/${FONT_ROOT}
+ tar xjf ${FILESDIR}/aliases.tar.bz2 -C ${D}/${FONT_ROOT}/Type1
+
+ chmod 0755 `find ${D}/${FONT_ROOT} -type d`
+ chmod 0644 `find ${D}/${FONT_ROOT} -type f`
+
+ for name in `find ${D}/${FONT_ROOT} -type f -name *.Z`; do
+ gunzip $name
+ (
+ cd `dirname $name`
+ gzip `basename $name .Z`
+ )
+ done
+
+ mkdir -p ${D}/${FONT_DIR} || die
+ mv *.ttf ${D}/${FONT_DIR} || die
+ chmod 0755 `find ${D}/${FONT_DIR} -type d` || die
+ chmod 0644 `find ${D}/${FONT_DIR} -type f` || die
+}
+
+
+rebuild_fontfiles() {
+ einfo "Refreshing fonts.scale and fonts.dir..."
+
+ (
+ cd ${FONT_ROOT}/TrueType/win
+ mkfontscale
+ mkfontdir
+ )
+
+ (
+ cd ${FONT_ROOT}/TrueType/misc
+ mkfontscale
+ mkfontdir
+ )
+
+ (
+ cd ${FONT_ROOT}/Russian
+ for name in `find . -type d`; do
+ (
+ cd $name || die
+ mkfontdir
+ )
+ done
+ )
+
+ (
+ cd ${FONT_DIR}
+ mkfontscale
+ mkfontdir
+ )
+}
+
+pkg_postinst() {
+ rebuild_fontfiles
+
+ einfo "In order to make X see the fonts, you need to add the"
+ einfo "following lines to the files section of your "
+ einfo "/etc/X11/XF86Config (or the XOrg equivalent):"
+ einfo " FontPath \"${FONT_ROOT}/TrueType/win:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/TrueType/misc:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Russian/misc:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Russian/100dpi:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Russian/75dpi:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Russian/AltIsoKoi:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Russian/Win:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Unicode:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Type1/All:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Type1/ER-KOI8:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Type1/ER-CP1251:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Type1/KOI8:unscaled\""
+ einfo " FontPath \"${FONT_ROOT}/Type1/Misc-KOI8:unscaled\""
+
+ einfo ""
+ einfo "In order to make them accessible to your current X"
+ einfo "session, run:"
+ einfo " xset fp+ ${FONT_DIR}"
+ einfo " xset fp rehash"
+}