From d8354e1ded6a9213aa7504d16de43e3fe4011947 Mon Sep 17 00:00:00 2001 From: knarf Date: Wed, 8 Sep 2010 18:44:12 +0000 Subject: Thorn containing the libjpeg library git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/libjpeg/trunk@2 ba58616d-3abc-4c77-8745-3ba8ad4a582f --- README | 18 ++++++++++ configuration.ccl | 7 ++++ dist/jpeg-8b.tar.gz | Bin 0 -> 965125 bytes interface.ccl | 3 ++ libjpeg.sh | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ param.ccl | 1 + schedule.ccl | 1 + src/make.code.defn | 7 ++++ 8 files changed, 131 insertions(+) create mode 100644 README create mode 100644 configuration.ccl create mode 100644 dist/jpeg-8b.tar.gz create mode 100644 interface.ccl create mode 100755 libjpeg.sh create mode 100644 param.ccl create mode 100644 schedule.ccl create mode 100644 src/make.code.defn diff --git a/README b/README new file mode 100644 index 0000000..ac70dea --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +Cactus Code Thorn libjpeg +Author(s) : Frank Löffler + Erik Schnetter +Maintainer(s): Cactus team +Licence : ? +-------------------------------------------------------------------------- + +1. Purpose + +Distribute the libjpeg library; see + + + +From the web site: + +IJG is an informal group that writes and distributes a widely used free library for JPEG image compression. + +The current version is release 8b of 16-May-2010. This is a stable and solid foundation for many application's JPEG support. diff --git a/configuration.ccl b/configuration.ccl new file mode 100644 index 0000000..5eea0a0 --- /dev/null +++ b/configuration.ccl @@ -0,0 +1,7 @@ +# Configuration definitions for thorn libjpeg + +PROVIDES libjpeg +{ + SCRIPT libjpeg.sh + LANG bash +} diff --git a/dist/jpeg-8b.tar.gz b/dist/jpeg-8b.tar.gz new file mode 100644 index 0000000..10dda1a Binary files /dev/null and b/dist/jpeg-8b.tar.gz differ diff --git a/interface.ccl b/interface.ccl new file mode 100644 index 0000000..a496888 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,3 @@ +# Interface definition for thorn libjpeg + +IMPLEMENTS: libjpeg diff --git a/libjpeg.sh b/libjpeg.sh new file mode 100755 index 0000000..f3731e8 --- /dev/null +++ b/libjpeg.sh @@ -0,0 +1,94 @@ +#! /bin/bash + +################################################################################ +# Prepare +################################################################################ + +# Set up shell +set -x # Output commands +set -e # Abort on errors + +# Set locations +NAME=jpeg-8b +SRCDIR=$(dirname $0) +INSTALL_DIR=${SCRATCH_BUILD} +LIBJPEG_DIR=${INSTALL_DIR}/${NAME} + +# Clean up environment +unset LIBS + + + +################################################################################ +# Build +################################################################################ + +( + exec >&2 # Redirect stdout to stderr + set -x # Output commands + set -e # Abort on errors + cd ${INSTALL_DIR} + if [ -e done-${NAME} -a done-${NAME} -nt ${SRCDIR}/dist/${NAME}.tar.gz \ + -a done-${NAME} -nt ${SRCDIR}/libjpeg.sh ] + then + echo "libjpeg: The enclosed libjpeg library has already been built; doing nothing" + else + echo "libjpeg: Building enclosed libjpeg library" + + echo "libjpeg: Unpacking archive..." + rm -rf build-${NAME} + mkdir build-${NAME} + pushd build-${NAME} + # Should we use gtar or tar? + TAR=$(gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar) + ${TAR} xzf ${SRCDIR}/dist/${NAME}.tar.gz + popd + + echo "libjpeg: Configuring..." + rm -rf ${NAME} + mkdir ${NAME} + pushd build-${NAME}/${NAME} + ./configure --prefix=${LIBJPEG_DIR} + + echo "libjpeg: Building..." + make + + echo "libjpeg: Installing..." + make install + popd + + echo 'done' > done-${NAME} + echo "libjpeg: Done." + fi +) + +if (( $? )); then + echo 'BEGIN ERROR' + echo 'Error while building libjpeg. Aborting.' + echo 'END ERROR' + exit 1 +fi + + + +################################################################################ +# Configure Cactus +################################################################################ + +# Set options +LIBJPEG_INC_DIRS="${LIBJPEG_DIR}/include" +LIBJPEG_LIB_DIRS="${LIBJPEG_DIR}/lib" +LIBJPEG_LIBS='jpeg' + +# Pass options to Cactus +echo "BEGIN MAKE_DEFINITION" +echo "HAVE_LIBJPEG = 1" +echo "LIBJPEG_DIR = ${LIBJPEG_DIR}" +echo "LIBJPEG_INC_DIRS = ${LIBJPEG_INC_DIRS}" +echo "LIBJPEG_LIB_DIRS = ${LIBJPEG_LIB_DIRS}" +echo "LIBJPEG_LIBS = ${LIBJPEG_LIBS}" +echo "END MAKE_DEFINITION" + +echo 'INCLUDE_DIRECTORY $(LIBJPEG_INC_DIRS)' +echo 'LIBRARY_DIRECTORY $(LIBJPEG_LIB_DIRS)' +echo 'LIBRARY $(LIBJPEG_LIBS)' diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..6b26bcd --- /dev/null +++ b/param.ccl @@ -0,0 +1 @@ +# Parameter definitions for thorn libjpeg diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..479d67d --- /dev/null +++ b/schedule.ccl @@ -0,0 +1 @@ +# Schedule definitions for thorn libjpeg diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..7f26de6 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,7 @@ +# Main make.code.defn file for thorn libjpeg + +# Source files in this directory +SRCS = + +# Subdirectories containing source files +SUBDIRS = -- cgit v1.2.3