mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
cad/qcad: upgrade to v3.32.9.0
Note: flavors removed, because with Qt5 only the bundled legacy OpenNURBS is supported. Only Qt6 seems active. Remark: two new ports, cad/qtjsapi and cad/qcadjsapi are released separately, but without them you get the error "No script handler found". PR: 295682 Approved by: mr (maintainer)
This commit is contained in:
+25
-40
@@ -1,41 +1,31 @@
|
||||
PORTNAME= qcad
|
||||
PORTVERSION= 3.32.2.0
|
||||
PORTVERSION= 3.32.9.0
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= cad
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
#PATCH_SITES= https://github.com/qcad/qcad/commit/
|
||||
#PATCHFILES= bbcd195f199e75190e758f46475b4f723643a820.patch:-p1
|
||||
#GH_TAGNAME= 98f92a5a275102dfab915b920e2ebf52f43bf091
|
||||
|
||||
MAINTAINER= mr@FreeBSD.org
|
||||
COMMENT= Professional CAD system
|
||||
WWW= https://www.ribbonsoft.com/qcad.html
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
BROKEN_i386= doesn't buld on pkg builder
|
||||
BROKEN_i386= doesn't build on pkg builder
|
||||
|
||||
BUILD_DEPENDS= bash:shells/bash \
|
||||
${LOCALBASE}/lib/libopenNURBS.a:graphics/opennurbs
|
||||
BUILD_DEPENDS= bash:shells/bash
|
||||
LIB_DEPENDS= libOpenNURBS.so:graphics/opennurbs \
|
||||
libqtjsapi.so:cad/qtjsapi \
|
||||
libcups.so:print/cups
|
||||
|
||||
USES= cmake compiler:c++17-lang gl localbase:ldflags qt:6
|
||||
USE_CXXSTD= c++17
|
||||
|
||||
USES= compiler:c++11-lang gl gmake qmake qt:${FLAVOR:S/qt//}
|
||||
#USES= compiler:c++11-lang gl gmake qmake qt:5
|
||||
USE_CXXSTD= c++14
|
||||
FLAVORS= qt5 #qt6
|
||||
FLAVOR= qt5
|
||||
qt5_PKGNAMESUFFIX= -qt5
|
||||
qt6_PKGNAMESUFFIX= -qt6
|
||||
USE_GITHUB= yes
|
||||
|
||||
CMAKE_ON= BUILD_QT6
|
||||
USE_QT= 5compat base declarative svg tools
|
||||
USE_GL= opengl
|
||||
USE_LDCONFIG= yes
|
||||
_USE_QT5= buildtools qmake:build \
|
||||
concurrent designer gui help imageformats network opengl script \
|
||||
scripttools sql svg uitools xml xmlpatterns
|
||||
_USE_QT6= base
|
||||
USE_QT= ${_USE_QT${FLAVOR:S/qt//}}
|
||||
#USE_QT= ${_USE_QT5}
|
||||
USE_GL= glu
|
||||
|
||||
DESKTOP_ENTRIES="QCad" \
|
||||
"" \
|
||||
@@ -50,29 +40,23 @@ RESDIR= ${WRKSRC}/debug
|
||||
RESDIR= ${WRKSRC}/release
|
||||
.endif
|
||||
|
||||
SHRLIBS= qcadcore qcadecmaapi qcadentity qcadgrid qcadgui qcadoperations \
|
||||
SHRLIBS= qcadcore qcadentity qcadgrid qcadgui qcadoperations \
|
||||
qcadsnap qcadspatialindex qcadstemmer spatialindexnavel
|
||||
STALIBS= dxflib stemmer
|
||||
SHRDIR= fonts libraries linetypes patterns plugins scripts themes ts
|
||||
#QSCRIPTS should not be installed to avoid conflicts with texlive-base
|
||||
QSCRIPTS= bbox dwg2bmp dwg2pdf dwg2svg
|
||||
SHRDIR= fonts libraries linetypes patterns plugins scripts support themes ts
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
CFLAGS_i386= -fPIC
|
||||
CXXFLAGS_i386= -fPIC
|
||||
CFLAGS+= -DON_SIZEOF_WCHAR_T=4 -fPIC
|
||||
LDFLAGS+= -lexecinfo
|
||||
LDFLAGS_i386= -Wl,-z,notext
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITH_DEBUG)
|
||||
ALL_TARGET= debug
|
||||
PLIST_SUB+= DEBUG_LIB_SUFFIX="_debug"
|
||||
RESDIR= ${WRKSRC}/debug
|
||||
.if ${ARCH} != "sparc64" && ${ARCH} != "powerpc" && ${ARCH} != powerpc64
|
||||
CFLAGS+= -DON_LITTLE_ENDIAN
|
||||
.else
|
||||
ALL_TARGET= release
|
||||
PLIST_SUB+= DEBUG_LIB_SUFFIX=""
|
||||
RESDIR= ${WRKSRC}/release
|
||||
CFLAGS+= -DON_BIG_ENDIAN
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
@@ -85,8 +69,7 @@ pre-configure:
|
||||
${WRKSRC}/src/core/RSettings.cpp
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${RESDIR}/qcad-bin ${STAGEDIR}${PREFIX}/bin/
|
||||
${LN} -sf qcad-bin ${STAGEDIR}${PREFIX}/bin/qcad
|
||||
${INSTALL_PROGRAM} ${RESDIR}/qcad ${STAGEDIR}${PREFIX}/bin/
|
||||
.for lib in ${SHRLIBS:C|^|lib|:C|$|.so|}
|
||||
${INSTALL_LIB} ${RESDIR}/${lib} ${STAGEDIR}${PREFIX}/lib/${lib}.0
|
||||
${LN} -sf ${lib}.0 ${STAGEDIR}${PREFIX}/lib/${lib}
|
||||
@@ -98,7 +81,9 @@ do-install:
|
||||
.for dir in ${SHRDIR}
|
||||
cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${DATADIR}
|
||||
.endfor
|
||||
|
||||
do-install-EXAMPLES-on:
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1741683907
|
||||
SHA256 (qcad/qcad-qcad-v3.32.2.0_GH0.tar.gz) = ac2bbbc89f21d004683e95e91ac8777f4e1385e9f1efaf574eff42adb2fb1972
|
||||
SIZE (qcad/qcad-qcad-v3.32.2.0_GH0.tar.gz) = 43092869
|
||||
TIMESTAMP = 1779904495
|
||||
SHA256 (qcad/qcad-qcad-v3.32.9.0_GH0.tar.gz) = 78585ab01143525745257531c0210592ee14811aef52274ddab8bb30138e3bf4
|
||||
SIZE (qcad/qcad-qcad-v3.32.9.0_GH0.tar.gz) = 44821097
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- CMakeInclude.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ CMakeInclude.txt
|
||||
@@ -35,7 +35,7 @@ endif()
|
||||
set(RWIN32 TRUE)
|
||||
endif()
|
||||
|
||||
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+if(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
LIBS += \
|
||||
- -lopennurbs \
|
||||
- -lzlib
|
||||
+ -lopenNURBS \
|
||||
+ -lOpenNURBS \
|
||||
+ -lz
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
Second hunk: fix a version of the shipped qtscriptgenerator, as when updating Qt, the new one might
|
||||
not yet be bundled in the tarball.
|
||||
|
||||
--- src/3rdparty/3rdparty.pro.orig 2025-02-10 09:29:49 UTC
|
||||
--- src/3rdparty/3rdparty.pro.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/3rdparty.pro
|
||||
@@ -11,9 +11,8 @@ else {
|
||||
SUBDIRS += legacy
|
||||
@@ -19,7 +19,7 @@ else {
|
||||
}
|
||||
else {
|
||||
# Qt 6: use newer opennurbs library
|
||||
- SUBDIRS += opennurbs
|
||||
+ # FreeBSD: prefer opennurbs from dependent ports
|
||||
}
|
||||
}
|
||||
|
||||
-!r_no_opennurbs {
|
||||
- SUBDIRS += opennurbs
|
||||
-}
|
||||
+# FreeBSD: prefer opennurbs from dependent ports
|
||||
+
|
||||
!rs_no_dxf {
|
||||
SUBDIRS += dxflib
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- src/3rdparty/CMakeLists.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/CMakeLists.txt
|
||||
@@ -5,7 +5,6 @@ add_subdirectory(dxflib)
|
||||
project(3rdparty VERSION 1.0 LANGUAGES CXX C)
|
||||
|
||||
add_subdirectory(dxflib)
|
||||
-add_subdirectory(opennurbs)
|
||||
add_subdirectory(spatialindexnavel)
|
||||
add_subdirectory(stemmer)
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/include/spatialindex/MovingRegion.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/include/spatialindex/MovingRegion.h
|
||||
@@ -152,10 +152,6 @@ namespace SpatialIndex
|
||||
uint32_t m_boundary;
|
||||
const MovingRegion* m_to;
|
||||
|
||||
- struct ascending: public std::binary_function<CrossPoint&, CrossPoint&, bool>
|
||||
- {
|
||||
- bool operator()(const CrossPoint& __x, const CrossPoint& __y) const { return __x.m_t > __y.m_t; }
|
||||
- };
|
||||
}; // CrossPoint
|
||||
|
||||
public:
|
||||
@@ -0,0 +1,13 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/mvrtree/MVRTree.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/mvrtree/MVRTree.h
|
||||
@@ -179,10 +179,6 @@ namespace SpatialIndex
|
||||
NNEntry(id_type id, IEntry* e, double f) : m_id(id), m_pEntry(e), m_minDist(f) {}
|
||||
~NNEntry() {}
|
||||
|
||||
- struct greater : public std::binary_function<NNEntry*, NNEntry*, bool>
|
||||
- {
|
||||
- bool operator()(const NNEntry* __x, const NNEntry* __y) const { return __x->m_minDist > __y->m_minDist; }
|
||||
- };
|
||||
}; // NNEntry
|
||||
|
||||
class NNComparator : public INearestNeighborComparator
|
||||
@@ -0,0 +1,27 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/rtree/BulkLoader.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/rtree/BulkLoader.h
|
||||
@@ -40,13 +40,13 @@ namespace SpatialIndex
|
||||
Record();
|
||||
Record(const Region& r, id_type id, uint32_t len, byte* pData, uint32_t s);
|
||||
~Record();
|
||||
-
|
||||
+
|
||||
bool operator<(const Record& r) const;
|
||||
|
||||
void storeToFile(Tools::TemporaryFile& f);
|
||||
void loadFromFile(Tools::TemporaryFile& f);
|
||||
|
||||
- struct SortAscending : public std::binary_function<Record* const, Record* const, bool>
|
||||
+ struct SortAscending
|
||||
{
|
||||
bool operator()(Record* const r1, Record* const r2)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ namespace SpatialIndex
|
||||
public:
|
||||
PQEntry(Record* r, uint32_t u32Index) : m_r(r), m_u32Index(u32Index) {}
|
||||
|
||||
- struct SortAscending : public std::binary_function<const PQEntry&, const PQEntry&, bool>
|
||||
+ struct SortAscending
|
||||
{
|
||||
bool operator()(const PQEntry& e1, const PQEntry& e2)
|
||||
{
|
||||
@@ -0,0 +1,12 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/rtree/RTree.cc.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/rtree/RTree.cc
|
||||
@@ -525,7 +525,8 @@ void SpatialIndex::RTree::RTree::nearestNeighborQuery(
|
||||
Tools::LockGuard lock(&m_lock);
|
||||
#endif
|
||||
|
||||
- std::priority_queue<NNEntry*, std::vector<NNEntry*>, NNEntry::ascending> queue;
|
||||
+ auto ascending = [](const NNEntry* lhs, const NNEntry* rhs) { return rhs->m_minDist > lhs->m_minDist; };
|
||||
+ std::priority_queue<NNEntry*, std::vector<NNEntry*>, decltype(ascending)> queue(ascending);
|
||||
|
||||
queue.push(new NNEntry(m_rootID, 0, 0.0));
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/rtree/RTree.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/rtree/RTree.h
|
||||
@@ -157,10 +157,6 @@ namespace SpatialIndex
|
||||
NNEntry(id_type id, IEntry* e, double f) : m_id(id), m_pEntry(e), m_minDist(f) {}
|
||||
~NNEntry() {}
|
||||
|
||||
- struct ascending : public std::binary_function<NNEntry*, NNEntry*, bool>
|
||||
- {
|
||||
- bool operator()(const NNEntry* __x, const NNEntry* __y) const { return __x->m_minDist > __y->m_minDist; }
|
||||
- };
|
||||
}; // NNEntry
|
||||
|
||||
class NNComparator : public INearestNeighborComparator
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/spatialindex/MovingRegion.cc.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/spatialindex/MovingRegion.cc
|
||||
@@ -910,7 +910,8 @@ double MovingRegion::getIntersectingAreaInTime(const I
|
||||
|
||||
MovingRegion x = *this;
|
||||
CrossPoint c;
|
||||
- std::priority_queue<CrossPoint, std::vector<CrossPoint>, CrossPoint::ascending> pq;
|
||||
+ auto ascending = [](CrossPoint& lhs, CrossPoint& rhs) { return lhs.m_t > rhs.m_t; };
|
||||
+ std::priority_queue < CrossPoint, std::vector<CrossPoint>, decltype(ascending)> pq(ascending);
|
||||
|
||||
// find points of intersection in all dimensions.
|
||||
for (uint32_t i = 0; i < m_dimension; ++i)
|
||||
@@ -0,0 +1,13 @@
|
||||
--- src/3rdparty/legacy/spatialindexnavel/src/tprtree/TPRTree.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/3rdparty/legacy/spatialindexnavel/src/tprtree/TPRTree.h
|
||||
@@ -158,10 +158,6 @@ namespace SpatialIndex
|
||||
NNEntry(id_type id, IEntry* e, double f) : m_id(id), m_pEntry(e), m_minDist(f) {}
|
||||
~NNEntry() {}
|
||||
|
||||
- struct ascending : public std::binary_function<NNEntry*, NNEntry*, bool>
|
||||
- {
|
||||
- bool operator()(const NNEntry* __x, const NNEntry* __y) const { return __x->m_minDist > __y->m_minDist; }
|
||||
- };
|
||||
}; // NNEntry
|
||||
|
||||
class NNComparator : public INearestNeighborComparator
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/core/CMakeLists.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/core/CMakeLists.txt
|
||||
@@ -248,7 +248,7 @@ target_link_libraries(qcadcore PUBLIC
|
||||
Qt::Svg
|
||||
Qt::Xml
|
||||
Qt::Qml
|
||||
- zlib
|
||||
+ z
|
||||
OpenNURBS
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
|
||||
+#ifdef Q_OS_FREEBSD
|
||||
+ dirList.append("/usr/local/share/qcad/" + subDirectory);
|
||||
+ dirList.append("%%DATADIR%%" + subDirectory);
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- src/core/RScriptHandler.h.orig 2025-03-11 20:09:48 UTC
|
||||
+++ src/core/RScriptHandler.h
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <QList>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
+#include <QScriptEngine>
|
||||
|
||||
#include "RDocumentInterface.h"
|
||||
#include "RScriptAction.h"
|
||||
@@ -1,11 +1,11 @@
|
||||
--- src/core/RSettings.cpp.orig 2025-02-10 09:29:49 UTC
|
||||
--- src/core/RSettings.cpp.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/core/RSettings.cpp
|
||||
@@ -393,9 +393,13 @@ QString RSettings::getApplicationPath() {
|
||||
@@ -397,9 +397,13 @@ QString RSettings::getApplicationPath() {
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_FREEBSD
|
||||
+ ret.cd("/usr/local/share/qcad");
|
||||
+ ret.cd("%%DATADIR%%");
|
||||
+#else
|
||||
if (ret.dirName() == "debug" || ret.dirName() == "release") {
|
||||
ret.cdUp();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/core/bridges/CMakeLists.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/core/bridges/CMakeLists.txt
|
||||
@@ -247,7 +247,7 @@ target_link_libraries(qcadcore PUBLIC
|
||||
Qt::Svg
|
||||
Qt::Xml
|
||||
Qt::Qml
|
||||
- zlib
|
||||
+ z
|
||||
OpenNURBS
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- src/core/core.pro.orig 2025-02-10 09:29:49 UTC
|
||||
--- src/core/core.pro.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/core/core.pro
|
||||
@@ -318,7 +318,7 @@ DEFINES += QCADCORE_LIBRARY
|
||||
@@ -324,7 +324,7 @@ DEFINES += QCADCORE_LIBRARY
|
||||
OTHER_FILES += core.dox math/math.dox
|
||||
DEFINES += QCADCORE_LIBRARY
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- src/core/math/RSpline.h.orig 2025-02-10 09:29:49 UTC
|
||||
--- src/core/math/RSpline.h.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/core/math/RSpline.h
|
||||
@@ -33,7 +33,7 @@ class RSplineProxy;
|
||||
class RSplineProxy;
|
||||
@@ -34,7 +34,7 @@ class RSplineProxy;
|
||||
|
||||
#ifndef R_NO_OPENNURBS
|
||||
#if QT_VERSION >= 0x060000
|
||||
-#include "opennurbs/opennurbs.h"
|
||||
+#include <openNURBS/opennurbs.h>
|
||||
+#include <OpenNURBS/opennurbs.h>
|
||||
#else
|
||||
#include "legacy/opennurbs/opennurbs.h"
|
||||
#endif
|
||||
|
||||
#ifndef RDEFAULT_MIN1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/entity/CMakeLists.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/entity/CMakeLists.txt
|
||||
@@ -121,7 +121,7 @@ target_link_libraries(qcadentity PUBLIC
|
||||
Qt::Svg
|
||||
Qt::Xml
|
||||
qcadcore
|
||||
- opennurbs
|
||||
+ OpenNURBS
|
||||
)
|
||||
|
||||
if(win32-msvc2010)
|
||||
@@ -0,0 +1,13 @@
|
||||
--- src/run/CMakeInclude.txt.orig 2026-05-06 14:27:07 UTC
|
||||
+++ src/run/CMakeInclude.txt
|
||||
@@ -110,8 +110,8 @@ if(NOT r_no_opennurbs)
|
||||
|
||||
if(NOT r_no_opennurbs)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
- zlib
|
||||
- opennurbs
|
||||
+ z
|
||||
+ OpenNURBS
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
|
||||
You need to install the port cad/qcadjsapi .
|
||||
|
||||
EOM
|
||||
}
|
||||
]
|
||||
+1172
-388
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user