From 85270479098aaeee91ea687011e2e121d940b2e5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 6 Jul 2022 04:59:09 -0700 Subject: 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 --- ...01-fontforgeexe-Use-env-to-find-fontforge.patch | 29 +++++++++++++ ...include-sys-select-on-non-glibc-platforms.patch | 11 ++--- .../fontforge/fontforge_20190801.bb | 47 --------------------- .../fontforge/fontforge_20220308.bb | 48 ++++++++++++++++++++++ 4 files changed, 80 insertions(+), 55 deletions(-) create mode 100644 meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch delete mode 100644 meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb create mode 100644 meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb diff --git a/meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch b/meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch new file mode 100644 index 0000000000..e8c1a11d48 --- /dev/null +++ b/meta-oe/recipes-graphics/fontforge/fontforge/0001-fontforgeexe-Use-env-to-find-fontforge.patch @@ -0,0 +1,29 @@ +From f5a19ad9b2aea85dab28e7c61ac39404631fad2d Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + 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 + diff --git a/meta-oe/recipes-graphics/fontforge/fontforge/0001-include-sys-select-on-non-glibc-platforms.patch b/meta-oe/recipes-graphics/fontforge/fontforge/0001-include-sys-select-on-non-glibc-platforms.patch index 54ff7b76d2..27de27d57d 100644 --- a/meta-oe/recipes-graphics/fontforge/fontforge/0001-include-sys-select-on-non-glibc-platforms.patch +++ b/meta-oe/recipes-graphics/fontforge/fontforge/0001-include-sys-select-on-non-glibc-platforms.patch @@ -11,19 +11,14 @@ Signed-off-by: Khem Raj 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 #endif --- -2.23.0 - diff --git a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb b/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb deleted file mode 100644 index cb5f4d5ea1..0000000000 --- a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "A font editor" -HOMEPAGE = "http://fontforge.github.io/en-US/" -LICENSE = "BSD-3-Clause & GPL-3.0-only" -LIC_FILES_CHKSUM = " \ - file://COPYING.gplv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \ -" - -DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native" -DEPENDS:append:class-target = " libxi" - -inherit autotools pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg - -REQUIRED_DISTRO_FEATURES:append:class-target = " x11" - -# tag 20190801 -SRCREV = "ac635b818e38ddb8e7e2e1057330a32b4e25476e" -SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ - file://0001-include-sys-select-on-non-glibc-platforms.patch \ -" -S = "${WORKDIR}/git" - -EXTRA_OECONF += "--without-libuninameslist --enable-python-scripting --enable-python-extension" -EXTRA_OECONF:append:class-native = " with_x=no" - -LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" -BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" - -#do_configure:prepend() { -# uthash sources are expected in uthash/src -# mkdir -p ${S}/uthash/src -# cp ${STAGING_INCDIR}/ut*.h ${S}/uthash/src -#} - -PACKAGES =+ "${PN}-python" - -FILES:${PN} += " \ - ${datadir}/appdata \ - ${datadir}/metainfo \ - ${datadir}/mime \ -" - -FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR} ${datadir}/${BPN}/python" -RDEPENDS:${PN}-python = "python3" - -# for e.g kde's oxygen-fonts -BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb b/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb new file mode 100644 index 0000000000..83bf82a448 --- /dev/null +++ b/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb @@ -0,0 +1,48 @@ +SUMMARY = "A font editor" +HOMEPAGE = "http://fontforge.github.io/en-US/" +LICENSE = "BSD-3-Clause & GPL-3.0-only" +LIC_FILES_CHKSUM = " \ + file://COPYING.gplv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \ +" + +DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native libspiro" +DEPENDS:append:class-target = " libxi" + +inherit cmake pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg + +REQUIRED_DISTRO_FEATURES:append:class-target = " x11" + +# 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_OECMAKE = "-DENABLE_GUI=OFF -DENABLE_DOCS=OFF" + +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 +# mkdir -p ${S}/uthash/src +# cp ${STAGING_INCDIR}/ut*.h ${S}/uthash/src +#} + +PACKAGES =+ "${PN}-python" + +FILES:${PN} += " \ + ${datadir}/appdata \ + ${datadir}/metainfo \ + ${datadir}/mime \ +" + +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR} ${datadir}/${BPN}/python" +RDEPENDS:${PN}-python = "python3" + +# for e.g kde's oxygen-fonts +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf