[arch-commits] Commit in sl/trunk (PKGBUILD system_ldflags.patch)
Brett Cornwall
ainola at gemini.archlinux.org
Thu Feb 3 04:48:56 UTC 2022
Date: Thursday, February 3, 2022 @ 04:48:55
Author: ainola
Revision: 1124056
Patch in support for system LDFLAGS
Without system LDFLAGS we don't get e.g. RELRO and other expected standards of
packaging.
Added:
sl/trunk/system_ldflags.patch
Modified:
sl/trunk/PKGBUILD
----------------------+
PKGBUILD | 15 ++++++++++++---
system_ldflags.patch | 17 +++++++++++++++++
2 files changed, 29 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-03 04:28:10 UTC (rev 1124055)
+++ PKGBUILD 2022-02-03 04:48:55 UTC (rev 1124056)
@@ -13,13 +13,22 @@
url="https://github.com/eyJhb/sl"
license=('custom')
depends=('ncurses')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/eyJhb/sl/archive/$pkgver.tar.gz")
-sha512sums=('4a57737a60c90a1eec2210ce7c28db937b46a5c35006bd1b5ff43d20ef617a004c49c2b2897ebc0fb8c57b6687fe933b2c9834f5800fdc0bf9912e07542a3b30')
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/eyJhb/sl/archive/$pkgver.tar.gz"
+ "system_ldflags.patch"
+)
+sha512sums=('4a57737a60c90a1eec2210ce7c28db937b46a5c35006bd1b5ff43d20ef617a004c49c2b2897ebc0fb8c57b6687fe933b2c9834f5800fdc0bf9912e07542a3b30'
+ 'cf4592f1f1b2dfe431e8f993a9395900a6a05e6704ce2be32fddab74de8bede2a82c006b82496e50de3ba3c76bda978947f77f251ec41d9391b4db0479bf60c8')
+prepare() {
+ cd "sl-$pkgver"
+ patch < ../system_ldflags.patch
+}
+
build() {
cd "$srcdir/sl-$pkgver"
- cc $CFLAGS -o sl sl.c -lcurses
+ make
gzip -9 -f sl.1
}
Added: system_ldflags.patch
===================================================================
--- system_ldflags.patch (rev 0)
+++ system_ldflags.patch 2022-02-03 04:48:55 UTC (rev 1124056)
@@ -0,0 +1,17 @@
+--- Makefile 2022-02-02 20:30:23.352782993 -0800
++++ Makefile 2022-02-02 20:33:32.503983729 -0800
+@@ -8,11 +8,12 @@
+
+ CC=gcc
+ CFLAGS=-O3 -Wall
++LDFLAGS+=-lncurses
+
+ all: sl
+
+ sl: sl.c sl.h
+- $(CC) $(CFLAGS) -o sl sl.c -lncurses
++ $(CC) $(CFLAGS) -o sl sl.c $(LDFLAGS)
+
+ clean:
+ rm -f sl
+
More information about the arch-commits
mailing list