Subject: CVS commit: pkgsrc/textproc/expat
From: Brook Milligan
Date: 2024-12-18 16:03:59
Message id: 20241218150359.2BE8DFC1D@cvs.NetBSD.org

Log Message:
textproc/expat: fix file used by other packages to find installed library

On Darwin, the installed expat shared library includes only the major
version number, not minor version and patch, in the name.  The
corresponding configure check, however, looks for the full name with
all three parts and fails.

The same problem occurs on Windows and is discussed in issue 485, even
mentioning that Darwin likely has the same issue:

    https://github.com/libexpat/libexpat/issues/485

For some reason, the fix (removing minor and patch versions from the
cmake file used by configure) was applied for Windows but not for
Darwin.

See the upstream issue:

    https://github.com/libexpat/libexpat/issues/935

which was closed with

    https://github.com/libexpat/libexpat/pull/937

--- cmake/autotools/expat-noconfig__macos.cmake.in.orig	2023-08-26 \ 
12:27:53.000000000 +0000
+++ cmake/autotools/expat-noconfig__macos.cmake.in
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
 # 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}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PAT \ 
CH@.dylib"
+  IMPORTED_LOCATION_NOCONFIG \ 
"${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.dylib"
   IMPORTED_SONAME_NOCONFIG "@rpath/libexpat.@SO_MAJOR@.dylib"
   )

 list(APPEND _cmake_import_check_targets expat::expat )
-list(APPEND _cmake_import_check_files_for_expat::expat \ 
"${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" \ 
)
+list(APPEND _cmake_import_check_files_for_expat::expat \ 
"${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.dylib" )

 # Commands beyond this point should not need to know the version.
 set(CMAKE_IMPORT_FILE_VERSION)

Files:
RevisionActionfile
1.52modifypkgsrc/textproc/expat/distinfo
1.1addpkgsrc/textproc/expat/patches/patch-cmake_autotools_expat-noconfig____macos.cmake.in