summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Baldino2023-04-22 20:52:28 +0000
committerJoe Baldino2023-04-22 21:00:45 +0000
commitb07fa969c11befc8de3688fb97ccdb7dad906b54 (patch)
tree261c0e52dd5e7d81432e56f3df9f4610724bb919
parent16225bbcf8576b396df8c5f848dded21aac64555 (diff)
downloadaur-b07fa969c11befc8de3688fb97ccdb7dad906b54.tar.gz
PKGBUILD: use upstream patch, bump to pkgrel 3
Use Makefile patch submitted to upstream project. See: https://github.com/alewmoose/2048-in-terminal/pull/9 Signed-off-by: Joe Baldino <pedanticdm@gmx.us>
-rw-r--r--.SRCINFO4
-rw-r--r--0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch44
-rw-r--r--0001-Makefile-tweak-usage-of-implicit-variables.patch61
-rw-r--r--PKGBUILD6
4 files changed, 66 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 806ac3ec136c..b7317524b3f6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -13,8 +13,8 @@ pkgbase = 2048term-git
provides = 2048term
conflicts = 2048term
source = 2048term::git+https://github.com/alewmoose/2048-in-terminal.git
- source = 0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch
+ source = 0001-Makefile-tweak-usage-of-implicit-variables.patch
sha256sums = SKIP
- sha256sums = 913a3c2a535fa514cfa764ed77e1cf52742bdf1810aa71a2fc34585640e1daa5
+ sha256sums = 76a5244ecb82f4a6928a2cdbc5fae7db1e1f94fb6c270f98cd7cd1a3129b89b2
pkgname = 2048term-git
diff --git a/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch b/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch
deleted file mode 100644
index bd29850ce9da..000000000000
--- a/0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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
-
diff --git a/0001-Makefile-tweak-usage-of-implicit-variables.patch b/0001-Makefile-tweak-usage-of-implicit-variables.patch
new file mode 100644
index 000000000000..35913a4660d5
--- /dev/null
+++ b/0001-Makefile-tweak-usage-of-implicit-variables.patch
@@ -0,0 +1,61 @@
+From 883fafd5f6c5a702349916ad64dd927cc2e17b63 Mon Sep 17 00:00:00 2001
+From: Joe Baldino <pedanticdm@gmx.us>
+Date: Mon, 3 Apr 2023 22:12:19 -0700
+Subject: [PATCH] Makefile: tweak usage of implicit variables
+
+There are CFLAGS required for correct compilation, so append rather than
+conditionally assign. Remove optimizer and like flags from Makefile-- users can
+pass these in if they like (e.g. from their environment).
+
+Same with LDLIBS-- append instead of conditional assignment.
+
+For the NCURSES_ variables, use make's shell function instead of backticks for
+expansion.
+
+Add CPPFLAGS and LDFLAGS implicit variables to the default target, allowing
+more user flexibility.
+
+Signed-off-by: Joe Baldino <pedanticdm@gmx.us>
+---
+ Makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2f6e160d53b1..54679a0b98ab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,11 +10,11 @@ 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)
+-LDLIBS?=$(NCURSES_LDLIBS)
++CFLAGS+= -Wall -Wextra -pedantic -std=c11 -D_GNU_SOURCE $(NCURSES_CFLAGS)
++LDLIBS+= $(NCURSES_LDLIBS)
+
+ PREFIX?=/usr/local
+ BINDIR?=$(PREFIX)/bin
+@@ -25,13 +25,13 @@ BINDIR?=$(PREFIX)/bin
+ all: $(TARGET)
+
+ $(TARGET): $(OBJ)
+- $(CC) $(CFLAGS) $^ -o $(TARGET) $(LDLIBS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $(TARGET) $(LDLIBS)
+
+ %.o : %.c
+
+ $(BUILDDIR)/%.o: $(SRCDIR)/%.c $(BUILDDIR)/%.d
+ $(CC) -MM $< -MQ $(BUILDDIR)/$*.o -MF $(BUILDDIR)/$*.d
+- $(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
+ %.d: ;
+
+--
+2.40.0
+
diff --git a/PKGBUILD b/PKGBUILD
index be33f3db1c87..8913af907d1a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,10 +3,10 @@
# Contributor: Aleksandr Grehov <alewmosse@gmail.com>
_pkgname='2048term'
-_patch='0001-ARCHLINUX-conform-Makefile-to-packaging-standards.patch'
+_patch='0001-Makefile-tweak-usage-of-implicit-variables.patch'
pkgname="${_pkgname}-git"
pkgver=20220613.bf22f86
-pkgrel=2
+pkgrel=3
pkgdesc='Console version of the game "2048"'
url='https://github.com/alewmoose/2048-in-terminal.git'
arch=('i686' 'x86_64' 'armv7h')
@@ -16,7 +16,7 @@ makedepends=('git')
source=("${_pkgname}::git+https://github.com/alewmoose/2048-in-terminal.git"
"${_patch}")
sha256sums=('SKIP'
- '913a3c2a535fa514cfa764ed77e1cf52742bdf1810aa71a2fc34585640e1daa5')
+ '76a5244ecb82f4a6928a2cdbc5fae7db1e1f94fb6c270f98cd7cd1a3129b89b2')
provides=("${_pkgname}")
conflicts=("${_pkgname}")