pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Apr  1 10:43:05 UTC 2022

Modified Files:
        pkgsrc/devel: Makefile
Added Files:
        pkgsrc/devel/sdl12-compat: DESCR Makefile PLIST buildlink3.mk distinfo
        pkgsrc/devel/sdl12-compat/patches: patch-CMakeLists.txt
            patch-include_SDL_SDL__config.h

Log Message:
devel: add sdl12-compat

This is the Simple DirectMedia Layer, a general API that provides low level
access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D
framebuffer across multiple platforms.

This code is a compatibility layer; it provides a binary and source compatible
API for programs written against SDL 1.2, but it uses SDL 2.0 behind the
scenes. If you are writing new code, please target SDL 2.0 directly and do
not use this layer.


To generate a diff of this commit:
cvs rdiff -u -r1.3704 -r1.3705 pkgsrc/devel/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/sdl12-compat/DESCR \
    pkgsrc/devel/sdl12-compat/Makefile pkgsrc/devel/sdl12-compat/PLIST \
    pkgsrc/devel/sdl12-compat/buildlink3.mk \
    pkgsrc/devel/sdl12-compat/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/sdl12-compat/patches/patch-CMakeLists.txt \
    pkgsrc/devel/sdl12-compat/patches/patch-include_SDL_SDL__config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/Makefile
diff -u pkgsrc/devel/Makefile:1.3704 pkgsrc/devel/Makefile:1.3705
--- pkgsrc/devel/Makefile:1.3704        Thu Mar 31 21:48:13 2022
+++ pkgsrc/devel/Makefile       Fri Apr  1 10:43:05 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3704 2022/03/31 21:48:13 wiz Exp $
+# $NetBSD: Makefile,v 1.3705 2022/04/01 10:43:05 nia Exp $
 #
 
 COMMENT=       Development utilities
@@ -3154,6 +3154,7 @@ SUBDIR+=  scmcvs
 SUBDIR+=       scons
 SUBDIR+=       sdcc
 SUBDIR+=       sdcc3
+SUBDIR+=       sdl12-compat
 SUBDIR+=       semantic
 SUBDIR+=       semi
 SUBDIR+=       sfsexp

Added files:

Index: pkgsrc/devel/sdl12-compat/DESCR
diff -u /dev/null pkgsrc/devel/sdl12-compat/DESCR:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/DESCR     Fri Apr  1 10:43:05 2022
@@ -0,0 +1,8 @@
+This is the Simple DirectMedia Layer, a general API that provides low level
+access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D
+framebuffer across multiple platforms.
+
+This code is a compatibility layer; it provides a binary and source compatible
+API for programs written against SDL 1.2, but it uses SDL 2.0 behind the
+scenes. If you are writing new code, please target SDL 2.0 directly and do
+not use this layer.
Index: pkgsrc/devel/sdl12-compat/Makefile
diff -u /dev/null pkgsrc/devel/sdl12-compat/Makefile:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/Makefile  Fri Apr  1 10:43:05 2022
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2022/04/01 10:43:05 nia Exp $
+
+DISTNAME=      sdl12-compat-1.2.52
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=libsdl-org/}
+GITHUB_TAG=    release-${PKGVERSION_NOREV}
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/libsdl-org/sdl12-compat
+COMMENT=       SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes
+LICENSE=       zlib
+
+USE_CMAKE=     yes
+
+PKGCONFIG_OVERRIDE+=   sdl12_compat.pc.in
+
+post-install:
+       ${RM} ${DESTDIR}${PREFIX}/include/SDL/*.orig
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/sdl12-compat/PLIST
diff -u /dev/null pkgsrc/devel/sdl12-compat/PLIST:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/PLIST     Fri Apr  1 10:43:05 2022
@@ -0,0 +1,42 @@
+@comment $NetBSD: PLIST,v 1.1 2022/04/01 10:43:05 nia Exp $
+bin/sdl-config
+include/SDL/SDL.h
+include/SDL/SDL_active.h
+include/SDL/SDL_audio.h
+include/SDL/SDL_byteorder.h
+include/SDL/SDL_cdrom.h
+include/SDL/SDL_config.h
+include/SDL/SDL_copying.h
+include/SDL/SDL_cpuinfo.h
+include/SDL/SDL_endian.h
+include/SDL/SDL_error.h
+include/SDL/SDL_events.h
+include/SDL/SDL_getenv.h
+include/SDL/SDL_joystick.h
+include/SDL/SDL_keyboard.h
+include/SDL/SDL_keysym.h
+include/SDL/SDL_loadso.h
+include/SDL/SDL_main.h
+include/SDL/SDL_mouse.h
+include/SDL/SDL_mutex.h
+include/SDL/SDL_name.h
+include/SDL/SDL_opengl.h
+include/SDL/SDL_platform.h
+include/SDL/SDL_quit.h
+include/SDL/SDL_rwops.h
+include/SDL/SDL_stdinc.h
+include/SDL/SDL_syswm.h
+include/SDL/SDL_thread.h
+include/SDL/SDL_timer.h
+include/SDL/SDL_types.h
+include/SDL/SDL_version.h
+include/SDL/SDL_video.h
+include/SDL/begin_code.h
+include/SDL/close_code.h
+lib/libSDL-1.2.so
+lib/libSDL-1.2.so.0
+lib/libSDL-1.2.so.${PKGVERSION}
+lib/libSDL.so
+lib/libSDLmain.a
+lib/pkgconfig/sdl12_compat.pc
+share/aclocal/sdl.m4
Index: pkgsrc/devel/sdl12-compat/buildlink3.mk
diff -u /dev/null pkgsrc/devel/sdl12-compat/buildlink3.mk:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/buildlink3.mk     Fri Apr  1 10:43:05 2022
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2022/04/01 10:43:05 nia Exp $
+
+BUILDLINK_TREE+=       sdl12-compat
+
+.if !defined(SDL12_COMPAT_BUILDLINK3_MK)
+SDL12_COMPAT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.sdl12-compat+=   sdl12-compat>=1.2.52
+BUILDLINK_PKGSRCDIR.sdl12-compat?=     ../../devel/sdl12-compat
+BUILDLINK_INCDIRS.sdl12-compat+=       include/SDL
+
+.endif # SDL12_COMPAT_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -sdl12-compat
Index: pkgsrc/devel/sdl12-compat/distinfo
diff -u /dev/null pkgsrc/devel/sdl12-compat/distinfo:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/distinfo  Fri Apr  1 10:43:05 2022
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/04/01 10:43:05 nia Exp $
+
+BLAKE2s (sdl12-compat-1.2.52.tar.gz) = d8abf6a0bfa94472c664208232c654ea358aff157f4c14f8c508b887d7801479
+SHA512 (sdl12-compat-1.2.52.tar.gz) = cd8f34f61ee9c6d0bd635f4c7a6f3cfb6bb570976f3bf843f1e3893b3a86d087a40bdf5f6bb2de16c9534ec42bc846b6ff599ac557c3b088c447e6106e2558f9
+Size (sdl12-compat-1.2.52.tar.gz) = 421046 bytes
+SHA1 (patch-CMakeLists.txt) = ca6c1fc0c32c4e68f6d1f9bcf988f5bcdbecfa5b
+SHA1 (patch-include_SDL_SDL__config.h) = 96eb020bb246e111d4240f94f68a1f5e49222070

Index: pkgsrc/devel/sdl12-compat/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/devel/sdl12-compat/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/patches/patch-CMakeLists.txt      Fri Apr  1 10:43:05 2022
@@ -0,0 +1,33 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2022/04/01 10:43:05 nia Exp $
+
+Not every unix system has libdl.
+
+--- CMakeLists.txt.orig        2022-03-03 14:56:56.000000000 +0000
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ string(STRIP "${CMAKE_C_FLAGS}" CMAKE_C_
+ 
+ if(UNIX AND NOT APPLE)
+     set_target_properties(SDL PROPERTIES COMPILE_DEFINITIONS "_REENTRANT")
+-    target_link_libraries(SDL PRIVATE dl)
++    target_link_libraries(SDL PRIVATE ${CMAKE_DL_LIBS})
+ endif()
+ if(APPLE)
+     set_target_properties(SDL PROPERTIES INSTALL_NAME_DIR "")
+@@ -254,7 +254,7 @@ if(SDL12DEVEL)
+       set(SDL_CFLAGS "-D_GNU_SOURCE=1 -D_REENTRANT")
+       set(SDL_RLD_FLAGS "")  # !!! FIXME: this forces rpath, which we might want?
+       set(SDL_LIBS "-lSDL")
+-      set(SDL_STATIC_LIBS "-ldl")
++      set(SDL_STATIC_LIBS ${CMAKE_DL_LIBS})
+       if(NOT STATICDEVEL)
+         set(SDL_STATIC_LIBS "")
+       endif()
+@@ -297,7 +297,7 @@ if(STATICDEVEL AND SDL12DEVEL)
+   add_library(SDL-static STATIC ${SDL12COMPAT_SRCS})
+   target_include_directories(SDL-static PRIVATE ${SDL2_INCLUDE_DIRS})
+   set_target_properties(SDL-static PROPERTIES COMPILE_DEFINITIONS "_REENTRANT")
+-  target_link_libraries(SDL-static PRIVATE dl)
++  target_link_libraries(SDL-static PRIVATE ${CMAKE_DL_LIBS})
+   set_target_properties(SDL-static PROPERTIES
+           VERSION "${PROJECT_VERSION}"
+         OUTPUT_NAME "SDL")
Index: pkgsrc/devel/sdl12-compat/patches/patch-include_SDL_SDL__config.h
diff -u /dev/null pkgsrc/devel/sdl12-compat/patches/patch-include_SDL_SDL__config.h:1.1
--- /dev/null   Fri Apr  1 10:43:05 2022
+++ pkgsrc/devel/sdl12-compat/patches/patch-include_SDL_SDL__config.h   Fri Apr  1 10:43:05 2022
@@ -0,0 +1,25 @@
+$NetBSD: patch-include_SDL_SDL__config.h,v 1.1 2022/04/01 10:43:05 nia Exp $
+
+Not every Unix system has alloca.h.
+
+--- include/SDL/SDL_config.h.orig      2022-03-03 14:56:56.000000000 +0000
++++ include/SDL/SDL_config.h
+@@ -59,7 +59,6 @@ has these C runtime functions available.
+ stage, though. Send patches if your platform lacks something. */
+ #ifndef _WIN32
+ #define HAVE_LIBC 1
+-#define HAVE_ALLOCA_H 1
+ #define HAVE_SYS_TYPES_H 1
+ #define HAVE_STDIO_H 1
+ #define STDC_HEADERS 1
+@@ -72,6 +71,10 @@ stage, though. Send patches if your plat
+ #define HAVE_MATH_H 1
+ #endif
+ 
++#if defined(__linux__) || defined(__sun)
++#define HAVE_ALLOCA_H 1
++#endif
++
+ #if defined(__unix__) || defined(__APPLE__)
+ #define HAVE_ICONV_H 1
+ #define HAVE_SIGNAL_H 1



Home | Main Index | Thread Index | Old Index