0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/root-packages/v4l-utils/build.sh
Biswapriyo Nath 367aa9dcac fix(root/v4l-utils): Fix undefined symbols error with glob and globfree
This commit fixes the following linker errors.

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: glob
>>> referenced by ../../lib/libv4l2/.libs/libv4l2.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: globfree
>>> referenced by ../../lib/libv4l2/.libs/libv4l2.so
2024-07-29 19:06:55 +00:00

47 lines
1.4 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://git.linuxtv.org/v4l-utils.git
TERMUX_PKG_DESCRIPTION="Linux utilities to handle media devices"
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.24.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://linuxtv.org/downloads/v4l-utils/v4l-utils-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=cbb7fe8a6307f5ce533a05cded70bb93c3ba06395ab9b6d007eb53b75d805f5b
TERMUX_PKG_DEPENDS="argp, libc++, libv4l"
TERMUX_PKG_BUILD_DEPENDS="libandroid-glob"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-static
--disable-libdvbv5
--disable-qv4l2
--disable-qvidcap
--disable-bpf
--without-jpeg
--without-libudev
"
termux_step_pre_configure() {
local _inc="$TERMUX_PKG_SRCDIR/_getsubopt/include"
rm -rf "${_inc}"
mkdir -p "${_inc}"
cp "$TERMUX_PKG_BUILDER_DIR/getsubopt.h" "${_inc}"
CPPFLAGS+=" -I${_inc} -D__force= -UANDROID"
local _lib="$TERMUX_PKG_BUILDDIR/_getsubopt/lib"
rm -rf "${_lib}"
mkdir -p "${_lib}"
pushd "${_lib}"/..
$CC $CFLAGS $CPPFLAGS "$TERMUX_PKG_BUILDER_DIR/getsubopt.c" \
-fvisibility=hidden -c -o ./getsubopt.o
$AR cru "${_lib}"/libgetsubopt.a ./getsubopt.o
popd
LDFLAGS+=" -L${_lib} -l:libgetsubopt.a -landroid-glob"
}
termux_step_make_install() {
make -C utils install
make -C contrib install
install -Dm600 -t $TERMUX_PREFIX/etc/rc_keymaps \
$TERMUX_PKG_SRCDIR/utils/keytable/rc_keymaps/*
}