par2: Fix i686 build

This commit is contained in:
Fredrik Fornwall 2020-02-17 11:55:45 +01:00
parent dba58086d8
commit 4fc74f052a
1 changed files with 3 additions and 6 deletions

View File

@ -3,18 +3,15 @@ TERMUX_PKG_DESCRIPTION="par2cmdline is a PAR 2.0 compatible file verification an
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Oliver Schmidhauser @Neo-Oli"
TERMUX_PKG_VERSION=0.8.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/Parchive/par2cmdline/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=529f85857ec44e501cd8d95b0c8caf47477d7daa5bfb989e422c800bb71b689a
TERMUX_PKG_BUILD_IN_SRC=true
# i686 has linking error:
# libpar2.a(par2creator.o):par2creator.cpp:function .omp_outlined..22: error: undefined reference to '__atomic_load'
# libpar2.a(par2creator.o):par2creator.cpp:function .omp_outlined..22: error: undefined reference to '__atomic_compare_exchange'
TERMUX_PKG_BLACKLISTED_ARCHES="i686"
termux_step_pre_configure() {
if [ $TERMUX_ARCH = "i686" ]; then
sed -i 's/LDADD = -lstdc++/LDADD = -lstdc++ -latomic/' $TERMUX_PKG_SRCDIR/Makefile.am
# Avoid undefined reference to __atomic_* functions:
LDFLAGS+=" -latomic"
fi
aclocal
automake --add-missing