summaryrefslogtreecommitdiffstats
path: root/lib/fonts/Makefile
blob: ed95070860deb0c4fb06fca7f360505e88889506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# SPDX-License-Identifier: GPL-2.0
# Font handling

font-objs := fonts.o

font-objs-$(CONFIG_FONT_SUN8x16)   += font_sun8x16.o
font-objs-$(CONFIG_FONT_SUN12x22)  += font_sun12x22.o
font-objs-$(CONFIG_FONT_8x8)       += font_8x8.o
font-objs-$(CONFIG_FONT_8x16)      += font_8x16.o
font-objs-$(CONFIG_FONT_6x11)      += font_6x11.o
font-objs-$(CONFIG_FONT_7x14)      += font_7x14.o
font-objs-$(CONFIG_FONT_10x18)     += font_10x18.o
font-objs-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
font-objs-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
font-objs-$(CONFIG_FONT_MINI_4x6)  += font_mini_4x6.o
font-objs-$(CONFIG_FONT_6x10)      += font_6x10.o
font-objs-$(CONFIG_FONT_TER16x32)  += font_ter16x32.o

font-objs += $(font-objs-y)

obj-$(CONFIG_FONT_SUPPORT)         += font.o
ngle */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Aap recipe for Polish Vim spell files.

# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
    VIM = ../../../src/vim
@else:
    :progsearch VIM vim

SPELLDIR = ..
FILES    = pl_PL.aff pl_PL.dic

all: $SPELLDIR/pl.iso-8859-2.spl $SPELLDIR/pl.utf-8.spl \
        $SPELLDIR/pl.cp1250.spl ../README_pl.txt

$SPELLDIR/pl.iso-8859-2.spl : $FILES
        :sys env LANG=pl_PL.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q

$SPELLDIR/pl.utf-8.spl : $FILES
        :sys env LANG=pl_PL.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q

$SPELLDIR/pl.cp1250.spl : $FILES
        :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/pl pl_PL" -c q

../README_pl.txt: README_pl_PL.txt
        :copy $source $target

#
# Fetching the files from OpenOffice.org.
#
#OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
#:attr {fetch = $OODIR/%file%} pl_PL.zip

#
# Fetching the files from
#
HTTPDIR = http://www.kurnik.pl/slownik/ort/

# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
# This is a bit tricky, since the file name includes the date.
pl_PL.aff pl_PL.dic: {buildcheck=}
        :assertpkg tar bunzip2
        @from time import strftime, gmtime, time
        @for day in range(20):
            date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
            base =  alt-myspell-pl-$date
            fname = $base.tar.bz2
            :attr {fetch = $HTTPDIR/%file%} $fname
            @try:
                :fetch $fname
                ok = 1
            @except:
                ok = 0
            @if ok:
                @break
        :sys bunzip2 -c $fname | tar xf -
        :move $base/* .
        :deldir $base
        :delete $fname
        @if not os.path.exists('pl_PL.orig.aff'):
            :copy pl_PL.aff pl_PL.orig.aff
        @if not os.path.exists('pl_PL.orig.dic'):
            :copy pl_PL.dic pl_PL.orig.dic
        @if os.path.exists('pl_PL.diff'):
            :sys patch <pl_PL.diff


# Generate diff files, so that others can get the OpenOffice files and apply
# the diffs to get the Vim versions.

diff:
        :assertpkg diff
        :sys {force} diff -a -C 1 pl_PL.orig.aff pl_PL.aff >pl_PL.diff
        :sys {force} diff -a -C 1 pl_PL.orig.dic pl_PL.dic >>pl_PL.diff


# Check for updated spell files.  When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.

check:
        :assertpkg tar bunzip2 diff
        @from time import strftime, gmtime, time
        @for day in range(20):
            date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
            base =  alt-myspell-pl-$date
            fname = $base.tar.bz2
            :attr {fetch = $HTTPDIR/%file%} $fname
            @try:
                :fetch $fname
                ok = 1
            @except:
                ok = 0
            @if ok:
                @break
        :sys bunzip2 -c $fname | tar xf -
        :cd $base
        @try:
            @import stat
            :sys $UNZIP ../pl_PL.zip
            :sys {force} diff ../pl_PL.orig.aff pl_PL.aff >d
            @if os.stat('d')[stat.ST_SIZE] > 0:
                :copy pl_PL.aff ../pl_PL.new.aff
            :sys {force} diff ../pl_PL.orig.dic pl_PL.dic >d
            @if os.stat('d')[stat.ST_SIZE] > 0:
                :copy pl_PL.dic ../pl_PL.new.dic
        @finally:
            :cd ..
            :delete {r}{f}{q} $base
            :delete $fname


# vim: set sts=4 sw=4 :