diff --git a/common/shlibs b/common/shlibs index da94406855dccb..86746e83a1f46d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4689,3 +4689,4 @@ libcpptrace.so.1 cpptrace-1.0.4_1 libcgif.so.0 cgif-0.5.3_1 libdsk.so.5 libdsk-1.5.22_1 libblend2d.so libblend2d-0.21.2_1 +libf3d.so.4 f3d-4.0.0_1 diff --git a/srcpkgs/f3d-devel b/srcpkgs/f3d-devel new file mode 120000 index 00000000000000..c9ac968fd2a320 --- /dev/null +++ b/srcpkgs/f3d-devel @@ -0,0 +1 @@ +f3d \ No newline at end of file diff --git a/srcpkgs/f3d/patches/include-cstdint.patch b/srcpkgs/f3d/patches/include-cstdint.patch new file mode 100644 index 00000000000000..49b017086cf9e5 --- /dev/null +++ b/srcpkgs/f3d/patches/include-cstdint.patch @@ -0,0 +1,25 @@ +int64_t is pulled in transitively on glibc +add the missing include so headers also builds on musl + +--- a/library/public/video_frame.h ++++ b/library/public/video_frame.h +@@ -4,6 +4,8 @@ + #include "exception.h" + #include "export.h" + ++#include ++ + namespace f3d + { + /** +--- a/library/public/video_packet.h ++++ b/library/public/video_packet.h +@@ -4,6 +4,8 @@ + #include "exception.h" + #include "export.h" + ++#include ++ + namespace f3d + { + /** diff --git a/srcpkgs/f3d/template b/srcpkgs/f3d/template new file mode 100644 index 00000000000000..e5e149cdf0322b --- /dev/null +++ b/srcpkgs/f3d/template @@ -0,0 +1,48 @@ +# Template file for 'f3d' +pkgname=f3d +version=4.0.0 +revision=1 +build_style=cmake +configure_args="-DBUILD_TESTING=OFF + -DF3D_USE_EXTERNAL_CXXOPTS=ON -DF3D_USE_EXTERNAL_NLOHMANN_JSON=ON + $(vopt_bool alembic F3D_PLUGIN_BUILD_ALEMBIC) + $(vopt_bool draco F3D_PLUGIN_BUILD_DRACO) + $(vopt_bool occt F3D_PLUGIN_BUILD_OCCT) + $(vopt_bool exr F3D_MODULE_EXR) + $(vopt_bool webp F3D_MODULE_WEBP)" +makedepends="cxxopts json-c++ vtk-devel $(vopt_if alembic alembic-devel) + $(vopt_if draco draco-devel) $(vopt_if occt occt-devel) + $(vopt_if exr libopenexr-devel) $(vopt_if webp libwebp-devel)" +short_desc="Fast and minimalist 3D viewer" +maintainer="Alex March " +license="BSD-3-Clause" +homepage="https://f3d.app" +changelog="https://raw.githubusercontent.com/f3d-app/f3d/refs/heads/master/doc/CHANGELOG.md" +distfiles="https://github.com/f3d-app/f3d/archive/refs/tags/v${version}.tar.gz" +checksum=3edb481a5ab7bb6689fc3f37689895465eceecf1052bc30e4f86ad14f4ee1d71 + +build_options="alembic draco exr occt webp" +build_options_default="alembic draco exr occt webp" + +desc_option_alembic="Enable Alembic plugin for ABC files" +desc_option_draco="Enable Draco plugin for DRC and Draco-compressed glTF files" +desc_option_exr="Enable support for OpenEXR images" +desc_option_occt="Enable OpenCASCADE plugin for STEP and IGES files" +desc_option_webp="Enable support for WebP images" + +post_install() { + rm -r ${DESTDIR}/usr/share/doc # holds copies of the license files + vlicense LICENSE.md + vlicense THIRD_PARTY_LICENSES.md +} + +f3d-devel_package() { + depends="${sourcepkg}>=${version}_${revision} vtk-devel" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/libf3d.so + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + } +}