Skip to content

Commit 53de652

Browse files
committed
box2d: add upgrade candidate
1 parent 313cc18 commit 53de652

6 files changed

Lines changed: 133 additions & 0 deletions

File tree

box2d/DESCR

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Box2D is a 2D physics engine for games. It features:
2+
3+
Collision
4+
Continuous collision detection
5+
Contact callbacks: begin, end, pre-solve, post-solve
6+
Convex polygons and circles
7+
Multiple shapes per body
8+
One-shot contact manifolds
9+
Dynamic tree broadphase
10+
Efficient pair management
11+
Fast broadphase AABB queries
12+
Collision groups and categories
13+
14+
Physics
15+
Continuous physics with time of impact solver
16+
Persistent body-joint-contact graph
17+
Island solution and sleep management
18+
Contact, friction, and restitution
19+
Stable stacking with a linear-time solver
20+
Revolute, prismatic, distance, pulley, gear, mouse joint,
21+
and other joint types
22+
Joint limits, motors, and friction
23+
Momentum decoupled position correction
24+
Fairly accurate reaction forces/impulses

box2d/Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# $NetBSD: Makefile,v 1.5 2024/08/25 06:18:49 wiz Exp $
2+
3+
DISTNAME= box2d-3.1.1
4+
CATEGORIES= graphics
5+
MASTER_SITES= ${MASTER_SITE_GITHUB:=erincatto/}
6+
GITHUB_TAG= v${PKGVERSION_NOREV}
7+
8+
MAINTAINER= ryoon@NetBSD.org
9+
HOMEPAGE= https://github.com/erincatto/box2d/
10+
COMMENT= 2D physics engine for games
11+
LICENSE= mit
12+
13+
USE_LANGUAGES= c c++
14+
15+
CMAKE_CONFIGURE_ARGS+= -DBOX2D_BUILD_UNIT_TESTS=OFF
16+
CMAKE_CONFIGURE_ARGS+= -DBOX2D_BUILD_TESTBED=OFF
17+
CMAKE_CONFIGURE_ARGS+= -DBOX2D_SAMPLES=OFF
18+
CMAKE_CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=ON
19+
20+
.include "../../devel/cmake/build.mk"
21+
.include "../../x11/libX11/buildlink3.mk"
22+
.include "../../x11/libXcursor/buildlink3.mk"
23+
.include "../../x11/libXi/buildlink3.mk"
24+
.include "../../x11/libXinerama/buildlink3.mk"
25+
.include "../../x11/libXrandr/buildlink3.mk"
26+
.include "../../mk/bsd.pkg.mk"

box2d/PLIST

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@comment $NetBSD$
2+
include/box2d/base.h
3+
include/box2d/box2d.h
4+
include/box2d/collision.h
5+
include/box2d/id.h
6+
include/box2d/math_functions.h
7+
include/box2d/types.h
8+
lib/cmake/box2d/box2dConfig-noconfig.cmake
9+
lib/cmake/box2d/box2dConfig.cmake
10+
lib/cmake/box2d/box2dConfigVersion.cmake
11+
lib/libbox2d.so
12+
lib/libbox2d.so.3
13+
lib/libbox2d.so.${PKGVERSION}

box2d/buildlink3.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# $NetBSD: buildlink3.mk,v 1.1 2021/02/06 06:41:33 ryoon Exp $
2+
3+
BUILDLINK_TREE+= box2d
4+
5+
.if !defined(BOX2D_BUILDLINK3_MK)
6+
BOX2D_BUILDLINK3_MK:=
7+
8+
BUILDLINK_API_DEPENDS.box2d+= box2d>=2.4.1
9+
BUILDLINK_PKGSRCDIR.box2d?= ../../graphics/box2d
10+
11+
.endif # BOX2D_BUILDLINK3_MK
12+
13+
BUILDLINK_TREE+= -box2d

box2d/distinfo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$NetBSD: distinfo,v 1.4 2024/08/11 06:39:04 wiz Exp $
2+
3+
BLAKE2s (box2d-3.1.1.tar.gz) = ed7b5f74ba923d6999c1c545c11eadb45023d990a4233edebf603b8321fd9dfd
4+
SHA512 (box2d-3.1.1.tar.gz) = 7367640e7f2ff395b8ca48766c71f57c96e08c298627c996eba76899a149ee28b0e3ecacfa4a224fdb5d160c7e25c6069bb8414fd1575787727d796097aa347b
5+
Size (box2d-3.1.1.tar.gz) = 780115 bytes

box2d/log

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# v3.1 Release Notes
2+
3+
## API Changes
4+
- 64-bit filter categories and masks
5+
- 64-bit dynamic tree user data
6+
- Renamed `b2SmoothSegment` to `b2ChainSegment`
7+
- Cast and overlap functions modified for argument consistency
8+
- Contact begin events now provide the manifold
9+
- More consistent functions to make polygons
10+
- Contact events are now disabled by default
11+
- Replaced `b2Timer` with `uint64_t`
12+
- Shape material properties now use `b2SurfaceMaterial`
13+
14+
## New Features
15+
- New character mover features and sample
16+
- Revised sensor system is now independent of body type and sleep
17+
- Rolling resistance and tangent speed
18+
- Friction and restitution mixing callbacks
19+
- World explosions
20+
- World access to the maximum linear speed
21+
- More control over body mass updates
22+
- Filter joint to disable collision between specific bodies
23+
- Bodies can now have names for debugging
24+
- Added `b2Body_SetTargetTransform` for kinematic bodies
25+
26+
## Improvements
27+
- Cross-platform determinism
28+
- Custom SSE2 and Neon for significantly improved performance
29+
- SSE2 is the default instead of AVX2
30+
- Removed SIMDE library dependency
31+
- Faster ray and shape casts
32+
- Faster continuous collision
33+
- Each segment of a chain shape may have a different surface material
34+
- Reduced overhead of restitution when not used
35+
- Implemented atomic platform wrappers eliminating the `experimental:c11atomics` flag
36+
37+
## Bugs Fixes
38+
- Many bug fixes based on user testing
39+
- Fixed missing hit events
40+
- Capsule and polygon manifold fixes
41+
- Fixed missing contact end events
42+
- PreSolve is now called in continuous collision
43+
- Reduced clipping into chain shapes by fast bodies
44+
- Friction and restitution are now remixed in the contact solver every time step
45+
- Body move events are now correctly adjusted for time of impact
46+
47+
## Infrastructure
48+
- Unit test for API coverage
49+
- macOS and Windows samples built in GitHub actions
50+
- CMake install
51+
- imgui and glfw versions are now pinned in FetchContent
52+
- Initial Emscripten support

0 commit comments

Comments
 (0)