diff options
| -rw-r--r-- | meta-oe/recipes-graphics/fontforge/fontforge/0001-cmake-Use-alternate-way-to-detect-libm.patch | 67 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb | 7 |
2 files changed, 71 insertions, 3 deletions
diff --git a/meta-oe/recipes-graphics/fontforge/fontforge/0001-cmake-Use-alternate-way-to-detect-libm.patch b/meta-oe/recipes-graphics/fontforge/fontforge/0001-cmake-Use-alternate-way-to-detect-libm.patch new file mode 100644 index 0000000000..dd799e7485 --- /dev/null +++ b/meta-oe/recipes-graphics/fontforge/fontforge/0001-cmake-Use-alternate-way-to-detect-libm.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | From 6d3c48d1b01943a467928235c3affbab463c25ab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 7 Jul 2022 12:32:47 -0700 | ||
| 4 | Subject: [PATCH] cmake: Use alternate way to detect libm | ||
| 5 | |||
| 6 | The standard package provided with MathLib cmake module does not work | ||
| 7 | when libm is folded into libc starting glibc 2.35+ | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | CMakeLists.txt | 7 ++++++- | ||
| 13 | contrib/fonttools/CMakeLists.txt | 2 +- | ||
| 14 | fontforge/CMakeLists.txt | 2 +- | ||
| 15 | fontforgeexe/CMakeLists.txt | 4 ++-- | ||
| 16 | 4 files changed, 10 insertions(+), 5 deletions(-) | ||
| 17 | |||
| 18 | --- a/CMakeLists.txt | ||
| 19 | +++ b/CMakeLists.txt | ||
| 20 | @@ -111,9 +111,14 @@ find_package_with_target(Intl REQUIRED) | ||
| 21 | find_package(GLIB 2.6 REQUIRED COMPONENTS gio gobject) | ||
| 22 | find_package(Iconv REQUIRED) | ||
| 23 | find_package(LibXml2 REQUIRED) | ||
| 24 | -find_package(MathLib REQUIRED) | ||
| 25 | find_package(ZLIB REQUIRED) | ||
| 26 | |||
| 27 | +include(CheckLibraryExists) | ||
| 28 | +CHECK_LIBRARY_EXISTS(m pow "" HAVE_LIB_M) | ||
| 29 | +if (HAVE_LIB_M) | ||
| 30 | + set(EXTRA_LIBS ${EXTRA_LIBS} m) | ||
| 31 | +endif (HAVE_LIB_M) | ||
| 32 | + | ||
| 33 | check_include_file(pthread.h HAVE_PTHREAD_H) | ||
| 34 | if(HAVE_PTHREAD_H) | ||
| 35 | find_package(Threads) | ||
| 36 | --- a/contrib/fonttools/CMakeLists.txt | ||
| 37 | +++ b/contrib/fonttools/CMakeLists.txt | ||
| 38 | @@ -15,6 +15,6 @@ add_executable(woff woff.c) | ||
| 39 | |||
| 40 | target_link_libraries(acorn2sfd PRIVATE fontforge) | ||
| 41 | target_link_libraries(dewoff PRIVATE ZLIB::ZLIB) | ||
| 42 | -target_link_libraries(pcl2ttf PRIVATE MathLib::MathLib) | ||
| 43 | +target_link_libraries(pcl2ttf PRIVATE ${EXTRA_LIBS}) | ||
| 44 | target_link_libraries(ttf2eps PRIVATE fontforge) | ||
| 45 | target_link_libraries(woff PRIVATE ZLIB::ZLIB) | ||
| 46 | --- a/fontforge/CMakeLists.txt | ||
| 47 | +++ b/fontforge/CMakeLists.txt | ||
| 48 | @@ -237,7 +237,7 @@ target_link_libraries(fontforge | ||
| 49 | GLIB::GLIB | ||
| 50 | Intl::Intl | ||
| 51 | PRIVATE | ||
| 52 | - MathLib::MathLib | ||
| 53 | + ${EXTRA_LIBS} | ||
| 54 | Iconv::Iconv | ||
| 55 | ZLIB::ZLIB | ||
| 56 | ) | ||
| 57 | --- a/fontforgeexe/CMakeLists.txt | ||
| 58 | +++ b/fontforgeexe/CMakeLists.txt | ||
| 59 | @@ -110,7 +110,7 @@ if(ENABLE_PYTHON_SCRIPTING_RESULT) | ||
| 60 | target_link_libraries(fontforgeexe PRIVATE Python3::Python) | ||
| 61 | endif() | ||
| 62 | |||
| 63 | -target_link_libraries(fontforgeexe PRIVATE fontforge Iconv::Iconv MathLib::MathLib) | ||
| 64 | +target_link_libraries(fontforgeexe PRIVATE fontforge Iconv::Iconv ${EXTRA_LIBS}) | ||
| 65 | install(TARGETS fontforgeexe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| 66 | |||
| 67 | if(UNIX) | ||
diff --git a/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb b/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb index 83bf82a448..c53f2db01b 100644 --- a/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb +++ b/meta-oe/recipes-graphics/fontforge/fontforge_20220308.bb | |||
| @@ -18,14 +18,15 @@ SRCREV = "582bd41a9bf04326300fc02a677fe3610d6d3ccd" | |||
| 18 | SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ | 18 | SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \ |
| 19 | file://0001-include-sys-select-on-non-glibc-platforms.patch \ | 19 | file://0001-include-sys-select-on-non-glibc-platforms.patch \ |
| 20 | file://0001-fontforgeexe-Use-env-to-find-fontforge.patch \ | 20 | file://0001-fontforgeexe-Use-env-to-find-fontforge.patch \ |
| 21 | file://0001-cmake-Use-alternate-way-to-detect-libm.patch \ | ||
| 21 | " | 22 | " |
| 22 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
| 23 | 24 | ||
| 24 | EXTRA_OECMAKE = "-DENABLE_GUI=OFF -DENABLE_DOCS=OFF" | 25 | EXTRA_OECMAKE = "-DENABLE_DOCS=OFF" |
| 25 | 26 | ||
| 26 | CFLAGS += "-fno-strict-aliasing" | 27 | CFLAGS += "-fno-strict-aliasing" |
| 27 | LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI} -lm" | 28 | LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" |
| 28 | BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI} -lm" | 29 | BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" |
| 29 | 30 | ||
| 30 | #do_configure:prepend() { | 31 | #do_configure:prepend() { |
| 31 | # uthash sources are expected in uthash/src | 32 | # uthash sources are expected in uthash/src |
