termux-packages/packages/heyu/build.sh
Henrik Grimler fd0015b9dd heyu: fix errors about duplicate symbols with ndk >=r22
Errors looks like:

    aarch64-linux-android-clang  -fstack-protector-strong -Oz -Drindex=strrchr  -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib -fopenmp -static-openmp -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -o heyu date.o erase.o info.o message.o relay.o monitor.o reset.o setclock.o stop.o tty.o x10.o xread.o xwrite.o status.o cm11a.o eeprom.o process.o sun.o cmd.o config.o x10state.o poll.o modules.o cm17a.o xsync.o timing.o cm10a.o tty_aux.o relay_aux.o x10aux.o rfxcom.o digimax.o oregon.o  -lm
    ld: error: duplicate symbol: newsb
    >>> defined at tty.c
    >>>            tty.o:(newsb)
    >>> defined at tty_aux.c
    >>>            tty_aux.o:(.bss+0x30)

    ld: error: duplicate symbol: oldsb
    >>> defined at tty.c
    >>>            tty.o:(oldsb)
    >>> defined at tty_aux.c
    >>>            tty_aux.o:(.bss+0x0)

    ld: error: duplicate symbol: spoolfile
    >>> defined at relay.c
    >>>            relay.o:(spoolfile)
    >>> defined at relay_aux.c
    >>>            relay_aux.o:(.bss+0x1C4)
    clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [Makefile:467: heyu] Error 1
2021-10-22 23:05:45 +02:00

15 lines
581 B
Bash

TERMUX_PKG_HOMEPAGE=https://www.heyu.org/
TERMUX_PKG_DESCRIPTION="Program for remotely controlling lights and appliances"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.11-rc3
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/HeyuX10Automation/heyu/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=6285f134e03688b5ec03986ef53cce463abc007281996156cac52b61cbeb58b2
TERMUX_PKG_AUTO_UPDATE=true
termux_step_pre_configure() {
# rindex is an obsolete version of strrchr which is not available in Android:
CFLAGS+=" -Drindex=strrchr"
}