Fix for the problem sthen@ reported some time ago: if a library is

not listed in SHARED_LIBS, it will be created with no version suffix.

It was a regression caused by my "build shared libraries without
soname" work, sorry.
This commit is contained in:
dcoppa 2013-05-13 15:02:26 +00:00
parent 4237a882a9
commit 35dcd7ca8d
3 changed files with 22 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.79 2013/04/22 13:13:56 zhuk Exp $
# $OpenBSD: Makefile,v 1.80 2013/05/13 15:02:26 dcoppa Exp $
VMEM_WARNING = Yes
DPB_PROPERTIES =parallel
@ -12,7 +12,7 @@ HOMEPAGE = http://www.cmake.org/
CATEGORIES = devel
COMMENT = portable build system
DISTNAME = cmake-2.8.10.2
REVISION = 4
REVISION = 5
MASTER_SITES = ${HOMEPAGE}files/v2.8/
MAINTAINER = David Coppa <dcoppa@openbsd.org>

View File

@ -1,9 +1,7 @@
# $OpenBSD: cmake.port.mk,v 1.17 2013/04/18 22:54:50 sthen Exp $
# $OpenBSD: cmake.port.mk,v 1.18 2013/05/13 15:02:26 dcoppa Exp $
BUILD_DEPENDS+= devel/cmake>=2.8.0
# XXX if a library is not listed in SHARED_LIBS, it will be created
# with *no* version suffix.
.for _n _v in ${SHARED_LIBS}
CONFIGURE_ENV+=LIB${_n}_VERSION=${_v}
MAKE_ENV+=LIB${_n}_VERSION=${_v}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Source_cmTarget_cxx,v 1.16 2012/11/15 08:43:25 dcoppa Exp $
--- Source/cmTarget.cxx.orig Tue Nov 6 20:41:36 2012
+++ Source/cmTarget.cxx Mon Nov 12 12:14:34 2012
$OpenBSD: patch-Source_cmTarget_cxx,v 1.17 2013/05/13 15:02:26 dcoppa Exp $
--- Source/cmTarget.cxx.orig Tue Nov 27 14:26:33 2012
+++ Source/cmTarget.cxx Mon May 13 16:45:49 2013
@@ -3097,12 +3097,16 @@ std::string cmTarget::GetPDBName(const char* config)
//----------------------------------------------------------------------------
bool cmTarget::HasSOName(const char* config)
@ -18,7 +18,21 @@ $OpenBSD: patch-Source_cmTarget_cxx,v 1.16 2012/11/15 08:43:25 dcoppa Exp $
}
//----------------------------------------------------------------------------
@@ -3455,9 +3459,43 @@ void cmTarget::GetLibraryNames(std::string& name,
@@ -3426,8 +3430,13 @@ void cmTarget::GetLibraryNames(std::string& name,
// Check for library version properties.
const char* version = this->GetProperty("VERSION");
const char* soversion = this->GetProperty("SOVERSION");
+#if defined(__OpenBSD__)
+ if(this->GetType() != cmTarget::SHARED_LIBRARY &&
+ this->GetType() != cmTarget::MODULE_LIBRARY)
+#else
if(!this->HasSOName(config) ||
this->IsFrameworkOnApple())
+#endif
{
// Versioning is supported only for shared libraries and modules,
// and then only when the platform supports an soname flag.
@@ -3455,9 +3464,43 @@ void cmTarget::GetLibraryNames(std::string& name,
// The library name.
name = prefix+base+suffix;
@ -62,7 +76,7 @@ $OpenBSD: patch-Source_cmTarget_cxx,v 1.16 2012/11/15 08:43:25 dcoppa Exp $
// The library's real name on disk.
this->ComputeVersionedName(realName, prefix, base, suffix,
@@ -3490,7 +3528,23 @@ void cmTarget::ComputeVersionedName(std::string& vName
@@ -3490,7 +3533,23 @@ void cmTarget::ComputeVersionedName(std::string& vName
if(version)
{
vName += ".";