![](https://secure.gravatar.com/avatar/df8330968b6df8cd1c1942c5fb4b720c.jpg?s=120&d=mm&r=g)
commit 51f2ccbc7330229c8cd94b7fa5f30da498d5e4e6 Author: Danny Rawlins <monster.romster@gmail.com> Date: Sat Apr 13 18:32:05 2019 +1000 sdl_ttf: bug fixes diff --git a/sdl_ttf/.signature b/sdl_ttf/.signature index 1aeb9198..cfd1a814 100644 --- a/sdl_ttf/.signature +++ b/sdl_ttf/.signature @@ -1,5 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF35ZMPrk6lAHTWPgYOpiHd0eyNdrzlJ+H3Q0MCUgy1azkShMSyWwjuU6oRpuF6qZhjfqv319/hJM6tJhWsrQhow0= -SHA256 (Pkgfile) = f0d74da071ad9acc2046ed5d0d9c2d1ef81ca8d2e277e301c03707190f6cbdc9 +RWSagIOpLGJF3wMqgmpyDXwlGyPhyvwrmPk2OI86dHHRGph+X2+whDeQ0ziGycEkXcF7dR7ifLvloQiPeviUQ/nc16eFqQO+Lwg= +SHA256 (Pkgfile) = 7670b947de6ffed51a2aee18014edd70840c90cf45d7ac9dfd55bf1a5c37626e SHA256 (.footprint) = 2b4e678b2ec669dfd9c984c938bb395b191ff84f71b12239239087ab514f50d2 SHA256 (SDL_ttf-2.0.11.tar.gz) = 724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7 +SHA256 (freetype-pkgconfig.patch) = 87412f614b97b4724cb4845db882f07c15caf098dee57a856d6dbae0f58de80d +SHA256 (bug1433.patch) = 4baea703454b9bca9498a920485552f1b8489a5007f8f1366080b14a4cd74c90 diff --git a/sdl_ttf/Pkgfile b/sdl_ttf/Pkgfile index 2e4b770d..47367dbf 100644 --- a/sdl_ttf/Pkgfile +++ b/sdl_ttf/Pkgfile @@ -1,21 +1,25 @@ # Description: TrueType library for libsdl. -# URL: http://www.libsdl.org/projects/SDL_ttf/ +# URL: https://www.libsdl.org/projects/SDL_ttf/ # Maintainer: Danny Rawlins, crux at romster dot me -# Packager: Simone Rota, sip at crux dot nu # Depends on: freetype libsdl name=sdl_ttf version=2.0.11 -release=1 -source=(http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$version.tar.gz) +release=2 +source=(https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$version.tar.gz + freetype-pkgconfig.patch + bug1433.patch) build() { cd SDL_ttf-$version - ./configure \ - --prefix=/usr \ - --disable-dependency-tracking + patch -i $SRC/bug1433.patch + patch -p1 -i $SRC/freetype-pkgconfig.patch + touch NEWS README AUTHORS ChangeLog + autoreconf -vi + + ./configure --prefix=/usr make make DESTDIR=$PKG install } diff --git a/sdl_ttf/bug1433.patch b/sdl_ttf/bug1433.patch new file mode 100644 index 00000000..b402fb3e --- /dev/null +++ b/sdl_ttf/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/sdl_ttf/freetype-pkgconfig.patch b/sdl_ttf/freetype-pkgconfig.patch new file mode 100644 index 00000000..02b06356 --- /dev/null +++ b/sdl_ttf/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