diff options
author | Claudia Pellegrino | 2023-05-18 14:09:58 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2023-05-18 14:09:58 +0200 |
commit | a6d9802513675539b44c8038faa14ec8b49e8090 (patch) | |
tree | c82b1f49361e1e5d78253e2f9b156ab72eade052 | |
parent | c9bce64ede9775ba2164cc91c2e602d426c26193 (diff) | |
download | aur-a6d9802513675539b44c8038faa14ec8b49e8090.tar.gz |
Remove build-time Git error flood
The original Makefile tries to calculate a Git revision number from the
source tree. Unless the source tree happens to be a checked-out
Git worktree, that causes standard output to be flooded with lots of
unhelpful error messages and help texts.
If Git is not installed at build time, similar error messages would
occur.
Short-circuit the Git revision calculation to prevent this.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 3 | ||||
-rw-r--r-- | fix-git-rev.patch | 13 |
3 files changed, 18 insertions, 0 deletions
@@ -12,8 +12,10 @@ pkgbase = x16-emulator depends = sdl2 depends = x16-rom=r42 source = x16-emulator-r42.tar.gz::https://github.com/X16Community/x16-emulator/archive/r42.tar.gz + source = fix-git-rev.patch source = modify-base-path.patch md5sums = 3cc24b8783c2c11890dc284d9d55219e + md5sums = c0b5ba5190ef5ee4dd8e58433f261e35 md5sums = 5cd0550d2af1b4267c9b9f30eed9691e pkgname = x16-emulator @@ -13,16 +13,19 @@ makedepends=('clang' 'pandoc' 'gendesk') source=( "$pkgname-$pkgver.tar.gz::https://github.com/X16Community/$pkgname/archive/$pkgver.tar.gz" + "fix-git-rev.patch" "modify-base-path.patch" ) md5sums=( '3cc24b8783c2c11890dc284d9d55219e' + 'c0b5ba5190ef5ee4dd8e58433f261e35' '5cd0550d2af1b4267c9b9f30eed9691e' ) prepare() { cd "$pkgname-$pkgver" + patch -uN < ../fix-git-rev.patch patch -uN src/main.c ../modify-base-path.patch sed -i -e 's/^\(LDFLAGS=.*\)/\1 '"${LDFLAGS}/" Makefile gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name "X16 Emulator" --icon "$pkgname" --exec "x16emu" --categories "Game;Emulator" diff --git a/fix-git-rev.patch b/fix-git-rev.patch new file mode 100644 index 000000000000..186ce1e616ba --- /dev/null +++ b/fix-git-rev.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 6b1f4fe..ee65ed2 100644 +--- a/Makefile ++++ b/Makefile +@@ -42,7 +42,7 @@ endif + X16_OUTPUT=x16emu + MAKECART_OUTPUT=makecart + +-GIT_REV=$(shell git diff --quiet && echo -n $$(git rev-parse --short=8 HEAD || /bin/echo "00000000") || /bin/echo -n $$( /bin/echo -n $$(git rev-parse --short=7 HEAD || /bin/echo "0000000"); /bin/echo -n '+')) ++GIT_REV=0000000 + + CFLAGS+=-D GIT_REV='"$(GIT_REV)"' + |