lowdown: fix cross compilation and add patch I wrote earlier to respect
ldflags closes #13019
This commit is contained in:
parent
8d1068ef2e
commit
d462c9d8b6
|
@ -0,0 +1,24 @@
|
|||
HAVE_ARC4RANDOM=0
|
||||
HAVE_CAPSICUM=0
|
||||
HAVE_ERR=1
|
||||
HAVE_EXPLICIT_BZERO=1
|
||||
HAVE_GETPROGNAME=0
|
||||
HAVE_INFTIM=0
|
||||
HAVE_MD5=0
|
||||
HAVE_MEMMEM=1
|
||||
HAVE_MEMRCHR=1
|
||||
HAVE_MEMSET_S=0
|
||||
HAVE_PATH_MAX=1
|
||||
HAVE_PLEDGE=0
|
||||
HAVE_PROGRAM_INVOCATION_SHORT_NAME=1
|
||||
HAVE_REALLOCARRAY=0
|
||||
HAVE_RECALLOCARRAY=0
|
||||
HAVE_SANDBOX_INIT=0
|
||||
HAVE_SECCOMP_FILTER=1
|
||||
HAVE_SOCK_NONBLOCK=1
|
||||
HAVE_STRLCAT=0
|
||||
HAVE_STRLCPY=0
|
||||
HAVE_STRTONUM=0
|
||||
HAVE_SYSTRACE=0
|
||||
HAVE_ZLIB=0
|
||||
HAVE___PROGNAME=1
|
|
@ -0,0 +1,24 @@
|
|||
HAVE_ARC4RANDOM=0
|
||||
HAVE_CAPSICUM=0
|
||||
HAVE_ERR=1
|
||||
HAVE_EXPLICIT_BZERO=0
|
||||
HAVE_GETPROGNAME=0
|
||||
HAVE_INFTIM=0
|
||||
HAVE_MD5=0
|
||||
HAVE_MEMMEM=1
|
||||
HAVE_MEMRCHR=1
|
||||
HAVE_MEMSET_S=0
|
||||
HAVE_PATH_MAX=1
|
||||
HAVE_PLEDGE=0
|
||||
HAVE_PROGRAM_INVOCATION_SHORT_NAME=1
|
||||
HAVE_REALLOCARRAY=0
|
||||
HAVE_RECALLOCARRAY=0
|
||||
HAVE_SANDBOX_INIT=0
|
||||
HAVE_SECCOMP_FILTER=1
|
||||
HAVE_SOCK_NONBLOCK=1
|
||||
HAVE_STRLCAT=1
|
||||
HAVE_STRLCPY=1
|
||||
HAVE_STRTONUM=0
|
||||
HAVE_SYSTRACE=0
|
||||
HAVE_ZLIB=0
|
||||
HAVE___PROGNAME=1
|
|
@ -0,0 +1,33 @@
|
|||
From 04a9e2f44d90f7b397716bb50d55e53e6ed8367c Mon Sep 17 00:00:00 2001
|
||||
From: Duncaen <mail@duncano.de>
|
||||
Date: Fri, 9 Mar 2018 18:53:12 +0100
|
||||
Subject: [PATCH] use LDFLAGS in Makefile
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9a124cc..0a422c3 100644
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -62,7 +62,7 @@ installwww: www
|
||||
install -m 0444 lowdown.tar.gz.sha512 $(WWWDIR)/snapshots
|
||||
|
||||
lowdown: liblowdown.a main.o
|
||||
- $(CC) -o $@ main.o liblowdown.a -lm
|
||||
+ $(CC) -o $@ main.o liblowdown.a $(LDFLAGS) -lm
|
||||
|
||||
lowdown-diff: lowdown
|
||||
ln -f lowdown lowdown-diff
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -65,7 +65,7 @@
|
||||
CFLAGS="${CFLAGS} -Wwrite-strings -Wno-unused-parameter"
|
||||
LDADD=
|
||||
CPPFLAGS=
|
||||
-LDFLAGS=
|
||||
+LDFLAGS=`printf "all:\\n\\t@echo \\\$(LDFLAGS)\\n" | make -sf -`
|
||||
PREFIX="/usr/local"
|
||||
BINDIR=
|
||||
SBINDIR=
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'lowdown'
|
||||
pkgname=lowdown
|
||||
version=0.3.1
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="${pkgname}-VERSION_${version//./_}"
|
||||
configure_args="PREFIX=/usr MANDIR=/usr/share/man"
|
||||
build_style=configure
|
||||
|
@ -12,11 +12,14 @@ homepage="https://kristaps.bsd.lv/lowdown/"
|
|||
distfiles="https://github.com/kristapsdz/lowdown/archive/VERSION_${version//./_}.tar.gz"
|
||||
checksum=af1fe2904dd543e46ff2b19ccd601df053986f3913d5abf68ac9c62da50754ec
|
||||
|
||||
pre_build() {
|
||||
cat >> Makefile.configure <<-EOF
|
||||
CFLAGS += ${CFLAGS}
|
||||
LDFLAGS += ${LDFLAGS}
|
||||
EOF
|
||||
pre_configure() {
|
||||
local _libc=glibc
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) _libc=musl ;;
|
||||
esac
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
cp "${FILESDIR}/configure.$_libc" configure.local
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in New Issue