diff --git a/srcpkgs/lowdown/files/configure.glibc b/srcpkgs/lowdown/files/configure.glibc new file mode 100644 index 00000000000..8347d66c265 --- /dev/null +++ b/srcpkgs/lowdown/files/configure.glibc @@ -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 diff --git a/srcpkgs/lowdown/files/configure.musl b/srcpkgs/lowdown/files/configure.musl new file mode 100644 index 00000000000..cd43518cf67 --- /dev/null +++ b/srcpkgs/lowdown/files/configure.musl @@ -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 diff --git a/srcpkgs/lowdown/patches/ldflags.patch b/srcpkgs/lowdown/patches/ldflags.patch new file mode 100644 index 00000000000..f5bb6e4a950 --- /dev/null +++ b/srcpkgs/lowdown/patches/ldflags.patch @@ -0,0 +1,33 @@ +From 04a9e2f44d90f7b397716bb50d55e53e6ed8367c Mon Sep 17 00:00:00 2001 +From: Duncaen +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= diff --git a/srcpkgs/lowdown/template b/srcpkgs/lowdown/template index 5f736c14bea..2fc71c1244c 100644 --- a/srcpkgs/lowdown/template +++ b/srcpkgs/lowdown/template @@ -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() {