diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-06 20:06:28 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-06 20:06:28 +0200 |
commit | 38419263f6033f1ac086f27d80136eb030c9cb4f (patch) | |
tree | 9c6ce13c444632b34c467d47747947f2474ab708 | |
parent | 48f0e5e16de67b3870e5f3f05956978f925c2efe (diff) |
add liberation truetype font package and add mkfontscale check, complete the other font checks
-rw-r--r-- | mk/image.mk | 13 | ||||
-rw-r--r-- | package/liberation-fonts-ttf/Makefile | 29 | ||||
-rwxr-xr-x | scripts/prereq.sh | 47 |
3 files changed, 84 insertions, 5 deletions
diff --git a/mk/image.mk b/mk/image.mk index a3e044fde..f2f00e650 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -61,11 +61,14 @@ image-prepare-post: rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \ dd if=$$rng bs=512 count=1 >>${TARGET_DIR}/etc/.rnd 2>/dev/null; \ chmod 600 ${TARGET_DIR}/etc/.rnd - @-if [ -d ${TARGET_DIR}/usr/share/fonts/X11 ];then \ - for i in $$(ls ${TARGET_DIR}/usr/share/fonts/X11/);do \ - mkfontdir ${TARGET_DIR}/usr/share/fonts/X11/$${i}; \ - done; \ - fi + -for dir in X11 truetype; do \ + if [ -d ${TARGET_DIR}/usr/share/fonts/$${dir} ];then \ + for i in $$(ls ${TARGET_DIR}/usr/share/fonts/$${dir}/);do \ + mkfontdir ${TARGET_DIR}/usr/share/fonts/$${dir}/$${i}; \ + mkfontscale ${TARGET_DIR}/usr/share/fonts/$${dir}/$${i}; \ + done; \ + fi; \ + done $(SED) '/^root:/s!:/bin/sh$$!:${ROOTSH}!' ${TARGET_DIR}/etc/passwd -rm -f ${TARGET_DIR}/bin/sh ln -sf ${BINSH} ${TARGET_DIR}/bin/sh diff --git a/package/liberation-fonts-ttf/Makefile b/package/liberation-fonts-ttf/Makefile new file mode 100644 index 000000000..944b0448a --- /dev/null +++ b/package/liberation-fonts-ttf/Makefile @@ -0,0 +1,29 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= liberation-fonts-ttf +PKG_VERSION:= 2.00.1 +PKG_RELEASE:= 1 +PKG_HASH:= 7890278a6cd17873c57d9cd785c2d230d9abdea837e96516019c5885dd271504 +PKG_DESCR:= free fonts compatible to msttfonts +PKG_SECTION:= x11/fonts +PKG_URL:= https://fedorahosted.org/liberation-fonts/ +PKG_SITES:= https://fedorahosted.org/releases/l/i/liberation-fonts/ + +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBERATION_FONTS_TTF,liberation-fonts-ttf,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION))) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +liberation-fonts-ttf-install: + $(INSTALL_DIR) $(IDIR_LIBERATION_FONTS_TTF)/usr/share/fonts/truetype/liberation + $(CP) $(WRKSRC)/*.ttf $(IDIR_LIBERATION_FONTS_TTF)/usr/share/fonts/truetype/liberation + +include $(ADK_TOPDIR)/mk/pkg-bottom.mk diff --git a/scripts/prereq.sh b/scripts/prereq.sh index 769487df7..a27b443c4 100755 --- a/scripts/prereq.sh +++ b/scripts/prereq.sh @@ -704,6 +704,30 @@ else NEED_XKBCOMP="$NEED_XKBCOMP xkeyboard-config" fi + if [ -n "$ADK_PACKAGE_FONT_BH_100DPI" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-100dpi" + fi + + if [ -n "$ADK_PACKAGE_FONT_BH_75DPI" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-75dpi" + fi + + if [ -n "$ADK_PACKAGE_FONT_BH_TYPE1" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-type1" + fi + + if [ -n "$ADK_PACKAGE_FONT_BH_TTF" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-ttf" + fi + + if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_100DPI" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-lucidatypewriter-100dpi" + fi + + if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_75DPI" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bh-lucidatypewriter-75dpi" + fi + if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_100DPI" ]; then NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-100dpi" fi @@ -712,6 +736,10 @@ else NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-75dpi" fi + if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_TYPE1" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-type1" + fi + if [ -n "$ADK_PACKAGE_FONT_ADOBE_100DPI" ]; then NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-100dpi" fi @@ -720,6 +748,18 @@ else NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-75dpi" fi + if [ -n "$ADK_PACKAGE_FONT_XFREE86_TYPE1" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-xfree86-type1" + fi + + if [ -n "$ADK_PACKAGE_FONT_MISC_MISC" ]; then + NEED_MKFONTDIR="$NEED_MKFONTDIR font-misc-misc" + fi + + if [ -n "$ADK_PACKAGE_LIBERATION_FONTS_TTF" ]; then + NEED_MKFONTSCALE="$NEED_MKFONTSCALE liberation-fonts-ttf" + fi + if [ -n "$NEED_MKFONTDIR" ]; then if ! which mkfontdir >/dev/null 2>&1; then printf "You need mkfontdir to build $NEED_MKFONTDIR \n" @@ -727,6 +767,13 @@ else fi fi + if [ -n "$NEED_MKFONTSCALE" ]; then + if ! which mkfontscale >/dev/null 2>&1; then + printf "You need mkfontscale to build $NEED_MKFONTSCALE \n" + out=1 + fi + fi + if [ -n "$NEED_XKBCOMP" ]; then if ! which xkbcomp >/dev/null 2>&1; then printf "You need xkbcomp to build $NEED_XKBCOMP \n" |