pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cad/oce cad/oce: fixes for Darwin



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e0f9f0caee9
branches:  trunk
changeset: 375667:8e0f9f0caee9
user:      brook <brook%pkgsrc.org@localhost>
date:      Sat Mar 19 23:55:42 2022 +0000

description:
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:

 cad/oce/Makefile                     |  15 ++++++++++++++-
 cad/oce/PLIST.x11                    |   6 ++++--
 cad/oce/distinfo                     |   4 ++--
 cad/oce/patches/patch-CMakeLists.txt |  29 +++++++++++++++++++----------
 4 files changed, 39 insertions(+), 15 deletions(-)

diffs (123 lines):

diff -r 5fe3acd99e46 -r 8e0f9f0caee9 cad/oce/Makefile
--- a/cad/oce/Makefile  Sat Mar 19 23:55:02 2022 +0000
+++ b/cad/oce/Makefile  Sat Mar 19 23:55:42 2022 +0000
@@ -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 @@
 
 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 -r 5fe3acd99e46 -r 8e0f9f0caee9 cad/oce/PLIST.x11
--- a/cad/oce/PLIST.x11 Sat Mar 19 23:55:02 2022 +0000
+++ b/cad/oce/PLIST.x11 Sat Mar 19 23:55:42 2022 +0000
@@ -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_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 -r 5fe3acd99e46 -r 8e0f9f0caee9 cad/oce/distinfo
--- a/cad/oce/distinfo  Sat Mar 19 23:55:02 2022 +0000
+++ b/cad/oce/distinfo  Sat Mar 19 23:55:42 2022 +0000
@@ -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 -r 5fe3acd99e46 -r 8e0f9f0caee9 cad/oce/patches/patch-CMakeLists.txt
--- a/cad/oce/patches/patch-CMakeLists.txt      Sat Mar 19 23:55:02 2022 +0000
+++ b/cad/oce/patches/patch-CMakeLists.txt      Sat Mar 19 23:55:42 2022 +0000
@@ -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 @@
        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 @@
        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)
+ 



Home | Main Index | Thread Index | Old Index