Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2014 09:59:46 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372439 - in head/games/minecraft-client: . files
Message-ID:  <201411110959.sAB9xk5D072674@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Tue Nov 11 09:59:46 2014
New Revision: 372439
URL: https://svnweb.freebsd.org/changeset/ports/372439
QAT: https://qat.redports.org/buildarchive/r372439/

Log:
  Remove dependency on bash
  
  PR:		ports/193945
  Submitted by:	Jan Kokemuller

Modified:
  head/games/minecraft-client/Makefile
  head/games/minecraft-client/files/minecraft-runtime
  head/games/minecraft-client/pkg-plist

Modified: head/games/minecraft-client/Makefile
==============================================================================
--- head/games/minecraft-client/Makefile	Tue Nov 11 09:42:33 2014	(r372438)
+++ head/games/minecraft-client/Makefile	Tue Nov 11 09:59:46 2014	(r372439)
@@ -3,7 +3,7 @@
 
 PORTNAME=	minecraft-client
 PORTVERSION=	1.7.9
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games java
 MASTER_SITES=	http://s3.amazonaws.com/Minecraft.Download/launcher/:minecraft \
 		http://media-mcw.cursecdn.com/c/c5/:icon
@@ -15,8 +15,7 @@ EXTRACT_ONLY=
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Client for the block building game
 
-RUN_DEPENDS=	${JAVALIBDIR}/lwjgl/lwjgl.jar:${PORTSDIR}/games/lwjgl \
-		bash:${PORTSDIR}/shells/bash
+RUN_DEPENDS=	${JAVALIBDIR}/lwjgl/lwjgl.jar:${PORTSDIR}/games/lwjgl
 
 WRKSRC=		${WRKDIR}
 NO_BUILD=	yes

Modified: head/games/minecraft-client/files/minecraft-runtime
==============================================================================
--- head/games/minecraft-client/files/minecraft-runtime	Tue Nov 11 09:42:33 2014	(r372438)
+++ head/games/minecraft-client/files/minecraft-runtime	Tue Nov 11 09:59:46 2014	(r372439)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/bash
+#!/bin/sh
 
 LWJGL_JLP_OVRD="/usr/local/lib/lwjgl2.9.1"
 LWJGL_OVRD="/usr/local/share/java/classes/lwjgl/lwjgl.jar"
@@ -7,40 +7,38 @@ LWJGL_UTIL_OVRD="/usr/local/share/java/c
 export JAVA_HOME=/usr/local/openjdk8
 
 build_classpath() {
-    j=0
-    ocp=`echo ${1} | sed 's/:/ /g'`
-    for p in ${ocp}
+    local IFS=":"
+    for p in ${1}
     do
-        if [[ $p == *lwjgl-* ]]
-        then
-            ncp[$j]=${LWJGL_OVRD}
-        elif [[ $p == *lwjgl_util* ]]
-        then
-            ncp[$j]=${LWJGL_UTIL_OVRD}
-        else
-            ncp[$j]=${p}
-        fi
-        j=$(( j + 1 ))
+        case "${p}" in
+        *lwjgl-*)
+            cp="${cp}:${LWJGL_OVRD}"
+            ;;
+        *lwjgl_util*)
+            cp="${cp}:${LWJGL_UTIL_OVRD}"
+            ;;
+        *)
+            cp="${cp}:${p}"
+            ;;
+        esac
     done
-
-    cp=`echo ${ncp[@]} | sed 's/ /:/g'`
+    cp=${cp#?}
 }
 
-
-i=0
 for var in "${@}"
 do
-    if [[ "$var" == -Djava.library* ]]
-    then
-        args[$i]="-Djava.library.path=${LWJGL_JLP_OVRD}"
-    elif [[ "$var" == *lwjgl_util* ]]
-    then
+    case "${var}" in
+    -Djava.library*)
+        args="${args} -Djava.library.path=${LWJGL_JLP_OVRD}"
+        ;;
+    *lwjgl_util*)
         build_classpath "${var}"
-        args[$i]="$cp"
-    else
-        args[$i]=$var
-    fi
-        i=$(( i + 1 ))
+        args="${args} ${cp}"
+        ;;
+    *)
+        args="${args} ${var}"
+        ;;
+    esac
 done
 
-${JAVA_HOME}/jre/bin/java ${args[@]}
+${JAVA_HOME}/jre/bin/java ${args}

Modified: head/games/minecraft-client/pkg-plist
==============================================================================
--- head/games/minecraft-client/pkg-plist	Tue Nov 11 09:42:33 2014	(r372438)
+++ head/games/minecraft-client/pkg-plist	Tue Nov 11 09:59:46 2014	(r372439)
@@ -3,4 +3,3 @@ bin/minecraft-client
 %%DATADIR%%/minecraft-runtime
 %%DATADIR%%/Notifier.java
 share/pixmaps/minecraft-client.png
-@dirrm %%DATADIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411110959.sAB9xk5D072674>