aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@ba58616d-3abc-4c77-8745-3ba8ad4a582f>2010-09-08 18:44:12 +0000
committerknarf <knarf@ba58616d-3abc-4c77-8745-3ba8ad4a582f>2010-09-08 18:44:12 +0000
commitd8354e1ded6a9213aa7504d16de43e3fe4011947 (patch)
treea3f2a45a9bd32e13ec1138cc7c7f0dc1e69f06ae
parent26ca36a0796ab5cf1350a277a83aaa09186d09ae (diff)
Thorn containing the libjpeg library
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/libjpeg/trunk@2 ba58616d-3abc-4c77-8745-3ba8ad4a582f
-rw-r--r--README18
-rw-r--r--configuration.ccl7
-rw-r--r--dist/jpeg-8b.tar.gzbin0 -> 965125 bytes
-rw-r--r--interface.ccl3
-rwxr-xr-xlibjpeg.sh94
-rw-r--r--param.ccl1
-rw-r--r--schedule.ccl1
-rw-r--r--src/make.code.defn7
8 files changed, 131 insertions, 0 deletions
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 <http://www.ijg.org/>
+
+
+
+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
--- /dev/null
+++ b/dist/jpeg-8b.tar.gz
Binary files 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 =