Skip to content

Commit

Permalink
Make fonts repecting XDG
Browse files Browse the repository at this point in the history
Xorg is now looking in ${LOCALBASE}/share/fonts by default
Xorg now accepts symlinks in etc/X11/fontpath.d (as decribed in Xserver(1))
Large cleanup on lots of font ports
All fonts are now properly dynamically generating fonts.dir and fonts.scale
instead of sometime overwriting existing ones)
All fonts are generating fontconfig's cache
Improve consistency in fonts ports
  • Loading branch information
bapt committed Mar 21, 2015
1 parent 9167139 commit fe5a7e4
Show file tree
Hide file tree
Showing 413 changed files with 6,371 additions and 7,365 deletions.
4 changes: 2 additions & 2 deletions Mk/Scripts/check-stagedir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ check_orphans_from_plist() {
*/.svnignore) ;;
*/CVS/*|'@dir '*/CVS) ;;
*/info/dir|info/dir) ;;
lib/X11/fonts/*/fonts.dir) ;;
lib/X11/fonts/*/fonts.scale) ;;
share/fonts/*/fonts.dir) ;;
share/fonts/*/fonts.scale) ;;
share/applications/mimeinfo.cache) ;;
share/mime/XMLnamespaces) ;;
share/mime/aliases) ;;
Expand Down
4 changes: 2 additions & 2 deletions Mk/Uses/display.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ display_ARGS= install

.if !defined(DISPLAY)
BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver \
${LOCALBASE}/lib/X11/fonts/misc/8x13O.pcf.gz:${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps \
${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/font-alias \
${LOCALBASE}/share/fonts/misc/8x13O.pcf.gz:${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps \
${LOCALBASE}/share/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/font-alias \
${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \
xkbcomp:${PORTSDIR}/x11/xkbcomp

Expand Down
2 changes: 1 addition & 1 deletion Mk/Uses/fonts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN_DEPENDS+= fc-cache:${PORTSDIR}/x11-fonts/fontconfig \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale

FONTNAME?= ${PORTNAME}
FONTSDIR?= ${PREFIX}/lib/X11/fonts/${FONTNAME}
FONTSDIR?= ${PREFIX}/share/fonts/${FONTNAME}
PLIST_FILES+= "@fcfontsdir ${FONTSDIR}"
SUB_LIST+= FONTSDIR="${FONTSDIR}"
PLIST_SUB+= FONTSDIR="${FONTSDIR}"
Expand Down
10 changes: 7 additions & 3 deletions Mk/bsd.xorg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ USES+= libtool

. if ${XORG_CAT} == "font"
FONTNAME?= ${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/}
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/lib/X11/fonts
CONFIGURE_ENV+= FONTROOTDIR=${PREFIX}/lib/X11/fonts
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts
CONFIGURE_ENV+= FONTROOTDIR=${PREFIX}/share/fonts
. if !defined(NOFONT)
USES+= fonts
BUILD_DEPENDS+= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
PLIST_FILES+= "@comment ${FONTSDIR}/fonts.dir" \
"@comment ${FONTSDIR}/fonts.scale"
. endif
. endif

Expand All @@ -93,7 +95,9 @@ USES+= pathfix
DISTFILES?= xorg-server-${PORTVERSION}.tar.bz2
WRKSRC= ${WRKDIR}/xorg-server-${PORTVERSION}
USES+= pathfix
CONFIGURE_ARGS+= --with-xkb-path=${LOCALBASE}/share/X11/xkb
CONFIGURE_ARGS+= --with-xkb-path=${LOCALBASE}/share/X11/xkb \
--with-fontrootdir=${LOCALBASE}/share/fonts \
--with-default-font-path="catalogue:${LOCALBASE}/etc/X11/fontpath.d,built-ins"

LIB_PC_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/dri.pc:${PORTSDIR}/graphics/dri
USE_XORG+= pciaccess xextproto videoproto fontsproto dri2proto fontutil:build
Expand Down
12 changes: 12 additions & 0 deletions UPDATING
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.

20150321:
AFFECTS: Users of x11-servers/xorg-server and other X servers
AUTHOR: [email protected]

All fonts ports have been modified to respect XDG and install in
share/fonts

The Xorg servers now are looking there by default, and have been
modified to also look into etc/X11/fontpath.d (see Xserver(1) for more
details) adding a symlink in that directory pointing to a font directory
will automatically add the later into Xorg FontPath

20150317:
AFFECTS: users of editors/openoffice-4 and editors/openoffice-devel
AUTHOR: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion arabic/ae_fonts_mono/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= ae_fonts_mono
PORTVERSION= 1.0
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= arabic x11-fonts
MASTER_SITES= SF/arabeyes/Fonts/ae_fonts
DISTNAME= ${PORTNAME}
Expand Down
2 changes: 1 addition & 1 deletion arabic/ae_fonts_ttf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= ae_fonts1_ttf
PORTVERSION= 1.1
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= arabic x11-fonts
MASTER_SITES= SF/arabeyes/Fonts/ae_fonts
DISTNAME= ${PORTNAME}_${PORTVERSION}
Expand Down
2 changes: 1 addition & 1 deletion arabic/kacst_fonts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= kacst_fonts
PORTVERSION= 2.01
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= arabic
MASTER_SITES= SF/arabeyes/${PORTNAME} \
http://www.c-s.li/ports/
Expand Down
6 changes: 3 additions & 3 deletions arabic/khotot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ MONO_DESC= Install Arabic PCF fonts
AEFONTS_DESC= Install Arabeyes project TrueType fonts
KACST_DESC= Install King AbdulAziz University fonts

MONO_RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/ae_fonts_mono/fonts.dir:${PORTSDIR}/arabic/ae_fonts_mono
AEFONTS_RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/ae_fonts1/AAHS/fonts.dir:${PORTSDIR}/arabic/ae_fonts_ttf
KACST_RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/kacst_fonts/fonts.dir:${PORTSDIR}/arabic/kacst_fonts
MONO_RUN_DEPENDS= ae_fonts_mono>0:${PORTSDIR}/arabic/ae_fonts_mono
AEFONTS_RUN_DEPENDS= ae_fonts_ttf>0:${PORTSDIR}/arabic/ae_fonts_ttf
KACST_RUN_DEPENDS= kacst_fonts>0:${PORTSDIR}/arabic/kacst_fonts

.include <bsd.port.mk>
4 changes: 2 additions & 2 deletions audio/py-karaoke/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= karaoke
PORTVERSION= 0.7.5
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= audio python
MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand Down Expand Up @@ -52,7 +52,7 @@ post-patch:
post-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/fonts
.for i in DejaVuSans.ttf DejaVuSansCondensed-Bold.ttf DejaVuSansCondensed.ttf
@${LN} -sf ${LOCALBASE}/lib/X11/fonts/dejavu/${i} \
@${LN} -sf ${LOCALBASE}/share/fonts/dejavu/${i} \
${STAGEDIR}${DATADIR}/fonts
.endfor
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_pycdgAux.so
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/phoronix-test-suite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

PORTNAME= phoronix-test-suite
PORTVERSION= 5.4.1
PORTREVISION= 1
CATEGORIES= benchmarks
MASTER_SITES= http://www.phoronix-test-suite.com/releases/

Expand Down Expand Up @@ -43,7 +44,7 @@ post-patch:
${WRKSRC}/pts-core/external-test-dependencies/xml/freebsd-packages.xml \
${WRKSRC}/pts-core/objects/bilde_renderer/bilde_renderer.php \
${WRKSRC}/pts-core/objects/client/pts_client.php
@${SED} -i '' -e "s|/usr/share/fonts|${LOCALBASE}/lib/X11/fonts| ; \
@${SED} -i '' -e "s|/usr/share/fonts|${LOCALBASE}/share/fonts| ; \
s|/usr/X11/lib|${LOCALBASE}/lib|" \
${WRKSRC}/pts-core/objects/bilde_renderer/bilde_renderer.php
@${SED} -i '' -e "/fpdf.php/s|/usr/share/php|${PREFIX}/share|" \
Expand Down
2 changes: 1 addition & 1 deletion chinese/auto-cn-l10n/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RELAXCONF_DESC= A set of utilities for FreeBSD LiveCD
.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MWQY}
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/wqy/wenquanyi_10pt.pcf:${PORTSDIR}/x11-fonts/wqy
RUN_DEPENDS+= ${LOCALBASE}/share/fonts/wqy/wenquanyi_10pt.pcf:${PORTSDIR}/x11-fonts/wqy
.endif

.if ${PORT_OPTIONS:MFIREFLYTTF}
Expand Down
5 changes: 4 additions & 1 deletion chinese/bg5ps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= bg5ps
PORTVERSION= 1.3.0p3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= chinese print
MASTER_SITES= http://ftp.jaist.ac.jp/pub/FreeBSD/distfiles/ \
http://www.gtlib.gatech.edu/pub/FreeBSD/distfiles/
Expand All @@ -19,6 +19,9 @@ SUB_FILES= pkg-message

OPTIONS_DEFINE= DOCS EXAMPLES

post-patch:
@${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' bg5ps.conf gb2312-bg5ps.conf

do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bg5ps ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/ttf2psm ${STAGEDIR}${PREFIX}/bin
Expand Down
11 changes: 0 additions & 11 deletions chinese/bg5ps/files/patch-bg5ps.conf

This file was deleted.

9 changes: 0 additions & 9 deletions chinese/bg5ps/files/patch-gb2312-bg5ps.conf

This file was deleted.

2 changes: 1 addition & 1 deletion chinese/eterm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ CONFIGURE_ARGS= --enable-trans --enable-utmp \
PKGDIR= ${.CURDIR}
PLIST= ${MASTERDIR}/pkg-plist

RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/local/kc15f.pcf.gz:${PORTSDIR}/chinese/kcfonts
RUN_DEPENDS= ${LOCALBASE}/share/fonts/local/kc15f.pcf.gz:${PORTSDIR}/chinese/kcfonts

.include "${MASTERDIR}/Makefile"
11 changes: 5 additions & 6 deletions chinese/gugod-clean/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@

PORTNAME= gugod-clean
PORTVERSION= 1.3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= chinese x11-fonts
MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/gugod/

MAINTAINER= [email protected]
COMMENT= Pretty font modifyed from X11 schumacher-clean that match kcfonts

USES= fonts
RUN_DEPENDS= bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale

FONTFILES= gugod16.bdf gugod18.bdf gugod20.bdf gugod22.bdf

WRKSRC= ${WRKDIR}
NO_BUILD= yes
XFONTDIR= ${LOCALBASE}/lib/X11/fonts/local
FONTNAME= gugod

do-install:
@${MKDIR} ${STAGEDIR}${XFONTDIR}
${INSTALL_DATA} ${FONTFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${XFONTDIR}
@${MKDIR} ${STAGEDIR}${FONTSDIR}
${INSTALL_DATA} ${FONTFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${FONTSDIR}

.include <bsd.port.mk>
10 changes: 4 additions & 6 deletions chinese/gugod-clean/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
lib/X11/fonts/local/gugod16.bdf
lib/X11/fonts/local/gugod18.bdf
lib/X11/fonts/local/gugod20.bdf
lib/X11/fonts/local/gugod22.bdf
@exec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@unexec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
%%FONTSDIR%%/gugod16.bdf
%%FONTSDIR%%/gugod18.bdf
%%FONTSDIR%%/gugod20.bdf
%%FONTSDIR%%/gugod22.bdf
8 changes: 6 additions & 2 deletions chinese/kcfonts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,24 @@

PORTNAME= kcfonts
PORTVERSION= 1.05
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= chinese x11-fonts
MASTER_SITES= ${MASTER_SITE_GENTOO}
MASTER_SITE_SUBDIR= distfiles

MAINTAINER= [email protected]
COMMENT= Kuo Chauo Chinese Fonts collection

USES= fonts
BUILD_DEPENDS= bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir

MAKE_ARGS= CFONTDIR=${FONTSDIR} EFONTDIR=${FONTSDIR}
MAKE_JOBS_UNSAFE=yes
BROKEN_sparc64= Does not build on sparc64

NO_WRKSUBDIR= yes

pre-install:
${MKDIR} ${STAGEDIR}${FONTSDIR}

.include <bsd.port.mk>
4 changes: 2 additions & 2 deletions chinese/kcfonts/files/patch-Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

-CFONTDIR=/usr/X11R6/lib/X11/fonts/chinese
-EFONTDIR=/usr/X11R6/lib/X11/fonts/misc
+CFONTDIR=${PREFIX}/lib/X11/fonts/local
+EFONTDIR=${PREFIX}/lib/X11/fonts/local
+CFONTDIR=${PREFIX}/share/fonts/chinese
+EFONTDIR=${PREFIX}/share/fonts/misc
FONTS =kc24f.pcf.gz kc15f.pcf.gz kc8x15.pcf.gz kc12x24.pcf.gz
PROGS =kc24f kc15f kc8x15 kc12x24 kca2et
OBJS =tran.o kc24f.o kc15f.o kc8x15.o kc12x24.o kca2et.o
Expand Down
14 changes: 5 additions & 9 deletions chinese/kcfonts/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
lib/X11/fonts/local/kc8x15.pcf.gz
lib/X11/fonts/local/kc12x24.pcf.gz
lib/X11/fonts/local/kc15f.pcf.gz
lib/X11/fonts/local/kc24f.pcf.gz
lib/X11/fonts/local/kc_fonts.alias
@exec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@unexec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@unexec if [ `\head -1 %D/lib/X11/fonts/local/fonts.dir` = 0 ]; then rm -f %D/lib/X11/fonts/local/fonts.dir; fi
@unexec if [ ! -s %D/lib/X11/fonts/local/fonts.alias ]; then rm -f %D/lib/X11/fonts/local/fonts.alias; fi
%%FONTSDIR%%/kc8x15.pcf.gz
%%FONTSDIR%%/kc12x24.pcf.gz
%%FONTSDIR%%/kc15f.pcf.gz
%%FONTSDIR%%/kc24f.pcf.gz
%%FONTSDIR%%/kc_fonts.alias
6 changes: 1 addition & 5 deletions chinese/ttfm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

PORTNAME= ttfm
PORTVERSION= 0.9.5
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= chinese print
MASTER_SITES= LOCAL/rafan/chinese

MAINTAINER= [email protected]
COMMENT= Big5/GB enhanced TrueType Font Manager

RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2

MAKE_ARGS= FREETYPE_BASE=${LOCALBASE:Q} CC="${CC}"
Expand All @@ -20,8 +18,6 @@ PORTDOCS= README USAGE

OPTIONS_DEFINE= DOCS

.include <bsd.port.options.mk>

post-patch:
@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' \
-e 's,%%PREFIX%%,${PREFIX},' \
Expand Down
3 changes: 2 additions & 1 deletion chinese/ttfm/Makefile.ttf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ FONTSDIR?= ${PREFIX}/share/fonts/TrueType
FONTSDIR_REL= ${FONTSDIR:S,^${PREFIX}/,,}
PLIST_SUB+= FONTSDIR=${FONTSDIR_REL}

XFONTSDIR?= ${LOCALBASE}/lib/X11/fonts/TrueType
USES+= fonts
XFONTSDIR?= ${LOCALBASE}/share/fonts/TrueType
XFONTSDIR_REL= ${XFONTSDIR:S,${LOCALBASE}/,,}
PLIST_SUB+= XFONTSDIR=${XFONTSDIR_REL}

Expand Down
4 changes: 2 additions & 2 deletions comms/gnuradio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= gnuradio
PORTVERSION= 3.7.4
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= comms astro hamradio
MASTER_SITES= http://gnuradio.org/releases/gnuradio/ \
${MASTER_SITE_LOCAL}
Expand Down Expand Up @@ -82,7 +82,7 @@ BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen \
${LOCALBASE}/bin/sphinx-apidoc:${PORTSDIR}/textproc/py-sphinx \
dot:${PORTSDIR}/graphics/graphviz \
xmlto:${PORTSDIR}/textproc/xmlto \
${LOCALBASE}/lib/X11/fonts/freefont-ttf/fonts.scale:${PORTSDIR}/x11-fonts/freefont-ttf
freefont-ttf>0:${PORTSDIR}/x11-fonts/freefont-ttf
CMAKE_ARGS+= -DENABLE_DOXYGEN:STRING="ON"
CMAKE_ARGS+= -DENABLE_DOCS:STRING="ON"
CMAKE_ARGS+= -DENABLE_BAD_BOOST="ON"
Expand Down
2 changes: 1 addition & 1 deletion comms/gnuradio/files/patch-docs_doxygen_Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# set the path where dot can find it.

-DOT_FONTPATH =
+DOT_FONTPATH = %%PREFIX%%/lib/X11/fonts/freefont-ttf
+DOT_FONTPATH = %%PREFIX%%/share/fonts/freefont-ttf

# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
2 changes: 1 addition & 1 deletion databases/rrdtool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ USE_GNOME+= intltool
CONFIGURE_ARGS+=--disable-nls
.endif

.if exists(${LOCALBASE}/lib/X11/fonts/dejavu) || ${PORT_OPTIONS:MDEJAVU}
.if exists(${LOCALBASE}/share/fonts/dejavu) || ${PORT_OPTIONS:MDEJAVU}
RUN_DEPENDS+= dejavu>0:${PORTSDIR}/x11-fonts/dejavu
.endif

Expand Down
Loading

0 comments on commit fe5a7e4

Please sign in to comment.