summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudia Pellegrino2022-09-25 15:20:21 +0200
committerClaudia Pellegrino2022-09-25 17:46:04 +0200
commit8e7bcadad8835887fedf078eed05d9ffbf801c96 (patch)
tree6e9977279722d1afa6f09d343fb3cf47fc780a89
parenta5cdda1e2e2e0b105f426c284fc95237c73d0a1f (diff)
downloadaur-8e7bcadad8835887fedf078eed05d9ffbf801c96.tar.gz
Fix pkgver, C-, LDFLAGS, add `conflicts`
- Upstream revision ac9374c [1] has changed the location of the base version number. Fix base version calculation in this PKGBUILD in order to accommodate that upstream change. - Fix namcap warning `W: ELF file (…) lacks FULL RELRO, check LDFLAGS.` Re-use the LDFLAGS trick that the original PKGBUILD author has used to work around a pecularity in the upstream Makefile: the Makefile defines its own CFLAGS and LDFLAGS from scratch, not leaving room for us to override a few crucial pieces that makepkg is providing. To work around that limitation, the original PKGBUILD author injects makepkg’s CFLAGS into the CC variable (at least for the `utils` part). To fix the namcap warnings, add LDFLAGS to this workaround. Also use the same trick for the main executable, which fixes a similar namcap warning there. - Use the same CFLAGS trick to fix yet another issue in this PKGBUILD, which the upstream commit [1] has uncovered, where the main executable wouldn’t compile due to the Makefile-provided VERSION_STR missing. Applying the CFLAGS trick from `utils` to the main executable solves that issue, too. - Upstream has cut a tagged release for the first time [2]. Therefore, preemptively add `conflicts` and `provides` directives to this PKGBUILD. That accommodates the upcoming (non-VCS) `vspcplay` AUR package. [1]: https://github.com/raphnet/vspcplay/commit/ac9374c3589104570987b9302b57b89bb8386fd6 [2]: https://github.com/raphnet/vspcplay/releases/tag/v1.4
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
2 files changed, 11 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6a60e38a8342..702be386cb33 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = vspcplay-git
pkgdesc = A terminal-based visual SNES sound file (SPC) player and optimisation tool
- pkgver = 1.3.r52.414c9ab
+ pkgver = 1.4.r73.8de179a
pkgrel = 1
url = http://vspcplay.raphnet.net/
arch = i686
@@ -8,6 +8,8 @@ pkgbase = vspcplay-git
license = GPL2
makedepends = git
depends = sdl
+ provides = vspcplay
+ conflicts = vspcplay
source = git+https://github.com/raphnet/vspcplay
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 8f5bbab2bb9b..f67e0d91d23c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgbase=vspcplay
pkgname=vspcplay-git
-pkgver=1.3.r52.414c9ab
+pkgver=1.4.r73.8de179a
pkgrel=1
pkgdesc="A terminal-based visual SNES sound file (SPC) player and optimisation tool"
arch=('i686' 'x86_64')
@@ -12,16 +12,17 @@ url="http://vspcplay.raphnet.net/"
license=('GPL2')
depends=('sdl')
makedepends=('git')
+conflicts=('vspcplay')
+provides=('vspcplay')
source=(git+https://github.com/raphnet/vspcplay)
md5sums=('SKIP')
pkgver() {
printf "%s.r%s.%s" \
"$(
- # Parse the base version from `main.c`
- sed -n \
- -e 's/#define PROG_NAME_VERSION_STRING ".* v\(.*\)"/\1/p' \
- "${_pkgbase}/main.c"
+ # Parse base version from the Makefile
+ sed -n -e 's/.*-DVERSION_STR=\\"\([^"]*\)\\".*/\1/p' \
+ "${_pkgbase}/Makefile"
)" \
"$(git -C "${_pkgbase}" rev-list --count HEAD)" \
"$(git -C "${_pkgbase}" rev-parse --short HEAD)"
@@ -29,9 +30,9 @@ pkgver() {
build() {
cd "${srcdir}/${_pkgbase}"
- make CFLAGS="${CFLAGS} $(sdl-config --cflags)"
+ make CC="gcc ${CFLAGS}" LD="\$(CPP) ${LDFLAGS}"
cd utils
- make CC="gcc ${CFLAGS}"
+ make CC="gcc ${CFLAGS} ${LDFLAGS}"
}
package() {