Files
BMLFS/build-scripts/libtiff.build
2023-12-21 23:18:30 -06:00

71 lines
2.6 KiB
Bash

#! /bin/bash
# libTIFF
# Source: https://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: CMake
# Recommended: NONE
# Optional: Freeglut, libjpeg-turbo, JBIG-KIT
# If optimizing, use flags with GCC:
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -falign-functions=32 -fno-lto "
export CFLAGS+="-fno-math-errno -fno-semantic-interposition "
export CFLAGS+="-fno-trapping-math -fstack-protector-strong -fzero-call-used-regs=used "
#patch -Np1 -i ../patches/tiff-alpine/CVE-2018-12900.patch
mkdir -p libtiff-build &&
cd libtiff-build &&
cmake -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libtiff-4.6.0 \
-DCMAKE_INSTALL_PREFIX=/usr -G Ninja .. &&
read -p "Compile?" && ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja 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------------------------------------------------------|
libtiff: libtiff (a library for reading and writing TIFF files)
libtiff:
libtiff: This package provides support for the Tag Image File Format (TIFF),
libtiff: a widely used format for storing image data. Included is the libtiff
libtiff: library (for reading and writing TIFF files), and a collection of
libtiff: tools for working with TIFF images.
libtiff:
libtiff:
libtiff:
libtiff:
libtiff:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libtiff-4.6.0-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
libtiff-doc: Manuals for libtiff (a library for reading and writing TIFF files)
libtiff-doc:
libtiff-doc: This package provides support for the Tag Image File Format (TIFF),
libtiff-doc: a widely used format for storing image data. Included is the libtiff
libtiff-doc: library (for reading and writing TIFF files), and a collection of
libtiff-doc: tools for working with TIFF images.
libtiff-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/
sudo -S makepkg -l y -c n $PKGS/libtiff-doc-4.6.0-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*