diff options
author | Joe Baldino | 2023-04-03 22:32:16 -0700 |
---|---|---|
committer | Joe Baldino | 2023-04-03 22:42:28 -0700 |
commit | 16225bbcf8576b396df8c5f848dded21aac64555 (patch) | |
tree | fadc85234159bca64544a53c464f93403cb0834c | |
parent | 8858193802e0c7cf884282d706391ddec165fdc1 (diff) | |
download | aur-16225bbcf8576b396df8c5f848dded21aac64555.tar.gz |
PKGBUILD: fix namcap LDFLAGS warnings
Thanks to namcap, found that upstream Makefile does not honor LDFLAGS. Fixed
that. Until I get around to submitting this fix upstream, we'll carry the patch
here. Namcap also reminded me to depend upon glibc.
While there, upstream Makefile doesn't handle CFLAGS correctly, so fixed that
as well.
Typically we don't bump pkgrel for -git packages because it's unnecessary (and
therefore sloppy). But, since upstream sees so little activity, I must bump
pkgrel to ensure a smooth package upgrade.
Signed-off-by: Joe Baldino <pedanticdm@gmx.us>
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch | 44 | ||||
-rw-r--r-- | PKGBUILD | 16 |
3 files changed, 60 insertions, 5 deletions
@@ -1,17 +1,20 @@ pkgbase = 2048term-git pkgdesc = Console version of the game "2048" pkgver = 20220613.bf22f86 - pkgrel = 1 + pkgrel = 2 url = https://github.com/alewmoose/2048-in-terminal.git arch = i686 arch = x86_64 arch = armv7h license = MIT makedepends = git + depends = glibc depends = ncurses provides = 2048term conflicts = 2048term source = 2048term::git+https://github.com/alewmoose/2048-in-terminal.git + source = 0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch sha256sums = SKIP + sha256sums = 913a3c2a535fa514cfa764ed77e1cf52742bdf1810aa71a2fc34585640e1daa5 pkgname = 2048term-git diff --git a/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch b/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch new file mode 100644 index 000000000000..bd29850ce9da --- /dev/null +++ b/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch @@ -0,0 +1,44 @@ +From 1eae2af78f76a836ab4cb23f7bddd28c4432f24a Mon Sep 17 00:00:00 2001 +From: Joe Baldino <pedanticdm@gmx.us> +Date: Mon, 3 Apr 2023 22:12:19 -0700 +Subject: [PATCH] ARCHLINUX: conform Makefile to packaging standards + +LDFLAGS are not used by the upstream build system. Fix that to allow makepkg to +do its work. + +Remove "Dad's CFLAGS". Only keep essential arguments to build source code, and +leave additional optimizations, etc to the end-user. +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 2f6e160d53b1..bbf30a443c7c 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,10 +10,10 @@ OBJ=$(SRC:$(SRCDIR)/%.c=$(BUILDDIR)/%.o) + DEP=$(SRC:$(SRCDIR)/%.c=$(BUILDDIR)/%.d) + + NCURSES_LIB?=ncurses +-NCURSES_CFLAGS?=`pkg-config --cflags $(NCURSES_LIB)` +-NCURSES_LDLIBS?=`pkg-config --libs $(NCURSES_LIB)` ++NCURSES_CFLAGS?=$(shell pkg-config --cflags $(NCURSES_LIB)) ++NCURSES_LDLIBS?=$(shell pkg-config --libs $(NCURSES_LIB)) + +-CFLAGS?=-Wall -Wextra -pedantic -std=c11 -O2 -march=native -D_GNU_SOURCE $(NCURSES_CFLAGS) ++CFLAGS+= -Wall -Wextra -pedantic -std=c11 -D_GNU_SOURCE $(NCURSES_CFLAGS) + LDLIBS?=$(NCURSES_LDLIBS) + + PREFIX?=/usr/local +@@ -25,7 +25,7 @@ BINDIR?=$(PREFIX)/bin + all: $(TARGET) + + $(TARGET): $(OBJ) +- $(CC) $(CFLAGS) $^ -o $(TARGET) $(LDLIBS) ++ $(CC) $(CFLAGS) $^ -o $(TARGET) $(LDFLAGS) $(LDLIBS) + + %.o : %.c + +-- +2.40.0 + @@ -3,21 +3,29 @@ # Contributor: Aleksandr Grehov <alewmosse@gmail.com> _pkgname='2048term' +_patch='0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch' pkgname="${_pkgname}-git" pkgver=20220613.bf22f86 -pkgrel=1 +pkgrel=2 pkgdesc='Console version of the game "2048"' url='https://github.com/alewmoose/2048-in-terminal.git' arch=('i686' 'x86_64' 'armv7h') license=('MIT') -depends=('ncurses') +depends=('glibc' 'ncurses') makedepends=('git') -source=("${_pkgname}::git+https://github.com/alewmoose/2048-in-terminal.git") -sha256sums=('SKIP') +source=("${_pkgname}::git+https://github.com/alewmoose/2048-in-terminal.git" + "${_patch}") +sha256sums=('SKIP' + '913a3c2a535fa514cfa764ed77e1cf52742bdf1810aa71a2fc34585640e1daa5') provides=("${_pkgname}") conflicts=("${_pkgname}") +prepare() { + cd "${srcdir}/${_pkgname}" + patch --forward --strip=1 --input="${srcdir}/${_patch}" +} + pkgver() { cd "${srcdir}/${_pkgname}" git log -1 --format='%cd.%h' --date=short --abbrev=7 | tr -d - |