#!/bin/sh DestinysDirectory="/i686/home/tc/Downloads" mkdir -p "$DestinysDirectory" cd "$DestinysDirectory" tce-load -iwl compiletc Xorg-7.7-3d-dev liblzma-dev librsvg-dev libwebp1-dev libgs-dev perl5 libwmf-dev jasper2-dev zstd-dev wget -c "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.40/GraphicsMagick-1.3.40.tar.xz" tar -xf GraphicsMagick-1.3.40.tar.xz cd GraphicsMagick-1.3.40/ CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure -prefix=/usr/local --disable-static --localstatedir=/var --enable-shared --with-gs-font-dir=/usr/local/share/ghostscript/fonts --with-perl find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; make mkdir -p "$DestinysDirectory/graphicsmagick/usr/local/share/doc/graphicsmagick" make DESTDIR=$DestinysDirectory/graphicsmagick/ install cp $DestinysDirectory/GraphicsMagick-1.3.40/Copyright.txt $DestinysDirectory/graphicsmagick/usr/local/share/doc/graphicsmagick/ cd .. mkdir -p $DestinysDirectory/graphicsmagick-dev/usr/local cp -pRf $DestinysDirectory/graphicsmagick/usr/local/include $DestinysDirectory/graphicsmagick-dev/usr/local/ rm -rf $DestinysDirectory/graphicsmagick/usr/local/include/ mksquashfs graphicsmagick/ graphicsmagick.tcz mksquashfs graphicsmagick-dev/ graphicsmagick-dev.tcz md5sum graphicsmagick.tcz > graphicsmagick.tcz.md5.txt md5sum graphicsmagick-dev.tcz > graphicsmagick-dev.tcz.md5.txt echo -e "libwebp1.tcz\nlibtiff.tcz\nfreetype.tcz\njasper2.tcz\nlibjpeg-turbo.tcz\nlibpng.tcz\nlibwmf.tcz\nlibXext.tcz\nlibSM.tcz\nlibICE.tcz\nlibX11.tcz\nlibxcb.tcz\nlibXau.tcz\nlibXdmcp.tcz\nbzip2-lib.tcz\nlibxml2.tcz\nliblzma.tcz\nlibzstd.tcz" > graphicsmagick.tcz.dep echo -e "graphicsmagick.tcz" > graphicsmagick-dev.tcz.dep submitqc --libs --strip