#! /bin/bash # Little CMS2 # Source: https://github.com/mm2/Little-CMS/releases/download/lcms2.14/lcms2-2.14.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: libjpeg-turbo and LibTIFF # if optimizing with GCC: export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -falign-functions=32 -ffat-lto-objects -flto=4 " export CFLAGS+="-fno-math-errno -fno-semantic-interposition " export CFLAGS+="-fno-trapping-math -fstack-protector-strong -fzero-call-used-regs=used " export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed " # per BLFS, Apply the upstream fix for an issue breaking colord: sed '/BufferSize < TagSize/,+1 s/goto Error/TagSize = BufferSize/' \ -i src/cmsio0.c ./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------------------------------------------------------| lcms2: lcms2 (little cms engine, version 2) lcms2: lcms2: Little cms is a small, speed optimized color management engine. lcms2: lcms2: lcms was written by Marti Maria . lcms2: lcms2: Homepage: http://www.littlecms.com lcms2: lcms2: lcms2: lcms2: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/lcms2-2.14-$PSUFFIX && cd /BMAN cat > /tmp/slack-desc << "EOF" lcms2-doc: Manuals for lcms2 (little cms engine, version 2) lcms2-doc: lcms2-doc: Little cms is a small, speed optimized color management engine. lcms2-doc: lcms2-doc: http://www.littlecms.com lcms2-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/lcms2-doc-2.14-$NOPSUFFIX sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*