diff options
author | Heine Pedersen | 2019-10-06 12:30:51 +0200 |
---|---|---|
committer | Heine Pedersen | 2019-10-06 12:30:51 +0200 |
commit | e97c745a45242a1ffbcc42f517e3d0f82dbfe472 (patch) | |
tree | 9911c902582b6a8970412ccd829f0b7906ecd353 | |
download | aur-e97c745a45242a1ffbcc42f517e3d0f82dbfe472.tar.gz |
First version of package
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | add_filename_macro.patch | 14 | ||||
-rw-r--r-- | fix_build_with_sdl2_2.0.10.patch | 16 | ||||
-rw-r--r-- | julius-game.desktop | 9 | ||||
-rw-r--r-- | julius-game.install | 4 |
6 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cb19d1693e3b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = julius-game + pkgdesc = Open source re-implementation of Caesar III (Original copy required) + pkgver = 1.1.0 + pkgrel = 1 + url = https://github.com/bvschaik/julius + install = julius-game.install + arch = i686 + arch = x86_64 + license = Affero GPL + depends = sdl2 + depends = sdl2_mixer + source = julius-game.desktop + source = julius-game.install + source = fix_build_with_sdl2_2.0.10.patch + source = add_filename_macro.patch + source = https://github.com/bvschaik/julius/archive/v1.1.0.zip + sha256sums = d44482503d890ab62e64f607c67b5c9686de68e17411920d3c02d54d468ac2a2 + sha256sums = 903b97f1a07bf4fa8495166c00e45fd1c2ec5fba4d25169cf5f810e51781ac40 + sha256sums = 5b3efd9802b9b630fd9fbaf84da2f6708ef22e841600b0078e04bacc37de32e0 + sha256sums = 86d1468c89d8c6624224207fb3b864d54ce82889302766934859d2eb6c8c99b8 + sha256sums = dfb66d15713592c02f3564e8359f55117b2b4365181f62d877cd26c50f092ed3 + +pkgname = julius-game + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8490245c5045 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +#Maintainer: NiNjA <heinep at gmail dot com> + +_pkgname=julius +pkgname=$_pkgname-game +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Open source re-implementation of Caesar III (Original copy required)" +arch=('i686' 'x86_64') +url="https://github.com/bvschaik/julius" +license=('Affero GPL') +depends=('sdl2' 'sdl2_mixer') +install="$pkgname.install" +source=($pkgname.desktop $pkgname.install fix_build_with_sdl2_2.0.10.patch add_filename_macro.patch $url/archive/v$pkgver.zip) +sha256sums=('d44482503d890ab62e64f607c67b5c9686de68e17411920d3c02d54d468ac2a2' + '903b97f1a07bf4fa8495166c00e45fd1c2ec5fba4d25169cf5f810e51781ac40' + '5b3efd9802b9b630fd9fbaf84da2f6708ef22e841600b0078e04bacc37de32e0' + '86d1468c89d8c6624224207fb3b864d54ce82889302766934859d2eb6c8c99b8' + 'dfb66d15713592c02f3564e8359f55117b2b4365181f62d877cd26c50f092ed3') + +package() { + cd "$srcdir/$_pkgname-$pkgver" + patch -p1 < ../fix_build_with_sdl2_2.0.10.patch + patch -p0 < ../add_filename_macro.patch + sed -i 's#__FILE__#__FILENAME__#g' ext/libsmacker/* # replace full path in symbol table with base name + mkdir build && cd build + cmake .. + make + + mkdir -p "$pkgdir"/usr/{bin,share/applications,share/pixmaps} + cp julius "$pkgdir/usr/bin/julius-game" + install -Dm664 "$srcdir/$_pkgname-$pkgver/res/julius_48.png" "$pkgdir/usr/share/pixmaps/julius-game48.png" + install -Dm664 "$srcdir/$_pkgname-$pkgver/res/julius_256.png" "$pkgdir/usr/share/pixmaps/julius-game256.png" + install -Dm664 "$srcdir/$_pkgname-$pkgver/res/julius_512.png" "$pkgdir/usr/share/pixmaps/julius-game512.png" + install -Dm664 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications" + + return 0 +} diff --git a/add_filename_macro.patch b/add_filename_macro.patch new file mode 100644 index 000000000000..037bd565adc3 --- /dev/null +++ b/add_filename_macro.patch @@ -0,0 +1,14 @@ +--- CMakeLists.txt.orig 2019-10-06 12:18:03.648902685 +0200 ++++ CMakeLists.txt 2019-10-06 12:18:25.002441273 +0200 +@@ -1,6 +1,11 @@ + cmake_minimum_required(VERSION 3.0.2) + include(CMakeDependentOption) + ++cmake_policy(PUSH) ++cmake_policy(SET CMP0005 OLD) ++add_definitions(-D__FILENAME__=\\"$\(<F\)\\") ++cmake_policy(POP) ++ + if(VITA_BUILD AND SWITCH_BUILD) + message(FATAL_ERROR "Cannot build with -DVITA_BUILD=ON and -DSWITCH_BUILD=ON at the same time") + endif() diff --git a/fix_build_with_sdl2_2.0.10.patch b/fix_build_with_sdl2_2.0.10.patch new file mode 100644 index 000000000000..1f859e74d1ec --- /dev/null +++ b/fix_build_with_sdl2_2.0.10.patch @@ -0,0 +1,16 @@ +diff --git a/src/platform/julius.c b/src/platform/julius.c +index 99d8a66a..03669d3d 100644 +--- a/src/platform/julius.c ++++ b/src/platform/julius.c +@@ -368,7 +368,10 @@ static int init_sdl(void) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not initialize SDL: %s", SDL_GetError()); + return 0; + } +-#if SDL_VERSION_ATLEAST(2, 0, 4) ++#if SDL_VERSION_ATLEAST(2, 0, 10) ++ SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0"); ++ SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0"); ++#elif SDL_VERSION_ATLEAST(2, 0, 4) + SDL_SetHint(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "1"); + #endif + SDL_Log("SDL initialized"); diff --git a/julius-game.desktop b/julius-game.desktop new file mode 100644 index 000000000000..3beaf8d8c272 --- /dev/null +++ b/julius-game.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Exec=julius-game +Icon=julius-game256 +Type=Application +Categories=Game;StrategyGame; +Name=Julius (Caesar III) +StartupNotify=false +Terminal=false diff --git a/julius-game.install b/julius-game.install new file mode 100644 index 000000000000..17c53671d83a --- /dev/null +++ b/julius-game.install @@ -0,0 +1,4 @@ +post_install() { + echo ">> julius-game requires a copy of the original Caesar III. The binary will ask for game directory on first start." +} + |