mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-06 11:02:53 +00:00
80 lines
3.1 KiB
Bash
80 lines
3.1 KiB
Bash
#! /bin/bash
|
|
|
|
# libjpeg-turbo
|
|
# Source: https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-3.0.1.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: CMake, NASM or yasm
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# If optimizing, use these flags with GCC
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -Ofast -falign-functions=32 -ffat-lto-objects "
|
|
export CFLAGS+="-flto=auto -fno-semantic-interposition "
|
|
export CFLAGS+="-fstack-protector-strong -fzero-call-used-regs=used "
|
|
export CFLAGS+="-mprefer-vector-width=256 "
|
|
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
|
|
|
|
mkdir build &&
|
|
cd build &&
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=RELEASE \
|
|
-DENABLE_STATIC=FALSE \
|
|
-DWITH_JPEG8=1 \
|
|
-DBUILD_SHARED_LIBS=True \
|
|
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-3.0.1 \
|
|
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib \
|
|
.. &&
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S mkdir -pv /BMAN/install
|
|
sudo -S mkdir -pv /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------------------------------------------------------|
|
|
libjpeg-turbo: libjpeg-turbo (high-speed version of libjpeg)
|
|
libjpeg-turbo:
|
|
libjpeg-turbo: libjpeg-turbo is a high-speed version of libjpeg for x86 and
|
|
libjpeg-turbo: x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.)
|
|
libjpeg-turbo: to accelerate baseline JPEG compression and decompression.
|
|
libjpeg-turbo: libjpeg-turbo is generally 2-4x as fast as the unmodified
|
|
libjpeg-turbo: version of libjpeg, all else being equal.
|
|
libjpeg-turbo:
|
|
libjpeg-turbo:
|
|
libjpeg-turbo: libjpeg-turbo home: http://libjpeg-turbo.virtualgl.org
|
|
libjpeg-turbo:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libjpeg-turbo-3.0.1-$PSUFFIX &&
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
libjpeg-turbo-doc: Manuals for libjpeg-turbo (high-speed version of libjpeg)
|
|
libjpeg-turbo-doc:
|
|
libjpeg-turbo-doc: libjpeg-turbo is a high-speed version of libjpeg for x86 and
|
|
libjpeg-turbo-doc: x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.)
|
|
libjpeg-turbo-doc: to accelerate baseline JPEG compression and decompression.
|
|
libjpeg-turbo-doc: libjpeg-turbo is generally 2-4x as fast as the unmodified
|
|
libjpeg-turbo-doc: version of libjpeg, all else being equal.
|
|
libjpeg-turbo-doc:
|
|
libjpeg-turbo-doc: libjpeg-turbo home: http://libjpeg-turbo.virtualgl.org
|
|
libjpeg-turbo-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libjpeg-turbo-doc-3.0.1-$NOPSUFFIX
|
|
sudo -S rm -rf /BMAN/*
|
|
sudo -S rm -rf ${BUILD}/*
|