new package: sdl2-ttf

Requested in https://github.com/termux/x11-packages/issues/22.

Note that package requires libGL.so from Mesa, so at least xlib glx should be enabled.
This commit is contained in:
Leonid Pliushch 2018-11-12 23:07:37 +02:00 committed by Yaksh Bariya
parent 0128f1002d
commit bf827da4a4
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 61 additions and 2 deletions

View File

@ -4,7 +4,7 @@ TERMUX_PKG_HOMEPAGE=https://www.mesa3d.org
TERMUX_PKG_DESCRIPTION="An open-source implementation of the OpenGL specification"
## Use 17.3.x branch because 18.x.x requires 'pthread_barrier_t'.
TERMUX_PKG_VERSION=17.3.9
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=https://mesa.freedesktop.org/archive/mesa-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=c5beb5fc05f0e0c294fefe1a393ee118cb67e27a4dca417d77c297f7d4b6e479
@ -22,7 +22,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-gles2
--disable-dri
--disable-dri3
--disable-glx
--enable-glx=xlib
--with-platforms=x11
--without-dri-drivers
--without-gallium-drivers

View File

@ -0,0 +1,13 @@
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_HOMEPAGE=http://www.libsdl.org/projects/SDL_ttf
TERMUX_PKG_DESCRIPTION="A library that allows you to use TrueType fonts in your SDL applications (version 2)"
TERMUX_PKG_VERSION=2.0.14
TERMUX_PKG_SRCURL=https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=34db5e20bcf64e7071fe9ae25acaa7d72bdc4f11ab3ce59acc768ab62fe39276
TERMUX_PKG_DEPENDS="freetype, libandroid-support, sdl2"
termux_step_pre_configure() {
touch NEWS README AUTHORS ChangeLog
autoreconf -vi
}

View File

@ -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