aboutsummaryrefslogtreecommitdiff
path: root/libraries/jogamp
diff options
context:
space:
mode:
authorGiancarlo Dessì <slack@giand.it>2023-05-13 16:08:37 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-20 11:17:04 +0700
commita761124317c208b0f05729326f3a25bc42d932fe (patch)
treef45ef4c0fa053aa5e6c1c7347a17609f96bd5625 /libraries/jogamp
parentea60b592b5bdbc7017b2d1f5397e45d5d3cde725 (diff)
downloadslackbuilds-a761124317c208b0f05729326f3a25bc42d932fe.tar.xz
libraries/jogamp: Added (Java libraries for 3D Graphics/Multimedia)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/jogamp')
-rw-r--r--libraries/jogamp/README54
-rw-r--r--libraries/jogamp/jogamp.SlackBuild200
-rw-r--r--libraries/jogamp/jogamp.info18
-rw-r--r--libraries/jogamp/slack-desc19
4 files changed, 291 insertions, 0 deletions
diff --git a/libraries/jogamp/README b/libraries/jogamp/README
new file mode 100644
index 000000000000..67ab289db514
--- /dev/null
+++ b/libraries/jogamp/README
@@ -0,0 +1,54 @@
+JogAmp is a project that develops a collection of high performance
+Java™ libraries for 3D Graphics, Multimedia and Processing.
+This platform provide Java™ language bindings to the OpenGL®,
+OpenCL™, OpenAL and OpenMAX APIs.
+
+The platform consists of four modules:
+
+- Gluegen. This is a tool which automatically generates the Java code
+ and Java Native Interface code necessary to call C libraries. It is
+ also needed to build the other modules of JogAmp.
+- JOGL (Java OpenGL). It is the main module of JogAmp. It provides
+ access to the APIs in the OpenGL, ES, and EGL specifications. The
+ module includes also a native windowing toolkit, NEWT.
+- JOAL (Java OpenAL). It implements the Java bindings for OpenAL API
+ and is designed to provide hardware-supported 3D spatialized audio.
+- JOCL (Java OpenCL). It provides the Java bindings for OpenCL API.
+
+By default this script builds the package to install by default the
+modules Gluegen and JOGL. The build of JOAL is optional and enabled by
+default but can be disabled passing the following environment variable
+ JOAL=no ./jogamp.SlackBuild
+
+The build of module JOCL is optional and disabled by default. To
+enable it pass the following environment variable
+ JOCL=yes ./jogamp.SlackBuild
+
+Furthermore:
+
+1. The script requires the setting of the system environment
+ variable $JAVA_HOME that should be available with an usual
+ configuration. If not, please to set it before launch the script
+ export JAVA_HOME=<path to your JDK installation>
+ (for example: export JAVA_HOME=/usr/lib64/openjdk17)
+
+2. The path of Java executables (java, javac, ecc.) should be included
+ in the system environment variable $PATH of root user. If not you
+ have to set a full path to $JAVA_HOME/bin as following
+ export PATH=$JAVA_HOME/bin:$PATH
+
+3. The build requires an installed openJDK 17 compliant SDK available
+ in the SBo repository. This script is tested with the package
+ zulu-openJDK17 but it should work also with the openJDK17 package.
+ The build against jdk (8u361) or jdk19 packages is not sure.
+
+4. At the end, this slackbuild is still experimental because the
+ installation is not tested in runtime with the development of
+ applets and Java applications or the acquire as dependency by
+ packages that supports JogAmp. At the moment, the script installs
+ the JAR archives compatible with all platforms and the libraries,
+ but it is not sure if the compilers get access to these bindings.
+ So, it is possible that something still needs to be added or set in
+ the configuration post installation. If you would contribute,
+ please report to the mantainer for any issue or feedback to fix,
+ extend, and/or improve the slackbuild.
diff --git a/libraries/jogamp/jogamp.SlackBuild b/libraries/jogamp/jogamp.SlackBuild
new file mode 100644
index 000000000000..59b3154c07dc
--- /dev/null
+++ b/libraries/jogamp/jogamp.SlackBuild
@@ -0,0 +1,200 @@
+#!/bin/bash
+
+# Slackware build script for jogamp
+
+# Copyright 2023 Giancarlo Dessì, Cagliari, IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS 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 AUTHOR 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jogamp
+VERSION=${VERSION:-2.4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# The environment variable $JAVA_HOME is needed to pass the
+# path of the JDK installed. This should be available as
+# system environment variable. If not we have to pass it to
+# the script manually
+RTJAR=${RTJAR:-${JAVA_HOME}/lib/rt.jar}
+if [ "$JAVA_HOME" = "" ]; then
+ echo "* * * * * * * * * * * WARNING * * * * * * * * * * * *"
+ echo "* *"
+ echo "* CANNOT FIND THE HOME DIRECTORY OF JAVA SDK IN YOUR *"
+ echo "* SYSTEM. PLEASE LAUNCH THIS SCRIPT PASSING THE *"
+ echo "* ENVIRONMENT VARIABLE \$JAVA_HOME as following *"
+ echo "* *"
+ echo "* \$JAVA_HOME=<path of your SDK> ./jogamp.SlackBuild *"
+ echo "* *"
+ echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * *"
+ exit
+fi
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+mkdir $PRGNAM
+cd $PRGNAM
+tar xvf $CWD/gluegen-v$VERSION.tar.xz
+tar xvf $CWD/jcpp-v$VERSION.tar.xz
+cp -a jcpp-v$VERSION/src gluegen-v$VERSION/jcpp/
+mv gluegen-v$VERSION gluegen
+tar xvf $CWD/jogl-v$VERSION.tar.xz
+cp -a jcpp-v$VERSION/src jogl-v$VERSION/jcpp/
+mv jogl-v$VERSION jogl
+if [ "${JOAL:-yes}" = "yes" ]; then
+ tar xvf $CWD/joal-v$VERSION.tar.xz
+ cp -a jcpp-v$VERSION/src joal-v$VERSION/jcpp/
+ mv joal-v$VERSION joal
+fi
+if [ "${JOCL:-no}" != "no" ]; then
+ tar xvf $CWD/jocl-v$VERSION.tar.xz
+ cp -a jcpp-v$VERSION/src jocl-v$VERSION/jcpp/
+ mv jocl-v$VERSION jocl
+fi
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+unset CLASSPATH
+export SOURCE_LEVEL=1.8
+export TARGET_LEVEL=1.8
+export TARGET_RT_JAR=$RTJAR
+
+echo "************ Building of gluegen module *********************"
+cd gluegen/make
+ant clean
+ant
+ant junit.run
+
+if [ "${JOAL}" != "no" ]; then
+echo "************ Building of Joal module *********************"
+ cd ../../joal/make
+ ant clean
+ ant
+else
+echo "************ Bulding of Joal module skipped *******************"
+fi
+
+echo "************ Building of Jogl module *********************"
+cd ../../jogl/make
+ant clean
+ant
+
+if [ "${JOCL}" = "yes" ]; then
+echo "************ Building of Jocl module *********************"
+ cd ../../jocl/make
+ ant
+else
+echo "************ Bulding of Jocl module skipped *******************"
+fi
+
+cd ../../
+
+# fix some bad perms in doc files that have to install
+chmod 644 gluegen/LICENSE.txt joal/LICENSE.txt
+
+# Prepare the three of package
+mkdir -p $PKG/usr/share/java
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/jogamp
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/gluegen
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/jogl
+if [ "${JOAL}" != "no" ]; then
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/joal
+fi
+if [ "${JOCL}" = "yes" ]; then
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/jocl
+fi
+
+( cp -a gluegen/build/gluegen-rt.jar $PKG/usr/share/java )
+( cp -a gluegen/build/obj/*.so $PKG/usr/lib${LIBDIRSUFFIX}/jogamp )
+( cp -a gluegen/LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION/gluegen )
+if [ "${JOAL}" != "no" ]; then
+ ( cp -a joal/build/jar/joal.jar $PKG/usr/share/java )
+ ( cp -a joal/build/obj/*.so $PKG/usr/lib${LIBDIRSUFFIX}/jogamp )
+ ( cp -a joal/LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION/joal )
+ ( cp -a joal/README.txt $PKG/usr/doc/$PRGNAM-$VERSION/joal )
+fi
+( cp -a jogl/build/jar/jogl-all.jar $PKG/usr/share/java )
+( cp -a jogl/build/lib/*.so $PKG/usr/lib${LIBDIRSUFFIX}/jogamp )
+( cp -a jogl/LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION/jogl )
+( cp -a jogl/README.txt $PKG/usr/doc/$PRGNAM-$VERSION/jogl )
+if [ "${JOCL}" = "yes" ]; then
+ ( cp -a jocl/build/jar/jocl.jar $PKG/usr/share/java )
+ ( cp -a jocl/build/obj/*.so $PKG/usr/lib${LIBDIRSUFFIX}/jogamp )
+ ( cp -a jocl/LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION/jocl )
+ ( cp -a jocl/README.txt $PKG/usr/doc/$PRGNAM-$VERSION/jocl )
+fi
+
+( cd $PKG/usr/share/java ; rm -f jogl.jar )
+( cd $PKG/usr/share/java ; ln -sf jogl-all.jar jogl.jar )
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/jogamp/jogamp.info b/libraries/jogamp/jogamp.info
new file mode 100644
index 000000000000..7f838ba714d1
--- /dev/null
+++ b/libraries/jogamp/jogamp.info
@@ -0,0 +1,18 @@
+PRGNAM="jogamp"
+VERSION="2.4.0"
+HOMEPAGE="https://jogamp.org/"
+DOWNLOAD="https://jogamp.org/deployment/v2.4.0/archive/Sources/gluegen-v2.4.0.tar.xz \
+ https://jogamp.org/deployment/v2.4.0/archive/Sources/jcpp-v2.4.0.tar.xz \
+ https://jogamp.org/deployment/v2.4.0/archive/Sources/joal-v2.4.0.tar.xz \
+ https://jogamp.org/deployment/v2.4.0/archive/Sources/jocl-v2.4.0.tar.xz \
+ https://jogamp.org/deployment/v2.4.0/archive/Sources/jogl-v2.4.0.tar.xz"
+MD5SUM="8d86f1dddcbae130268215f1760dc461 \
+ fce6ee70e0fb6fa393ccbadf42361d20 \
+ 4464164eaf91f723dd65890d7ff8093a \
+ d3dae1dfe275431417be0a1a6800dddb \
+ 44ee4fa39d81366bedf1ead918f102eb"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="apache-ant p7zip zulu-openjdk17"
+MAINTAINER="Giancarlo Dessì"
+EMAIL="slack@giand.it"
diff --git a/libraries/jogamp/slack-desc b/libraries/jogamp/slack-desc
new file mode 100644
index 000000000000..8f5c90f2e6fc
--- /dev/null
+++ b/libraries/jogamp/slack-desc
@@ -0,0 +1,19 @@
+# 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------------------------------------------------------|
+jogamp: jogamp (Java libraries for 3D Graphics, Multimedia and Processing)
+jogamp:
+jogamp: JogAmp is a collection of high performance Java libraries for 3D
+jogamp: Graphics, Multimedia and Processing.
+jogamp: JOGL, JOCL and JOAL provide cross platform Java language bindings
+jogamp: to the OpenGL, OpenCL, OpenAL and OpenMAX APIs.
+jogamp:
+jogamp: Home page: https://jogamp.org/
+jogamp:
+jogamp:
+jogamp: