The package rpms/f3d.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/f3d.git/commit/?id=c4f46b2c487cdf5bd....
Change: +%ifarch %{java_arches}
Thanks.
Full change: ============
commit c4f46b2c487cdf5bd3abf00b2affa2603ad2bd85 Author: topazus topazus@outlook.com Date: Sun Mar 31 10:09:12 2024 +0800
initial import; rhbz#2193288
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c13c80 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/f3d-2.3.0.tar.gz +/f3d-2.3.1.tar.gz diff --git a/1225.patch b/1225.patch new file mode 100644 index 0000000..7e905e9 --- /dev/null +++ b/1225.patch @@ -0,0 +1,22 @@ +From 95f2d26778160ccf6d8f4cb3b25a179bcd05d210 Mon Sep 17 00:00:00 2001 +From: topazus 77263945+topazus@users.noreply.github.com +Date: Sat, 27 Jan 2024 14:53:41 +0800 +Subject: [PATCH] Add missing header for GCC 14 + +Ref: https://gcc.gnu.org/gcc-14/porting_to.html +--- + application/F3DStarter.cxx | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/application/F3DStarter.cxx b/application/F3DStarter.cxx +index 76e8e5ebfb..9b2f2fac5b 100644 +--- a/application/F3DStarter.cxx ++++ b/application/F3DStarter.cxx +@@ -12,6 +12,7 @@ + #include "options.h" + #include "window.h" + ++#include <algorithm> + #include <cassert> + #include <filesystem> + #include <set> diff --git a/f3d.spec b/f3d.spec new file mode 100644 index 0000000..bd8456b --- /dev/null +++ b/f3d.spec @@ -0,0 +1,232 @@ +%bcond_without python + +# time of tests on s390x is too long, disable it for now +%ifarch s390x +%bcond_with check +%else +%bcond_without check +%endif + +%bcond_with all_tests + +%global forgeurl https://github.com/f3d-app/f3d +Version: 2.3.1 +%forgemeta + +Name: f3d +Release: %autorelease +Summary: Fast and minimalist 3D viewer + +License: BSD-3-Clause +URL: %{forgeurl} +Source0: %{forgesource} + +# Add missing header for GCC 14 +Patch0: https://github.com/f3d-app/f3d/pull/1225.patch + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: ninja-build +BuildRequires: json-devel +BuildRequires: cxxopts-devel +BuildRequires: vtk-devel +BuildRequires: lapack-devel +BuildRequires: assimp-devel +BuildRequires: cmake(draco) +# fedora 39 do not ship draco-static package +%if 0%{?fedora} != 39 +BuildRequires: draco-static +%endif +BuildRequires: alembic-devel +BuildRequires: opencascade-devel +#BuildRequires: cmake(pxr) +BuildRequires: imath-devel +BuildRequires: help2man + +%if %{with check} +BuildRequires: xorg-x11-drv-dummy +BuildRequires: mesa-dri-drivers +# provides /usr/bin/xvfb-run +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: python3-pytest +%endif + +BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib + +Requires: hicolor-icon-theme +Requires: shared-mime-info + +%description +F3D is a fast and minimalist 3D viewer desktop application. It supports many +file formats, from digital content to scientific datasets (including glTF, USD, +STL, STEP, PLY, OBJ, FBX, Alembic), can show animations and support thumbnails +and many rendering and texturing options including real time physically based +rendering and raytracing. + +It is fully controllable from the command line and support configuration files. +It can provide thumbnails, support interactive hotkeys, drag&drop and +integration into file managers. + +F3D also contains the libf3d, a simple library to render meshes, with C++ and +Python Bindings, as well as experimental Java and Javascript bindings. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%if %{with python} +%package python3 +Summary: Python 3 bindings for the %{name} +BuildRequires: python3-devel +BuildRequires: python3-pybind11 +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: python3-%{name} = %{version}-%{release} + +%description python3 +This package contains Python 3 bindings for %{name}. +%endif + +%ifarch %{java_arches} +%package java +Summary: Java bindings for the %{name} +BuildRequires: javapackages-tools +BuildRequires: java-devel +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description java +This package contains Java bindings for %{name}. +%endif + +%prep +%forgeautosetup -p1 +# remove bundled libraries of cxxopts and nlohmann_json +rm -rf external/ +# fix install location for -java sub-package +sed -i 's|${CMAKE_INSTALL_LIBDIR}|${CMAKE_INSTALL_LIBDIR}/f3d|' java/CMakeLists.txt +sed -i 's|share/java|%{_jnidir}|' java/CMakeLists.txt + +%build +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DF3D_PLUGINS_STATIC_BUILD=OFF \ + -DF3D_PLUGINS_INSTALL_DIR=%{_libdir}/f3d/plugins \ + -DF3D_USE_EXTERNAL_CXXOPTS=ON \ + -DF3D_USE_EXTERNAL_NLOHMANN_JSON=ON \ + -DF3D_LINUX_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON \ + -DF3D_LINUX_GENERATE_MAN=ON \ + -DF3D_MODULE_RAYTRACING=OFF \ + -DF3D_MODULE_EXTERNAL_RENDERING=OFF \ + -DF3D_PLUGIN_BUILD_ALEMBIC=ON \ + -DF3D_PLUGIN_BUILD_ASSIMP=ON \ + -DF3D_PLUGIN_BUILD_DRACO=ON \ + -DF3D_PLUGIN_BUILD_EXODUS=ON \ + -DF3D_PLUGIN_BUILD_OCCT=ON \ + -DF3D_PLUGIN_BUILD_USD=OFF \ + -DF3D_PLUGIN_OCCT_COLORING_SUPPORT=ON \ + -DF3D_PLUGIN_BUILD_VDB=OFF \ +%if %{with python} + -DF3D_BINDINGS_PYTHON=ON \ +%endif +%ifarch %{java_arches} + -DF3D_BINDINGS_JAVA=ON \ +%endif +%if %{with check} + -DBUILD_TESTING=ON \ +%endif + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + +%cmake_build + +%install +%cmake_install + +%cmake_install --component mimetypes +%cmake_install --component sdk +%cmake_install --component configuration + +rm -r %{buildroot}%{_datadir}/doc/F3D +rm %{buildroot}%{_libdir}/libVTKExtensions*.a + +%check +%if %{with check} +export MESA_DEBUG=silent +export LIBGL_ALWAYS_SOFTWARE=true +export MESA_LOADER_DRIVER_OVERRIDE=llvmpipe +%if %{with all_tests} +xvfb-run -a bash -c "%ctest" +%else +skip_tests= +skip_tests+="libf3d::TestSDKCompareWithFile|libf3d::TestSDKMultiColoring|libf3d::TestSDKMultiOptions|" +skip_tests+="libf3d::TestSDKDynamicBackgroundColor|libf3d::TestSDKDynamicFontFile|libf3d::TestSDKDynamicLightIntensity|" +skip_tests+="libf3d::TestSDKDynamicProperties|f3d::TestVTP|f3d::TestVTR|f3d::TestVTM|f3d::TestGridAbsolute|" +skip_tests+="f3d::TestPointCloud|f3d::TestPointCloudBar|f3d::TestPointCloudDefaultScene|f3d::TestMultiblockMetaData|" +skip_tests+="f3d::TestLightIntensityBrighter|f3d::TestLightIntensityDarker|f3d::TestUTF8|f3d::TestComponentName|" +skip_tests+="f3d::TestGroupGeometries|f3d::TestGroupGeometriesColoring|f3d::TestScalarsCell|f3d::TestMetaData|" +skip_tests+="f3d::TestNoBackground|f3d::TestInteractionGroupGeometriesDrop|f3d::TestInteractionDropSameFiles|" +skip_tests+="f3d::TestVerboseWarning|f3d::TestTensorsDirect|f3d::TestTensorsVolumeDirect|pyf3d::TestPython_deprecated|" +skip_tests+="pyf3d::TestPython_image_compare" +xvfb-run -a bash -c "%ctest -E '$skip_tests'" +%endif +%endif + +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml + +%files +%license LICENSE.md +%doc README.md +%{_bindir}/f3d +%{bash_completions_dir}/f3d +%{zsh_completions_dir}/_f3d +%{fish_completions_dir}/f3d.fish +%{_datadir}/icons/hicolor/*/apps/f3d.png +%{_datadir}/icons/hicolor/scalable/apps/f3d.svg +%{_datadir}/applications/f3d-plugin-*.desktop +%{_datadir}/applications/f3d.desktop +%{_datadir}/mime/packages/f3d-*.xml +%dir %{_datadir}/f3d +%dir %{_datadir}/f3d/configs +%dir %{_datadir}/f3d/configs/config.d +%dir %{_datadir}/f3d/configs/thumbnail.d +%dir %{_datadir}/f3d/plugins +%{_datadir}/f3d/configs/config.d/*.json +%{_datadir}/f3d/configs/thumbnail.d/*.json +%{_datadir}/f3d/plugins/*.json +%{_datadir}/thumbnailers/f3d-plugin-*.thumbnailer +%{_mandir}/man1/f3d.1* +%{_metainfodir}/app.f3d.F3D.metainfo.xml + +%{_libdir}/libf3d.so.2* +%dir %{_libdir}/f3d +%dir %{_libdir}/f3d/plugins +%{_libdir}/f3d/plugins/libf3d-plugin-*.so + +%files devel +%{_libdir}/libf3d.so +%dir %{_includedir}/f3d +%{_includedir}/f3d/*.h +%dir %{_libdir}/cmake/f3d +%{_libdir}/cmake/f3d/*.cmake +%{_libdir}/cmake/f3d/*.in + +%if %{with python} +%files python3 +%{python3_sitearch}/f3d/ +%endif + +%ifarch %{java_arches} +%files java +%{_libdir}/f3d/libf3d-java.so +%{_jnidir}/f3d.jar +%endif + +%changelog +%autochangelog diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..7d85dbf --- /dev/null +++ b/packit.yaml @@ -0,0 +1,19 @@ +upstream_package_name: f3d +upstream_project_url: https://github.com/f3d-app/f3d +upstream_tag_template: v{version} + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-rawhide + + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-all diff --git a/sources b/sources new file mode 100644 index 0000000..22ab232 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (f3d-2.3.1.tar.gz) = dc1094690ca18f7f826cce7153dc033ecf2ec02a41627ff8fb75f65b1390e1d0f492e920e0e16dc8090afefe28ce66f22155bd803db67de0c36557016efd1b52
arch-excludes@lists.fedoraproject.org