From e09fd4327bac0cb0acca9fa17e642b5f9f915da5 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 2 Aug 2021 17:10:58 +0200 Subject: [PATCH] [mod] "npm run webfont" require fontforge & ttfautohint packages See commit dca3bcca9:: [mod] simple theme: include fonts "npm run webfont" to build the fonts directory. It requires fontforge and ttfautohint distro packages partial revert of commit 7137d28 I don't know why, but the same commit dca3bcca9 removes the fontforge & ttfautohint packages which has been added in 7137d28. I assume it was an mistake of the *partial revert of commit 7137d28*. Related-to: https://github.com/searxng/searxng/pull/157#discussion_r654836723 Signed-off-by: Markus Heiser --- docs/dev/quickstart.rst | 15 +++++++++++---- manage | 2 +- utils/searx.sh | 8 ++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index 8132bccc4..497e4bbcf 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -5,6 +5,8 @@ Development Quickstart ====================== .. _npm: https://www.npmjs.com/ +.. _fontforge: https://github.com/fontforge/fontforge +.. _ttfautohint: https://www.freetype.org/ttfautohint/doc/ttfautohint.html Searx loves developers, just clone and start hacking. All the rest is done for you simply by using :ref:`make `. @@ -31,7 +33,12 @@ If you implement themes, you will need to compile styles and JavaScript before make themes.all -Don't forget to install npm_ first. +Don't forget to install npm_, ttfautohint_ and fontforge_ first. To install +all system requirements of a :ref:`buildhosts` use:: + + sudo -H ./utils/searx.sh install buildhost + +Otherwise, install only what you need at least: .. tabs:: @@ -39,19 +46,19 @@ Don't forget to install npm_ first. .. code:: sh - sudo -H apt-get install npm + sudo -H apt-get install npm ttfautohint fontforge .. group-tab:: Arch Linux .. code-block:: sh - sudo -H pacman -S npm + sudo -H pacman -S npm ttfautohint fontforge .. group-tab:: Fedora / RHEL .. code-block:: sh - sudo -H dnf install npm + sudo -H dnf install npm ttfautohint fontforge If you finished your *tests* you can start to commit your changes. To separate the changed code from the build products first run: diff --git a/manage b/manage index 42c617f5b..728da6818 100755 --- a/manage +++ b/manage @@ -334,7 +334,7 @@ gecko.driver() { } node.env() { - if ! required_commands npm; then + if ! required_commands npm fontforge ttfautohint; then info_msg "to install build tools use::" info_msg " sudo -H ./utils/searx.sh install buildhost" die 1 "install needed build tools first" diff --git a/utils/searx.sh b/utils/searx.sh index 3ebe5df11..6254b9fab 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -43,7 +43,7 @@ shellcheck" BUILD_PACKAGES_debian="\ firefox graphviz imagemagick texlive-xetex librsvg2-bin texlive-latex-recommended texlive-extra-utils fonts-dejavu -latexmk +latexmk fontforge ttfautohint npm" # pacman packages @@ -55,7 +55,7 @@ shellcheck" BUILD_PACKAGES_arch="\ firefox graphviz imagemagick texlive-bin extra/librsvg -texlive-core texlive-latexextra ttf-dejavu +texlive-core texlive-latexextra ttf-dejavu fontforge ttfautohint npm" # dnf packages @@ -69,7 +69,7 @@ BUILD_PACKAGES_fedora="\ firefox graphviz graphviz-gd ImageMagick librsvg2-tools texlive-xetex-bin texlive-collection-fontsrecommended texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts -dejavu-sans-mono-fonts +dejavu-sans-mono-fonts fontforge ttfautohint npm" # yum packages @@ -89,7 +89,7 @@ BUILD_PACKAGES_centos="\ firefox graphviz graphviz-gd ImageMagick librsvg2-tools texlive-xetex-bin texlive-collection-fontsrecommended texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts -dejavu-sans-mono-fonts" +dejavu-sans-mono-fonts fontforge ttfautohint" case $DIST_ID-$DIST_VERS in ubuntu-16.04|ubuntu-18.04)