Disable thin archives if we use GNU ar since ours is too old to support
it.
If there is a way to do that via CONFIGURE_FLAGS += -Dsomething
conditionally on .if !${PROPERTIES:Mclang} that would probably be
preferable. Nothing I tried worked. Pointers welcome.
Not sure if anything but sparc64 among !clang archs is capable of
building (let alone running) this monster.
Index: patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file:
/cvs/ports/www/webkitgtk4/patches/patch-Source_cmake_OptionsCommon_cmake,v
retrieving revision 1.21
diff -u -p -r1.21 patch-Source_cmake_OptionsCommon_cmake
--- patches/patch-Source_cmake_OptionsCommon_cmake 26 Mar 2022 16:11:56
-0000 1.21
+++ patches/patch-Source_cmake_OptionsCommon_cmake 31 Mar 2022 18:56:22
-0000
@@ -1,16 +1,28 @@
+Disable thin archives for BFD since our prehistoric ar doesn't support
+it on !clang arches.
+
Put the internal library path first so that we can
build with an older webkitgtk4 package installed.
Index: Source/cmake/OptionsCommon.cmake
--- Source/cmake/OptionsCommon.cmake.orig
+++ Source/cmake/OptionsCommon.cmake
-@@ -180,6 +180,9 @@ if (NOT PORT STREQUAL "GTK" AND NOT PORT STREQUAL "WPE
+@@ -92,7 +92,7 @@ set(AR_SUPPORTS_THIN_ARCHIVES FALSE)
+ if (AR_STATUS EQUAL 0)
+ if (AR_VERSION MATCHES "^GNU ar ")
+ set(AR_VARIANT BFD)
+- set(AR_SUPPORTS_THIN_ARCHIVES TRUE)
++ set(AR_SUPPORTS_THIN_ARCHIVES FALSE)
+ elseif (AR_VERSION MATCHES "^LLVM ")
+ set(AR_VARIANT LLVM)
+ set(AR_SUPPORTS_THIN_ARCHIVES TRUE)
+@@ -179,6 +179,9 @@ if (NOT PORT STREQUAL "GTK" AND NOT PORT STREQUAL "WPE
+ set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute
path to executable installation directory")
set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH
"Absolute path to install executables executed by the library")
endif ()
-
++
+# make sure that the internal library dir is the first in the path
+link_directories("${CMAKE_BINARY_DIR}/lib")
-+
+
# Check whether features.h header exists.
# Including glibc's one defines __GLIBC__, that is used in Platform.h
- WEBKIT_CHECK_HAVE_INCLUDE(HAVE_FEATURES_H features.h)