summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO40
-rw-r--r--PKGBUILD121
-rw-r--r--lix-git.desktop8
3 files changed, 48 insertions, 121 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 966779b2dcb2..8765535b4bd1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,48 +1,24 @@
pkgbase = lix-git
pkgdesc = An action-puzzle game inspired by Lemmings
- pkgver = 0.9.31.r1587672355.8757be6b
- pkgrel = 2
- url = http://www.lixgame.com/
+ pkgver = 0.10.21.r1712198474.629c7121
+ pkgrel = 1
+ url = https://www.lixgame.com/
arch = i686
arch = x86_64
license = custom:CC0
makedepends = git
- makedepends = ldc
+ makedepends = d-compiler
makedepends = dub
+ makedepends = jq
depends = allegro
depends = enet
depends = hicolor-icon-theme
- depends = liblphobos
+ depends = d-runtime
provides = lix
conflicts = lix
source = lix-git::git+https://github.com/SimonN/lix-unstable.git
- source = lix-git-music-1.zip::http://www.lixgame.com/dow/lix-music.zip
- source = lix-git.desktop
- source = lix-git-allegro::git+https://github.com/SiegeLord/DAllegro5.git#tag=v4.0.4+5.2.0
- source = lix-git-bolts::git+https://github.com/aliak00/bolts.git#tag=v0.7.1
- source = lix-git-derelict-enet::git+https://github.com/DerelictOrg/DerelictENet.git#tag=v4.2.0
- source = lix-git-derelict-util::git+https://github.com/DerelictOrg/DerelictUtil.git#tag=v3.0.0-beta.2
- source = lix-git-enumap::git+https://github.com/rcorre/enumap.git#tag=v0.4.2
- source = lix-git-libinputvisitor::git+https://github.com/Abscissa/libInputVisitor.git#tag=v1.2.2
- source = lix-git-optional::git+https://github.com/aliak00/optional.git#tag=v0.6.3
- source = lix-git-sdlang-d::git+https://github.com/Abscissa/SDLang-D.git#tag=v0.10.6
- source = lix-git-silly::git+https://gitlab.com/AntonMeep/silly.git#tag=v1.0.2
- source = lix-git-taggedalgebraic::git+https://github.com/s-ludwig/taggedalgebraic.git#tag=v0.11.18
- source = lix-git-unit-threaded::git+https://github.com/atilaneves/unit-threaded.git#tag=v0.7.55
- sha512sums = SKIP
- sha512sums = 37349c98b739ea43c25137dd03865f1c9c41eec91e5edc109afd9d50ce3871bd0c7f63c3f3599a47bb4ef52f5bfd14e034010de0ac2aec5a9c0c83eaf0b89425
- sha512sums = 375b1439d9398371a3f58a92bfc0901b86bd89140aae431c7d9405bd2fb36ebcdb22b2686fea72d88b23a4ab94b138b4d742d8fd2965d8ec0542d2f8f64ed0c2
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = SKIP
+ source = lix-git-music-1.1.zip::https://www.lixgame.com/dow/lix-music.zip
sha512sums = SKIP
+ sha512sums = 280fd25a479ac8dd24475b014234270a12ab34edca7fb2f7ce4b768259111b1e7626d3ba37ac13d810f0653d23d7c9f212776e94d2c0b31a0de580864771ce9f
pkgname = lix-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 3c97282b48b1..d9bc333d74df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,72 +1,28 @@
# Maintainer: Lucki <https://aur.archlinux.org/account/Lucki>
# Contributor: Carl Reinke <mindless2112 gmail com>
-# shellcheck disable=SC2034,2154,2148
+# shellcheck shell=bash
+# shellcheck disable=SC2034,SC2154
pkgname=lix-git
_pkgname=${pkgname%-git}
-pkgver=0.9.31.r1587672355.8757be6b
-pkgrel=2
+pkgver=0.10.21.r1712198474.629c7121
+pkgrel=1
provides=("$_pkgname")
conflicts=("$_pkgname")
-source=("$pkgname::git+https://github.com/SimonN/lix-unstable.git")
-sha512sums=('SKIP')
+source=("$pkgname::git+https://github.com/SimonN/lix-unstable.git"
+ "$pkgname-music-1.1.zip::https://www.lixgame.com/dow/lix-music.zip")
+sha512sums=('SKIP'
+ '280fd25a479ac8dd24475b014234270a12ab34edca7fb2f7ce4b768259111b1e7626d3ba37ac13d810f0653d23d7c9f212776e94d2c0b31a0de580864771ce9f')
pkgdesc="An action-puzzle game inspired by Lemmings"
arch=('i686' 'x86_64')
-url="http://www.lixgame.com/"
+url="https://www.lixgame.com/"
license=('custom:CC0')
-depends=('allegro' 'enet' 'hicolor-icon-theme' 'liblphobos')
-makedepends=('git' 'ldc' 'dub')
-_dubv=( "4.0.4+5.2.0" # allegro
- "0.7.1" # bolts
- "4.2.0" # derelict-enet
- "3.0.0-beta.2" # derelict-util
- "0.4.2" # enumap
- "1.2.2" # libinputvisitor
- "0.6.3" # optional
- "0.10.6" # sdlang-d
- "1.0.2" # silly
- "0.11.18" # taggedalgebraic
- "0.7.55" # unit-threaded
- )
-
-# let makepkg handle dub packages
-# These have to be git clones, otherwise dub isn't able to pick them up with the correct version later on
-# no git, no version field, assumed ~master
-# https://dub.pm/commandline.html#add-path
-source+=( "$pkgname-music-1.zip::http://www.lixgame.com/dow/lix-music.zip"
- "$pkgname.desktop"
- )
-sha512sums+=( '37349c98b739ea43c25137dd03865f1c9c41eec91e5edc109afd9d50ce3871bd0c7f63c3f3599a47bb4ef52f5bfd14e034010de0ac2aec5a9c0c83eaf0b89425'
- '375b1439d9398371a3f58a92bfc0901b86bd89140aae431c7d9405bd2fb36ebcdb22b2686fea72d88b23a4ab94b138b4d742d8fd2965d8ec0542d2f8f64ed0c2'
- )
-source+=( "$pkgname-allegro::git+https://github.com/SiegeLord/DAllegro5.git#tag=v${_dubv[0]}"
- "$pkgname-bolts::git+https://github.com/aliak00/bolts.git#tag=v${_dubv[1]}"
- "$pkgname-derelict-enet::git+https://github.com/DerelictOrg/DerelictENet.git#tag=v${_dubv[2]}"
- "$pkgname-derelict-util::git+https://github.com/DerelictOrg/DerelictUtil.git#tag=v${_dubv[3]}"
- "$pkgname-enumap::git+https://github.com/rcorre/enumap.git#tag=v${_dubv[4]}"
- "$pkgname-libinputvisitor::git+https://github.com/Abscissa/libInputVisitor.git#tag=v${_dubv[5]}"
- "$pkgname-optional::git+https://github.com/aliak00/optional.git#tag=v${_dubv[6]}"
- "$pkgname-sdlang-d::git+https://github.com/Abscissa/SDLang-D.git#tag=v${_dubv[7]}"
- "$pkgname-silly::git+https://gitlab.com/AntonMeep/silly.git#tag=v${_dubv[8]}"
- "$pkgname-taggedalgebraic::git+https://github.com/s-ludwig/taggedalgebraic.git#tag=v${_dubv[9]}"
- "$pkgname-unit-threaded::git+https://github.com/atilaneves/unit-threaded.git#tag=v${_dubv[10]}"
- )
-sha512sums+=( 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- )
+depends=('allegro' 'enet' 'hicolor-icon-theme' 'd-runtime')
+makedepends=('git' 'd-compiler' 'dub' 'jq')
pkgver() {
# https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git
- cd "$pkgname" || exit
+ cd "$pkgname" || exit 1
(
set -o pipefail
@@ -78,60 +34,63 @@ pkgver() {
)
}
+prepare() {
+ cd "$pkgname" || exit 1
+
+ # Iterate thorugh the required packages and versions to fetch them in advance
+ # Read from dub.selections.json and print them as "package,version"
+ for line in $(jq -r '.versions | keys[] as $k | "\($k),\(.[$k])"' <dub.selections.json); do
+
+ # Split each dependency at the ','
+ IFS=',' read -ra dep <<< "$line"
+
+ # Fetch each package at the required version
+ dub fetch --cache=local "${dep[0]}@${dep[1]}"
+ done
+}
+
_build() {
_r=0
- # add local dependencies to search path
- dub add-path "$srcdir"
+ # 2022.02.26
+ # 15:22 <@SimonN> It's possible that it's already enough to raise the stack size in the current shell: ulimit -s 16384
+ # 15:22 <@SimonN> See also: https://github.com/ldc-developers/ldc/issues/3913
+ # 15:26 <@SimonN> Yes, very high chance that the following will fix/workaround: Execute "ulimit -s 16384" in the same shell that will then run dub. I.e., we double the stack size, assuming "ulimit -s" printed 8192 before; it does that for me in new shells.
+ ulimit -s 16384
dub "$@" \
+ `# Do not resolve missing dependencies before building` \
+ --nodeps \
`# ensure dub stays outside the users home directory:` \
--cache=local \
`# Runs multiple compiler instances in parallel, if possible:` \
--parallel \
`# Forces a recompilation even if the target is up to date:` \
--force \
- `# Specifies the compiler binary to use:` \
- --compiler=ldc \
`# force FHS compatibility:` \
- --build=releaseXDG \
- `# Save result code for later when failed:` \
- || _r="$?"
-
- # remove local dependencies from search path so dub won't find them
- # later again
- dub remove-path "$srcdir"
-
- # removes any cached metadata like the list of available packages
- # and their latest version
- dub clean-caches
-
- if [[ "$_r" != 0 ]]; then
- # dub failed so we also fail after we removed the local dependencies
- return "$_r"
- fi
+ --build=releaseXDG
}
build() {
- cd "$pkgname" || exit
+ cd "$pkgname" || exit 1
_build build
}
check() {
- cd "$pkgname" || exit
+ cd "$pkgname" || exit 1
_build test
}
package() {
+ cd "$pkgname" || exit 1
+
# install application entry
install -Dm644 \
`# SRCFILE:` \
- "$pkgname.desktop" \
+ "data/desktop/com.lixgame.Lix.desktop" \
`# DSTFILE:` \
"$pkgdir/usr/share/applications/$_pkgname.desktop"
- cd "$pkgname" || exit
-
# install application entry icon
install -Dm644 \
`# SRCFILE:` \
diff --git a/lix-git.desktop b/lix-git.desktop
deleted file mode 100644
index 748937dbf72d..000000000000
--- a/lix-git.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Lix
-Comment=An action-puzzle game inspired by Lemmings
-Exec=lix
-Icon=lix
-Categories=Game;ActionGame;
-Keywords=game;lemmings;