expat: Fix CMake file

It was searching for headers in some lib/include directory.
This commit is contained in:
François Revol
2023-12-02 04:39:10 +01:00
parent a5fac32b63
commit 654cc24d09
2 changed files with 72 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ HOMEPAGE="http://expat.sourceforge.net/"
COPYRIGHT="1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
2001-2022 Expat maintainers."
LICENSE="MIT"
REVISION="2"
REVISION="3"
SOURCE_URI="https://downloads.sourceforge.net/expat/expat-$portVersion.tar.bz2"
CHECKSUM_SHA256="6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67"
PATCHES="expat-$portVersion.patchset"
@@ -49,6 +49,7 @@ BUILD_PREREQUIRES="
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
"
@@ -62,6 +63,7 @@ defineDebugInfoPackage expat$secondaryArchSuffix "${debugList[@]}"
BUILD()
{
./buildconf.sh
runConfigure ./configure --disable-static
make $jobArgs
}

View File

@@ -1,4 +1,4 @@
From 9982ce0749bf98b0d464b2c11199b87233c47e6e Mon Sep 17 00:00:00 2001
From eb00f2e37ee6e6a04e3dba973bc930223bea9747 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 24 May 2021 20:59:30 +0200
Subject: gcc2 build fix
@@ -346,5 +346,72 @@ index 471f2a2..6b8e7c5 100644
if (j > 1) {
i++;
--
2.30.2
2.42.1
From be034c86cf04b527cc8c42579752feb7077bb8a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Sat, 2 Dec 2023 02:02:15 +0100
Subject: Fix INTERFACE_INCLUDE_DIRECTORIES on Haiku
Not sure if the IMPORTED_LOCATION shouldn't be develop/lib
diff --git a/Makefile.am b/Makefile.am
index 37ae373..9a10a2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,6 +67,7 @@ cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@
_EXTRA_DIST_CMAKE = \
+ cmake/autotools/expat-noconfig__haiku.cmake.in \
cmake/autotools/expat-noconfig__linux.cmake.in \
cmake/autotools/expat-noconfig__macos.cmake.in \
cmake/autotools/expat-noconfig__windows.cmake.in \
diff --git a/cmake/autotools/expat-noconfig__haiku.cmake.in b/cmake/autotools/expat-noconfig__haiku.cmake.in
new file mode 100644
index 0000000..c1aad9d
--- /dev/null
+++ b/cmake/autotools/expat-noconfig__haiku.cmake.in
@@ -0,0 +1,26 @@
+#----------------------------------------------------------------
+# Generated CMake target import file for configuration "NoConfig".
+#----------------------------------------------------------------
+
+# Commands may need to know the format version.
+set(CMAKE_IMPORT_FILE_VERSION 1)
+
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+
+set_target_properties(expat::expat PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/develop/headers${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}"
+ INTERFACE_LINK_LIBRARIES "m"
+)
+
+# Import target "expat::expat" for configuration "NoConfig"
+set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
+set_target_properties(expat::expat PROPERTIES
+ IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/@LIBDIR_BASENAME@/libexpat.so.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@"
+ IMPORTED_SONAME_NOCONFIG "libexpat.so.@SO_MAJOR@"
+ )
+
+list(APPEND _cmake_import_check_targets expat::expat )
+list(APPEND _cmake_import_check_files_for_expat::expat "${_IMPORT_PREFIX}/lib/@LIBDIR_BASENAME@/libexpat.so.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@" )
+
+# Commands beyond this point should not need to know the version.
+set(CMAKE_IMPORT_FILE_VERSION)
diff --git a/configure.ac b/configure.ac
index d3642de..8ac1f4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,6 +410,7 @@ AC_SUBST([CMAKE_SHARED_LIBRARY_PREFIX])
AS_CASE("${host_os}",
[darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in],
[mingw*|cygwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in],
+ [haiku*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__haiku.cmake.in],
[CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in])
AC_CONFIG_FILES([Makefile]
[expat.pc]
--
2.42.1