build-sys: unbundle unifont

We should prefer the unifont.hex file from the system, instead of our
own. Upstream has made a few releases since our version was included,
and we should follow upstream changes. But adding 2.6MB to our source
repo every time upstream releases is not nice.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-01-26 19:12:56 -05:00
parent 4a84f3e614
commit 10bc4cd469
4 changed files with 16 additions and 10 deletions

View file

@ -3326,7 +3326,7 @@ noinst_PROGRAMS += \
systemd-subterm systemd-subterm
dist_pkgdata_DATA += \ dist_pkgdata_DATA += \
src/libsystemd-terminal/unifont-glyph-array.bin src/libsystemd-terminal/unifont-glyph-array.bin
nodist_userunit_DATA += \ nodist_userunit_DATA += \
units/user/systemd-consoled.service units/user/systemd-consoled.service
@ -3454,12 +3454,8 @@ test_unifont_LDADD = \
libsystemd-internal.la \ libsystemd-internal.la \
libsystemd-shared.la libsystemd-shared.la
.PHONY: update-unifont src/libsystemd-terminal/unifont-glyph-array.bin: tools/compile-unifont.py $(UNIFONT)
update-unifont: tools/compile-unifont.py $(AM_V_GEN)$(PYTHON) $< <$(UNIFONT) >$@
$(AM_V_GEN)$(PYTHON) $< \
<$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
>$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
@echo "unifont-glyph-array.bin has been regenerated"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
if ENABLE_GTK_DOC if ENABLE_GTK_DOC

View file

@ -1142,16 +1142,25 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"]) AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
AC_ARG_WITH(unifont,
AS_HELP_STRING([--with-unifont=PATH],
[Path to unifont.hex]),
[UNIFONT="$withval"],
[UNIFONT="/usr/share/unifont/unifont.hex"])
AC_SUBST(UNIFONT)
have_terminal=no have_terminal=no
have_unifont=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support])) AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then if test "x$enable_terminal" = "xyes"; then
PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes]) PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
AS_IF([test "x$have_terminal" != xyes -a "x$enable_terminal" = xyes], AC_CHECK_FILE($UNIFONT, [have_unifont=yes])
AS_IF([test "x$have_terminal" != xyes -o "x$have_unifont" != "xyes" -a "x$enable_terminal" = xyes],
[AC_MSG_ERROR([*** terminal support requested but required dependencies not available])], [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
[test "x$have_terminal" = xyes], [test "x$have_terminal" = xyes -a "x$have_unifont" = "xyes"],
[AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])]) [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
fi fi
AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"]) AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unifont" = "xyes"])
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
have_kdbus=no have_kdbus=no

1
src/libsystemd-terminal/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/unifont-glyph-array.bin