SF.net SVN: gar:[27127] csw/mgar/pkg

jake_goerzen at users.sourceforge.net jake_goerzen at users.sourceforge.net
Wed Dec 11 19:39:44 CET 2024


Revision: 27127
          http://sourceforge.net/p/gar/code/27127
Author:   jake_goerzen
Date:     2024-12-11 18:39:44 +0000 (Wed, 11 Dec 2024)
Log Message:
-----------
libsdl2: create new recipe and update to 2.30.9

Added Paths:
-----------
    csw/mgar/pkg/libsdl2/
    csw/mgar/pkg/libsdl2/Makefile
    csw/mgar/pkg/libsdl2/branches/
    csw/mgar/pkg/libsdl2/tags/
    csw/mgar/pkg/libsdl2/trunk/
    csw/mgar/pkg/libsdl2/trunk/Makefile
    csw/mgar/pkg/libsdl2/trunk/checksums
    csw/mgar/pkg/libsdl2/trunk/files/
    csw/mgar/pkg/libsdl2/trunk/files/0001-SDL_x11messagebox.c-Solaris-10.patch

Added: csw/mgar/pkg/libsdl2/Makefile
===================================================================
--- csw/mgar/pkg/libsdl2/Makefile	                        (rev 0)
+++ csw/mgar/pkg/libsdl2/Makefile	2024-12-11 18:39:44 UTC (rev 27127)
@@ -0,0 +1,2 @@
+%:
+	$(MAKE) -C trunk $*

Index: csw/mgar/pkg/libsdl2/trunk
===================================================================
--- csw/mgar/pkg/libsdl2/trunk	2024-12-11 09:24:25 UTC (rev 27126)
+++ csw/mgar/pkg/libsdl2/trunk	2024-12-11 18:39:44 UTC (rev 27127)

Property changes on: csw/mgar/pkg/libsdl2/trunk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+work
Added: csw/mgar/pkg/libsdl2/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libsdl2/trunk/Makefile	                        (rev 0)
+++ csw/mgar/pkg/libsdl2/trunk/Makefile	2024-12-11 18:39:44 UTC (rev 27127)
@@ -0,0 +1,48 @@
+NAME = SDL2
+VERSION = 2.30.9
+GARTYPE = v2
+
+DESCRIPTION = Simple DirectMedia Layer library
+define BLURB
+  SDL is a library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard.
+endef
+
+MASTER_SITES = https://www.libsdl.org/release/
+DISTFILES  = $(DISTNAME).tar.gz
+
+PACKAGES += CSWlibsdl2-2-0-0
+CATALOGNAME_CSWlibsdl2-2-0-0 = libsdl2_2_0_0
+PKGFILES_CSWlibsdl2-2-0-0 += $(call baseisadirs,$(libdir),libSDL2-2\.0\.so\.0\.22\.0)
+PKGFILES_CSWlibsdl2-2-0-0 += $(call baseisadirs,$(libdir),libSDL2-2\.0\.so\.0(\.\d+)*)
+SPKG_DESC_CSWlibsdl2-2-0-0 += $(DESCRIPTION), libSDL2-2.0.so.0
+
+PACKAGES += CSWlibsdl2-dev
+CATALOGNAME_CSWlibsdl2-dev = libsdl2_dev
+SPKG_DESC_CSWlibsdl2-dev += $(DESCRIPTION), development files
+PKGFILES_CSWlibsdl2-dev += /opt/csw/lib/amd64/libSDL2.so
+PKGFILES_CSWlibsdl2-dev += /opt/csw/lib/sparcv9/libSDL2.so
+PKGFILES_CSWlibsdl2-dev += /opt/csw/lib/libSDL2.so
+PKGFILES_CSWlibsdl2-dev += $(PKGFILES_DEVEL)
+
+RUNTIME_DEP_PKGS_CSWlibsdl2-2-0-0 += CSWlibgcc-s1
+
+RUNTIME_DEP_PKGS_CSWlibsdl2-dev += CSWlibsdl2-2-0-0
+
+PATCHFILES = 0001-SDL_x11messagebox.c-Solaris-10.patch
+
+GARCOMPILER = GNU
+
+BUILD64_LIBS_ONLY = 1
+
+XMKMF=/usr/openwin/bin/xmkmf
+MAKE = gmake
+INSTALL = ginstall
+
+CONFIGURE_ARGS = $(DIRPATHS) --disable-static
+CONFIGURE_ARGS += --disable-video-vulkan
+
+TEST_SCRIPTS =
+
+PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
+
+include gar/category.mk


Property changes on: csw/mgar/pkg/libsdl2/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: csw/mgar/pkg/libsdl2/trunk/checksums
===================================================================
--- csw/mgar/pkg/libsdl2/trunk/checksums	                        (rev 0)
+++ csw/mgar/pkg/libsdl2/trunk/checksums	2024-12-11 18:39:44 UTC (rev 27127)
@@ -0,0 +1 @@
+57393a5e1a46dd19ae40968a301c70a3  SDL2-2.30.9.tar.gz

Added: csw/mgar/pkg/libsdl2/trunk/files/0001-SDL_x11messagebox.c-Solaris-10.patch
===================================================================
--- csw/mgar/pkg/libsdl2/trunk/files/0001-SDL_x11messagebox.c-Solaris-10.patch	                        (rev 0)
+++ csw/mgar/pkg/libsdl2/trunk/files/0001-SDL_x11messagebox.c-Solaris-10.patch	2024-12-11 18:39:44 UTC (rev 27127)
@@ -0,0 +1,104 @@
+From 424893363fe270bb5bfb6774996b56e250020714 Mon Sep 17 00:00:00 2001
+From: Jake Goerzen <jgoerzen at opencsw.org>
+Date: Tue, 10 Dec 2024 21:38:54 +0100
+Subject: [PATCH] SDL_x11messagebox.c Solaris 10
+
+---
+ src/video/x11/SDL_x11messagebox.c | 27 ++++++++++++++++++++++-----
+ 1 file changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/src/video/x11/SDL_x11messagebox.c b/src/video/x11/SDL_x11messagebox.c
+index 0e3b67a..97a5328 100644
+--- a/src/video/x11/SDL_x11messagebox.c
++++ b/src/video/x11/SDL_x11messagebox.c
+@@ -125,12 +125,15 @@ static SDL_INLINE int IntMax(int a, int b)
+ /* Return width and height for a string. */
+ static void GetTextWidthHeight(SDL_MessageBoxDataX11 *data, const char *str, int nbytes, int *pwidth, int *pheight)
+ {
++#ifdef X_HAVE_UTF8_STRING
+     if (SDL_X11_HAVE_UTF8) {
+         XRectangle overall_ink, overall_logical;
+         X11_Xutf8TextExtents(data->font_set, str, nbytes, &overall_ink, &overall_logical);
+         *pwidth = overall_logical.width;
+         *pheight = overall_logical.height;
+-    } else {
++    } else
++#endif
++    {
+         XCharStruct text_structure;
+         int font_direction, font_ascent, font_descent;
+         X11_XTextExtents(data->font_struct, str, nbytes,
+@@ -186,6 +189,7 @@ static int X11_MessageBoxInit(SDL_MessageBoxDataX11 *data, const SDL_MessageBoxD
+         return SDL_SetError("Couldn't open X11 display");
+     }
+ 
++#ifdef X_HAVE_UTF8_STRING
+     if (SDL_X11_HAVE_UTF8) {
+         char **missing = NULL;
+         int num_missing = 0;
+@@ -197,7 +201,9 @@ static int X11_MessageBoxInit(SDL_MessageBoxDataX11 *data, const SDL_MessageBoxD
+         if (!data->font_set) {
+             return SDL_SetError("Couldn't load font %s", g_MessageBoxFont);
+         }
+-    } else {
++    } else
++#endif
++    {
+         data->font_struct = X11_XLoadQueryFont(data->display, g_MessageBoxFontLatin1);
+         if (!data->font_struct) {
+             return SDL_SetError("Couldn't load font %s", g_MessageBoxFontLatin1);
+@@ -536,11 +542,14 @@ static void X11_MessageBoxDraw(SDL_MessageBoxDataX11 *data, GC ctx)
+     for (i = 0; i < data->numlines; i++) {
+         TextLineData *plinedata = &data->linedata[i];
+ 
++#ifdef X_HAVE_UTF8_STRING
+         if (SDL_X11_HAVE_UTF8) {
+             X11_Xutf8DrawString(display, window, data->font_set, ctx,
+                                 data->xtext, data->ytext + i * data->text_height,
+                                 plinedata->text, plinedata->length);
+-        } else {
++        } else
++#endif
++        {
+             X11_XDrawString(display, window, ctx,
+                             data->xtext, data->ytext + i * data->text_height,
+                             plinedata->text, plinedata->length);
+@@ -565,12 +574,15 @@ static void X11_MessageBoxDraw(SDL_MessageBoxDataX11 *data, GC ctx)
+ 
+         X11_XSetForeground(display, ctx, (data->mouse_over_index == i) ? data->color[SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED] : data->color[SDL_MESSAGEBOX_COLOR_TEXT]);
+ 
++#ifdef X_HAVE_UTF8_STRING
+         if (SDL_X11_HAVE_UTF8) {
+             X11_Xutf8DrawString(display, window, data->font_set, ctx,
+                                 buttondatax11->x + offset,
+                                 buttondatax11->y + offset,
+                                 buttondata->text, buttondatax11->length);
+-        } else {
++        } else
++#endif
++        {
+             X11_XDrawString(display, window, ctx,
+                             buttondatax11->x + offset, buttondatax11->y + offset,
+                             buttondata->text, buttondatax11->length);
+@@ -604,12 +616,17 @@ static int X11_MessageBoxLoop(SDL_MessageBoxDataX11 *data)
+     SDL_bool has_focus = SDL_TRUE;
+     KeySym last_key_pressed = XK_VoidSymbol;
+     unsigned long gcflags = GCForeground | GCBackground;
++#ifdef X_HAVE_UTF8_STRING
++    const int have_utf8 = SDL_X11_HAVE_UTF8;
++#else
++    const int have_utf8 = 0;
++#endif
+ 
+     SDL_zero(ctx_vals);
+     ctx_vals.foreground = data->color[SDL_MESSAGEBOX_COLOR_BACKGROUND];
+     ctx_vals.background = data->color[SDL_MESSAGEBOX_COLOR_BACKGROUND];
+ 
+-    if (!SDL_X11_HAVE_UTF8) {
++    if (!have_utf8) {
+         gcflags |= GCFont;
+         ctx_vals.font = data->font_struct->fid;
+     }
+-- 
+2.4.0
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list