summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdinaldo P. Silva <edps.mundognu@gmail.com>2015-08-23 09:48:46 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-08-23 09:48:46 +0700
commit148ca20de48244719872d14c6387f52ce781f20d (patch)
tree27f7dfaed2e41b059bca3134ecad61fe2c19227c
parent97749447469c6200771c8bfe5a2a4402d1aa3bc9 (diff)
downloadslackbuilds-148ca20de48244719872d14c6387f52ce781f20d.tar.gz
network/freerapid: Fix compatibilities with new JDK.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/freerapid/README10
-rw-r--r--network/freerapid/doinst.sh6
-rw-r--r--network/freerapid/frd.sh95
-rw-r--r--network/freerapid/freerapid.SlackBuild2
-rw-r--r--network/freerapid/freerapid.desktop2
5 files changed, 40 insertions, 75 deletions
diff --git a/network/freerapid/README b/network/freerapid/README
index 0ac58f37b1..dbb98772b0 100644
--- a/network/freerapid/README
+++ b/network/freerapid/README
@@ -4,6 +4,16 @@ Facebook, Picasa and other file-sharing services, include the new ones like mega
Simply copy and paste your links from a browser to this application.
FreeRapid Downloader will handle the rest itself. No more clicking or uncomfortable waiting.
+To use smooth fonts (better appearance), the options " -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true " should be used.
+
+In some distros, the options " -Djava.net.preferIPv4Stack=true -Xmx160m " should be used.
+
+To reduce CPU usage, the option " -Dsun.java2d.opengl=true " should be used.
+
+The options mentioned were added in /usr/bin/freerapid for convenience, simply uncomment the desired option.
+
+Please add /usr/lib{64}/java/bin into your $PATH.
+
Main Features:
* support for concurrent downloading from multiple services;
diff --git a/network/freerapid/doinst.sh b/network/freerapid/doinst.sh
index 9424ce43ff..9081430537 100644
--- a/network/freerapid/doinst.sh
+++ b/network/freerapid/doinst.sh
@@ -1,3 +1,9 @@
+set -e
+
+# create links for compatibility with new JDK versions...
+ln -sf /usr/lib/java/bin/java /usr/bin/java
+ln -sf /usr/lib/java/bin/javaws /usr/bin/javaws
+
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
diff --git a/network/freerapid/frd.sh b/network/freerapid/frd.sh
index 20a8bb1daf..a2b989ddbc 100644
--- a/network/freerapid/frd.sh
+++ b/network/freerapid/frd.sh
@@ -1,79 +1,26 @@
#!/bin/sh
-# FRD requires Sun Java 6, NO Shity GCJ, NO buggy OpenJDK, but Sun Java 6!
-# some crappy distros needed to add switch -Djava.net.preferIPv4Stack=true
-# Look for java in these directories
-LOOKUP_JRE_DIRS="/usr/lib/jvm/* /opt/java* /opt/jre*"
-#Created by Petris 2009 -> Many thanks!
-# Required version
-REQ_JVER1=1
-REQ_JVER2=6
-REQ_JVER3=0
-REQ_JVER4=5
-check_java_version () {
- JVER1=`echo $JAVA_VERSION_OUTPUT | sed 's/java version "\([0-9]*\)\.[0-9]*\.[0-9]*_[0-9]*".*/\1/'`
- JVER2=`echo $JAVA_VERSION_OUTPUT | sed 's/java version "[0-9]*\.\([0-9]*\)\.[0-9]*_[0-9]*".*/\1/'`
- JVER3=`echo $JAVA_VERSION_OUTPUT | sed 's/java version "[0-9]*\.[0-9]*\.\([0-9]*\)_[0-9]*".*/\1/'`
- JVER4=`echo $JAVA_VERSION_OUTPUT | sed 's/java version "[0-9]*\.[0-9]*\.[0-9]*_\([0-9]*\)".*/\1/'`
-
- if [ $JVER1 -gt $REQ_JVER1 ]; then
- return 0
- elif [ $JVER1 -lt $REQ_JVER1 ]; then
- return 1
- fi
-
- if [ $JVER2 -gt $REQ_JVER2 ]; then
- return 0
- elif [ $JVER2 -lt $REQ_JVER2 ]; then
- return 1
- fi
-
- if [ $JVER3 -gt $REQ_JVER3 ]; then
- return 0
- elif [ $JVER3 -lt $REQ_JVER3 ]; then
- return 1
- fi
-
- if [ $JVER4 -lt $REQ_JVER4 ]; then
- return 1
- fi
-
- return 0
-}
-
-# Handle symlinks
-PROGRAM="$0"
-while [ -L "$PROGRAM" ]; do
- PROGRAM=`readlink -f "$PROGRAM"`
-done
-cd "`dirname \"$PROGRAM\"`"
-
-# Check default java
+# default option.
if [ -x "`which java`" ]; then
- JAVA_VERSION_OUTPUT=`java -version 2>&1`
- check_java_version && cd /usr/share/freerapid-0.9.4/ && exec java -Djava.net.preferIPv4Stack=true -Xmx160m -jar frd.jar "$@"
-fi
-
-# Test other possible Java locations
-for JRE_PATH in $LOOKUP_JRE_DIRS; do
- if [ -x "$JRE_PATH/bin/java" ]; then
- JAVA_VERSION_OUTPUT=`"$JRE_PATH/bin/java" -version 2>&1`
- check_java_version && {
- export JRE_PATH
- cd /usr/share/freerapid-0.94/ && exec $JRE_PATH/bin/java -Djava.net.preferIPv4Stack=true -Xmx160m -jar frd.jar "$@"
- }
- fi
-done
-
-# Failed
-if [ -x "`which xmessage`" ]; then
- xmessage -nearmouse -file - <<EOF
-Failed to find a suitable java version.
-Required: $REQ_JVER1.$REQ_JVER2.$REQ_JVER3_$REQ_JVER4 or newer.
-EOF
-else
- echo Failed to find a suitable java version.
- echo Required: $REQ_JVER1.$REQ_JVER2.$REQ_JVER3_$REQ_JVER4 or newer.
+ cd /usr/share/freerapid-0.9.4/ && exec java -jar frd.jar "$@"
fi
-exit 1
+# less CPU usage.
+#if [ -x "`which java`" ]; then
+# cd /usr/share/freerapid-0.9.4/ && exec java -Dsun.java2d.opengl=true -jar frd.jar "$@"
+#fi
+
+# needed for some distros.
+#if [ -x "`which java`" ]; then
+# cd /usr/share/freerapid-0.9.4/ && exec java -Djava.net.preferIPv4Stack=true -Xmx160m -jar frd.jar "$@"
+#fi
+
+# better fonts appearance (smooth fonts).
+#if [ -x "`which java`" ]; then
+# cd /usr/share/freerapid-0.9.4/ && exec java -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Djava.net.preferIPv4Stack=true -Xmx160m -jar frd.jar "$@"
+#fi
+
+# all options combined.
+#if [ -x "`which java`" ]; then
+# cd /usr/share/freerapid-0.9.4/ && exec java -Dsun.java2d.opengl=true -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Djava.net.preferIPv4Stack=true -Xmx160m -jar frd.jar "$@"
+#fi
diff --git a/network/freerapid/freerapid.SlackBuild b/network/freerapid/freerapid.SlackBuild
index 6517a88166..a1fbf1c331 100644
--- a/network/freerapid/freerapid.SlackBuild
+++ b/network/freerapid/freerapid.SlackBuild
@@ -26,7 +26,7 @@ PRGNAM=freerapid
SRCNAM=FreeRapid
VERSION=${VERSION:-0.9.4}
SRCVER=${SRCVER:-0.9u4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
ARCH=noarch
diff --git a/network/freerapid/freerapid.desktop b/network/freerapid/freerapid.desktop
index ac8233d8d6..e27da579c2 100644
--- a/network/freerapid/freerapid.desktop
+++ b/network/freerapid/freerapid.desktop
@@ -5,5 +5,7 @@ Comment=Java based download manager
Exec=/usr/bin/freerapid
StartupNotify=true
Icon=freerapid
+Terminal=false
+X-MultipleArgs=false
Type=Application
Categories=Network;