mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-03 16:40:25 +00:00
74 lines
2.9 KiB
Bash
74 lines
2.9 KiB
Bash
#! /bin/bash
|
|
|
|
# libtheora
|
|
# Source: https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: libogg
|
|
# Recommended: libvorbis
|
|
# Optional: SDL, libpng, Doxygen, texlive, BibTex, Transfig
|
|
|
|
# if optimizing with GCC:
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
patch -Np1 -i ../patches/libtheora-alpine/automake.patch
|
|
patch -Np1 -i ../patches/libtheora-alpine/enc.patch
|
|
patch -Np1 -i ../patches/libtheora-alpine/fix-mmx.patch
|
|
patch -Np1 -i ../patches/libtheora-alpine/fix-timeb.patch
|
|
patch -Np1 -i ../patches/libtheora-alpine/libtheora-flags.patch
|
|
|
|
sed -i 's/png_\(sizeof\)/\1/g' examples/png2theora.c &&
|
|
libtoolize --force &&
|
|
aclocal -I m4 &&
|
|
autoconf --force &&
|
|
automake --force --add-missing &&
|
|
./configure --prefix=/usr --disable-static $BUILDTRUPLE &&
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S mkdir /BMAN/install && \
|
|
sudo -S mkdir /BMAN/usr && \
|
|
sudo -S mv $BUILD/usr/share /BMAN/usr/ && \
|
|
|
|
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------------------------------------------------------|
|
|
libtheora: libtheora (Theora video codec library)
|
|
libtheora:
|
|
libtheora: Theora is Xiph.Org's first publicly released video codec, intended
|
|
libtheora: for use within the Foundation's Ogg multimedia streaming system.
|
|
libtheora:
|
|
libtheora: The Theora bitstream format was frozen after the alpha3 release. This
|
|
libtheora: means that files produced by the alpha3 encoder will always be
|
|
libtheora: playable according to the Theora I specification. Traditionally
|
|
libtheora: alpha means a proof of concept, not a production-ready release.
|
|
libtheora: However the code is very robust, ready for and indeed in general use.
|
|
libtheora:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libtheora-1.1.1-$(uname -m)-mlfs.txz &&
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
libtheora-doc: Manuals for libtheora (Theora video codec library)
|
|
libtheora-doc:
|
|
libtheora-doc: Theora is Xiph.Org's first publicly released video codec, intended
|
|
libtheora-doc: for use within the Foundation's Ogg multimedia streaming system.
|
|
libtheora-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ && \
|
|
sudo -S makepkg -l y -c n $PKGS/libtheora-doc-1.1.1-noarch-mlfs.txz && \
|
|
sudo -S rm -rf /BMAN/* && \
|
|
sudo -S rm -rf ${BUILD}/*
|