libspiro: Add recipe
PATCH 1/2 libspiro: Add recipe
Needed by recent fontforge
Signed-off-by Khem Raj <[email protected]>
--- .../fontforge/libspiro_20200505.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb
meta-oe/recipes-graphics/fontforge/libspiro_20200505.bb new file +14 -0
@@ -0,0 +1,14 @@ +# Copyright (C) 2022 Khem Raj <[email protected]> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "LibSpiro is an adaptation of Spiro formula and functions into a sharable library" +HOMEPAGE = "https://github.com/fontforge/libspiro" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "https://github.com/fontforge/libspiro/releases/download/20200505/libspiro-dist-20200505.tar.gz" +SRC_URI[sha256sum] = "06c69a1e8dcbcabcf009fd96fd90b1a244d0257246e376c2c4d57c4ea4af0e49" + +inherit autotools + +BBCLASSEXTEND = "native"
Signature · 1 line
2.37.0
PATCH 2/2 fontforge: Upgrade to 20220308
Switch build system to cmake
Add patch to avoid hardcoding build paths in scripts Forward port musl patch
Signed-off-by Khem Raj <[email protected]>
---
...ntforgeexe-Use-env-to-find-fontforge.patch | 29 +++++++++++++++++++
...de-sys-select-on-non-glibc-platforms.patch | 11 ++-----
...orge_20190801.bb => fontforge_20220308.bb} | 17 ++++++-----
3 files changed, 41 insertions(+), 16 deletions(-)
create mode 100644 meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch
rename meta-oe/recipes-graphics/fontforge/{fontforge_20190801.bb => fontforge_20220308.bb} (68%)meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch new file +29 -0
@@ -0,0 +1,29 @@ +From f5a19ad9b2aea85dab28e7c61ac39404631fad2d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 6 Jul 2022 04:54:23 -0700 +Subject: [PATCH] fontforgeexe: Use env to find fontforge + +This helps in avoiding to encode build paths into interpeter + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + fontforgeexe/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fontforgeexe/CMakeLists.txt b/fontforgeexe/CMakeLists.txt +index b2d663b88..e2a8fee54 100644 +--- a/fontforgeexe/CMakeLists.txt ++++ b/fontforgeexe/CMakeLists.txt +@@ -118,7 +118,7 @@ if(UNIX) + foreach(_script fontimage.pe fontlint.pe sfddiff.pe) + get_filename_component(_output \"\${_script}\" NAME_WE) + file(READ \"${CMAKE_CURRENT_SOURCE_DIR}/\${_script}\" _input) +- file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/\${_output}\" \"#!\${CMAKE_INSTALL_PREFIX}/bin/fontforge -lang=ff\\n\${_input}\") ++ file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/\${_output}\" \"#!/usr/bin/env fontforge -lang=ff\\n\${_input}\") + endforeach() + " COMPONENT nativescripts) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fontimage" "${CMAKE_CURRENT_BINARY_DIR}/fontlint" "${CMAKE_CURRENT_BINARY_DIR}/sfddiff" +-- +2.37.0 +
meta-oe/recipes-graphics/fontforge/fontforge/0001-include-sys-select-on-non-glibc-platforms.patch +3 -8
@@ -11,19 +11,14 @@ Signed-off-by: Khem Raj <[email protected]> gdraw/gdraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/gdraw/gdraw.c b/gdraw/gdraw.c -index 24591b778..217c63140 100644 --- a/gdraw/gdraw.c +++ b/gdraw/gdraw.c -@@ -32,7 +32,7 @@ +@@ -33,7 +33,7 @@ #include "gkeysym.h" #include "ustring.h" --#if __Mac || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ -+#if __Mac || __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ || !defined(__GLIBC__) +-#if __Mac ++#if __Mac || (defined(__linux__) && !defined(__GLIBC__)) # include <sys/select.h> #endif --- -2.23.0 -
meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb renamed from meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb +9 -8
@@ -6,25 +6,26 @@ LIC_FILES_CHKSUM = " \ file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \ " -DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native" +DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native libspiro" DEPENDS:append:class-target = " libxi" -inherit autotools pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg +inherit cmake pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg REQUIRED_DISTRO_FEATURES:append:class-target = " x11" -# tag 20190801 -SRCREV = "ac635b818e38ddb8e7e2e1057330a32b4e25476e" +# tag 20220308 +SRCREV = "582bd41a9bf04326300fc02a677fe3610d6d3ccd" SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ file://0001-include-sys-select-on-non-glibc-platforms.patch \ + file://0001-fontforgeexe-Use-env-to-find-fontforge.patch \ " S = "${WORKDIR}/git" -EXTRA_OECONF += "--without-libuninameslist --enable-python-scripting --enable-python-extension" -EXTRA_OECONF:append:class-native = " with_x=no" +EXTRA_OECMAKE = "-DENABLE_GUI=OFF -DENABLE_DOCS=OFF" -LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" -BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" +CFLAGS += "-fno-strict-aliasing" +LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI} -lm" +BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI} -lm" #do_configure:prepend() { # uthash sources are expected in uthash/src
Signature · 1 line
2.37.0