diff options
author | brook <brook@pkgsrc.org> | 2022-03-19 23:55:42 +0000 |
---|---|---|
committer | brook <brook@pkgsrc.org> | 2022-03-19 23:55:42 +0000 |
commit | 6829d91fcf0059e0a26d07809d64a2a2ae904356 (patch) | |
tree | ef9d9a9d05759d3502549ebb024247923bb09173 /cad/oce | |
parent | 157cbc02d4c43690af4d4912b8f8d721b2c80afd (diff) | |
download | pkgsrc-6829d91fcf0059e0a26d07809d64a2a2ae904356.tar.gz |
cad/oce: fixes for Darwin
Currently cad/oce does not build on Darwin, in part because sed
substitutions in CMakeFiles fail because the suffixes (.dylib) differ
from expected (.so). There are, however, two additional problems.
First, frameworks are not used by pkgsrc, yet CMakeLists.txt expects
them on Darwin and uses special installation steps. Instead, use the
standard installation steps. Additionally, there are a few PLIST
differences between Darwin and other platforms, which are handled with
PLIST.* variables that differentiate Darwin from other systems.
Diffstat (limited to 'cad/oce')
-rw-r--r-- | cad/oce/Makefile | 15 | ||||
-rw-r--r-- | cad/oce/PLIST.x11 | 6 | ||||
-rw-r--r-- | cad/oce/distinfo | 4 | ||||
-rw-r--r-- | cad/oce/patches/patch-CMakeLists.txt | 29 |
4 files changed, 39 insertions, 15 deletions
diff --git a/cad/oce/Makefile b/cad/oce/Makefile index 7f7db20653d..49d07125a3b 100644 --- a/cad/oce/Makefile +++ b/cad/oce/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2020/08/17 20:17:17 leot Exp $ +# $NetBSD: Makefile,v 1.10 2022/03/19 23:55:42 brook Exp $ DISTNAME= OCE-0.18.3 PKGNAME= ${DISTNAME:tl} @@ -26,11 +26,24 @@ LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/oce CMAKE_ARGS+= -DOCE_INSTALL_PREFIX:PATH=${PREFIX} +.include "../../mk/bsd.prefs.mk" + SUBST_CLASSES+= prefix SUBST_MESSAGE.prefix= Fixing PREFIX path. SUBST_STAGE.prefix= post-configure SUBST_FILES.prefix= CMakeFiles/Export/lib/oce/OCE-libraries-release.cmake +.if !empty(OPSYS:MDarwin) +SUBST_SED.prefix= -e "s|${BUILDLINK_DIR}/lib/lib\([0-9a-zA-Z_-]*\)\.dylib|\1|g" +.else SUBST_SED.prefix= -e "s|${BUILDLINK_DIR}/lib/lib\([0-9a-zA-Z_-]*\)\.so|\1|g" +.endif + +PLIST_VARS+= Darwin not_Darwin +.if !empty(OPSYS:MDarwin) +PLIST.Darwin= yes +.else +PLIST.not_Darwin= yes +.endif .include "options.mk" diff --git a/cad/oce/PLIST.x11 b/cad/oce/PLIST.x11 index 06e7ef2b8a8..3f7f71c8c2e 100644 --- a/cad/oce/PLIST.x11 +++ b/cad/oce/PLIST.x11 @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.x11,v 1.2 2017/05/15 12:31:38 fhajny Exp $ +@comment $NetBSD: PLIST.x11,v 1.3 2022/03/19 23:55:42 brook Exp $ include/oce/AIS_AngleDimension.hxx include/oce/AIS_AttributeFilter.lxx include/oce/AIS_Axis.lxx @@ -406,7 +406,9 @@ include/oce/XmlTObjDrivers_ModelDriver.hxx include/oce/XmlTObjDrivers_ObjectDriver.hxx include/oce/XmlTObjDrivers_ReferenceDriver.hxx include/oce/XmlTObjDrivers_XYZDriver.hxx -include/oce/Xw_Window.hxx +${PLIST.not_Darwin}include/oce/Xw_Window.hxx +${PLIST.Darwin}include/oce/Cocoa_LocalPool.hxx +${PLIST.Darwin}include/oce/Cocoa_Window.hxx lib/libTKBin.so lib/libTKBin.so.11 lib/libTKBin.so.11.0.0 diff --git a/cad/oce/distinfo b/cad/oce/distinfo index 61196826661..34e788a81d6 100644 --- a/cad/oce/distinfo +++ b/cad/oce/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.6 2021/10/26 10:04:14 nia Exp $ +$NetBSD: distinfo,v 1.7 2022/03/19 23:55:42 brook Exp $ BLAKE2s (OCE-0.18.3.tar.gz) = ae4eede3763564fd33225a2966079f5c1f18ae5e6cdd4cfc8eb03027fcac4159 SHA512 (OCE-0.18.3.tar.gz) = 6fdeb6ca4ce25361379872ccc465799d4a43407974c4f626b32df695e582b9e553cce17af6a6a7ff46ebed9b813d910ad23eb308a5356dabb9b9bbd4f42a8636 Size (OCE-0.18.3.tar.gz) = 24633768 bytes -SHA1 (patch-CMakeLists.txt) = 572853b493ce8551f1d910c897271827943b595a +SHA1 (patch-CMakeLists.txt) = 5d3e3342f4d71858a5b4c686b269bed466c39f06 SHA1 (patch-adm_cmake_TKernel_CMakeLists.txt) = acb153e88ce92c7f651a2762de5a60a51d1af5dd SHA1 (patch-src_MeshVS_MeshVS__MeshPrsBuilder.cxx) = f4778ecd72e5f984f316e85e535a7418ca7ae806 SHA1 (patch-src_OSD_OSD__MemInfo.cxx) = e1328a861393d458bc110c930c5ecf5343e2a304 diff --git a/cad/oce/patches/patch-CMakeLists.txt b/cad/oce/patches/patch-CMakeLists.txt index 2371d7d2bd2..8d8f1e98d25 100644 --- a/cad/oce/patches/patch-CMakeLists.txt +++ b/cad/oce/patches/patch-CMakeLists.txt @@ -1,10 +1,12 @@ -$NetBSD: patch-CMakeLists.txt,v 1.1 2017/01/20 11:00:50 fhajny Exp $ +$NetBSD: patch-CMakeLists.txt,v 1.2 2022/03/19 23:55:42 brook Exp $ Do not version lib and share subdirs. ---- CMakeLists.txt.orig 2017-01-13 05:34:36.000000000 +0000 +Do not install specially on Darwin. + +--- CMakeLists.txt.orig 2018-02-13 18:38:59.000000000 +0000 +++ CMakeLists.txt -@@ -853,7 +853,7 @@ if(MSVC OR (MINGW AND OCE_INSTALL_PRIVAT +@@ -868,7 +868,7 @@ if(MSVC OR (MINGW AND OCE_INSTALL_PRIVAT endif(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR) else(MSVC) if(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR) @@ -13,7 +15,7 @@ Do not version lib and share subdirs. endif(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR) endif() -@@ -883,7 +883,7 @@ endif(NOT DEFINED OCE_INSTALL_SCRIPT_DIR +@@ -898,7 +898,7 @@ endif(NOT DEFINED OCE_INSTALL_SCRIPT_DIR # Data if(NOT DEFINED OCE_INSTALL_DATA_DIR) if(NOT MSVC) @@ -22,12 +24,19 @@ Do not version lib and share subdirs. else () set(OCE_INSTALL_DATA_DIR "share/oce") endif(NOT MSVC) -@@ -908,7 +908,7 @@ if(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DI - OCE.framework/Versions/${OCE_VERSION}/Resources) - else(APPLE) - set(OCE_INSTALL_CMAKE_DATA_DIR +@@ -918,13 +918,8 @@ if(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DI + if(WIN32) + set(OCE_INSTALL_CMAKE_DATA_DIR cmake) + else(WIN32) +- if(APPLE) +- set(OCE_INSTALL_CMAKE_DATA_DIR +- OCE.framework/Versions/${OCE_VERSION}/Resources) +- else(APPLE) +- set(OCE_INSTALL_CMAKE_DATA_DIR - lib${LIB_SUFFIX}/oce-${OCE_VERSION}) -+ lib${LIB_SUFFIX}/oce) - endif(APPLE) +- endif(APPLE) ++ set(OCE_INSTALL_CMAKE_DATA_DIR ++ lib${LIB_SUFFIX}/oce) endif(WIN32) endif(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DIR) + |