Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Mar 2024 18:02:18 GMT
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b7bc96ccb104 - main - cad/librepcb: add support of OpenCascade
Message-ID:  <202403211802.42LI2I7w023493@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b7bc96ccb10409807aa1c39cf7dd3a7436476db0

commit b7bc96ccb10409807aa1c39cf7dd3a7436476db0
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2024-03-17 16:36:42 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2024-03-21 18:01:18 +0000

    cad/librepcb: add support of OpenCascade
    
    Patch from upstream, slightly modified because cad/opencascade has been
    fixed against the reported crash.
    
    PR:             277312
    Approved by:    yuri (maintainer)
---
 cad/librepcb/Makefile                              |  1 +
 .../files/patch-cmake_FindOpenCascade.cmake        | 39 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/cad/librepcb/Makefile b/cad/librepcb/Makefile
index 9f02c5448433..9623bce62494 100644
--- a/cad/librepcb/Makefile
+++ b/cad/librepcb/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	librepcb
 DISTVERSION=	1.0.0
 DISTVERSIONSUFFIX=	-source
+PORTREVISION=	1
 CATEGORIES=	cad
 MASTER_SITES=	https://download.librepcb.org/releases/${DISTVERSION}/
 
diff --git a/cad/librepcb/files/patch-cmake_FindOpenCascade.cmake b/cad/librepcb/files/patch-cmake_FindOpenCascade.cmake
new file mode 100644
index 000000000000..d18e7215354f
--- /dev/null
+++ b/cad/librepcb/files/patch-cmake_FindOpenCascade.cmake
@@ -0,0 +1,39 @@
+--- cmake/FindOpenCascade.cmake.orig	2023-09-24 10:47:05 UTC
++++ cmake/FindOpenCascade.cmake
+@@ -1,6 +1,3 @@
+-# Specify OpenCascade libraries needed for LibrePCB
+-set(OCC_LIBRARIES TKXCAF TKXDESTEP)
+-
+ # Add library
+ add_library(open_cascade INTERFACE)
+ add_library(OpenCascade::OpenCascade ALIAS open_cascade)
+@@ -15,8 +12,16 @@ if(OpenCASCADE_FOUND)
+ # Try to find OCCT shared library on the system
+ find_package(OpenCASCADE CONFIG QUIET)
+ if(OpenCASCADE_FOUND)
+-  message(STATUS "Using system OpenCASCADE (OCCT)")
++  message(STATUS "Using system OpenCASCADE (OCCT ${OpenCASCADE_VERSION})")
+ 
++  # Specify OpenCascade libraries needed for LibrePCB
++  # https://github.com/LibrePCB/LibrePCB/issues/1315
++  if(OpenCASCADE_VERSION VERSION_GREATER_EQUAL 7.8.0)
++    set(OCC_LIBRARIES TKCAF TKDESTEP)
++  else()
++    set(OCC_LIBRARIES TKXCAF TKXDESTEP)
++  endif()
++
+   # Populate target
+   target_include_directories(
+     open_cascade SYSTEM INTERFACE "${OpenCASCADE_INCLUDE_DIR}"
+@@ -32,7 +37,10 @@ if(OCE_FOUND)
+ # Try to find OCE shared library on the system
+ find_package(OCE CONFIG QUIET)
+ if(OCE_FOUND)
+-  message(STATUS "Using system OpenCASCADE (OCE)")
++  message(STATUS "Using system OpenCASCADE (OCE ${OCE_VERSION})")
++
++  # Specify OpenCascade libraries needed for LibrePCB
++  set(OCC_LIBRARIES TKXCAF TKXDESTEP)
+ 
+   # Populate target
+   target_include_directories(



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403211802.42LI2I7w023493>