hwinfo: Fix build failure "No rule to make target"

```
make: *** No rule to make target '[TERMUX_PKG_SRCDIR]/src/libhd.a', needed by 'hwinfo'.  Stop.
```
This commit is contained in:
Tee KOBAYASHI 2022-01-31 10:36:38 +09:00 committed by Yaksh Bariya
parent 35be5c4aae
commit ee28b31df9
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Hardware detection tool from openSUSE"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=21.74
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/openSUSE/hwinfo/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e826865af657c4966c37c8e915499dc148ff6df4879d3d86f71885defee8335c
TERMUX_PKG_DEPENDS="libandroid-shmem, libuuid, libx86emu"
@ -10,6 +11,14 @@ TERMUX_PKG_BREAKS="hwinfo-dev"
TERMUX_PKG_REPLACES="hwinfo-dev"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
sed -i -E '/^SUBDIRS\s*=/d' Makefile
echo -e '\n$(LIBHD):\n\t$(MAKE) -C src' >> Makefile
echo -e '\t$(CC) -shared $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \' >> Makefile
echo -e '\t\t-Wl,--whole-archive $(LIBHD) -Wl,--no-whole-archive \' >> Makefile
echo -e '\t\t-Wl,-soname=$(LIBHD_SONAME) -o $(LIBHD_SO) $(SO_LIBS)' >> Makefile
}
termux_step_configure() {
echo 'touch changelog' > git2log
LDFLAGS+=" -landroid-shmem"