summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD37
-rw-r--r--SDL_ttf-2.0.11-PSP.patch56
3 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2ab4d37ba92d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = psp-sdl_ttf
+ pkgdesc = A simple library to load ttfs of various formats as SDL surfaces (psp)
+ pkgver = 2.0.11
+ pkgrel = 1
+ url = http://www.libsdl.org/projects/SDL_ttf/
+ arch = any
+ license = custom
+ makedepends = psp-gcc
+ makedepends = psp-pkg-config
+ depends = psp-sdk
+ depends = psp-sdl
+ depends = psp-freetype2
+ options = staticlibs
+ options = !buildflags
+ options = !strip
+ source = http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz
+ source = SDL_ttf-2.0.11-PSP.patch
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = psp-sdl_ttf
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9e6733d65248
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+
+pkgname=psp-sdl_ttf
+pkgver=2.0.11
+pkgrel=1
+pkgdesc="A simple library to load ttfs of various formats as SDL surfaces (psp)"
+arch=('any')
+url="http://www.libsdl.org/projects/SDL_ttf/"
+license=('custom')
+depends=('psp-sdk' 'psp-sdl' 'psp-freetype2')
+makedepends=('psp-gcc' 'psp-pkg-config')
+options=('staticlibs' '!buildflags' '!strip')
+source=("http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-${pkgver}.tar.gz"
+ "SDL_ttf-${pkgver}-PSP.patch")
+md5sums=('SKIP'
+ 'SKIP')
+
+prepare() {
+ cd "$srcdir/SDL_ttf-$pkgver"
+ rm -f README.PSP
+ patch -Np1 -i ../SDL_ttf-${pkgver}-PSP.patch
+}
+
+build() {
+ cd "$srcdir/SDL_ttf-$pkgver"
+ sh autogen.sh
+ export LDFLAGS="-L$(psp-config --pspsdk-path)/lib -L$(psp-config --psp-prefix)/lib -lc -lpspuser"
+ export LIBS="-lc -lpspuser"
+ mkdir -p build-psp && pushd build-psp
+ ../configure --prefix=/usr/psp --host=psp \
+ --with-sdl-prefix=$(psp-config --psp-prefix) --with-freetype-prefix=$(psp-config --psp-prefix) --without-x
+ make
+}
+
+package() {
+ cd "$srcdir/SDL_ttf-$pkgver/build-psp"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/SDL_ttf-2.0.11-PSP.patch b/SDL_ttf-2.0.11-PSP.patch
new file mode 100644
index 000000000000..d888f775de58
--- /dev/null
+++ b/SDL_ttf-2.0.11-PSP.patch
@@ -0,0 +1,56 @@
+diff -burN SDL_ttf-2.0.10/config.sub SDL_ttf/config.sub
+--- SDL_ttf-2.0.10/config.sub 2009-10-13 01:06:38.000000000 +0200
++++ SDL_ttf/config.sub 2012-01-15 23:22:35.440349052 +0100
+@@ -942,6 +942,10 @@
+ ps2)
+ basic_machine=i386-ibm
+ ;;
++ psp)
++ basic_machine=mipsallegrexel-psp
++ os=-elf
++ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+diff -burN SDL_ttf-2.0.10/configure.in SDL_ttf/configure.in
+--- SDL_ttf-2.0.10/configure.in 2009-10-13 01:06:38.000000000 +0200
++++ SDL_ttf/configure.in 2012-01-15 23:22:35.440349052 +0100
+@@ -87,6 +87,9 @@
+ use_version_rc=true
+ fi
+ ;;
++ *-psp-*)
++ CFLAGS="$CFLAGS -G0"
++ ;;
+ esac
+ AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
+
+@@ -154,6 +157,10 @@
+ fi
+ SYS_GL_LIBS=""
+ ;;
++ *-psp-*)
++ MATHLIB="-lm"
++ SYS_GL_LIBS="-lGL -lpsprtc"
++ ;;
+ *)
+ MATHLIB="-lm"
+ AC_PATH_X
+diff -burN SDL_ttf-2.0.10/README.PSP SDL_ttf/README.PSP
+--- SDL_ttf-2.0.10/README.PSP 1970-01-01 01:00:00.000000000 +0100
++++ SDL_ttf/README.PSP 2012-01-15 23:22:35.441349036 +0100
+@@ -0,0 +1,14 @@
++Requirements:
++
++ freetype
++ SDL
++
++To build and install:
++
++ ./autogen.sh
++ LDFLAGS="-L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lpspuser" \
++ ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) \
++ --with-freetype-prefix=$(psp-config --psp-prefix) \
++ --without-x --prefix=$(psp-config --psp-prefix)
++ make
++ make install