From b97df3c0bfab5e12fdfb05121ae622a07f04a0f3 Mon Sep 17 00:00:00 2001 From: Bruno Wolff III Date: Apr 14 2020 00:18:56 +0000 Subject: Make font directory detection automatic at build time This still isn't perfect, but will make it so just rebuilding after a font changes directories works without needing to figure out where it move to. --- diff --git a/hedgewars.spec b/hedgewars.spec index b561c70..e3070fd 100644 --- a/hedgewars.spec +++ b/hedgewars.spec @@ -1,6 +1,6 @@ Name: hedgewars Version: 1.0.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Funny turn-based artillery game, featuring fighting Hedgehogs! License: GPL+ URL: http://www.hedgewars.org/ @@ -103,14 +103,14 @@ done # -DGHFLAGS=-dynamic uses dynamic linking for Haskell, but this isn't # available on arm. -# -DFONTS_DIRS="/usr/share/fonts/wqy-zenhei;/usr/share/fonts/dejavu-sans-fonts" +# -DFONTS_DIRS="`find %{_datadir}/fonts -type d -printf '%p;'`" # makes sure the system fonts are used. This avoids problems with physfs access # and having to symlink font files. %ifarch %{arm} -%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 -DBUILD_ENGINE_C=1 -DFONTS_DIRS="/usr/share/fonts/wqy-zenhei;/usr/share/fonts/dejavu-sans-fonts" . +%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 -DBUILD_ENGINE_C=1 -DFONTS_DIRS="`find %{_datadir}/fonts -type d -printf '%p;'`" . %else -%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 -DBUILD_ENGINE_C=1 -DGHFLAGS=-dynamic -DFONTS_DIRS="/usr/share/fonts/wqy-zenhei;/usr/share/fonts/dejavu-sans-fonts" . +%cmake -DMINIMAL_FLAGS=1 -DNOVIDEOREC=1 -DBUILD_ENGINE_C=1 -DGHFLAGS=-dynamic -DFONTS_DIRS="`find %{_datadir}/fonts -type d -printf '%p;'`" . %endif %make_build @@ -199,6 +199,9 @@ find %{buildroot} -type f -name '*.ttc' | xargs rm -f %changelog +* Mon Apr 13 2020 Bruno Wolff III - 1.0.0-8 +- Search for fonts from the top + * Mon Apr 13 2020 Bruno Wolff III - 1.0.0-7 - Handle change in where dejavu fonts are located