diff options
author | Eduard Wirch | 2019-02-20 11:39:26 +0100 |
---|---|---|
committer | Eduard Wirch | 2019-02-20 11:40:09 +0100 |
commit | d257293acc4716300c716e835e6553d743b42928 (patch) | |
tree | 5f9e2f258f5668c553c4f0e23533c55260878e33 | |
parent | 5744bee03e626738fa24cdf36a3a8a6ec89ec2d7 (diff) | |
download | aur-d257293acc4716300c716e835e6553d743b42928.tar.gz |
Update to 3.2
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | deepgit.sh | 143 |
3 files changed, 143 insertions, 29 deletions
@@ -1,20 +1,18 @@ -# Generated by mksrcinfo v8 -# Fri Jul 27 06:35:18 UTC 2018 pkgbase = deepgit pkgdesc = A tool to investigate the history of source code. - pkgver = 3.0.3 + pkgver = 3.2 pkgrel = 1 url = http://www.syntevo.com/deepgit/ arch = any license = custom - depends = java-runtime + depends = java-environment>=8 depends = hicolor-icon-theme - depends = bash - source = https://www.syntevo.com/downloads/deepgit/deepgit-linux-3_0_3.tar.gz + depends = desktop-file-utils + source = https://www.syntevo.com/downloads/deepgit/deepgit-linux-3_2.tar.gz source = deepgit.sh source = deepgit.desktop - sha1sums = 9dae5f919708d926e40db7377973b29fcdd77966 - sha1sums = 5e59abc4997dbdfc110df414129950164a01cab1 + sha1sums = 6d7865feb079ecc8715643a66eeb7feb2a897945 + sha1sums = 23a92ccca3e7e452538cc7a9739c86a71dea474c sha1sums = 8ab2e36b3cb2e6f7b5af70a4ddbe2e9d307d3988 pkgname = deepgit @@ -1,15 +1,17 @@ -# Maintainer: Louis des Landes <aur@psykar.com> +# Maintainer: Eduard Wirch <wirch.eduard@gmail.com> +# Contributor: Louis des Landes <aur@psykar.com> + pkgname=deepgit -pkgver=3.0.3 +pkgver=3.2 pkgrel=1 pkgdesc="A tool to investigate the history of source code." arch=('any') url="http://www.syntevo.com/deepgit/" license=('custom') depends=( - 'java-runtime' + 'java-environment>=8' 'hicolor-icon-theme' - 'bash' + 'desktop-file-utils' ) source=( @@ -18,15 +20,14 @@ source=( "deepgit.desktop" ) sha1sums=( - 9dae5f919708d926e40db7377973b29fcdd77966 - 5e59abc4997dbdfc110df414129950164a01cab1 + 6d7865feb079ecc8715643a66eeb7feb2a897945 + 23a92ccca3e7e452538cc7a9739c86a71dea474c 8ab2e36b3cb2e6f7b5af70a4ddbe2e9d307d3988 ) package() { cd $srcdir # Copy ./lib to /usr/share/java/$pkgname/ - # Just be under a folder named lib, or it crashes install -m 644 -Dt "$pkgdir/usr/share/java/$pkgname/lib/" $srcdir/$pkgname/lib/* # Add executable to /usr/bin diff --git a/deepgit.sh b/deepgit.sh index 385c56a1c179..d3bcb216cad9 100644 --- a/deepgit.sh +++ b/deepgit.sh @@ -1,8 +1,118 @@ -#!/bin/bash +#!/bin/bash --login +# +# Editing this script should not be required. +# +# To specify an alternative Java Runtime Environment, set the environment +# variable DEEPGIT_JAVA_HOME or add a +# +# jre=/path/to/jre +# +# line to deepgit.vmoptions (see below). +# +# To specify additional VM options, add them to deepgit.vmoptions +# or ~/.deepgit/deepgit.vmoptions files. -# TODO -# this seems necessary for Solaris to find the Cairo-library -# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/gnome-private/lib +APP_NAME=DeepGit +APP_LOWER=deepgit + +parseVmOptions() { + if [ -f $1 ]; then + while read LINE || [[ -n "$LINE" ]]; do + LINE="${LINE#"${LINE%%[![:space:]]*}"}" + if [ ${#LINE} -gt 0 ] && [ ! ${LINE:0:1} == '#' ]; then + if [ ${LINE:0:4} == 'jre=' ]; then + APP_JAVA_HOME="${LINE:4}" + elif [ ${LINE:0:5} == 'path=' ]; then + APP_PATH="$APP_PATH:${LINE:5}" + else + _VM_PROPERTIES="$_VM_PROPERTIES $LINE" + fi + fi + done < $1 + fi +} + +echoJreConfigurationAndExit() { + mkdir --parents $APP_CONFIG_DIR + touch $APP_CONFIG_DIR/$APP_LOWER.vmoptions + echo "Add the line" + echo "jre=/path/to/jre" + echo "to $APP_CONFIG_DIR/$APP_LOWER.vmoptions and change the path" + echo "to the one pointing to the desired JRE." + exit 1 +} + +case "$BASH" in + */bash) : + ;; + *) + exec /bin/bash "$0" "$@" + ;; +esac + + +# check system architecture +ARCHITECTURE=`uname -m` +if [ "$ARCHITECTURE" != "x86_64" ] ; then + echo "$APP_NAME is not supported any more on 32-bit systems." + exit 1 +fi + +# Resolve the location of the DeepGit installation. +# This includes resolving any symlinks. +PRG=$0 +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` + if expr "$link" : '^/' 2> /dev/null >/dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi +done + +APP_BIN=`dirname "$PRG"` + +# Absolutize dir +oldpwd=`pwd` +cd "${APP_BIN}"; +APP_BIN=`pwd` +cd "${oldpwd}"; +unset oldpwd + +APP_CONFIG_DIR=${XDG_CONFIG_HOME:$HOME/.config}/$APP_LOWER + +APP_HOME=`dirname "$APP_BIN"` +APP_JAVA_HOME=$DEEPGIT_JAVA_HOME +parseVmOptions $APP_BIN/$APP_LOWER.vmoptions +parseVmOptions $HOME/.$APP_LOWER/$APP_LOWER.vmoptions +parseVmOptions $APP_CONFIG_DIR/$APP_LOWER.vmoptions + +# Determine Java Runtime +if [ "$APP_JAVA_HOME" = "" ] ; then + APP_JAVA_HOME=$JAVA_HOME +fi + +_JAVA_EXEC="java" +if [ "$APP_JAVA_HOME" != "" ] ; then + _TMP="$APP_JAVA_HOME/bin/java" + if [ -f "$_TMP" ] ; then + if [ -x "$_TMP" ] ; then + _JAVA_EXEC="$_TMP" + else + echo "Warning: $_TMP is not executable" + fi + else + echo "Warning: $_TMP does not exist" + fi +elif [ -e "$APP_HOME/jre/bin/java" ] ; then + _JAVA_EXEC="$APP_HOME/jre/bin/java" +fi + +if ! which "$_JAVA_EXEC" >/dev/null 2>&1 ; then + echo "Error: No Java Runtime Environment (JRE) 1.8 or higher found" + echoJreConfigurationAndExit +fi if type "lsb_release" > /dev/null 2> /dev/null ; then if [ "$XDG_CURRENT_DESKTOP" == "Unity" ] ; then @@ -17,18 +127,23 @@ if type "lsb_release" > /dev/null 2> /dev/null ; then fi if [ "$KDE_SESSION_UID" != "" ] && [ "$GTK2_RC_FILES" == "" ] ; then - if grep -q "oxygen-gtk" "$HOME/.gtkrc-2.0-kde4"; then - echo "Please change the GTK+ theme to something else than oxygen-gtk." - echo "See also http://www.syntevo.com/blog/?p=4143" - exit -1 - fi + if grep -q "oxygen-gtk" "$HOME/.gtkrc-2.0-kde4"; then + echo "Please change the GTK+ theme to something else than oxygen-gtk." + echo "See also http://www.syntevo.com/blog/?p=4143" + exit -1 + fi +fi + +if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + export GDK_BACKEND=x11 fi -# as workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=435773 -export SWT_GTK3=0 +# work-around for https://bugs.eclipse.org/bugs/show_bug.cgi?id=542675 +export GTK_IM_MODULE=ibus -_GC_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=25 -Xmx768m" -_MISC_OPTS="-Xverify:none -XX:MaxJavaStackTraceDepth=1000000 -Dsun.io.useCanonCaches=false" +_GC_OPTS="-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=25 -Xmx1024m -Xss2m" +_MISC_OPTS="-Xverify:none -XX:MaxJavaStackTraceDepth=1000000 -Dsun.io.useCanonCaches=false -XX:ErrorFile=$APP_CONFIG_DIR/@VERSION_MAJOR@/hs_err_pid%p.log" +APP_PATH="$PATH$DEEPGIT_PATH" -exec /usr/bin/java $_GC_OPTS $_MISC_OPTS -jar '/usr/share/java/deepgit/lib/bootloader.jar' "$@" +(export PATH="$APP_PATH"; "$_JAVA_EXEC" $_GC_OPTS $_MISC_OPTS $_VM_PROPERTIES -jar "/usr/share/java/deepgit/lib/bootloader.jar" "$@") |