From 0763bc3883bf44179fe3ae7951fa72ae1bd93b58 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Fri, 16 Aug 2019 21:51:47 +0300 Subject: [PATCH] libjasper: fix linking with libm for on-device builds --- packages/libjasper/CMakeLists.txt.patch | 12 ++++++++++++ packages/libjasper/build.sh | 3 --- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 packages/libjasper/CMakeLists.txt.patch diff --git a/packages/libjasper/CMakeLists.txt.patch b/packages/libjasper/CMakeLists.txt.patch new file mode 100644 index 000000000..02db396e5 --- /dev/null +++ b/packages/libjasper/CMakeLists.txt.patch @@ -0,0 +1,12 @@ +diff -uNr jasper-version-2.0.16/CMakeLists.txt jasper-version-2.0.16.mod/CMakeLists.txt +--- jasper-version-2.0.16/CMakeLists.txt 2019-03-12 20:04:35.000000000 +0200 ++++ jasper-version-2.0.16.mod/CMakeLists.txt 2019-08-16 21:46:51.751881755 +0300 +@@ -323,7 +323,7 @@ + + find_library(MATH_LIBRARY m) + if (NOT MATH_LIBRARY) +- set(MATH_LIBRARY "") ++ set(MATH_LIBRARY "-lm") + endif() + + ################################################################################ diff --git a/packages/libjasper/build.sh b/packages/libjasper/build.sh index 2b29ed2c5..7d8dfb94f 100644 --- a/packages/libjasper/build.sh +++ b/packages/libjasper/build.sh @@ -12,6 +12,3 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -H$TERMUX_PKG_SRCDIR -B$TERMUX_PKG_BUILDDIR " -termux_step_pre_configure() { - LDFLAGS+=" -lm" -}