[packages/box2d] - updated to 3.1.1 (new soname)
qboosh
qboosh at pld-linux.org
Sun May 24 16:04:34 CEST 2026
commit 33abc4bd680d5f371387d3ed94bf6645cd09d26f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 24 16:04:39 2026 +0200
- updated to 3.1.1 (new soname)
box2d-link.patch | 11 +++++++++++
box2d.spec | 35 +++++++++++++++++++++++++++--------
2 files changed, 38 insertions(+), 8 deletions(-)
---
diff --git a/box2d.spec b/box2d.spec
index 426a095..629a0ec 100644
--- a/box2d.spec
+++ b/box2d.spec
@@ -1,15 +1,27 @@
+#
+# Conditional build:
+%bcond_with sse2 # x86 SSE2 SIMD instructions
+%bcond_with avx2 # x86_64 AVX2 instructions
+%bcond_with neon # ARM Neon SIMD instructions
+%ifarch %{x8664} x32 pentium4
+%define with_sse2 1
+%endif
+%if %{with sse2} || %{with avx2} || %{with neon}
+%define with_simd 1
+%endif
Summary: Box2D - 2D physics engine for games
Summary(pl.UTF-8): Box2D - silnik fizyki 2D dla gier
Name: box2d
-Version: 2.4.1
+Version: 3.1.1
Release: 1
License: MIT
Group: Libraries
#Source0Download: https://github.com/erincatto/box2d/releases
Source0: https://github.com/erincatto/box2d/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 00d2c9c66da494aed947e03bff73e080
+# Source0-md5: d73952c02f83dfcb708badb1c5e63909
+Patch0: %{name}-link.patch
URL: https://box2d.org/
-BuildRequires: cmake >= 3.8
+BuildRequires: cmake >= 3.22
BuildRequires: rpmbuild(macros) >= 1.605
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -33,11 +45,18 @@ Pliki nagłówkowe biblioteki box2d.
%prep
%setup -q
+%patch -P0 -p1
%build
+%if %{with sse2}
+CFLAGS="%{rpmcflags} -msse2 -mfpmath=sse"
+%endif
%cmake -B build \
+ %{?with_avx2:-DBOX2D_AVX2:BOOL=ON} \
-DBOX2D_BUILD_UNIT_TESTS:BOOL=OFF \
- -DBOX2D_BUILD_TESTBED:BOOL=OFF
+ -DBOX2D_BUILD_TESTBED:BOOL=OFF \
+ %{!?with_simd:-DBOX2D_DISABLE_SIMD:BOOL=ON}
+
%{__make} -C build
%install
@@ -54,12 +73,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CHANGELOG.md README.md
-%attr(755,root,root) %{_libdir}/libbox2d.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbox2d.so.2
+%doc README.md docs/{images,*.md}
+%{_libdir}/libbox2d.so.*.*.*
+%ghost %{_libdir}/libbox2d.so.3
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libbox2d.so
+%{_libdir}/libbox2d.so
%{_libdir}/cmake/box2d
%{_includedir}/box2d
diff --git a/box2d-link.patch b/box2d-link.patch
new file mode 100644
index 0000000..f8e50ae
--- /dev/null
+++ b/box2d-link.patch
@@ -0,0 +1,11 @@
+--- box2d-3.1.1/src/CMakeLists.txt.orig 2026-05-24 15:57:50.141889343 +0200
++++ box2d-3.1.1/src/CMakeLists.txt 2026-05-24 15:58:32.744991875 +0200
+@@ -85,6 +85,8 @@ target_include_directories(box2d
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+
++target_link_libraries(box2d PRIVATE m)
++
+ set(CMAKE_DEBUG_POSTFIX "d")
+
+ # Box2D uses C17 for _Static_assert and anonymous unions
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/box2d.git/commitdiff/33abc4bd680d5f371387d3ed94bf6645cd09d26f
More information about the pld-cvs-commit
mailing list