diff --git a/cad/Makefile b/cad/Makefile index e85ed462ada0..f43f0c101c4f 100644 --- a/cad/Makefile +++ b/cad/Makefile @@ -1,162 +1,163 @@ COMMENT = CAD tools SUBDIR += PrusaSlicer SUBDIR += abc SUBDIR += admesh SUBDIR += adms SUBDIR += alliance SUBDIR += antimony SUBDIR += apio SUBDIR += appcsxcad SUBDIR += archimedes SUBDIR += astk-client SUBDIR += astk-serveur SUBDIR += atlc SUBDIR += brlcad SUBDIR += calculix SUBDIR += calculix-ccx SUBDIR += camotics SUBDIR += caneda SUBDIR += cascade SUBDIR += cascade-compiler SUBDIR += chipvault SUBDIR += csxcad SUBDIR += cura SUBDIR += cura-engine SUBDIR += cvc SUBDIR += digital SUBDIR += dinotrace SUBDIR += ecpprog SUBDIR += electric SUBDIR += electric-ng SUBDIR += fasm SUBDIR += fdm_materials SUBDIR += feappv SUBDIR += fidocadj SUBDIR += freecad SUBDIR += freehdl SUBDIR += fritzing SUBDIR += gds3d SUBDIR += gdscpp SUBDIR += gdsreader SUBDIR += gdstk SUBDIR += gdt SUBDIR += geda SUBDIR += gerbv SUBDIR += ghdl SUBDIR += gmsh SUBDIR += gnucap SUBDIR += gplcver SUBDIR += graywolf SUBDIR += gspiceui SUBDIR += gtkwave SUBDIR += horizon-eda SUBDIR += hs-verismith SUBDIR += ifcopenshell SUBDIR += impact SUBDIR += irsim SUBDIR += iverilog SUBDIR += k40-whisperer SUBDIR += kicad SUBDIR += kicad-devel SUBDIR += kicad-doc SUBDIR += kicad-library-footprints SUBDIR += kicad-library-footprints-devel SUBDIR += kicad-library-packages3d SUBDIR += kicad-library-packages3d-devel SUBDIR += kicad-library-symbols SUBDIR += kicad-library-symbols-devel SUBDIR += kicad-library-templates SUBDIR += kicad-library-templates-devel SUBDIR += klayout SUBDIR += ktechlab SUBDIR += ldraw SUBDIR += ldview SUBDIR += leocad SUBDIR += lepton-eda + SUBDIR += libbgcode SUBDIR += libgdsii SUBDIR += libopencad SUBDIR += librecad SUBDIR += libredwg SUBDIR += librepcb SUBDIR += librnd SUBDIR += logisim SUBDIR += magic SUBDIR += meshdev SUBDIR += meshlab SUBDIR += netgen SUBDIR += netgen-lvs SUBDIR += ngspice_rework SUBDIR += nvc SUBDIR += opencascade SUBDIR += opencascade740 SUBDIR += openctm SUBDIR += openfpgaloader SUBDIR += openroad SUBDIR += openscad SUBDIR += openscad-devel SUBDIR += opentimer SUBDIR += openvsp SUBDIR += oregano SUBDIR += p5-GDS2 SUBDIR += p5-Verilog-Perl SUBDIR += padring SUBDIR += pcb SUBDIR += pcb-rnd SUBDIR += pdnmesh SUBDIR += py-amaranth SUBDIR += py-cocotb SUBDIR += py-edalize SUBDIR += py-ezdxf SUBDIR += py-gdspy SUBDIR += py-gdstk SUBDIR += py-gmsh SUBDIR += py-lcapy SUBDIR += py-phidl SUBDIR += py-pyfda SUBDIR += py-pygmsh SUBDIR += py-pymtl SUBDIR += py-pyvcd SUBDIR += py-vunit-hdl SUBDIR += python-gdsii SUBDIR += qcad SUBDIR += qcsxcad SUBDIR += qelectrotech SUBDIR += qflow SUBDIR += qmls SUBDIR += qrouter SUBDIR += qspeakers SUBDIR += qucs-s SUBDIR += qucsator SUBDIR += repsnapper SUBDIR += rubygem-gdsii SUBDIR += scotch SUBDIR += silice SUBDIR += solvespace SUBDIR += sp2sp SUBDIR += spice SUBDIR += stepcode SUBDIR += stm32flash SUBDIR += sumo SUBDIR += surelog SUBDIR += svlint SUBDIR += svls SUBDIR += sweethome3d SUBDIR += symbiyosys SUBDIR += tkgate SUBDIR += tochnog SUBDIR += uhdm SUBDIR += uranium SUBDIR += verilator SUBDIR += verilog-mode.el SUBDIR += veroroute SUBDIR += veryl SUBDIR += xcircuit SUBDIR += xyce SUBDIR += yosys SUBDIR += yosys-ghdl-plugin SUBDIR += yosys-systemverilog SUBDIR += z88 SUBDIR += zcad .include diff --git a/cad/libbgcode/Makefile b/cad/libbgcode/Makefile new file mode 100644 index 000000000000..ffa5500927c5 --- /dev/null +++ b/cad/libbgcode/Makefile @@ -0,0 +1,27 @@ +PORTNAME= libbgcode +DISTVERSION= 0.2.0 +CATEGORIES= cad + +MAINTAINER= teodorsigaev@gmail.com +COMMENT= Prusa Block & Binary G-code reader/writer/converter +WWW= https://github.com/prusa3d/libbgcode + +LICENSE= AGPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libboost_nowide.so:devel/boost-libs + +USES= cmake + +USE_GITHUB= yes +GH_ACCOUNT= prusa3d +GH_TAGNAME= 6f43cb004ef3d3bda37dde49f6235e24d2717629 +GH_TUPLE= atomicobject:heatshrink:v0.4.1:heatshrink + +CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON \ + -DLibBGCode_BUILD_DEPS=ON \ + -DLibBGCode_BUILD_TESTS=OFF + +PORTDATA= * + +.include diff --git a/cad/libbgcode/distinfo b/cad/libbgcode/distinfo new file mode 100644 index 000000000000..835c43181731 --- /dev/null +++ b/cad/libbgcode/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1709747111 +SHA256 (prusa3d-libbgcode-0.2.0-6f43cb004ef3d3bda37dde49f6235e24d2717629_GH0.tar.gz) = 315349d55fcee2eaf41ca7ba6a4b8e0e442c74b04f6074d6e108c169fa36e908 +SIZE (prusa3d-libbgcode-0.2.0-6f43cb004ef3d3bda37dde49f6235e24d2717629_GH0.tar.gz) = 455740 +SHA256 (atomicobject-heatshrink-v0.4.1_GH0.tar.gz) = 7529a1c8ac501191ad470b166773364e66d9926aad632690c72c63a1dea7e9a6 +SIZE (atomicobject-heatshrink-v0.4.1_GH0.tar.gz) = 36945 diff --git a/cad/libbgcode/files/patch-CMakeLists.txt b/cad/libbgcode/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b03fc2532691 --- /dev/null +++ b/cad/libbgcode/files/patch-CMakeLists.txt @@ -0,0 +1,13 @@ +--- CMakeLists.txt.orig 2024-03-06 18:20:01 UTC ++++ CMakeLists.txt +@@ -27,10 +27,6 @@ endif () + include(deps/autobuild.cmake) + endif () + +-if (NOT CMAKE_DEBUG_POSTFIX) +- set(CMAKE_DEBUG_POSTFIX "d") +-endif () +- + include(CMakeDependentOption) + cmake_dependent_option(${PROJECT_NAME}_BUILD_COMPONENT_Convert "Include Convert component in the library" ON + "${PROJECT_NAME}_BUILD_COMPONENT_Binarize" OFF) diff --git a/cad/libbgcode/files/patch-deps_CMakeLists.txt b/cad/libbgcode/files/patch-deps_CMakeLists.txt new file mode 100644 index 000000000000..7bc456adc57c --- /dev/null +++ b/cad/libbgcode/files/patch-deps_CMakeLists.txt @@ -0,0 +1,23 @@ +--- deps/CMakeLists.txt.orig 2024-01-22 12:56:01 UTC ++++ deps/CMakeLists.txt +@@ -41,16 +41,16 @@ include(${PROJECT_SOURCE_DIR}/../cmake/modules/AddCMak + + include(${PROJECT_SOURCE_DIR}/../cmake/modules/AddCMakeProject.cmake) + +-set(supported_packages Boost heatshrink Catch2 ZLIB pybind11) ++set(supported_packages heatshrink) + + include(CMakeDependentOption) + option(${PROJECT_NAME}_SELECT_ALL "Choose all external projects to be selected (create build target for them)." ON) + option(${PROJECT_NAME}_BUILD_ALL "Choose all external projects to be built." OFF) + +-find_package(Git REQUIRED) +- ++#find_package(Git REQUIRED) ++# + # The default command line for patching. Only works for newer +-set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespace=fix) ++#set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespace=fix) + + foreach (pkg ${supported_packages}) + option(${PROJECT_NAME}_BUILD_${pkg} "Select package ${pkg} to be built." OFF) diff --git a/cad/libbgcode/files/patch-deps_heatshrink_heatshrink.cmake b/cad/libbgcode/files/patch-deps_heatshrink_heatshrink.cmake new file mode 100644 index 000000000000..849910764089 --- /dev/null +++ b/cad/libbgcode/files/patch-deps_heatshrink_heatshrink.cmake @@ -0,0 +1,12 @@ +--- deps/heatshrink/heatshrink.cmake.orig 2023-11-16 13:57:12 UTC ++++ deps/heatshrink/heatshrink.cmake +@@ -1,6 +1,5 @@ + add_cmake_project(heatshrink +- URL https://github.com/atomicobject/heatshrink/archive/refs/tags/v0.4.1.zip +- URL_HASH SHA256=2e2db2366bdf36cb450f0b3229467cbc6ea81a8c690723e4227b0b46f92584fe ++ URL file://../../heatshrink-0.4.1 + PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ./CMakeLists.txt && + ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in ./Config.cmake.in +-) +\ No newline at end of file ++) diff --git a/cad/libbgcode/pkg-descr b/cad/libbgcode/pkg-descr new file mode 100644 index 000000000000..f83c7d33e36a --- /dev/null +++ b/cad/libbgcode/pkg-descr @@ -0,0 +1,2 @@ +Prusa Block & Binary G-code reader/writer/converter. +libbgcode provides three API: core, binarize and convert. diff --git a/cad/libbgcode/pkg-plist b/cad/libbgcode/pkg-plist new file mode 100644 index 000000000000..962a25c25bdf --- /dev/null +++ b/cad/libbgcode/pkg-plist @@ -0,0 +1,21 @@ +bin/bgcode +include/LibBGCode/binarize/binarize.hpp +include/LibBGCode/binarize/export.h +include/LibBGCode/convert/convert.hpp +include/LibBGCode/convert/export.h +include/LibBGCode/core/core.hpp +include/LibBGCode/core/export.h +lib/cmake/LibBGCode/LibBGCodeBinarizeTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/LibBGCode/LibBGCodeBinarizeTargets.cmake +lib/cmake/LibBGCode/LibBGCodeConfig.cmake +lib/cmake/LibBGCode/LibBGCodeConfigVersion.cmake +lib/cmake/LibBGCode/LibBGCodeConvertTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/LibBGCode/LibBGCodeConvertTargets.cmake +lib/cmake/LibBGCode/LibBGCodeCoreTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/LibBGCode/LibBGCodeCoreTargets.cmake +lib/libbgcode_binarize.so +lib/libbgcode_binarize.so.0.2.0 +lib/libbgcode_convert.so +lib/libbgcode_convert.so.0.2.0 +lib/libbgcode_core.so +lib/libbgcode_core.so.0.2.0