#!/bin/bash # Written by Manfred Mueller # # Copyright (c) 2013 Manfred Mueller, Muelheim, Germany # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ----------------------------------------------------------------------------- . /usr/share/slax/slaxbuildlib SLAX_BUNDLE_NAME="gimp-legacy" SLAX_BUNDLE_VERSION="2.6.11" SLAX_BUNDLE_DESCRIPTION="The GNU Image Manipulation Program The GIMP is a powerful tool for the preparation and manipulation of digital images. The GIMP provides the user with a wide variety of image manipulation, painting, processing, and rendering tools. The GIMP's open design and extensible architecture make for a very powerful end product for photo and image retouching, web graphics design, or digital illustration. This package has been compiled with --prefix=/opt/gimp-2.6. Thus it doesn't conflict with the actual gimp 2.8.x version. The babl and gegl libraries have been integrated with --prefix=/opt/gimp-2.6, too." SLAX_BUNDLE_CATEGORIES="graphics" SLAX_BUNDLES_REQUIRED="python,pygobject,pygtk" SLAX_BUNDLES_REQUIRED_TO_COMPILE_ONLY="rpm2cpio libxslt expat intltool perl db48 gettext-tools" SLAX_BUNDLE_MAINTAINER_NAME="Manfred Mueller" SLAX_BUNDLE_MAINTAINER_EMAIL="manfred.mueller@fluxflux.net" SLAX_BUNDLE_SOURCE_DOWNLOAD[0]="http://ftp.tu-chemnitz.de/pub/linux/fedora/linux/releases/16/Everything/source/SRPMS/gimp-2.6.11-23.fc16.src.rpm" SLAX_BUNDLE_SOURCE_DOWNLOAD[1]="http://slackware.org.uk/slackware/slackware-13.37/source/l/babl/babl-0.1.2.tar.xz" SLAX_BUNDLE_SOURCE_DOWNLOAD[2]="http://slackware.org.uk/slackware/slackware-13.37/source/l/gegl/gegl-0.1.2.tar.xz" SLAX_BUNDLE_SOURCE_DOWNLOAD[3]="http://fluxflux.net/downloads/SlaxBuilds/${SLAX_BUNDLE_NAME}/gimp-splash.png" check_variables_for_errors download_all_sources extract_all_sources init_bundle_target_dir activate_required_bundles export PATH=/opt/gimp-2.6/bin:$PATH export PKG_CONFIG_PATH=/opt/gimp-2.6/lib/pkgconfig export LD_LIBRARY_PATH=/opt/gimp-2.6/lib for DEP in babl gegl; do cd ${SLAX_CURRENT_BUILDSCRIPT_DIR}/$DEP-0.1.2/ || exit 1 ./configure \ --prefix=/opt/gimp-2.6 \ --enable-mmx \ --disable-sse \ --build=${SLAX_ARCH}-slackware-linux make -j8 || make || exit 1 make install make DESTDIR="${SLAX_BUNDLE_TARGET}" install done mkdir -p "${SLAX_CURRENT_BUILDSCRIPT_DIR}"/src cd "${SLAX_CURRENT_BUILDSCRIPT_DIR}"/src rpm2cpio "${SLAX_CURRENT_BUILDSCRIPT_DIR}"/gimp-2.6.11-23.fc16.src.rpm | cpio -imd || exit 1 tar xf gimp-${SLAX_BUNDLE_VERSION}.tar.bz2 || exit 1 cd gimp-${SLAX_BUNDLE_VERSION} || exit 1 bzcat ../gimp-${SLAX_BUNDLE_VERSION}-11-autoreconf.patch.bz2 | patch -p1 || exit 1 for PATCH in $(ls ../*.patch); do patch -p1 < $PATCH || exit 1; done env LDFLAGS="-lgobject-2.0 -lglib-2.0 -lm" \ ./configure CFLAGS="$SLAX_CFLAGS" \ --prefix=/opt/gimp-2.6 \ --enable-gimp-remote \ --without-gvfs \ --with-libcurl \ --build=${SLAX_ARCH}-slackware-linux make -j8 || make || exit 1 make DESTDIR="${SLAX_BUNDLE_TARGET}" install cat << EOS >> "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/bin/gimp26_start.sh PATH=/opt/gimp-2.6/bin:\$PATH export PATH LD_LIBRARY_PATH=/opt/gimp-2.6/lib export LD_LIBRARY_PATH /opt/gimp-2.6/bin/gimp-2.6 "\$@" EOS chmod +x "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/bin/gimp26_start.sh mkdir -p "${SLAX_BUNDLE_TARGET}"/usr/{bin,share/applications} || exit 1 ( cd "${SLAX_BUNDLE_TARGET}"/usr/bin for LINK in gimp-legacy gimp-2.6; do ln -s ../../opt/gimp-2.6/bin/gimp26_start.sh $LINK done ) mv "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/share/icons/hicolor/48x48/apps/gimp.png "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/${SLAX_BUNDLE_NAME}.png rm -rf "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/share/{applications,icons} cat << EOD >> "${SLAX_BUNDLE_TARGET}"/usr/share/applications/${SLAX_BUNDLE_NAME}.desktop [Desktop Entry] Version=1.0 Type=Application Name=Gimp legacy 2.6 Exec=gimp-2.6 %U TryExec=gimp-2.6 Icon=/opt/gimp-2.6/gimp-legacy.png Terminal=false Categories=Graphics;2DGraphics;RasterGraphics;GTK; StartupNotify=false MimeType=application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/tiff;image/jpeg;image/x-psp;image/png;image/x-icon;image/x-xpixmap; EOD mv "${SLAX_CURRENT_BUILDSCRIPT_DIR}"/gimp-splash.png "${SLAX_BUNDLE_TARGET}"/opt/gimp-2.6/share/gimp/2.0/images/gimp-splash.png for BUNDLE in ${SLAX_BUNDLES_REQUIRED_TO_COMPILE_ONLY}; do slax deactivate $BUNDLE done create_slax_bundle