Thu Aug 15 10:26:16 2013 UTC ()
Simple DirectMedia Layer is a cross-platform development library designed to
provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog and many
Humble Bundle games.
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for
other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings available
for several other languages, including C# and Python.
SDL 2.0 is distributed under the zlib license. This license allows you to use
SDL freely in any software.
(adam)
diff -r0 -r1.1 pkgsrc/devel/SDL2/DESCR
diff -r0 -r1.1 pkgsrc/devel/SDL2/Makefile
diff -r0 -r1.1 pkgsrc/devel/SDL2/PLIST
diff -r0 -r1.1 pkgsrc/devel/SDL2/buildlink3.mk
diff -r0 -r1.1 pkgsrc/devel/SDL2/distinfo
diff -r0 -r1.1 pkgsrc/devel/SDL2/options.mk
diff -r0 -r1.1 pkgsrc/devel/SDL2/patches/patch-CMakeLists.txt
Simple DirectMedia Layer is a cross-platform development library designed to
provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog and many
Humble Bundle games.
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for
other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings available
for several other languages, including C# and Python.
SDL 2.0 is distributed under the zlib license. This license allows you to use
SDL freely in any software.
# $NetBSD: Makefile,v 1.1 2013/08/15 10:26:16 adam Exp $
DISTNAME= SDL2-2.0.0
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.libsdl.org/
COMMENT= Simple DirectMedia Layer is a cross-platform multimedia library
LICENSE= zlib
USE_LANGUAGES= c c++
USE_CMAKE= yes
USE_TOOLS+= pkg-config
PKGCONFIG_OVERRIDE+= sdl2.pc.in
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} != "Linux"
BUILDLINK_TRANSFORM+= rm:-ldl
.endif
SUBST_CLASSES+= prefix
SUBST_FILES.prefix= build/cmake_install.cmake
SUBST_MESSAGE.prefix= Fixing PREFIX path.
SUBST_SED.prefix= -e "s|/usr/local|${PREFIX}|1"
SUBST_STAGE.prefix= pre-install
.include "options.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/libusb/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2013/08/15 10:26:16 adam Exp $
bin/sdl2-config
include/SDL2/SDL.h
include/SDL2/SDL_assert.h
include/SDL2/SDL_atomic.h
include/SDL2/SDL_audio.h
include/SDL2/SDL_bits.h
include/SDL2/SDL_blendmode.h
include/SDL2/SDL_clipboard.h
include/SDL2/SDL_config.h
include/SDL2/SDL_config_android.h
include/SDL2/SDL_config_iphoneos.h
include/SDL2/SDL_config_macosx.h
include/SDL2/SDL_config_minimal.h
include/SDL2/SDL_config_pandora.h
include/SDL2/SDL_config_psp.h
include/SDL2/SDL_config_windows.h
include/SDL2/SDL_config_wiz.h
include/SDL2/SDL_copying.h
include/SDL2/SDL_cpuinfo.h
include/SDL2/SDL_endian.h
include/SDL2/SDL_error.h
include/SDL2/SDL_events.h
include/SDL2/SDL_gamecontroller.h
include/SDL2/SDL_gesture.h
include/SDL2/SDL_haptic.h
include/SDL2/SDL_hints.h
include/SDL2/SDL_joystick.h
include/SDL2/SDL_keyboard.h
include/SDL2/SDL_keycode.h
include/SDL2/SDL_loadso.h
include/SDL2/SDL_log.h
include/SDL2/SDL_main.h
include/SDL2/SDL_messagebox.h
include/SDL2/SDL_mouse.h
include/SDL2/SDL_mutex.h
include/SDL2/SDL_name.h
include/SDL2/SDL_opengl.h
include/SDL2/SDL_opengles.h
include/SDL2/SDL_opengles2.h
include/SDL2/SDL_pixels.h
include/SDL2/SDL_platform.h
include/SDL2/SDL_power.h
include/SDL2/SDL_quit.h
include/SDL2/SDL_rect.h
include/SDL2/SDL_render.h
include/SDL2/SDL_revision.h
include/SDL2/SDL_rwops.h
include/SDL2/SDL_scancode.h
include/SDL2/SDL_shape.h
include/SDL2/SDL_stdinc.h
include/SDL2/SDL_surface.h
include/SDL2/SDL_system.h
include/SDL2/SDL_syswm.h
include/SDL2/SDL_test.h
include/SDL2/SDL_test_assert.h
include/SDL2/SDL_test_common.h
include/SDL2/SDL_test_compare.h
include/SDL2/SDL_test_crc32.h
include/SDL2/SDL_test_font.h
include/SDL2/SDL_test_fuzzer.h
include/SDL2/SDL_test_harness.h
include/SDL2/SDL_test_images.h
include/SDL2/SDL_test_log.h
include/SDL2/SDL_test_md5.h
include/SDL2/SDL_test_random.h
include/SDL2/SDL_thread.h
include/SDL2/SDL_timer.h
include/SDL2/SDL_touch.h
include/SDL2/SDL_types.h
include/SDL2/SDL_version.h
include/SDL2/SDL_video.h
include/SDL2/begin_code.h
include/SDL2/close_code.h
lib/libSDL2-2.0.so
lib/libSDL2-2.0.so.0
lib/libSDL2-2.0.so.0.0.0
lib/libSDL2.a
lib/libSDL2.so
lib/libSDL2main.a
lib/pkgconfig/sdl2.pc
share/aclocal/sdl2.m4
# $NetBSD: buildlink3.mk,v 1.1 2013/08/15 10:26:16 adam Exp $
BUILDLINK_TREE+= SDL2
.if !defined(SDL2_BUILDLINK3_MK)
SDL2_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.SDL2+= SDL2>=2.0
BUILDLINK_PKGSRCDIR.SDL2?= ../../devel/SDL2
BUILDLINK_INCDIRS.SDL2+= include/SDL2
pkgbase := SDL2
.include "../../mk/pkg-build-options.mk"
.if !empty(PKG_BUILD_OPTIONS.SDL2:Mnas)
.include "../../audio/nas/buildlink3.mk"
.endif
.include "../../converters/libiconv/buildlink3.mk"
.if ${OPSYS} != "Darwin"
. if !empty(PKG_BUILD_OPTIONS.SDL2:Mopengl)
. include "../../graphics/MesaLib/buildlink3.mk"
. endif
.include "../../x11/xproto/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.endif
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.endif # SDL2_BUILDLINK3_MK
BUILDLINK_TREE+= -SDL2
$NetBSD: distinfo,v 1.1 2013/08/15 10:26:16 adam Exp $
SHA1 (SDL2-2.0.0.tar.gz) = a907eb5203abad6649c1eae0120d96c0a1931350
RMD160 (SDL2-2.0.0.tar.gz) = 3e29daa152eae2c1a473b8dd413e1b07ce35cd70
Size (SDL2-2.0.0.tar.gz) = 3623960 bytes
SHA1 (patch-CMakeLists.txt) = a82312d4063fd57af66bbc7600d1e84573bf5c4d
# $NetBSD: options.mk,v 1.1 2013/08/15 10:26:16 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.SDL2
PKG_SUPPORTED_OPTIONS= alsa arts esound nas opengl oss pulseaudio
PKG_SUPPORTED_OPTIONS+= x11 xcursor xim xinerama xrandr xrender xscrnsaver
PKG_SUGGESTED_OPTIONS+= oss
.if ${OPSYS} == "Darwin"
PKG_SUGGESTED_OPTIONS+= opengl
.else
PKG_SUGGESTED_OPTIONS+= x11
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Malsa)
.include "../../audio/alsa-lib/buildlink3.mk"
CMAKE_ARGS+= -DALSA=ON
.else
CMAKE_ARGS+= -DALSA=OFF
.endif
.if !empty(PKG_OPTIONS:Marts)
.include "../../audio/arts/buildlink3.mk"
CMAKE_ARGS+= -DARTS=ON
.else
CMAKE_ARGS+= -DARTS=OFF
.endif
.if !empty(PKG_OPTIONS:Mesound)
.include "../../audio/esound/buildlink3.mk"
CMAKE_ARGS+= -DESD=ON
.else
CMAKE_ARGS+= -DESD=OFF
.endif
.if !empty(PKG_OPTIONS:Mnas)
.include "../../audio/nas/buildlink3.mk"
CMAKE_ARGS+= -DNAS=ON
.else
CMAKE_ARGS+= -DNAS=OFF
.endif
.if !empty(PKG_OPTIONS:Mopengl)
. if ${OPSYS} != "Darwin"
.include "../../graphics/MesaLib/buildlink3.mk"
. endif
CMAKE_ARGS+= -DVIDEO_OPENGL=ON
.else
CMAKE_ARGS+= -DVIDEO_OPENGL=OFF
.endif
.if !empty(PKG_OPTIONS:Moss)
CMAKE_ARGS+= -DOSS=ON
.else
CMAKE_ARGS+= -DOSS=OFF
.endif
.if !empty(PKG_OPTIONS:Mpulseaudio)
.include "../../audio/pulseaudio/buildlink3.mk"
CMAKE_ARGS+= -DPULSEAUDIO=ON
.else
CMAKE_ARGS+= -DPULSEAUDIO=OFF
.endif
.if !empty(PKG_OPTIONS:Mx11)
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/xproto/buildlink3.mk"
CMAKE_ARGS+= -DX11_SHARED=ON -DVIDEO_X11=ON
.else
CMAKE_ARGS+= -DX11_SHARED=OFF -DVIDEO_X11=OFF
.endif
.if !empty(PKG_OPTIONS:Mxcursor)
.include "../../x11/libXcursor/buildlink3.mk"
CMAKE_ARGS+= -DVIDEO_X11_XCURSOR=ON
.else
CMAKE_ARGS+= -DVIDEO_X11_XCURSOR=OFF
.endif
.if !empty(PKG_OPTIONS:Mxim)
.include "../../x11/libXi/buildlink3.mk"
CMAKE_ARGS+= -DVIDEO_X11_XINPUT=ON
.else
CMAKE_ARGS+= -DVIDEO_X11_XINPUT=OFF
.endif
.if !empty(PKG_OPTIONS:Mxinerama)
.include "../../x11/libXinerama/buildlink3.mk"
CMAKE_ARGS+= -DVIDEO_X11_XINERAMA=ON
.else
CMAKE_ARGS+= -DVIDEO_X11_XINERAMA=OFF
.endif
.if !empty(PKG_OPTIONS:Mxrandr)
.include "../../x11/libXrandr/buildlink3.mk"
CMAKE_ARGS+= -DVIDEO_X11_XRANDR=ON
.else
CMAKE_ARGS+= -DVIDEO_X11_XRANDR=OFF
.endif
.if !empty(PKG_OPTIONS:Mxrender)
.include "../../x11/libXrender/buildlink3.mk"
.endif
.if !empty(PKG_OPTIONS:Mxscrnsaver)
.include "../../x11/libXScrnSaver/buildlink3.mk"
CMAKE_ARGS+= -DVIDEO_X11_XSCRNSAVER=ON
.else
CMAKE_ARGS+= -DVIDEO_X11_XSCRNSAVER=OFF
.endif
$NetBSD: patch-CMakeLists.txt,v 1.1 2013/08/15 10:26:16 adam Exp $
Allow in-tree build.
Handle .dylib extension on Darwin.
--- CMakeLists.txt.orig 2013-08-12 02:57:53.000000000 +0000
+++ CMakeLists.txt
@@ -1,6 +1,3 @@
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
- message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
-endif()
cmake_minimum_required(VERSION 2.6)
project(SDL2 C)
@@ -1185,10 +1182,15 @@ list(APPEND INCLUDE_FILES ${BIN_INCLUDE_
install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
if(SDL_SHARED)
+ if(APPLE)
+ set(SO_EXT "dylib")
+ else(APPLE)
+ set(SO_EXT "so")
+ endif(APPLE)
install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
- \"libSDL2-2.0.so\" \"libSDL2.so\")")
- install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
+ \"libSDL2-2.0.${SO_EXT}\" \"libSDL2.${SO_EXT}\")")
+ install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SO_EXT} DESTINATION "lib${LIB_SUFFIX}")
endif(SDL_SHARED)
if(NOT WINDOWS OR CYGWIN)