From 5f2e8d1224889bb1a0aa7519a64ba3a1b352e40fe0562482b8d1867c7d667ac0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Aug 2024 12:31:48 +0000 Subject: [PATCH 1/2] [info=b0f7f07cdc3e0457510d84361a8efef9121f4d2ffc8ed7dbf004b33a8b5fe8f3] OBS-URL: https://build.opensuse.org/package/show/games/SDL_Pango?expand=0&rev=27 --- .gitattributes | 23 ++++++ .gitignore | 1 + SDL_Pango-0.1.2-API-adds.patch | 125 +++++++++++++++++++++++++++++++++ SDL_Pango-0.1.2.tar.bz2 | 3 + SDL_Pango.changes | 96 +++++++++++++++++++++++++ SDL_Pango.spec | 87 +++++++++++++++++++++++ _scmsync.obsinfo | 4 ++ build.specials.obscpio | 3 + 8 files changed, 342 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 SDL_Pango-0.1.2-API-adds.patch create mode 100644 SDL_Pango-0.1.2.tar.bz2 create mode 100644 SDL_Pango.changes create mode 100644 SDL_Pango.spec create mode 100644 _scmsync.obsinfo create mode 100644 build.specials.obscpio diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/SDL_Pango-0.1.2-API-adds.patch b/SDL_Pango-0.1.2-API-adds.patch new file mode 100644 index 0000000..34b1f9f --- /dev/null +++ b/SDL_Pango-0.1.2-API-adds.patch @@ -0,0 +1,125 @@ +--- + src/SDL_Pango.c | 41 ++++++++++++++++++++++++++++------------- + src/SDL_Pango.h | 16 +++++++++++++++- + 2 files changed, 43 insertions(+), 14 deletions(-) + +Index: SDL_Pango-0.1.2/src/SDL_Pango.c +=================================================================== +--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c ++++ SDL_Pango-0.1.2/src/SDL_Pango.c +@@ -723,13 +723,8 @@ SDLPango_CopyFTBitmapToSurface( + SDL_UnlockSurface(surface); + } + +-/*! +- Create a context which contains Pango objects. +- +- @return A pointer to the context as a SDLPango_Context*. +-*/ + SDLPango_Context* +-SDLPango_CreateContext() ++SDLPango_CreateContext_GivenFontDesc(const char* font_desc) + { + SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context)); + G_CONST_RETURN char *charset; +@@ -743,8 +738,7 @@ SDLPango_CreateContext() + pango_context_set_language (context->context, pango_language_from_string (charset)); + pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR); + +- context->font_desc = pango_font_description_from_string( +- MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE)); ++ context->font_desc = pango_font_description_from_string(font_desc); + + context->layout = pango_layout_new (context->context); + +@@ -762,6 +756,17 @@ SDLPango_CreateContext() + } + + /*! ++ Create a context which contains Pango objects. ++ ++ @return A pointer to the context as a SDLPango_Context*. ++*/ ++SDLPango_Context* ++SDLPango_CreateContext() ++{ ++ return SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE)); ++} ++ ++/*! + Free a context. + + @param *context [i/o] Context to be free +@@ -1053,6 +1058,20 @@ SDLPango_SetMarkup( + pango_layout_set_font_description (context->layout, context->font_desc); + } + ++void ++SDLPango_SetText_GivenAlignment( ++ SDLPango_Context *context, ++ const char *text, ++ int length, ++ SDLPango_Alignment alignment) ++{ ++ pango_layout_set_attributes(context->layout, NULL); ++ pango_layout_set_text (context->layout, text, length); ++ pango_layout_set_auto_dir (context->layout, TRUE); ++ pango_layout_set_alignment (context->layout, alignment); ++ pango_layout_set_font_description (context->layout, context->font_desc); ++} ++ + /*! + Set plain text to context. + Text must be utf-8. +@@ -1067,11 +1086,7 @@ SDLPango_SetText( + const char *text, + int length) + { +- pango_layout_set_attributes(context->layout, NULL); +- pango_layout_set_text (context->layout, text, length); +- pango_layout_set_auto_dir (context->layout, TRUE); +- pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT); +- pango_layout_set_font_description (context->layout, context->font_desc); ++ SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT); + } + + /*! +Index: SDL_Pango-0.1.2/src/SDL_Pango.h +=================================================================== +--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h ++++ SDL_Pango-0.1.2/src/SDL_Pango.h +@@ -109,12 +109,20 @@ typedef enum { + SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */ + } SDLPango_Direction; + +- ++/*! ++ Specifies alignment of text. See Pango reference for detail ++*/ ++typedef enum { ++ SDLPANGO_ALIGN_LEFT, ++ SDLPANGO_ALIGN_CENTER, ++ SDLPANGO_ALIGN_RIGHT ++} SDLPango_Alignment; + + extern DECLSPEC int SDLCALL SDLPango_Init(); + + extern DECLSPEC int SDLCALL SDLPango_WasInit(); + ++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc); + extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext(); + + extern DECLSPEC void SDLCALL SDLPango_FreeContext( +@@ -157,6 +165,12 @@ extern DECLSPEC void SDLCALL SDLPango_Se + const char *markup, + int length); + ++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment( ++ SDLPango_Context *context, ++ const char *text, ++ int length, ++ SDLPango_Alignment alignment); ++ + extern DECLSPEC void SDLCALL SDLPango_SetText( + SDLPango_Context *context, + const char *markup, diff --git a/SDL_Pango-0.1.2.tar.bz2 b/SDL_Pango-0.1.2.tar.bz2 new file mode 100644 index 0000000..3aebbd8 --- /dev/null +++ b/SDL_Pango-0.1.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:872666d607e5bbffee0f57c2089e06dc168bb632efa26b7608cb422eaf9b3aeb +size 267712 diff --git a/SDL_Pango.changes b/SDL_Pango.changes new file mode 100644 index 0000000..9193bda --- /dev/null +++ b/SDL_Pango.changes @@ -0,0 +1,96 @@ +------------------------------------------------------------------- +Wed May 18 16:00:45 UTC 2022 - Jan Engelhardt + +- Remove baselibs.conf, nothing appears to be using it. +- Change -devel subpackage to be based on SRPM/project name. +- Use pkgconfig(sdl) to build with sdl12_compat. + +------------------------------------------------------------------- +Sat May 11 12:23:35 UTC 2019 - Jan Engelhardt + +- Remove --with-pic (ineffective with --disable-static) + +------------------------------------------------------------------- +Sat May 11 07:35:31 UTC 2019 - Luigi Baldoni + +- Add cairo as dependency for pango (fixes Factory build) +- Spec cleanup + +------------------------------------------------------------------- +Thu Jan 8 09:06:11 UTC 2015 - jengelh@inai.de + +- Use pkgconfig() symbols for pulling in BuildRequires + +------------------------------------------------------------------- +Thu Jan 30 14:29:07 UTC 2014 - jengelh@inai.de + +- Some metadata spruce-up: add current URLs, softer wildcarding + in the files list, more robust make install call + +------------------------------------------------------------------- +Mon Nov 11 03:47:15 UTC 2013 - jengelh@inai.de + +- Set RPM groups to the same values as on the main SDL packages + +------------------------------------------------------------------- +Wed Apr 17 14:49:54 UTC 2013 - dimstar@opensuse.org + +- Add libtool BuildRequires and call to autoreconf: even though we + don't have any patches, we need to bootstrap, as the ancient + ./libtool in the tarball (version 1.5) fails to work on recent + Builders, resulting in linker errors. + +------------------------------------------------------------------- +Thu Jan 3 02:31:49 UTC 2013 - crrodriguez@opensuse.org + +- Remove fontconfig-devel freetype2-devel which are not + really BuildRequired. + +------------------------------------------------------------------- +Fri Sep 16 18:19:36 UTC 2011 - jengelh@medozas.de + +- Add libSDL_Pango-devel to baselibs +- Remove reundant tags/ssections + +------------------------------------------------------------------- +Sat Jul 2 14:51:05 UTC 2011 - jengelh@medozas.de + +- Use %_smp_mflags for parallel building +- Strip %clean section (not needed on BS) + +------------------------------------------------------------------- +Wed Jan 27 02:36:01 CET 2010 - jengelh@medozas.de + +- package baselibs.conf + +------------------------------------------------------------------- +Wed Oct 7 14:52:17 CEST 2009 - prusnak@suse.cz + +- fix provides and obsoletes [bnc#544957] + +------------------------------------------------------------------- +Wed Jun 3 13:30:54 CEST 2009 - coolo@novell.com + +- fix requires of devel package + +------------------------------------------------------------------- +Wed May 20 15:37:01 CEST 2009 - prusnak@suse.cz + +- follow Shared Library Policy + +------------------------------------------------------------------- +Thu Jun 26 22:56:36 CEST 2008 - crrodriguez@suse.de + +- disable unusable static libraries +- SDL_Pango-devel should require SDL-devel + +------------------------------------------------------------------- +Thu Dec 27 04:13:56 CET 2007 - crrodriguez@suse.de + +- fix library-without-ldconfig-* errors + +------------------------------------------------------------------- +Sun Oct 29 19:16:21 CET 2006 - sndirsch@suse.de + +- created package + diff --git a/SDL_Pango.spec b/SDL_Pango.spec new file mode 100644 index 0000000..06e2891 --- /dev/null +++ b/SDL_Pango.spec @@ -0,0 +1,87 @@ +# +# spec file for package SDL_Pango +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libSDL_Pango1 +Name: SDL_Pango +Version: 0.1.2 +Release: 0 +Summary: Programming Pango via SDL +License: LGPL-2.1-or-later +Group: Development/Libraries/X11 +URL: http://sdlpango.sourceforge.net/ +#CVS-Clone: -d:pserver:anonymous@sdlpango.cvs.sourceforge.net:/cvsroot/sdlpango co -P SDL_Pango +Source: %name-%version.tar.bz2 +Patch1: %name-%version-API-adds.patch +BuildRequires: dos2unix +BuildRequires: libtool +BuildRequires: pkg-config +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(sdl) + +%description +Pango is the text rendering engine of GNOME 2.x. SDL_Pango connects the +engine to SDL. + +%package -n %lname +Summary: Programming Pango via SDL +Group: System/Libraries + +%description -n %lname +Pango is the text rendering engine of GNOME 2.x. SDL_Pango connects the +engine to SDL. + +%package devel +Summary: Headers for SDL_Pango development +Group: Development/Libraries/X11 +Requires: %lname = %version +Requires: pkgconfig(sdl) +Provides: libSDL_Pango-devel = %version-%release +Obsoletes: libSDL_Pango-devel < %version-%release + +%description devel +This package contains the necessary include files and libraries needed +to develop applications that require SDL_Pango. + +%prep +%autosetup -p1 +dos2unix AUTHORS README + +%build +autoreconf -fiv +%configure --disable-static +%make_build + +%install +%make_install +find %buildroot -type f -name "*.la" -delete -print + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%license COPYING +%doc AUTHORS README +%_libdir/libSDL_Pango.so.* + +%files devel +%_includedir/SDL_Pango.h +%_libdir/pkgconfig/SDL_Pango.pc +%_libdir/libSDL_Pango.so + +%changelog diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..8e5d3d3 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1652993361 +commit: b0f7f07cdc3e0457510d84361a8efef9121f4d2ffc8ed7dbf004b33a8b5fe8f3 +url: https://src.opensuse.org/jengelh/SDL_Pango +revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..e2bfe18 --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edb3a0f4d4209968ff0c9522515592abeb1e60ec7ce21933c537d1a54630235a +size 256 From b56a9ba9da1742efb2f35f76e90910868a93e044d248bd7c05494d5d66a63482 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 21 Aug 2024 12:45:02 +0000 Subject: [PATCH 2/2] [info=0cfd18917c796883c41d5e83258886d260708dbaa9facec3ba691fdf0226353e] OBS-URL: https://build.opensuse.org/package/show/games/SDL_Pango?expand=0&rev=28 --- SDL_Pango.changes | 5 +++++ SDL_Pango.spec | 1 + _scmsync.obsinfo | 4 ++-- build.specials.obscpio | 2 +- gcc14.patch | 48 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 gcc14.patch diff --git a/SDL_Pango.changes b/SDL_Pango.changes index 9193bda..1bc70af 100644 --- a/SDL_Pango.changes +++ b/SDL_Pango.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 21 12:48:49 UTC 2024 - Jan Engelhardt + +- Add gcc14.patch + ------------------------------------------------------------------- Wed May 18 16:00:45 UTC 2022 - Jan Engelhardt diff --git a/SDL_Pango.spec b/SDL_Pango.spec index 06e2891..e6984a9 100644 --- a/SDL_Pango.spec +++ b/SDL_Pango.spec @@ -27,6 +27,7 @@ URL: http://sdlpango.sourceforge.net/ #CVS-Clone: -d:pserver:anonymous@sdlpango.cvs.sourceforge.net:/cvsroot/sdlpango co -P SDL_Pango Source: %name-%version.tar.bz2 Patch1: %name-%version-API-adds.patch +Patch2: gcc14.patch BuildRequires: dos2unix BuildRequires: libtool BuildRequires: pkg-config diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo index 8e5d3d3..06683fe 100644 --- a/_scmsync.obsinfo +++ b/_scmsync.obsinfo @@ -1,4 +1,4 @@ -mtime: 1652993361 -commit: b0f7f07cdc3e0457510d84361a8efef9121f4d2ffc8ed7dbf004b33a8b5fe8f3 +mtime: 1724244574 +commit: 0cfd18917c796883c41d5e83258886d260708dbaa9facec3ba691fdf0226353e url: https://src.opensuse.org/jengelh/SDL_Pango revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio index e2bfe18..32ae108 100644 --- a/build.specials.obscpio +++ b/build.specials.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edb3a0f4d4209968ff0c9522515592abeb1e60ec7ce21933c537d1a54630235a +oid sha256:c10e53b20ba6d913b832f8ce8db2fdaf474517c21f98bca163b871b35932a64f size 256 diff --git a/gcc14.patch b/gcc14.patch new file mode 100644 index 0000000..583204f --- /dev/null +++ b/gcc14.patch @@ -0,0 +1,48 @@ +From: Jan Engelhardt +Date: 2024-08-21 14:44:53.847192112 +0200 + +SDL_Pango.c: In function 'drawGlyphString': +SDL_Pango.c:349:5: error: implicit declaration of function 'SDLPango_CopyFTBitmapToSurface' [-Wimplicit-function-declaration] + 349 | SDLPango_CopyFTBitmapToSurface( +Take inspiration from +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e529a13405f08edca871efbe73a0392f507051c + +--- + src/SDL_Pango.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: SDL_Pango-0.1.2/src/SDL_Pango.c +=================================================================== +--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c ++++ SDL_Pango-0.1.2/src/SDL_Pango.c +@@ -228,6 +228,7 @@ + + #include + #include ++#define __FT2_BUILD_UNIX_H__ + + #include "SDL_Pango.h" + +@@ -298,7 +299,6 @@ typedef struct _contextImpl { + int + SDLPango_Init() + { +- g_type_init(); + + IS_INITIALIZED = -1; + +@@ -727,12 +727,12 @@ SDLPango_Context* + SDLPango_CreateContext_GivenFontDesc(const char* font_desc) + { + SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context)); +- G_CONST_RETURN char *charset; ++ const char *charset; + + context->font_map = pango_ft2_font_map_new (); + pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (context->font_map), DEFAULT_DPI, DEFAULT_DPI); + +- context->context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (context->font_map)); ++ context->context = pango_font_map_create_context (PANGO_FONT_MAP (context->font_map)); + + g_get_charset(&charset); + pango_context_set_language (context->context, pango_language_from_string (charset));