diff --git a/cad/kicad-devel/Makefile b/cad/kicad-devel/Makefile index 625b03f8efc9..2950c10a75d4 100644 --- a/cad/kicad-devel/Makefile +++ b/cad/kicad-devel/Makefile @@ -1,171 +1,171 @@ PORTNAME= kicad DISTVERSION= r${GIT_SRC_DATE} -PORTREVISION= 7 +PORTREVISION= 8 #PORTREVISION= 1 CATEGORIES= cad PKGNAMESUFFIX= -devel DIST_SUBDIR= ${PORTNAME} MAINTAINER= mr@FreeBSD.org COMMENT= Schematic and PCB editing software WWW= http://kicad-pcb.org/ LICENSE= GPLv3 BUILD_DEPENDS= ${LOCALBASE}/bin/git:devel/git \ ${LOCALBASE}/include/glm/glm.hpp:math/glm \ ${LOCALBASE}/bin/swig:devel/swig LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libfreetype.so:print/freetype2 \ libfontconfig.so:x11-fonts/fontconfig \ libharfbuzz.so:print/harfbuzz \ libngspice.so:cad/ngspice_rework@shlib \ libTKernel.so:cad/opencascade \ libpixman-1.so:x11/pixman \ libpng.so:graphics/png \ libcurl.so:ftp/curl \ libGLEW-wayland.so:graphics/glew-wayland \ libodbc.so:databases/unixODBC CONFLICTS_INSTALL= kicad # bin/_cvpcb.kiface BROKEN_aarch64= Fails to compile: use of undeclared identifier builtin_ia32_emms OPTIONS_DEFINE= DOCS PLIST_SUB= OPSYS=${OPSYS} \ DESKTOPDIR=${DESKTOPDIR:S|^${PREFIX}/||} USES= cmake:noninja compiler:c++11-lib desktop-file-utils gl \ gettext gnome pkgconfig python shared-mime-info shebangfix ssl \ tar:bzip2 xorg USE_GITLAB= yes GL_ACCOUNT= kicad/code GL_PROJECT= kicad GL_TAGNAME= ${GIT_SRC_HASH} USE_GL= gl glu glut USE_WX= 3.2 WX_COMPS= wx python:lib USE_GNOME= atk cairo gtk30 gdkpixbuf2 pango USE_XORG+= ice pixman x11 xext BINS= cvpcb eeschema gerbview kicad pcbnew EXTRAS2RM= linux-non_unicode linux wings3d LINUX.README \ contrib_makefiles.txt running_kicad_under_W98.txt SHEBANG_FILES= pcbnew/python/plugins/touch_slider_wizard.py CXXFLAGS+= --std=c++11 -I${WRKSRC} -I${WRKSRC}/include -I${LOCALBASE}/include CXXFLAGS_powerpc= -O0 CMAKE_ARGS= -DLOCALBASE="${LOCALBASE}" \ -DCMAKE_BUILD_TYPE="Debug" \ -DKICAD_TESTING_VERSION=ON \ -DKICAD_VERSION=${DISTVERSION} \ -DCMAKE_INCLUDE_PATH="${WRKSRC}/include ${LOCALBASE}/include" \ -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ -DwxWidgets_USE_DEBUG=ON \ -DwxWidgets_USE_USE_UNICODE=ON \ -DwxWidgets_wxrc_EXECUTABLE=${WXRC_CMD} \ -DKICAD_SCRIPTING=ON \ -DKICAD_SCRIPTING_MODULES=ON \ -DKICAD_SCRIPTING_PYTHON3=ON \ -DKICAD_SCRIPTING_WXPYTHON=ON \ -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \ -DKICAD_SKIP_BOOST=YES \ -DKICAD_SPICE=ON \ -DKICAD_USE_OCE=OFF \ -DKICAD_USE_OCC=ON \ -DKICAD_USE_EGL=ON \ -DOCC_INCLUDE_DIR=${LOCALBASE}/include/OpenCASCADE USE_LDCONFIG= yes .include "Makefile.git_rev" showversions: @${ECHO} "GIT_SRC_HASH: ${GIT_SRC_HASH}" @${ECHO} "GIT_SRC_DATE: ${GIT_SRC_DATE}" @${ECHO} "DISTDIR: ${DISTDIR}" @${ECHO} "DIST_SUBDIR: ${DIST_SUBDIR}" @${ECHO} "DISTNAME: ${DISTNAME}" @${ECHO} "DISTVERSION: ${DISTVERSION}" # Updating to new rev: # sh files/newVersion.sh # make makesum && make clean # make install #breaks probably due to plist differences # make makeplist > pkg-plist #One has to edit/review the generated plist # make generate-plist && make check-plist # < Check PLIST_FILE_LIST below > tmp: echo "${DATADIR} ${DATADIR:H}" # The CheckCXXSymbolExists module has been shipped with CMake since 3.0 times. # The ancient implementation that this bundled module uses, no longer works # because it uses CMake internals that have gone away in 3.11. post-extract: ${RM} ${WRKSRC}/CMakeModules/CheckCXXSymbolExists.cmake pre-configure: ${REINPLACE_CMD} -e 's|/usr/share/kicad|${DATADIR}|' \ -e 's|/usr/local|${PREFIX}|' \ ${WRKSRC}/common/gestfich.cpp ${REINPLACE_CMD} -e 's|/usr/bin/xdg-open|${LOCALBASE}/bin/xdg-open|' \ ${WRKSRC}/common/pgm_base.cpp post-configure: # ${REINPLACE_CMD} -e 's|#define HAVE_ISO646_H|//#define HAVE_ISO646_H|' \ # ${WRKSRC}/config.h for f in `${FIND} ${WRKSRC} -name \*.make -o -name link.txt` ; do \ ${REINPLACE_CMD} \ -e 's|CC = gcc|#CC = gcc|' \ -e 's|LD = gcc|LD = ${CC}|' \ -e 's|LD = g++|LD = ${CXX}|' \ -e 's|wx-config|${WX_CONFIG}|' \ -e 's|CXX_FLAGS =|CXX_FLAGS = ${WRKSRC}/include -I${LOCALBASE}/include|' \ -e 's|C_FLAGS =|C_FLAGS = ${WRKSRC}/include -I${LOCALBASE}/include|' \ -e 's|LDFLAGS =|LDFLAGS += -L${LOCALBASE}/lib|' \ -e 's|gcc -D|${CC} -D|' \ -e 's/-pthread;-D_THREAD_SAFE/-pthread -D_THREAD_SAFE/g' \ $$f ; \ done ${REINPLACE_CMD} -e 's|/usr/local/bin/xdg-open|${LOCALBASE}/bin/xdg-open|' \ ${WRKSRC}/common/pgm_base.cpp pre-install: @echo "${DATADIR}, ${DOCSDIR}" #post-install: #.for subdir in library modules template # ${CP} -Rp ${WRKDIR}/kicad-library-master/${subdir} ${STAGEDIR}${DATADIR} #.endfor #.for subdir in internat # ${CP} -Rp ${WRKDIR}/kicad-doc/${subdir} ${STAGEDIR}${DOCSDIR} #.endfor PLIST_FILE_LIST= bin/freeroute.jnlp \ bin/cvpcb \ bin/eeschema \ bin/gerbview \ bin/kicad \ bin/pcbnew \ bin/pl_editor \ bin/bitmap2component \ bin/pcb_calculator \ share/mimelnk/application/x-kicad-schematic.desktop \ share/mimelnk/application/x-kicad-project.desktop \ share/icons/hicolor/24x24/mimetypes/application-x-kicad-project.png \ share/icons/hicolor/48x48/apps/kicad.png \ share/icons/hicolor/48x48/mimetypes/application-x-kicad-project.png \ share/icons/hicolor/scalable/apps/kicad.svg \ share/icons/hicolor/scalable/mimetypes/application-x-kicad-project.svg \ share/icons/hicolor/16x16/mimetypes/application-x-kicad-project.png \ share/icons/hicolor/32x32/mimetypes/application-x-kicad-project.png \ share/icons/hicolor/22x22/mimetypes/application-x-kicad-project.png \ share/mime/packages/kicad.xml \ share/applications/kicad.desktop \ share/applications/eeschema.desktop PLIST_DIR_LIST= lib/kicad PLIST_SHAREDDIR_LIST= share/mimelnk/application \ share/mimelnk .include diff --git a/cad/kicad-devel/files/patch-cmake_FindOCC.cmake b/cad/kicad-devel/files/patch-cmake_FindOCC.cmake new file mode 100644 index 000000000000..b3eb1132e754 --- /dev/null +++ b/cad/kicad-devel/files/patch-cmake_FindOCC.cmake @@ -0,0 +1,35 @@ +--- cmake/FindOCC.cmake.orig 2023-06-22 13:35:48 UTC ++++ cmake/FindOCC.cmake +@@ -45,7 +45,7 @@ set( OCC_LIBS + TKGeomAlgo + TKGeomBase + TKHLR +- TKIGES ++ TKDEIGES + TKLCAF + TKMath + TKMesh +@@ -55,18 +55,15 @@ set( OCC_LIBS + TKPrim + TKService + TKShHealing +- TKSTEP209 +- TKSTEPAttr +- TKSTEPBase +- TKSTEP +- TKSTL ++ TKDESTEP ++ TKDESTL + TKTObj + TKTopAlgo + TKV3d +- TKVRML ++ TKDEVRML + TKXCAF +- TKXDEIGES +- TKXDESTEP ++ TKXSDRAWIGES ++ TKXSDRAWSTEP + TKXMesh + TKXmlL + TKXml diff --git a/cad/kicad-devel/files/patch-include-kiway.h b/cad/kicad-devel/files/patch-include-kiway.h index dda125f679c6..9244e58c8eea 100644 --- a/cad/kicad-devel/files/patch-include-kiway.h +++ b/cad/kicad-devel/files/patch-include-kiway.h @@ -1,11 +1,11 @@ ---- include/kiway.h.orig 2021-12-11 08:54:03 UTC +--- include/kiway.h.orig 2023-06-22 13:35:48 UTC +++ include/kiway.h -@@ -114,7 +114,7 @@ +@@ -115,7 +115,7 @@ #define KIFACE_INSTANCE_NAME_AND_VERSION "KIFACE_1" #ifndef SWIG -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) #define LIB_ENV_VAR wxT( "LD_LIBRARY_PATH" ) #elif defined(__WXMAC__) #define LIB_ENV_VAR wxT( "DYLD_LIBRARY_PATH" ) diff --git a/cad/kicad-devel/files/patch-pcbnew_import_gfx_dxf_import_plugin.cpp b/cad/kicad-devel/files/patch-pcbnew_import__gfx_dxf__import__plugin.cpp similarity index 58% rename from cad/kicad-devel/files/patch-pcbnew_import_gfx_dxf_import_plugin.cpp rename to cad/kicad-devel/files/patch-pcbnew_import__gfx_dxf__import__plugin.cpp index 12625f24511b..2eeba09414c4 100644 --- a/cad/kicad-devel/files/patch-pcbnew_import_gfx_dxf_import_plugin.cpp +++ b/cad/kicad-devel/files/patch-pcbnew_import__gfx_dxf__import__plugin.cpp @@ -1,32 +1,40 @@ ---- pcbnew/import_gfx/dxf_import_plugin.cpp.orig 2023-01-08 16:40:34.270267000 +0100 -+++ pcbnew/import_gfx/dxf_import_plugin.cpp 2023-01-08 16:40:37.228586000 +0100 -@@ -581,5 +581,5 @@ +--- pcbnew/import_gfx/dxf_import_plugin.cpp.orig 2023-06-22 13:35:48 UTC ++++ pcbnew/import_gfx/dxf_import_plugin.cpp +@@ -580,7 +580,7 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseDa + // For now, we assume ellipses in the XY plane. VECTOR2D center( mapX( centerCoords.x ), mapY( centerCoords.y ) ); - VECTOR2D major( mapX( majorCoords.x ), mapY( majorCoords.y ) ); + VECTOR2D _major( mapX( majorCoords.x ), mapY( majorCoords.y ) ); // DXF elliptical arcs store their angles in radians (unlike circular arcs which use degrees) -@@ -599,5 +599,5 @@ + // The arcs wind CCW as in KiCad. The end angle must be greater than the start angle, and if +@@ -598,7 +598,7 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseDa + if( aData.ratio == 1.0 ) { - double radius = major.EuclideanNorm(); + double radius = _major.EuclideanNorm(); if( startAngle == endAngle ) -@@ -617,5 +617,5 @@ + { +@@ -616,7 +616,7 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseDa + } std::vector> splines; - ELLIPSE ellipse( center, major, aData.ratio, startAngle, endAngle ); + ELLIPSE ellipse( center, _major, aData.ratio, startAngle, endAngle ); TransformEllipseToBeziers( ellipse, splines ); -@@ -631,6 +631,6 @@ + +@@ -630,8 +630,8 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseDa + bufferToUse->AddSpline( b.Start, b.C1, b.C2, b.End, lineWidth ); // Naive bounding - updateImageLimits( center + major ); - updateImageLimits( center - major ); + updateImageLimits( center + _major ); + updateImageLimits( center - _major ); } + diff --git a/cad/kicad-devel/files/patch-thirdparty_glew_CMakeLists.txt b/cad/kicad-devel/files/patch-thirdparty_glew_CMakeLists.txt index 18c5a496dd6c..d56f7dd4d070 100644 --- a/cad/kicad-devel/files/patch-thirdparty_glew_CMakeLists.txt +++ b/cad/kicad-devel/files/patch-thirdparty_glew_CMakeLists.txt @@ -1,10 +1,10 @@ ---- thirdparty/glew/CMakeLists.txt.orig 2022-05-07 15:44:23 +0200 +--- thirdparty/glew/CMakeLists.txt.orig 2023-06-22 13:35:48 UTC +++ thirdparty/glew/CMakeLists.txt -@@ -5,6 +5,7 @@ +@@ -5,6 +5,7 @@ target_include_directories( glew PRIVATE "${CMAKE_CURR # The actual include directories will be added to the global include paths as # system headers target_include_directories( glew PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" ) +target_include_directories( glew SYSTEM PRIVATE "${CMAKE_INSTALL_PREFIX}/include" ) # Definitions for compiling GLEW staticly for EGL (extracted from the main GLEW CMakeLists.txt file) - add_definitions( -DGLEW_STATIC ) + add_compile_definitions( GLEW_STATIC ) diff --git a/cad/kicad-devel/files/patch-thirdparty_nanodbc_CMakeLists.txt b/cad/kicad-devel/files/patch-thirdparty_nanodbc_CMakeLists.txt index a4b434935ab1..79157d85e791 100644 --- a/cad/kicad-devel/files/patch-thirdparty_nanodbc_CMakeLists.txt +++ b/cad/kicad-devel/files/patch-thirdparty_nanodbc_CMakeLists.txt @@ -1,30 +1,23 @@ ---- thirdparty/nanodbc/CMakeLists.txt.orig 2022-09-14 12:06:32 UTC +--- thirdparty/nanodbc/CMakeLists.txt.orig 2023-06-22 13:35:48 UTC +++ thirdparty/nanodbc/CMakeLists.txt -@@ -165,16 +165,11 @@ elseif(MINGW) +@@ -155,16 +155,11 @@ endif() endif() ######################################## -## Mac OS X specifics for targets +## FreeBSD specifics for targets ######################################## -if(APPLE) - set(CMAKE_MACOSX_RPATH ON) - message(STATUS "Use rpaths on Mac OS X - ${CMAKE_MACOSX_RPATH}") - - # AppleClang complains of unused `-I/path/` arguments. - # These are harmless and can be safely ignored. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument") -endif() +# Clang complains of unused `-I/path/` arguments. +# These are harmless and can be safely ignored. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument") ######################################## ## library target -@@ -202,4 +197,4 @@ endif() - if(NANODBC_ENABLE_UNICODE) - add_compile_definitions(NANODBC_ENABLE_UNICODE) - target_compile_definitions(nanodbc PUBLIC NANODBC_ENABLE_UNICODE) --endif() -\ No newline at end of file -+endif()