box2d

2D physics engine library for simulating realistic game collisions and gravity

brewmacoslinux
Try with needOr install directly
Source

About

2D physics engine for games

Examples

compile a game using box2d physics library$ gcc myGame.c -o myGame $(pkg-config --cflags --libs box2d)
check box2d library version installed$ pkg-config --modversion box2d
find box2d header files location on system$ pkg-config --cflags box2d
link box2d library when building cmake project$ echo 'find_package(box2d REQUIRED)' >> CMakeLists.txt
check if box2d is properly installed$ pkg-config --exists box2d && echo 'box2d is installed'