diff --git a/README.md b/README.md index 3852feb..f292536 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # libSDL_ttf -This library allows you to use TrueType fonts to render text in SDL -applications. +This library allows you to use TrueType fonts to render text in SDL applications. diff --git a/libSDL_ttf-2.0.11-bug1433.patch b/libSDL_ttf-2.0.11-bug1433.patch new file mode 100644 index 0000000..b402fb3 --- /dev/null +++ b/libSDL_ttf-2.0.11-bug1433.patch @@ -0,0 +1,11 @@ +--- SDL_ttf.c.orig 2012-02-12 16:36:41.859977617 +0100 ++++ SDL_ttf.c 2012-02-12 16:36:53.696580159 +0100 +@@ -1747,7 +1747,7 @@ + /* Copy the character from the pixmap */ + src = glyph->pixmap.buffer; + dst = (Uint8*) textbuf->pixels; +- for ( row = 0; row < glyph->bitmap.rows; ++row ) { ++ for ( row = 0; row < glyph->pixmap.rows; ++row ) { + memcpy( dst, src, glyph->pixmap.width ); + src += glyph->pixmap.pitch; + dst += textbuf->pitch; \ No newline at end of file diff --git a/libSDL_ttf-2.0.11-freetype-pkgconfig.patch b/libSDL_ttf-2.0.11-freetype-pkgconfig.patch new file mode 100644 index 0000000..02b0635 --- /dev/null +++ b/libSDL_ttf-2.0.11-freetype-pkgconfig.patch @@ -0,0 +1,46 @@ +https://bugs.gentoo.org/654758 + +--- SDL_ttf-2.0.11/configure.in ++++ SDL_ttf-2.0.11/configure.in +@@ -64,6 +64,7 @@ + ;; + esac + ++PKG_PROG_PKG_CONFIG + + dnl Check for iconv (character conversion library; see iconv.m4) + dnl This isn't available on many systems +@@ -94,6 +95,17 @@ + dnl + dnl Get the cflags and libraries from the freetype-config script + dnl ++PKG_CHECK_MODULES( ++ FREETYPE2, ++ freetype2, ++ [ ++ ft_found=yes ++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS" ++ LIBS="$LIBS $FREETYPE2_LIBS" ++ ], ++ ft_found=no ++) ++ + AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is + installed (optional)], + freetype_prefix="$withval", freetype_prefix="") +@@ -101,6 +113,7 @@ + where FREETYPE is installed (optional)], + freetype_exec_prefix="$withval", freetype_exec_prefix="") + ++if test "x$ft_found" != "xyes" ; then + if test x$freetype_exec_prefix != x ; then + freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix" + if test x${FREETYPE_CONFIG+set} != xset ; then +@@ -123,6 +136,7 @@ + CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`" + LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`" + fi ++fi + + dnl Check for SDL + SDL_VERSION=1.2.4 diff --git a/libSDL_ttf.spec b/libSDL_ttf.spec index 421c35d..e3d4505 100644 --- a/libSDL_ttf.spec +++ b/libSDL_ttf.spec @@ -1,6 +1,6 @@ Name: libSDL_ttf Version: 2.0.11 -Release: 1mamba +Release: 2mamba Summary: Simple DirectMedia Layer - Sample TrueType Font Library Group: System/Libraries Vendor: openmamba @@ -8,60 +8,81 @@ Distribution: openmamba Packager: Silvan Calarco URL: http://www.libsdl.org/projects/SDL_ttf/ Source: http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-%{version}.tar.gz +Patch0: libSDL_ttf-2.0.11-bug1433.patch +Patch1: libSDL_ttf-2.0.11-freetype-pkgconfig.patch License: LGPL - ## AUTOBUILDREQ-BEGIN +#ld-linux.so.3(GLIBC_2.4): .so link not found +#ld-linux.so.3: .so link not found BuildRequires: glibc-devel -BuildRequires: libfreetype-devel >= 2.1.9 -BuildRequires: libSDL-devel >= 1.2.13 +BuildRequires: libSDL-devel +BuildRequires: libbrotli-devel +BuildRequires: libbzip2-devel +BuildRequires: libdirectfb-devel +BuildRequires: libfreetype-devel +BuildRequires: libglib-devel +BuildRequires: libgraphite2-devel +BuildRequires: libharfbuzz-devel +BuildRequires: libpcre-devel +BuildRequires: libpng-devel +BuildRequires: libstdc++6-devel +BuildRequires: libts-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot - %description -This library allows you to use TrueType fonts to render text in SDL -applications. +This library allows you to use TrueType fonts to render text in SDL applications. %package devel Summary: Libraries, includes and more to develop SDL applications Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel -This library allows you to use TrueType fonts to render text in SDL -applications. +This library allows you to use TrueType fonts to render text in SDL applications. +This package contains libraries and header files for developing applications that use %{name}. + +%debug_package %prep %setup -q -n SDL_ttf-%{version} +%patch0 -p0 -b .bug1433 +%patch1 -p1 -b .freetype-pkgconfig + +touch AUTHORS ChangeLog NEWS +autoreconf -f -i +sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," config.sub %build -%configure \ - --prefix=%{_prefix} +%configure -%make %{_smp_mflags} +%make %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} -%makeinstall DESTDIR=%{buildroot} +%makeinstall %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %files %defattr(-,root,root) -%{_libdir}/*.so.* -%doc CHANGES COPYING README +%{_libdir}/libSDL_ttf-*.so.* +%doc COPYING %files devel %defattr(-,root,root) -%{_libdir}/*.a -%{_libdir}/*.la -%{_libdir}/*.so +%{_libdir}/libSDL_ttf.a +%{_libdir}/libSDL_ttf.la +%{_libdir}/libSDL_ttf.so %{_includedir}/SDL/*.h %{_libdir}/pkgconfig/SDL_ttf.pc +%doc CHANGES README %changelog +* Tue Feb 08 2022 Silvan Calarco 2.0.11-2mamba +- rebuilt with debug package and patches + * Mon Jan 23 2012 Automatic Build System 2.0.11-1mamba - automatic version update by autodist @@ -83,6 +104,6 @@ applications. * Thu Nov 11 2004 Davide Madrisan 2.0.6-2qilnx - rebuild and moved to devel official QiLinux repository -* Wed Sep 07 2004 Matteo Bernasconi 2.0.6-1qilnx +* Tue Sep 07 2004 Matteo Bernasconi 2.0.6-1qilnx - first build