Files
BMLFS/build-scripts/v4l-utils.build

79 lines
3.1 KiB
Bash

#! /bin/bash
# v4l-utils
# Source: https://www.linuxtv.org/downloads/v4l-utils/v4l-utils-1.26.1.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: LLVM argp-standalone libexecinfo
# Recommended: alsa-lib glu libjpeg-turbo qt5 json-c
# Optional: Doxygen SDL2 SDL2-image
patch -Np1 -i ../patches/v4l-utils-chimera/dont-install-to-sbin.patch
patch -Np1 -i ../patches/v4l-utils-chimera/int-overflow.patch
patch -Np1 -i ../patches/v4l-utils-chimera/libcpp.patch
patch -Np1 -i ../patches/v4l-utils-chimera/musl.patch
# If optimizing with GCC:
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
CFLAGS="-Wl,-lexecinfo -Wl,-largp " \
meson setup --prefix=/usr \
--buildtype=release \
-Ddoxygen-html=false \
-Ddoxygen-man=false OUT
ninja -C OUT -j2
sudo -S DESTDIR=$BUILD ninja -C OUT install && \
sudo -S mkdir -vp /BMAN/install && \
sudo -S mkdir -pv /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
v4l-utils: v4l-utils (libraries and utilities for video4linux)
v4l-utils:
v4l-utils: libv4l is a collection of libraries which adds a thin abstraction
v4l-utils: layer on top of video4linux2 devices. The purpose of this (thin)
v4l-utils: layer is to make it easy for application writers to support a wide
v4l-utils: variety of devices without having to write separate code for
v4l-utils: different devices in the same class. Linux V4L2 and DVB API
v4l-utils: utilities are also included.
v4l-utils:
v4l-utils: Homepage: http://linuxtv.org
v4l-utils:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/v4l-utils-1.26.1-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
v4l-utils-doc: Manuals for v4l-utils (libraries and utilities for video4linux)
v4l-utils-doc:
v4l-utils-doc: A collection of libraries which adds a thin abstraction layer on
v4l-utils-doc: top of video4linux2 devices. The purpose of this (thin) layer
v4l-utils-doc: is to make it easy for application writers to support a wide
v4l-utils-doc: variety of devices without having to write separate code for
v4l-utils-doc: different devices in the same class. Linux V4L2 and DVB API
v4l-utils-doc: utilities are also included.
v4l-utils-doc:
v4l-utils-doc: http://linuxtv.org
v4l-utils-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/v4l-utils-doc-1.26.1-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*