Skip to content

Commit

Permalink
devel/csfml: New port: C bindings to the Simple and Fast Multimedia L…
Browse files Browse the repository at this point in the history
…ibrary (SFML)

The Simple and Fast Multimedia Library (SFML) exists in devel/sfml.
SFML is a C++ library, and as such, may introduce complexity for other
languages to use the library. CSFML is an official SFML project to
provide C bindings to SFML, with the aim of reducing language binding
complexity, to enable other languages to use C over C++.

Website: https://github.com/SFML/CSFML

Differential Revision:	https://reviews.freebsd.org/D41519
  • Loading branch information
Alastair Hogge authored and Daniel Engberg committed Oct 21, 2023
1 parent 1e97857 commit c74ba8e
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -475,6 +475,7 @@
SUBDIR += criterion
SUBDIR += cscope
SUBDIR += cscout
SUBDIR += csfml
SUBDIR += csmith
SUBDIR += csoap
SUBDIR += cssc
Expand Down
24 changes: 24 additions & 0 deletions devel/csfml/Makefile
@@ -0,0 +1,24 @@
PORTNAME= csfml
DISTVERSION= 2.5.2
CATEGORIES= devel games graphics multimedia

MAINTAINER= agh@riseup.net
COMMENT= C bindings to the Simple and Fast Multimedia Library (SFML)
WWW= https://www.sfml-dev.org/download/csfml/

LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/license.md

BUILD_DEPENDS= sfml>0:devel/sfml
LIB_DEPENDS= libsfml-audio.so:devel/sfml \
libsfml-graphics.so:devel/sfml \
libsfml-network.so:devel/sfml \
libsfml-system.so:devel/sfml \
libsfml-window.so:devel/sfml

USES= cmake
USE_GITHUB= yes
GH_ACCOUNT= SFML
GH_PROJECT= ${PORTNAME:tu}

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/csfml/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1692583729
SHA256 (SFML-CSFML-2.5.2_GH0.tar.gz) = 2671f1cd2a4e54e86f7483c4683132466c01a6ca90fa010bc4964a8820c36f06
SIZE (SFML-CSFML-2.5.2_GH0.tar.gz) = 166888
10 changes: 10 additions & 0 deletions devel/csfml/files/patch-CMakeLists.txt
@@ -0,0 +1,10 @@
--- CMakeLists.txt.orig 2023-10-04 04:59:37 UTC
+++ CMakeLists.txt
@@ -63,5 +63,5 @@ install(DIRECTORY include
DESTINATION .
COMPONENT devel
PATTERN ".svn" EXCLUDE)
-install(FILES license.md DESTINATION ${INSTALL_MISC_DIR})
-install(FILES readme.md DESTINATION ${INSTALL_MISC_DIR})
+#install(FILES license.md DESTINATION ${INSTALL_MISC_DIR})
+#install(FILES readme.md DESTINATION ${INSTALL_MISC_DIR})
12 changes: 12 additions & 0 deletions devel/csfml/pkg-descr
@@ -0,0 +1,12 @@
CSFML is the official C bindings for the Simple and Fast Multimedia Library
(SFML). SFML is a simple, fast, cross-platform, C++ object-oriented multimedia
API. It abstracts windowing, graphics, audio, and networking.

The CSFML API aims to create C style abstractions as close as possible, to the
SFML C++ API. The follow-on effect of this enables building SFML bindings for
other languages, either via the language's Foreign Function Interface
mechanism, or by directly supporting C instead of C++.

Due to the similarities between the two APIs, no tutorial is provided, however,
users can follow the C++ tutorials available via the SFML website. Adapting
those tutorials to the C API should take little effort.
97 changes: 97 additions & 0 deletions devel/csfml/pkg-plist
@@ -0,0 +1,97 @@
include/SFML/Audio.h
include/SFML/Audio/Export.h
include/SFML/Audio/Listener.h
include/SFML/Audio/Music.h
include/SFML/Audio/Sound.h
include/SFML/Audio/SoundBuffer.h
include/SFML/Audio/SoundBufferRecorder.h
include/SFML/Audio/SoundRecorder.h
include/SFML/Audio/SoundStatus.h
include/SFML/Audio/SoundStream.h
include/SFML/Audio/Types.h
include/SFML/Config.h
include/SFML/GPUPreference.h
include/SFML/Graphics.h
include/SFML/Graphics/BlendMode.h
include/SFML/Graphics/CircleShape.h
include/SFML/Graphics/Color.h
include/SFML/Graphics/ConvexShape.h
include/SFML/Graphics/Export.h
include/SFML/Graphics/Font.h
include/SFML/Graphics/FontInfo.h
include/SFML/Graphics/Glsl.h
include/SFML/Graphics/Glyph.h
include/SFML/Graphics/Image.h
include/SFML/Graphics/PrimitiveType.h
include/SFML/Graphics/Rect.h
include/SFML/Graphics/RectangleShape.h
include/SFML/Graphics/RenderStates.h
include/SFML/Graphics/RenderTexture.h
include/SFML/Graphics/RenderWindow.h
include/SFML/Graphics/Shader.h
include/SFML/Graphics/Shape.h
include/SFML/Graphics/Sprite.h
include/SFML/Graphics/Text.h
include/SFML/Graphics/Texture.h
include/SFML/Graphics/Transform.h
include/SFML/Graphics/Transformable.h
include/SFML/Graphics/Types.h
include/SFML/Graphics/Vertex.h
include/SFML/Graphics/VertexArray.h
include/SFML/Graphics/VertexBuffer.h
include/SFML/Graphics/View.h
include/SFML/Network.h
include/SFML/Network/Export.h
include/SFML/Network/Ftp.h
include/SFML/Network/Http.h
include/SFML/Network/IpAddress.h
include/SFML/Network/Packet.h
include/SFML/Network/SocketSelector.h
include/SFML/Network/SocketStatus.h
include/SFML/Network/TcpListener.h
include/SFML/Network/TcpSocket.h
include/SFML/Network/Types.h
include/SFML/Network/UdpSocket.h
include/SFML/OpenGL.h
include/SFML/System.h
include/SFML/System/Clock.h
include/SFML/System/Export.h
include/SFML/System/InputStream.h
include/SFML/System/Mutex.h
include/SFML/System/Sleep.h
include/SFML/System/Thread.h
include/SFML/System/Time.h
include/SFML/System/Types.h
include/SFML/System/Vector2.h
include/SFML/System/Vector3.h
include/SFML/Window.h
include/SFML/Window/Clipboard.h
include/SFML/Window/Context.h
include/SFML/Window/Cursor.h
include/SFML/Window/Event.h
include/SFML/Window/Export.h
include/SFML/Window/Joystick.h
include/SFML/Window/JoystickIdentification.h
include/SFML/Window/Keyboard.h
include/SFML/Window/Mouse.h
include/SFML/Window/Sensor.h
include/SFML/Window/Touch.h
include/SFML/Window/Types.h
include/SFML/Window/VideoMode.h
include/SFML/Window/Window.h
include/SFML/Window/WindowHandle.h
lib/libcsfml-audio.so
lib/libcsfml-audio.so.2.5
lib/libcsfml-audio.so.2.5.2
lib/libcsfml-graphics.so
lib/libcsfml-graphics.so.2.5
lib/libcsfml-graphics.so.2.5.2
lib/libcsfml-network.so
lib/libcsfml-network.so.2.5
lib/libcsfml-network.so.2.5.2
lib/libcsfml-system.so
lib/libcsfml-system.so.2.5
lib/libcsfml-system.so.2.5.2
lib/libcsfml-window.so
lib/libcsfml-window.so.2.5
lib/libcsfml-window.so.2.5.2

0 comments on commit c74ba8e

Please sign in to comment.