%global conan_config_commit 472f35bcdbb5690ef0c1a4444b0800ee0ae10033 Name: libsavitar Version: 5.2.2 Release: 1%{?dist} Summary: C++ implementation of 3mf loading with SIP Python bindings License: LGPL-3.0-or-later URL: https://github.com/Ultimaker/libSavitar Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://github.com/ultimaker/conan-config/archive/%{conan_config_commit}.tar.gz # manually generated from the results of # conan download -r cura-ce umbase/0.1.7@ultimaker/stable Source2: umbase-0.1.7.tar.bz2 # conan download -r cura-ce standardprojectsettings/0.1.0@ultimaker/stable Source3: standardprojectsettings-0.1.0.tar.bz2 # Build the library with an sover Patch0: libsavitar-5.2.2-sover.patch BuildRequires: cmake BuildRequires: dos2unix BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: pugixml-devel %if 0 BuildRequires: python3-devel BuildRequires: python3-sip-devel BuildRequires: /usr/bin/sip %endif BuildRequires: conan %if 0 # we add a dependency on setuptools to provide the distutils module # upstream already removed the distutils usage in version 5+ BuildRequires: (python3-setuptools if python3-devel >= 3.12) %endif # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval %if 0%{?fedora} >= 37 || 0%{?rhel} >= 10 ExcludeArch: %{ix86} %endif # Get Fedora 33++ behavior on anything older %undefine __cmake_in_source_build %description Savitar is a C++ implementation of 3mf loading with SIP Python bindings. 3mf is a 3D printing file format. %package devel Summary: Development files for libsavitar Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Savitar is a C++ implementation of 3mf loading with SIP Python bindings. 3mf is a 3D printing file format. Development files. # This is now in https://github.com/Ultimaker/pySavitar # which i did not glue in here because i was angry and tired %if 0 %package -n python3-savitar Summary: Python 3 libSavitar bindings Requires: %{name}%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-savitar} %description -n python3-savitar Savitar is a C++ implementation of 3mf loading with SIP Python bindings. 3mf is a 3D printing file format. The Python bindings. %endif %prep %autosetup -n libSavitar-%{version} -p1 -S git -a 1 # Autosetup doesn't seem to like multiple -a flags, so here we are tar xf %{SOURCE2} tar xf %{SOURCE3} # Wrong end of line encoding dos2unix README.md # Hack conan until it cries. # These seem to be conan 2.0.0 incompatibilities for i in cura_build cura; do sed -i 's|build_requires|tool_requires|g' conan-config-%{conan_config_commit}/profiles/$i.jinja sed -i 's|\[env\]||g' conan-config-%{conan_config_commit}/profiles/$i.jinja done # This looks to just be a conan 2.0.0 incompatibility sed -i 's|Visual Studio|msvc|g' conanfile.py # No, we don't want your prebuilt pugixml. BARF. sed -i 's|"pugixml/1.12.1"|~|g' conandata.yml # Since I'm importing local copies of umbase and standardprojectsettings that I scraped off the cura-ce conan remote # it's easier to not use the name/tag that no longer exists. There might be a way to not need to do this, but BARF. sed -i 's|@ultimaker/stable||g' conanfile.py # Look, even I don't know how this was supposed to work. Best I can tell, there are no standardprojectsettings cmake files # in the conan remote that would be found by find_package(). The .cmake file that IS in the remote is just helper functions # and it turns out, that's all we need, so we just point the CMakeLists.txt to it and call it a day. sed -i 's|find_package(standardprojectsettings REQUIRED)|include(standardprojectsettings-0.1.0/StandardProjectSettings.cmake)|g' CMakeLists.txt %build export CXXFLAGS="%{optflags} -Wl,--as-needed" # Establish a config using the defaults from the upstream. # Fun story, this doesn't do much and generates a remotes.txt which... conan 2.0.0 doesn't even look at. # What a hot mess conan is. conan config install conan-config-%{conan_config_commit} # Makes a profile for conan. conan profile detect --force # Hack in our local copy of umbase and standardprojectsettings so it is found in conan's cache conan export umbase-0.1.7 conan export standardprojectsettings-0.1.0 # okay conan, try not to trip on your sword and impale yourself conan install . --build=missing --version %{version} %cmake -DCMAKE_SKIP_RPATH:BOOL=ON %cmake_build %install # This does nothing because... there is no install logic left in the CMakeLists.txt file. # %%cmake_install mkdir -p %{buildroot}%{_libdir} install -m755 %{__cmake_builddir}/libSavitar.so* %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} cp -a include/* %{buildroot}%{_includedir} %files %license LICENSE %doc README.md %{_libdir}/libSavitar.so.* %files devel %license LICENSE %{_libdir}/libSavitar.so %{_includedir}/Savitar %if 0 # Own the dir not to depend on cmake: %{_libdir}/cmake %endif %if 0 %files -n python3-savitar %license LICENSE %doc README.md %{python3_sitearch}/Savitar.so %endif %changelog * Fri Jan 20 2023 Tom Callaway - 5.2.2-1 - i need a drink * Thu Jan 19 2023 Fedora Release Engineering - 4.13.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jul 21 2022 Fedora Release Engineering - 4.13.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 17 2022 Python Maint - 4.13.1-3 - Rebuilt for Python 3.11 * Mon Mar 28 2022 Miro Hrončok - 4.13.1-2 - Fix build failure with cmake 3.23+ - Fixes: rhbz#2069148 * Tue Feb 01 2022 Gabriel Féron - 4.13.1-1 - Update to 4.13.1 * Thu Jan 20 2022 Gabriel Féron - 4.13.0-1 - Update to 4.13.0 * Thu Jan 20 2022 Fedora Release Engineering - 4.12.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 13 2021 Gabriel Féron - 4.12.1-1 - Update to 4.12.1 * Wed Sep 15 2021 Gabriel Féron - 4.11.0-1 - Update to 4.11.0 * Mon Aug 16 2021 Gabriel Féron - 4.10.0-1 - Update to 4.10.0 * Thu Jul 22 2021 Fedora Release Engineering - 4.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 10 2021 Gabriel Féron - 4.9.1-1 - Update to 4.9.1 * Fri Jun 04 2021 Python Maint - 4.9.0-2 - Rebuilt for Python 3.10 * Mon Apr 26 2021 Gabriel Féron - 4.9.0-1 - Update to 4.9.0 * Tue Jan 26 2021 Fedora Release Engineering - 4.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Dec 22 2020 Jan Pazdziora - 4.8.0-1 - Update to 4.8.0 * Thu Sep 03 2020 Miro Hrončok - 4.7.1-1 - Update to 4.7.1 * Mon Aug 31 2020 Gabriel Féron - 4.7.0-1 - Update to 4.7.0 * Tue Jul 28 2020 Fedora Release Engineering - 4.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 4.6.1-2 - Rebuilt for Python 3.9 * Tue May 5 2020 Gabriel Féron - 4.6.1-1 - Update to 4.6.1 * Tue Apr 21 2020 Gabriel Féron - 4.6.0-1 - Update to 4.6.0 * Wed Jan 29 2020 Fedora Release Engineering - 4.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Nov 21 2019 Gabriel Féron - 4.4.0-1 - Update to 4.4.0 * Fri Nov 01 2019 Miro Hrončok - 4.1.0-4 - Make the dependency of python3-savitar on libsavitar strict (#1767762) * Mon Aug 19 2019 Miro Hrončok - 4.1.0-3 - Rebuilt for Python 3.8 * Thu Jul 25 2019 Fedora Release Engineering - 4.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jun 18 2019 Gabriel Féron - 4.1.0-1 - Update to 4.1.0 * Wed Apr 03 2019 Gabriel Féron - 4.0.0-1 - Update to 4.0.0 * Fri Feb 01 2019 Fedora Release Engineering - 3.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jan 26 2019 Gabriel Féron - 3.6.0-1 - Update to 3.6.0 * Mon Nov 12 2018 Miro Hrončok - 3.5.1-2 - Use PyQt5.sip (#1601917) * Mon Nov 12 2018 Miro Hrončok - 3.5.1-1 - Update to 3.5.1 (#1644323) * Tue Aug 28 2018 Miro Hrončok - 3.4.1-1 - Update to 3.4.1 (#1599715) * Fri Jul 13 2018 Fedora Release Engineering - 3.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 3.3.0-2 - Rebuilt for Python 3.7 * Wed May 02 2018 Miro Hrončok - 3.3.0-1 - Update to 3.3.0 (#1571783) * Mon Mar 19 2018 Miro Hrončok - 3.2.1-2 - Fix license tag (AGPLv3+ to LGPLv3+) * Mon Mar 19 2018 Miro Hrončok - 3.2.1-1 - Update to 3.2.1 (#1523886) * Wed Feb 07 2018 Fedora Release Engineering - 3.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Dec 09 2017 Miro Hrončok - 3.1.0-1 - Update to 3.1.0 (#1523886) - Don't sed lib -> lib64 (not needed now) * Mon Oct 23 2017 Miro Hrončok - 3.0.3-1 - Update to 3.0.3 (#1505189) * Wed Aug 30 2017 Miro Hrončok - 2.7.0-1 - Update to 2.7.0 (#1486731) * Thu Aug 03 2017 Fedora Release Engineering - 2.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 2.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Wed Jun 28 2017 Miro Hrončok - 2.6.1-1 - Updated to 2.6.1 (#1465417) * Tue Jun 27 2017 Miro Hrončok - 2.6.0-1 - Updated to 2.6.0 (#1465417) * Wed May 03 2017 Miro Hrončok - 0-0.1.20170501git1ad7ddb - New package