Skip to content

Commit

Permalink
Dynamic version resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Jul 23, 2024
1 parent 889f04b commit cbb8ab6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
chown -R 1000:1000 northfear-sdl2
cd northfear-sdl2
sudo --preserve-env=VITASDK -u \#1000 vita-makepkg
vdpm sdl2-2.30.2-1-arm.tar.xz
vdpm sdl2-*-arm.tar.xz
- name: Build
run: |
cargo vita build vpk --release --package vita-std-tests --tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
chown -R 1000:1000 northfear-sdl2
cd northfear-sdl2
sudo --preserve-env=VITASDK -u \#1000 vita-makepkg
vdpm sdl2-2.30.2-1-arm.tar.xz
vdpm sdl2-*-arm.tar.xz
- name: Build
run: |
cargo vita build vpk --release --package vita-std-tests --tests
Expand Down
4 changes: 4 additions & 0 deletions northfear-sdl2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src
pkg
*gz
*xz
14 changes: 11 additions & 3 deletions northfear-sdl2/VITABUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname=sdl2
pkgver=2.30.2
pkgver=2.24.0
pkgrel=1
gitrev=0867aceb28a493b489f54a3407a3b820b092206a
url='https://www.libsdl.org'
Expand All @@ -10,14 +10,22 @@ sha256sums=(
SKIP
)

pkgver() {
cd "SDL-${gitrev}"
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
echo "${ref_major}.${ref_minor}.${ref_micro}"
}

prepare() {
cd "SDL-${gitrev}"
}

build() {
cd "SDL-${gitrev}"
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE=Release -DSDL_TEST=OFF -DVIDEO_VITA_VGL=ON
rm -rf build; mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE=Release -DSDL_TEST=OFF -DVIDEO_VITA_VGL=ON
make -j$(nproc)
}

Expand Down

0 comments on commit cbb8ab6

Please sign in to comment.