diff --git a/cad/librepcb/Makefile b/cad/librepcb/Makefile index 9f02c5448433..9623bce62494 100644 --- a/cad/librepcb/Makefile +++ b/cad/librepcb/Makefile @@ -1,32 +1,33 @@ PORTNAME= librepcb DISTVERSION= 1.0.0 DISTVERSIONSUFFIX= -source +PORTREVISION= 1 CATEGORIES= cad MASTER_SITES= https://download.librepcb.org/releases/${DISTVERSION}/ MAINTAINER= yuri@FreeBSD.org COMMENT= Schematic and PCB editing software WWW= https://librepcb.org/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg4 \ libfontconfig.so:x11-fonts/fontconfig \ libfreeimage.so:graphics/freeimage \ libfreetype.so:print/freetype2 \ libTKService.so:cad/opencascade USES= cmake compiler:c++11-lang desktop-file-utils gl \ localbase:ldflags qt:5 shared-mime-info xorg zip USE_QT= concurrent core declarative gui network \ opengl printsupport quickcontrols2 sql svg xml widgets \ buildtools:build linguisttools:build testlib:build qmake:build USE_GL= gl glu USE_XORG= x11 WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} CMAKE_ARGS= -DCMAKE_PREFIX_PATH=${LOCALBASE}/lib # workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274834 .include 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(