[cantarell-fonts/default-vf] Add toggle for VF



commit c97b9721b49db43cdfb55763333410a27f72ff53
Author: Nikolaus Waxweiler <madigens gmail com>
Date:   Thu Jul 29 22:32:16 2021 +0100

    Add toggle for VF

 .gitlab-ci.yml    | 29 ++++++++++++++++++++++++++++-
 meson_options.txt |  5 ++++-
 src/meson.build   | 32 +++++++++++++++++---------------
 3 files changed, 49 insertions(+), 17 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5ea0b37..3cb30d5e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-build:
+build-default:
   image: 'registry.fedoraproject.org/fedora:latest'
   script:
     - dnf install -y git-core python3-pip meson ninja-build libappstream-glib-devel gettext python3.8
@@ -17,6 +17,33 @@ build:
     - git config --global user.email "you example com"
     - git config --global user.name "Your Name"
     - git commit -m "Make package with prebuilt binaries, ninja will dist them."
+
+    - ninja -C build dist
+  artifacts:
+    paths:
+      - build/meson-dist
+      - prebuilt/*.otf
+    expire_in: 7 days
+
+build-just-statics:
+  image: 'registry.fedoraproject.org/fedora:latest'
+  script:
+    - dnf install -y git-core python3-pip meson ninja-build libappstream-glib-devel gettext python3.8
+    - python3.8 -m ensurepip
+    - python3.8 -m venv venv
+    - . venv/bin/activate
+    - pip3 install meson ninja -r requirements.txt
+    - meson build -D buildstatics=true -D buildvf=false
+    - ninja -C build install
+
+    # Make a dist package with prebuilt binaries.
+    - git add meson_options.txt
+    - cp /usr/local/share/fonts/cantarell/*.otf prebuilt
+    - git add prebuilt/*.otf
+    - git config --global user.email "you example com"
+    - git config --global user.name "Your Name"
+    - git commit -m "Make package with prebuilt binaries, ninja will dist them."
+
     - ninja -C build dist
   artifacts:
     paths:
diff --git a/meson_options.txt b/meson_options.txt
index 38480b80..6c363eea 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,4 +8,7 @@ option('buildappstream', type : 'boolean', value : true,
        description : 'Build Appstream metadata file')
 
 option('buildstatics', type : 'boolean', value : false,
-       description : 'Build static fonts in addition to the variable font')
+       description : 'Build static fonts')
+
+option('buildvf', type : 'boolean', value : true,
+       description : 'Build variable fonts')
diff --git a/src/meson.build b/src/meson.build
index 37928aab..535133d5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -15,18 +15,20 @@ if get_option('buildstatics') == true
     )
 endif
 
-custom_target(
-    'cantarell-variable-font',
-    input: 'Cantarell.designspace',
-    output: 'Cantarell-VF.otf',
-    command: [
-        python3,
-        make_variable_font,
-        '@INPUT@',
-        join_paths(meson.current_source_dir(), 'Cantarell.stylespace'),
-        psautohint,
-        '@OUTPUT@'
-    ],
-    install: true,
-    install_dir: fontsdir,
-)
+if get_option('buildvf') == true
+    custom_target(
+        'cantarell-variable-font',
+        input: 'Cantarell.designspace',
+        output: 'Cantarell-VF.otf',
+        command: [
+            python3,
+            make_variable_font,
+            '@INPUT@',
+            join_paths(meson.current_source_dir(), 'Cantarell.stylespace'),
+            psautohint,
+            '@OUTPUT@'
+        ],
+        install: true,
+        install_dir: fontsdir,
+    )
+endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]