Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 2024 19:33:46 GMT
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 927d3fd388c9 - main - graphics/tiff: Replace local patch with upstreamed patch
Message-ID:  <202410231933.49NJXkT3089571@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=927d3fd388c92746cf46d6995bd8a974ada7ca9d

commit 927d3fd388c92746cf46d6995bd8a974ada7ca9d
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-10-23 18:39:41 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-10-23 19:33:37 +0000

    graphics/tiff: Replace local patch with upstreamed patch
    
    Reference:
    https://gitlab.com/libtiff/libtiff/-/commit/0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8
    
    Approved by:    portmgr (blanket)
---
 graphics/tiff/files/patch-cmake_LinkerChecks.cmake | 11 -----
 ...git-01-0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8 | 52 ++++++++++++++++++++++
 graphics/tiff/files/patch-libtiff_CMakeLists.txt   | 11 -----
 3 files changed, 52 insertions(+), 22 deletions(-)

diff --git a/graphics/tiff/files/patch-cmake_LinkerChecks.cmake b/graphics/tiff/files/patch-cmake_LinkerChecks.cmake
deleted file mode 100644
index 8b6c8c54482f..000000000000
--- a/graphics/tiff/files/patch-cmake_LinkerChecks.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- cmake/LinkerChecks.cmake.orig	2024-09-21 09:08:00 UTC
-+++ cmake/LinkerChecks.cmake
-@@ -39,7 +39,7 @@ set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
- } VERS_1;
- ")
- set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
--set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
-+set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Wl,--undefined-version "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
- check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
- set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
- file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
diff --git a/graphics/tiff/files/patch-git-01-0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8 b/graphics/tiff/files/patch-git-01-0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8
new file mode 100644
index 000000000000..765bf56f26da
--- /dev/null
+++ b/graphics/tiff/files/patch-git-01-0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8
@@ -0,0 +1,52 @@
+From 0dbcfc5bd2eaacf8be4f57f8b7cc7369d88fafa8 Mon Sep 17 00:00:00 2001
+From: "Daniel E @diizzyy" <unknown@example.com>
+Date: Sun, 20 Oct 2024 22:45:15 +0200
+Subject: [PATCH] CMake: fix build with LLVM/Clang 17+
+
+Fixes #651
+---
+ cmake/LinkerChecks.cmake | 7 ++++++-
+ libtiff/CMakeLists.txt   | 9 +++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/LinkerChecks.cmake b/cmake/LinkerChecks.cmake
+index ad1f0f9ff..90496bd2e 100644
+--- cmake/LinkerChecks.cmake
++++ cmake/LinkerChecks.cmake
+@@ -39,7 +39,12 @@ VERS_2 {
+ } VERS_1;
+ ")
+ set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
+-set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
++if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17)
++    set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Wl,--undefined-version "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
++else()
++    set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
++endif()
++
+ check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
+ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
+diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
+index a8aa0c320..2762fab7c 100755
+--- libtiff/CMakeLists.txt
++++ libtiff/CMakeLists.txt
+@@ -201,8 +201,13 @@ if(NOT CYGWIN)
+     set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION})
+ endif()
+ if(HAVE_LD_VERSION_SCRIPT)
+-  set_target_properties(tiff PROPERTIES LINK_FLAGS
+-                        "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
++  if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17)
++    set_target_properties(tiff PROPERTIES LINK_FLAGS
++                              "-Wl,--undefined-version -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
++  else()
++    set_target_properties(tiff PROPERTIES LINK_FLAGS
++                              "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
++  endif()
+ endif()
+ 
+ if(tiff-install)
+-- 
+GitLab
+
diff --git a/graphics/tiff/files/patch-libtiff_CMakeLists.txt b/graphics/tiff/files/patch-libtiff_CMakeLists.txt
deleted file mode 100644
index face49e28c9a..000000000000
--- a/graphics/tiff/files/patch-libtiff_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- libtiff/CMakeLists.txt.orig	2024-08-15 21:16:11 UTC
-+++ libtiff/CMakeLists.txt
-@@ -202,7 +202,7 @@ if(HAVE_LD_VERSION_SCRIPT)
- endif()
- if(HAVE_LD_VERSION_SCRIPT)
-   set_target_properties(tiff PROPERTIES LINK_FLAGS
--                        "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
-+  "-Wl,--undefined-version -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
- endif()
- 
- if(tiff-install)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410231933.49NJXkT3089571>