-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from pspdev/add-tinygettext
Add tinygettext
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
pkgname=tinygettext | ||
pkgver=20240715 | ||
pkgrel=1 | ||
pkgdesc="a simple gettext replacement that works directly on .po files" | ||
arch=('mips') | ||
license=('zlib') | ||
groups=('pspdev-default') | ||
url="https://github.com/tinygettext/tinygettext" | ||
depends=('sdl2') | ||
optdepends=() | ||
makedepends=() | ||
source=("git+https://github.com/tinygettext/tinygettext.git#commit=2e25c91ddb6c180928a6a29d7091f0bdfe5a81bd") | ||
sha256sums=('SKIP') | ||
|
||
prepare() { | ||
cd $pkgname | ||
git submodule update --init --recursive | ||
sed -i 's#@CMAKE_INSTALL_PREFIX@#${PSPDEV}/psp#g' tinygettext.pc.in | ||
sed -i 's#@LIB_SUBDIR@#lib#g' tinygettext.pc.in | ||
} | ||
|
||
build() { | ||
cd $pkgname | ||
mkdir -p build | ||
cd build | ||
cmake -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/psp -DBUILD_SHARED_LIBS=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DTINYGETTEXT_WITH_SDL=ON -DCMAKE_INSTALL_LIBDIR=${pkgdir}/psp/lib "${XTRA_OPTS[@]}" .. || { exit 1; } | ||
make --quiet $MAKEFLAGS || { exit 1; } | ||
} | ||
|
||
package () { | ||
cd "$pkgname/build" | ||
make --quiet $MAKEFLAGS install | ||
cd .. | ||
|
||
mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname" | ||
install -m 644 LICENSE.md "$pkgdir/psp/share/licenses/$pkgname" | ||
} |