Files
BMLFS/build-scripts/giflib.build
2024-06-14 11:26:45 -05:00

67 lines
2.3 KiB
Bash

#! /bin/bash
# giflib
# Source: https://sourceforge.net/projects/giflib/files/giflib-5.2.2.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: xmlto
# Recommended: NONE
# Optional: NONE
# If optimizing, use these flags 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/giflib-chimera/only-man.patch
patch -Np1 -i ../patches/giflib-chimera/restore-deprecated-utility-functions.patch
patch -Np1 -i ../patches/giflib-chimera/tests.patch
read -p "Compile?" && make PREFIX=/usr -j2 &&
sudo -S make DESTDIR=$BUILD PREFIX=/usr 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------------------------------------------------------|
giflib: giflib (GIF image format library)
giflib:
giflib: A library to load and save (uncompressed only) images using GIF,
giflib: or Graphics Interchange Format. GIF was introduced by CompuServe
giflib: in 1987, but is still widely used today (especially on web pages.)
giflib:
giflib:
giflib:
giflib:
giflib:
giflib:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/giflib-5.2.2-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
giflib-doc: Manuals for giflib (GIF image format library)
giflib-doc:
giflib-doc: A library to load and save (uncompressed only) images using GIF,
giflib-doc: or Graphics Interchange Format. GIF was introduced by CompuServe
giflib-doc: in 1987, but is still widely used today (especially on web pages.)
giflib-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/giflib-doc-5.2.1-noarch-mlfs.txz
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*