Skip to content

Commit

Permalink
SDL_ttf: New package.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux committed Feb 4, 2015
1 parent c4bc5a3 commit 9fef6ac
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
36 changes: 36 additions & 0 deletions mingw-w64-SDL_ttf/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Maintainer: Alexey Pavlov <[email protected]>

_realname=SDL_ttf
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.0.11
pkgrel=1
pkgdesc="A library that allows you to use TrueType fonts in your SDL applications (mingw-w64)"
arch=('any')
url="http://www.libsdl.org/projects/SDL_ttf/"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-SDL" "${MINGW_PACKAGE_PREFIX}-freetype")
options=('staticlibs' 'strip')
source=(http://www.libsdl.org/projects/SDL_ttf/release/${_realname}-$pkgver.tar.gz
bug1433.patch)
md5sums=('61e29bd9da8d245bc2471d1b2ce591aa'
'52d4ce6ec81588cba9fb9f3ff57a4e92')

build() {
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
"${srcdir}"/${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-shared \
--enable-static

make
}

package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="$pkgdir" install
install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
11 changes: 11 additions & 0 deletions mingw-w64-SDL_ttf/bug1433.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/SDL_ttf.c 2012-02-12 16:36:41.859977617 +0100
+++ b/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;

0 comments on commit 9fef6ac

Please sign in to comment.