diff options
author | plunky <plunky@pkgsrc.org> | 2020-05-21 08:42:00 +0000 |
---|---|---|
committer | plunky <plunky@pkgsrc.org> | 2020-05-21 08:42:00 +0000 |
commit | 68f9d9d44c8ccb2ed6e99d2fbd190295de125c0b (patch) | |
tree | 952d2bff884c45c0527170325b5631a8cc7c74b7 /multimedia | |
parent | 55aac251dd64d3c901863fea3f42161187e5d363 (diff) | |
download | pkgsrc-68f9d9d44c8ccb2ed6e99d2fbd190295de125c0b.tar.gz |
Added SFML-2.5.1 from pkgsrc-wip
SFML is a free multimedia C++ API that provides you low and high level access to
graphics, input, audio, etc.
This package contains the C++ language bindings of SFML.
Diffstat (limited to 'multimedia')
23 files changed, 542 insertions, 1 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile index 967604dd233..7211c5d42da 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.301 2020/04/23 17:16:40 nia Exp $ +# $NetBSD: Makefile,v 1.302 2020/05/21 08:42:00 plunky Exp $ # COMMENT= Multimedia utilities @@ -189,6 +189,7 @@ SUBDIR+= ruby-clutter-gstreamer SUBDIR+= ruby-gstreamer SUBDIR+= ruby-ming SUBDIR+= schroedinger +SUBDIR+= sfml SUBDIR+= sickgear SUBDIR+= smpeg SUBDIR+= smpeg2 diff --git a/multimedia/sfml/DESCR b/multimedia/sfml/DESCR new file mode 100644 index 00000000000..7063da7e7bb --- /dev/null +++ b/multimedia/sfml/DESCR @@ -0,0 +1,4 @@ +SFML is a free multimedia C++ API that provides you low and high level access to +graphics, input, audio, etc. + +This package contains the C++ language bindings of SFML. diff --git a/multimedia/sfml/Makefile b/multimedia/sfml/Makefile new file mode 100644 index 00000000000..ad33fd3bc7c --- /dev/null +++ b/multimedia/sfml/Makefile @@ -0,0 +1,37 @@ +# $NetBSD: Makefile,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +DISTNAME= SFML-2.5.1-sources +PKGNAME= ${DISTNAME:S/-sources//:tl} +CATEGORIES= multimedia +MASTER_SITES= http://www.sfml-dev.org/files/ +EXTRACT_SUFX= .zip + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://www.sfml-dev.org/ +COMMENT= Free multimedia C++ API +LICENSE= zlib + +USE_CMAKE= yes +USE_LANGUAGES= c c++ +USE_TOOLS+= rm + +WRKSRC= ${WRKDIR}/${DISTNAME:S/-sources//} + +INSTALLATION_DIRS+= include/SFML/Audio include/SFML/Graphics +INSTALLATION_DIRS+= include/SFML/Network/Unix include/SFML/Network/Win32 +INSTALLATION_DIRS+= include/SFML/System/Unix include/SFML/System/Win32 +INSTALLATION_DIRS+= include/SFML/Window lib + +.include "options.mk" + +.include "../../graphics/glu/buildlink3.mk" +.include "../../audio/openal-soft/buildlink3.mk" +.include "../../audio/libsndfile/buildlink3.mk" +.include "../../mk/jpeg.buildlink3.mk" +.include "../../graphics/glew/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" +.include "../../x11/libXrandr/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../graphics/MesaLib/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/sfml/PLIST b/multimedia/sfml/PLIST new file mode 100644 index 00000000000..74def9a5c0c --- /dev/null +++ b/multimedia/sfml/PLIST @@ -0,0 +1,136 @@ +@comment $NetBSD: PLIST,v 1.1 2020/05/21 08:42:00 plunky Exp $ +include/SFML/Audio.hpp +include/SFML/Audio/AlResource.hpp +include/SFML/Audio/Export.hpp +include/SFML/Audio/InputSoundFile.hpp +include/SFML/Audio/Listener.hpp +include/SFML/Audio/Music.hpp +include/SFML/Audio/OutputSoundFile.hpp +include/SFML/Audio/Sound.hpp +include/SFML/Audio/SoundBuffer.hpp +include/SFML/Audio/SoundBufferRecorder.hpp +include/SFML/Audio/SoundFileFactory.hpp +include/SFML/Audio/SoundFileFactory.inl +include/SFML/Audio/SoundFileReader.hpp +include/SFML/Audio/SoundFileWriter.hpp +include/SFML/Audio/SoundRecorder.hpp +include/SFML/Audio/SoundSource.hpp +include/SFML/Audio/SoundStream.hpp +include/SFML/Config.hpp +include/SFML/GpuPreference.hpp +include/SFML/Graphics.hpp +include/SFML/Graphics/BlendMode.hpp +include/SFML/Graphics/CircleShape.hpp +include/SFML/Graphics/Color.hpp +include/SFML/Graphics/ConvexShape.hpp +include/SFML/Graphics/Drawable.hpp +include/SFML/Graphics/Export.hpp +include/SFML/Graphics/Font.hpp +include/SFML/Graphics/Glsl.hpp +include/SFML/Graphics/Glsl.inl +include/SFML/Graphics/Glyph.hpp +include/SFML/Graphics/Image.hpp +include/SFML/Graphics/PrimitiveType.hpp +include/SFML/Graphics/Rect.hpp +include/SFML/Graphics/Rect.inl +include/SFML/Graphics/RectangleShape.hpp +include/SFML/Graphics/RenderStates.hpp +include/SFML/Graphics/RenderTarget.hpp +include/SFML/Graphics/RenderTexture.hpp +include/SFML/Graphics/RenderWindow.hpp +include/SFML/Graphics/Shader.hpp +include/SFML/Graphics/Shape.hpp +include/SFML/Graphics/Sprite.hpp +include/SFML/Graphics/Text.hpp +include/SFML/Graphics/Texture.hpp +include/SFML/Graphics/Transform.hpp +include/SFML/Graphics/Transformable.hpp +include/SFML/Graphics/Vertex.hpp +include/SFML/Graphics/VertexArray.hpp +include/SFML/Graphics/VertexBuffer.hpp +include/SFML/Graphics/View.hpp +include/SFML/Main.hpp +include/SFML/Network.hpp +include/SFML/Network/Export.hpp +include/SFML/Network/Ftp.hpp +include/SFML/Network/Http.hpp +include/SFML/Network/IpAddress.hpp +include/SFML/Network/Packet.hpp +include/SFML/Network/Socket.hpp +include/SFML/Network/SocketHandle.hpp +include/SFML/Network/SocketSelector.hpp +include/SFML/Network/TcpListener.hpp +include/SFML/Network/TcpSocket.hpp +include/SFML/Network/UdpSocket.hpp +include/SFML/OpenGL.hpp +include/SFML/System.hpp +include/SFML/System/Clock.hpp +include/SFML/System/Err.hpp +include/SFML/System/Export.hpp +include/SFML/System/FileInputStream.hpp +include/SFML/System/InputStream.hpp +include/SFML/System/Lock.hpp +include/SFML/System/MemoryInputStream.hpp +include/SFML/System/Mutex.hpp +include/SFML/System/NativeActivity.hpp +include/SFML/System/NonCopyable.hpp +include/SFML/System/Sleep.hpp +include/SFML/System/String.hpp +include/SFML/System/String.inl +include/SFML/System/Thread.hpp +include/SFML/System/Thread.inl +include/SFML/System/ThreadLocal.hpp +include/SFML/System/ThreadLocalPtr.hpp +include/SFML/System/ThreadLocalPtr.inl +include/SFML/System/Time.hpp +include/SFML/System/Utf.hpp +include/SFML/System/Utf.inl +include/SFML/System/Vector2.hpp +include/SFML/System/Vector2.inl +include/SFML/System/Vector3.hpp +include/SFML/System/Vector3.inl +include/SFML/Window.hpp +include/SFML/Window/Clipboard.hpp +include/SFML/Window/Context.hpp +include/SFML/Window/ContextSettings.hpp +include/SFML/Window/Cursor.hpp +include/SFML/Window/Event.hpp +include/SFML/Window/Export.hpp +include/SFML/Window/GlResource.hpp +include/SFML/Window/Joystick.hpp +include/SFML/Window/Keyboard.hpp +include/SFML/Window/Mouse.hpp +include/SFML/Window/Sensor.hpp +include/SFML/Window/Touch.hpp +include/SFML/Window/VideoMode.hpp +include/SFML/Window/Window.hpp +include/SFML/Window/WindowHandle.hpp +include/SFML/Window/WindowStyle.hpp +lib/cmake/SFML/SFMLConfig.cmake +lib/cmake/SFML/SFMLConfigDependencies.cmake +lib/cmake/SFML/SFMLConfigVersion.cmake +lib/cmake/SFML/SFMLSharedTargets-release.cmake +lib/cmake/SFML/SFMLSharedTargets.cmake +lib/libsfml-audio.so +lib/libsfml-audio.so.2.5 +lib/libsfml-audio.so.2.5.1 +lib/libsfml-graphics.so +lib/libsfml-graphics.so.2.5 +lib/libsfml-graphics.so.2.5.1 +lib/libsfml-network.so +lib/libsfml-network.so.2.5 +lib/libsfml-network.so.2.5.1 +lib/libsfml-system.so +lib/libsfml-system.so.2.5 +lib/libsfml-system.so.2.5.1 +lib/libsfml-window.so +lib/libsfml-window.so.2.5 +lib/libsfml-window.so.2.5.1 +lib/pkgconfig/sfml-all.pc +lib/pkgconfig/sfml-audio.pc +lib/pkgconfig/sfml-graphics.pc +lib/pkgconfig/sfml-network.pc +lib/pkgconfig/sfml-system.pc +lib/pkgconfig/sfml-window.pc +share/SFML/license.md +share/SFML/readme.md diff --git a/multimedia/sfml/buildlink3.mk b/multimedia/sfml/buildlink3.mk new file mode 100644 index 00000000000..0261c8d5c78 --- /dev/null +++ b/multimedia/sfml/buildlink3.mk @@ -0,0 +1,21 @@ +# $NetBSD: buildlink3.mk,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +BUILDLINK_TREE+= sfml + +.if !defined(SFML_BUILDLINK3_MK) +SFML_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.sfml+= sfml>=1.6 +BUILDLINK_PKGSRCDIR.sfml?= ../../multimedia/sfml + +.include "../../graphics/glu/buildlink3.mk" +.include "../../audio/openal-soft/buildlink3.mk" +.include "../../audio/libsndfile/buildlink3.mk" +.include "../../graphics/glew/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" +.include "../../x11/libXrandr/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../graphics/MesaLib/buildlink3.mk" +.endif # SFML_BUILDLINK3_MK + +BUILDLINK_TREE+= -sfml diff --git a/multimedia/sfml/distinfo b/multimedia/sfml/distinfo new file mode 100644 index 00000000000..4e8162c875c --- /dev/null +++ b/multimedia/sfml/distinfo @@ -0,0 +1,22 @@ +$NetBSD: distinfo,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +SHA1 (SFML-2.5.1-sources.zip) = a2d9d8ceed52bcff27d11f21e814b51ba19cd116 +RMD160 (SFML-2.5.1-sources.zip) = 3b137887696a223f0c3576b16bae9f0e3535f16f +SHA512 (SFML-2.5.1-sources.zip) = 75b4f3076d817388b78aa060fba6a4c67b2cde3393ec6d9dc66052d9770636572e9bfcd6b63fcb5dc7888e00cda2161cd84b55e07d463159da52ac1142d8d1af +Size (SFML-2.5.1-sources.zip) = 23283095 bytes +SHA1 (patch-CMakeLists.txt) = 235842ca31da0d886966e90877d705fd8ef0c5d3 +SHA1 (patch-cmake_Config.cmake) = af35cb044c2e6ab052678e97eb8a11cec5e1a5be +SHA1 (patch-include_SFML_Config.hpp) = 38f37c8a0db031844810f6dcdc057a3778c17d8c +SHA1 (patch-include_SFML_OpenGL.hpp) = f9e90d2bcdae186f3582720158f6afacc538172e +SHA1 (patch-include_SFML_Window_WindowHandle.hpp) = 443dbc01e551d50f373d9c0572aefbd306753ff7 +SHA1 (patch-src_SFML_System_CMakeLists.txt) = b4f007c5b4d0334844a05ff342ecd717247472d8 +SHA1 (patch-src_SFML_Window_CMakeLists.txt) = 2d6cafc10d5ff2fc858f32d678165854724d67fe +SHA1 (patch-src_SFML_Window_ClipboardImpl.hpp) = b201d1c2fe08dbf406105f68e026437fc5af3f1d +SHA1 (patch-src_SFML_Window_CursorImpl.hpp) = 74cabc7fc2a4a03a76a4f88fe408c1416022d0e2 +SHA1 (patch-src_SFML_Window_FreeBSD_JoystickImpl.cpp) = 0266e719a77b48d7c6728cffa315764e7249d2ba +SHA1 (patch-src_SFML_Window_FreeBSD_JoystickImpl.hpp) = 53d171b662e4413e2ea30840639b83966ec1c65e +SHA1 (patch-src_SFML_Window_GlContext.cpp) = c0e87ccba4d8e20e5099106e6642631e98304e4b +SHA1 (patch-src_SFML_Window_InputImpl.hpp) = 4a3a70632cfa0e792d9e0462d18071da557417a9 +SHA1 (patch-src_SFML_Window_JoystickImpl.hpp) = 3312a5a74085c9645b56d1f44a2b6fa90f373d06 +SHA1 (patch-src_SFML_Window_SensorImpl.hpp) = 4b78c150e5b6f75e29004568fb04151299f9b60e +SHA1 (patch-src_SFML_Window_WindowImpl.cpp) = 2c53df52107a7a2317c8d3a515f198f491805550 diff --git a/multimedia/sfml/options.mk b/multimedia/sfml/options.mk new file mode 100644 index 00000000000..cc4a21061c5 --- /dev/null +++ b/multimedia/sfml/options.mk @@ -0,0 +1,19 @@ +# $NetBSD: options.mk,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.sfml +PKG_SUPPORTED_OPTIONS= debug static +PKG_SUGGESTED_OPTIONS= # blank + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mdebug) +MAKE_ENV+= DEBUGBUILD=yes +.else +MAKE_ENV+= DEBUGBUILD=no +.endif + +.if !empty(PKG_OPTIONS:Mstatic) +MAKE_ENV+= STATIC=yes +.else +MAKE_ENV+= STATIC=no +.endif diff --git a/multimedia/sfml/patches/patch-CMakeLists.txt b/multimedia/sfml/patches/patch-CMakeLists.txt new file mode 100644 index 00000000000..6b94c3d00bf --- /dev/null +++ b/multimedia/sfml/patches/patch-CMakeLists.txt @@ -0,0 +1,24 @@ +$NetBSD: patch-CMakeLists.txt,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- CMakeLists.txt.orig 2018-10-15 19:41:39.000000000 +0000 ++++ CMakeLists.txt +@@ -140,7 +140,7 @@ endif() + # For miscellaneous files + if(SFML_OS_WINDOWS OR SFML_OS_IOS) + set(DEFAULT_INSTALL_MISC_DIR .) +-elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD) ++elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_NETBSD OR SFML_OS_OPENBSD) + set(DEFAULT_INSTALL_MISC_DIR share/SFML) + elseif(SFML_OS_MACOSX) + set(DEFAULT_INSTALL_MISC_DIR /usr/local/share/SFML) +@@ -277,7 +277,7 @@ endif() + # on Linux and BSD-like OS, install pkg-config files by default + set(SFML_INSTALL_PKGCONFIG_DEFAULT FALSE) + +-if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD) ++if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_NETBSD OR SFML_OS_OPENBSD) + set(SFML_INSTALL_PKGCONFIG_DEFAULT TRUE) + endif() + diff --git a/multimedia/sfml/patches/patch-cmake_Config.cmake b/multimedia/sfml/patches/patch-cmake_Config.cmake new file mode 100644 index 00000000000..a059d70d065 --- /dev/null +++ b/multimedia/sfml/patches/patch-cmake_Config.cmake @@ -0,0 +1,28 @@ +$NetBSD: patch-cmake_Config.cmake,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- cmake/Config.cmake.orig 2018-10-15 19:41:39.000000000 +0000 ++++ cmake/Config.cmake +@@ -31,6 +31,10 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "^k?Fre + set(SFML_OS_FREEBSD 1) + # don't use the OpenGL ES implementation on FreeBSD + set(OPENGL_ES 0) ++elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") ++ set(SFML_OS_NETBSD 1) ++ # XXX we want to use OPENGL_ES for some NetBSD, but which? ++ set(OPENGL_ES 0) + elseif(CMAKE_SYSTEM_NAME MATCHES "^OpenBSD$") + set(SFML_OS_OPENBSD 1) + # don't use the OpenGL ES implementation on OpenBSD +@@ -77,6 +81,10 @@ if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD) + set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig") + endif() + ++if(SFML_OS_NETBSD) ++ set(SFML_PKGCONFIG_DIR "/lib/pkgconfig") ++endif() ++ + # detect the compiler and its version + # Note: on some platforms (OS X), CMAKE_COMPILER_IS_GNUCXX is true + # even when CLANG is used, therefore the Clang test is done first diff --git a/multimedia/sfml/patches/patch-include_SFML_Config.hpp b/multimedia/sfml/patches/patch-include_SFML_Config.hpp new file mode 100644 index 00000000000..1a27b44bff8 --- /dev/null +++ b/multimedia/sfml/patches/patch-include_SFML_Config.hpp @@ -0,0 +1,18 @@ +$NetBSD: patch-include_SFML_Config.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- include/SFML/Config.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ include/SFML/Config.hpp +@@ -86,6 +86,11 @@ + // FreeBSD + #define SFML_SYSTEM_FREEBSD + ++ #elif defined(__NetBSD__) ++ ++ // NetBSD ++ #define SFML_SYSTEM_NETBSD ++ + #elif defined(__OpenBSD__) + + // OpenBSD diff --git a/multimedia/sfml/patches/patch-include_SFML_OpenGL.hpp b/multimedia/sfml/patches/patch-include_SFML_OpenGL.hpp new file mode 100644 index 00000000000..f98b2b4b0e7 --- /dev/null +++ b/multimedia/sfml/patches/patch-include_SFML_OpenGL.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-include_SFML_OpenGL.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- include/SFML/OpenGL.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ include/SFML/OpenGL.hpp +@@ -45,7 +45,7 @@ + + #include <GL/gl.h> + +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + #if defined(SFML_OPENGL_ES) + #include <GLES/gl.h> diff --git a/multimedia/sfml/patches/patch-include_SFML_Window_WindowHandle.hpp b/multimedia/sfml/patches/patch-include_SFML_Window_WindowHandle.hpp new file mode 100644 index 00000000000..22272e35eab --- /dev/null +++ b/multimedia/sfml/patches/patch-include_SFML_Window_WindowHandle.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-include_SFML_Window_WindowHandle.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- include/SFML/Window/WindowHandle.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ include/SFML/Window/WindowHandle.hpp +@@ -42,7 +42,7 @@ namespace sf + // Window handle is HWND (HWND__*) on Windows + typedef HWND__* WindowHandle; + +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + // Window handle is Window (unsigned long) on Unix - X11 + typedef unsigned long WindowHandle; diff --git a/multimedia/sfml/patches/patch-src_SFML_System_CMakeLists.txt b/multimedia/sfml/patches/patch-src_SFML_System_CMakeLists.txt new file mode 100644 index 00000000000..199e6e0dd89 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_System_CMakeLists.txt @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_System_CMakeLists.txt,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/System/CMakeLists.txt.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/System/CMakeLists.txt +@@ -90,7 +90,7 @@ sfml_add_library(sfml-system + SOURCES ${SRC} ${PLATFORM_SRC}) + + # setup dependencies +-if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX) ++if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_NETBSD OR SFML_OS_MACOSX) + target_link_libraries(sfml-system PRIVATE pthread) + endif() + if(SFML_OS_LINUX) diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_CMakeLists.txt b/multimedia/sfml/patches/patch-src_SFML_Window_CMakeLists.txt new file mode 100644 index 00000000000..7cc9e8aa833 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_CMakeLists.txt @@ -0,0 +1,42 @@ +$NetBSD: patch-src_SFML_Window_CMakeLists.txt,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/CMakeLists.txt.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/CMakeLists.txt +@@ -79,7 +79,7 @@ if(SFML_OS_WINDOWS) + + # make sure that we use the Unicode version of the Win API functions + add_definitions(-DUNICODE -D_UNICODE) +-elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD) ++elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_NETBSD OR SFML_OS_OPENBSD) + set(PLATFORM_SRC + ${SRCROOT}/Unix/CursorImpl.hpp + ${SRCROOT}/Unix/CursorImpl.cpp +@@ -110,7 +110,7 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD + ${SRCROOT}/Unix/JoystickImpl.cpp + ${SRCROOT}/Unix/JoystickImpl.hpp + ) +- elseif(SFML_OS_FREEBSD) ++ elseif(SFML_OS_FREEBSD OR SFML_OS_NETBSD) + set(PLATFORM_SRC + ${PLATFORM_SRC} + ${SRCROOT}/FreeBSD/JoystickImpl.cpp +@@ -235,7 +235,7 @@ if ((NOT BUILD_SHARED_LIBS) AND SFML_OS_ + endif() + + # find and setup usage for external libraries +-if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OPENBSD) ++if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_NETBSD OR SFML_OPENBSD) + sfml_find_package(X11 INCLUDE "X11_INCLUDE_DIR" LINK "X11_X11_LIB" "X11_Xrandr_LIB") + target_link_libraries(sfml-window PRIVATE X11) + endif() +@@ -277,7 +277,7 @@ if(SFML_OS_LINUX) + target_link_libraries(sfml-window PRIVATE UDev) + elseif(SFML_OS_WINDOWS) + target_link_libraries(sfml-window PRIVATE winmm gdi32) +-elseif(SFML_OS_FREEBSD) ++elseif(SFML_OS_FREEBSD OR SFML_OS_NETBSD) + target_link_libraries(sfml-window PRIVATE usbhid) + elseif(SFML_OS_MACOSX) + target_link_libraries(sfml-window PRIVATE "-framework Foundation" "-framework AppKit" "-framework IOKit" "-framework Carbon") diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_ClipboardImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_ClipboardImpl.hpp new file mode 100644 index 00000000000..b525feca066 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_ClipboardImpl.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_ClipboardImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/ClipboardImpl.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/ClipboardImpl.hpp +@@ -32,7 +32,7 @@ + + #if defined(SFML_SYSTEM_WINDOWS) + #include <SFML/Window/Win32/ClipboardImpl.hpp> +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + #include <SFML/Window/Unix/ClipboardImpl.hpp> + #elif defined(SFML_SYSTEM_MACOS) + #include <SFML/Window/OSX/ClipboardImpl.hpp> diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_CursorImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_CursorImpl.hpp new file mode 100644 index 00000000000..bd9a2c06d4b --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_CursorImpl.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_CursorImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/CursorImpl.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/CursorImpl.hpp +@@ -34,7 +34,7 @@ + + #include <SFML/Window/Win32/CursorImpl.hpp> + +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + #include <SFML/Window/Unix/CursorImpl.hpp> + diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.cpp b/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.cpp new file mode 100644 index 00000000000..a310d24b10b --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.cpp @@ -0,0 +1,23 @@ +$NetBSD: patch-src_SFML_Window_FreeBSD_JoystickImpl.cpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/FreeBSD/JoystickImpl.cpp.orig 2017-02-08 11:29:16.000000000 +0000 ++++ src/SFML/Window/FreeBSD/JoystickImpl.cpp +@@ -53,6 +53,16 @@ namespace + std::map<unsigned int, std::string> plugged; + std::map<int, std::pair<int, int> > hatValueMap; + ++#if defined(__NetBSD__) ++ int hid_get_report_id(int fd) ++ { ++ int id; ++ if (ioctl(fd, USB_GET_REPORT_ID, &id) < 0) ++ return -1; ++ return id; ++ } ++#endif ++ + bool isJoystick(const char *name) + { + int file = ::open(name, O_RDONLY | O_NONBLOCK); diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.hpp new file mode 100644 index 00000000000..e732832f5a1 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_FreeBSD_JoystickImpl.hpp @@ -0,0 +1,16 @@ +$NetBSD: patch-src_SFML_Window_FreeBSD_JoystickImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/FreeBSD/JoystickImpl.hpp.orig 2015-08-24 16:01:06.000000000 +0000 ++++ src/SFML/Window/FreeBSD/JoystickImpl.hpp +@@ -28,6 +28,9 @@ + //////////////////////////////////////////////////////////// + // Headers + //////////////////////////////////////////////////////////// ++#if defined(__NetBSD__) ++#include <dev/usb/usb.h> ++#endif + #include <dev/usb/usbhid.h> + #include <usbhid.h> + #include <vector> diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_GlContext.cpp b/multimedia/sfml/patches/patch-src_SFML_Window_GlContext.cpp new file mode 100644 index 00000000000..8b9393c8b7f --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_GlContext.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_GlContext.cpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/GlContext.cpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/GlContext.cpp +@@ -49,7 +49,7 @@ + #include <SFML/Window/Win32/WglContext.hpp> + typedef sf::priv::WglContext ContextType; + +- #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++ #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + #include <SFML/Window/Unix/GlxContext.hpp> + typedef sf::priv::GlxContext ContextType; diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_InputImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_InputImpl.hpp new file mode 100644 index 00000000000..9802ee9d70b --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_InputImpl.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_InputImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/InputImpl.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/InputImpl.hpp +@@ -32,7 +32,7 @@ + + #if defined(SFML_SYSTEM_WINDOWS) + #include <SFML/Window/Win32/InputImpl.hpp> +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + #include <SFML/Window/Unix/InputImpl.hpp> + #elif defined(SFML_SYSTEM_MACOS) + #include <SFML/Window/OSX/InputImpl.hpp> diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_JoystickImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_JoystickImpl.hpp new file mode 100644 index 00000000000..bbb79486f47 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_JoystickImpl.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_JoystickImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/JoystickImpl.hpp.orig 2015-08-24 16:01:06.000000000 +0000 ++++ src/SFML/Window/JoystickImpl.hpp +@@ -86,7 +86,7 @@ struct JoystickState + + #include <SFML/Window/Unix/JoystickImpl.hpp> + +-#elif defined(SFML_SYSTEM_FREEBSD) ++#elif defined(SFML_SYSTEM_FREEBSD) || defined (SFML_SYSTEM_NETBSD) + + #include <SFML/Window/FreeBSD/JoystickImpl.hpp> + diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_SensorImpl.hpp b/multimedia/sfml/patches/patch-src_SFML_Window_SensorImpl.hpp new file mode 100644 index 00000000000..dc9101f9cdc --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_SensorImpl.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_SensorImpl.hpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/SensorImpl.hpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/SensorImpl.hpp +@@ -35,7 +35,7 @@ + + #include <SFML/Window/Win32/SensorImpl.hpp> + +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + #include <SFML/Window/Unix/SensorImpl.hpp> + diff --git a/multimedia/sfml/patches/patch-src_SFML_Window_WindowImpl.cpp b/multimedia/sfml/patches/patch-src_SFML_Window_WindowImpl.cpp new file mode 100644 index 00000000000..974e251cdc1 --- /dev/null +++ b/multimedia/sfml/patches/patch-src_SFML_Window_WindowImpl.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_SFML_Window_WindowImpl.cpp,v 1.1 2020/05/21 08:42:00 plunky Exp $ + +add NetBSD support + +--- src/SFML/Window/WindowImpl.cpp.orig 2018-10-15 19:41:39.000000000 +0000 ++++ src/SFML/Window/WindowImpl.cpp +@@ -38,7 +38,7 @@ + #include <SFML/Window/Win32/WindowImplWin32.hpp> + typedef sf::priv::WindowImplWin32 WindowImplType; + +-#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) ++#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_NETBSD) || defined(SFML_SYSTEM_OPENBSD) + + #include <SFML/Window/Unix/WindowImplX11.hpp> + typedef sf::priv::WindowImplX11 WindowImplType; |