Yet another cmake patch, which needs a full bulk test. Many of you will
certainly know it, our cmake's SHARED_LIBS handling is broken for new
shared libs.
The default "0.0" version has been broken for several months/years.
Here is a attempt to fix this. With the following patch you get back the
following lines, if (a) LIBxxx_VERSION is not set and (b) SOVERSION for
the shared lib is set by cmake. (a) is clear but (b) helps us to handle
shared libs and not plugins (dlopen) aka shared libs without version.
...
Warning: unregistered shared lib(s)
SHARED_LIBS += fmt 0.0 # 0.0
/usr/ports/devel/fmt/pkg/PLIST is new
Patch changes:
- Remove MODULE_LIBRARY processing.
"MODULE libraries are plugins that are not linked into other targets
but may be loaded dynamically at runtime using dlopen-like
functionality." --
https://cmake.org/cmake/help/latest/command/add_library.html
- Add default "0.0" version:
if type SHARED_LIBRARY AND empty LIBxxx_VERSION BUT SOVERSION is set.
I would appreciate a bulk test, unfortunately I can't do one.
Rafael
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/cmake/Makefile,v
retrieving revision 1.204
diff -u -p -u -p -r1.204 Makefile
--- Makefile 26 Feb 2022 19:42:28 -0000 1.204
+++ Makefile 26 Feb 2022 21:18:17 -0000
@@ -8,7 +8,7 @@ VER = 3.20.3
EPOCH = 0
DISTNAME = cmake-${VER}
CATEGORIES = devel
-REVISION = 4
+REVISION = 5
HOMEPAGE = https://www.cmake.org/
Index: patches/patch-Source_cmGeneratorTarget_cxx
===================================================================
RCS file: /cvs/ports/devel/cmake/patches/patch-Source_cmGeneratorTarget_cxx,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 patch-Source_cmGeneratorTarget_cxx
--- patches/patch-Source_cmGeneratorTarget_cxx 9 May 2021 14:46:15 -0000 1.16
+++ patches/patch-Source_cmGeneratorTarget_cxx 26 Feb 2022 21:18:17 -0000
@@ -3,31 +3,14 @@ $OpenBSD: patch-Source_cmGeneratorTarget
Index: Source/cmGeneratorTarget.cxx
--- Source/cmGeneratorTarget.cxx.orig
+++ Source/cmGeneratorTarget.cxx
-@@ -4810,9 +4810,14 @@ cmGeneratorTarget::Names cmGeneratorTarget::GetLibrary
- // Check for library version properties.
- cmProp version = this->GetProperty("VERSION");
- cmProp soversion = this->GetProperty("SOVERSION");
-+#if defined(__OpenBSD__)
-+ if (this->GetType() != cmStateEnums::SHARED_LIBRARY &&
-+ this->GetType() != cmStateEnums::MODULE_LIBRARY) {
-+#else
- if (!this->HasSOName(config) ||
- this->Makefile->IsOn("CMAKE_PLATFORM_NO_VERSIONED_SONAME") ||
- this->IsFrameworkOnApple()) {
-+
No comments:
Post a Comment