Skip to content

Commit

Permalink
Upgrade to new SDL2_ttf version
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Jan 14, 2022
1 parent 009e797 commit f3c4a29
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions sdl2-ttf/PSPBUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname=sdl2-ttf
pkgver=2.0.15
pkgver=2.0.18
pkgrel=1
pkgdesc="a companion library to SDL2 for working with TrueType (tm) fonts"
arch=('mips')
Expand All @@ -8,25 +8,28 @@ license=('MIT')
depends=('sdl2' 'freetype2')
makedepends=()
optdepends=()
source=("https://github.com/pspdev/SDL_ttf/archive/${pkgver}-psp.tar.gz")
sha256sums=('540b2aaea1df6204526fd6df4a9e1e524360b6d36e2bebea79a6ad7cd180a621')
source=("https://github.com/libsdl-org/SDL_ttf/archive/refs/tags/release-${pkgver}.tar.gz")
sha256sums=('6b61544441b72bdfa1ced89034c6396fe80228eff201eb72c5f78e500bb80bd0')

prepare() {
cd "SDL_ttf-release-$pkgver"
sed -i '/POSITION_INDEPENDENT_CODE ON/d' CMakeLists.txt
}

build() {
cd "SDL_ttf-$pkgver-psp"
./autogen.sh
LDFLAGS="-L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lpspuser" \
SDL_CFLAGS="-I$(psp-config --psp-prefix)/include/SDL2" SDL_LIBS="-lSDL2" \
./configure --host psp --prefix=/psp --without-x
make
cd "SDL_ttf-release-$pkgver"
mkdir -p build
cd build
cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/psp -DBUILD_SHARED_LIBS=OFF \
"${XTRA_OPTS[@]}" .. || { exit 1; }
make --quiet $MAKEFLAGS || { exit 1; }
}

package() {
cd "SDL_ttf-$pkgver-psp"
make DESTDIR="$pkgdir/" install

rm "${pkgdir}/psp/lib/libSDL2_ttf.la"
cd "SDL_ttf-release-$pkgver/build"
make --quiet $MAKEFLAGS install

mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname"
install -m644 COPYING.txt "$pkgdir/psp/share/licenses/$pkgname"
mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname"
install -m644 ../COPYING.txt "$pkgdir/psp/share/licenses/$pkgname"
}

3 comments on commit f3c4a29

@sharkwouter
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjtrujy could you revert this commit? It's causing some issues

@fjtrujy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjtrujy could you revert this commit? It's causing some issues

Is the SDL2_ttf wrong? or is the changes that are wrong?

@sharkwouter
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some functions which do not work when using SDL2_ttf version 2.0.18, which do work with version 2.0.15. I'd say it's best we roll back for now. See this issue: #45

Please sign in to comment.