aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2019-09-13 19:25:09 +0200
committerPhil Christensen <philc@microsoft.com>2019-09-13 10:25:09 -0700
commit8887f6c09c27dd5f6dfeecc4c766ec9f67d95f7a (patch)
tree4ba368d96d9214d545bfc6f54682ec6e5209bf3c
parent16c0aa457975f0da9cfa22cac985cee31b6c13f8 (diff)
downloadvcpkg-8887f6c09c27dd5f6dfeecc4c766ec9f67d95f7a.tar.gz
vcpkg-8887f6c09c27dd5f6dfeecc4c766ec9f67d95f7a.zip
[libpng] Replace find_library() with a simple set() for linking libm on UNIX (#8079)
-rw-r--r--ports/libpng/CONTROL2
-rw-r--r--ports/libpng/fix-libm-unix.patch12
-rw-r--r--ports/libpng/portfile.cmake1
3 files changed, 14 insertions, 1 deletions
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL
index c77b2a9d1..bc06e8deb 100644
--- a/ports/libpng/CONTROL
+++ b/ports/libpng/CONTROL
@@ -1,5 +1,5 @@
Source: libpng
-Version: 1.6.37-3
+Version: 1.6.37-4
Build-Depends: zlib
Homepage: https://github.com/glennrp/libpng
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.
diff --git a/ports/libpng/fix-libm-unix.patch b/ports/libpng/fix-libm-unix.patch
new file mode 100644
index 000000000..0abd20879
--- /dev/null
+++ b/ports/libpng/fix-libm-unix.patch
@@ -0,0 +1,12 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2019-04-14 20:10:32.000000000 +0200
++++ b/CMakeLists.txt 2019-09-06 14:14:39.425498139 +0200
+@@ -44,7 +44,7 @@
+ endif()
+
+ if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
+- find_library(M_LIBRARY m)
++ set(M_LIBRARY m)
+ else()
+ # libm is not needed and/or not available
+ set(M_LIBRARY "")
diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake
index 7e4fc8b04..24858f26c 100644
--- a/ports/libpng/portfile.cmake
+++ b/ports/libpng/portfile.cmake
@@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
use-abort-on-all-platforms.patch
+ fix-libm-unix.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)