aboutsummaryrefslogtreecommitdiff
path: root/games/minecraft-client
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-04-17 23:14:24 +0000
committerJohn Marino <marino@FreeBSD.org>2014-04-17 23:14:24 +0000
commitc10af0ab7046940ea25daabb8b05c4e5db5e0d00 (patch)
tree00d4ea05b233c4c071ffd6e822d0816cc6dbf6e1 /games/minecraft-client
parent05816273352eb65502e4f79a7b2999a512fc9e51 (diff)
downloadports-c10af0ab7046940ea25daabb8b05c4e5db5e0d00.tar.gz
ports-c10af0ab7046940ea25daabb8b05c4e5db5e0d00.zip
games/minecraft-client: Unbreak run by using official launcher
The method of selectively loading specific versions in Minecraft stopped working in the 1.5.x series. From 1.6.0 and later, the official launcher must be used. The launcher itself does not change often (last time was July 2013). The jar files are downloaded into $HOME/.minecraft directory, so every user gets their own copy which is not removed when the port is uninstalled. The new launcher also downloads lwjgl files, so the dependency on games/lwjgl is redundant, as well as openal-soft. This allows the port to be simplified and to always install the native version. The port version doesn't really matter anymore. I will set it to 1.7.9 right now as this is the latest available version. PR: ports/188473 Approved by: marino@. It does mirror the maintainers original intent, but he did not weigh in on the PR. The game was broken. Simplified by: marino@
Notes
Notes: svn path=/head/; revision=351506
Diffstat (limited to 'games/minecraft-client')
-rw-r--r--games/minecraft-client/Makefile47
-rw-r--r--games/minecraft-client/distinfo8
-rw-r--r--games/minecraft-client/pkg-plist1
3 files changed, 13 insertions, 43 deletions
diff --git a/games/minecraft-client/Makefile b/games/minecraft-client/Makefile
index e7604fd3dfda..ce0a006d8fdc 100644
--- a/games/minecraft-client/Makefile
+++ b/games/minecraft-client/Makefile
@@ -2,11 +2,11 @@
# $FreeBSD$
PORTNAME= minecraft-client
-PORTVERSION= 1.7.5
+PORTVERSION= 1.7.9
CATEGORIES= games java
-MASTER_SITES= http://s3.amazonaws.com/Minecraft.Download/versions/${PORTVERSION}/:minecraft \
+MASTER_SITES= http://s3.amazonaws.com/Minecraft.Download/launcher/:minecraft \
http://media-mcw.cursecdn.com/c/c5/:icon
-DISTFILES= ${PORTVERSION}.jar:minecraft \
+DISTFILES= Minecraft.jar:minecraft \
Grass.png:icon
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
EXTRACT_ONLY=
@@ -14,13 +14,11 @@ EXTRACT_ONLY=
MAINTAINER= janik@hikarihq.com
COMMENT= Client for the block building game
-OPTIONS_DEFINE= NATIVE_LIBS
-OPTIONS_DEFAULT= NATIVE_LIBS
-NATIVE_LIBS_DESC= Enable native libs support
-
WRKSRC= ${WRKDIR}
NO_BUILD= yes
USE_JAVA= yes
+JAVA_OS= native
+JAVA_VENDOR= openjdk
JAVA_VERSION= 1.7+
DESKTOP_ENTRIES="Minecraft" \
"Block building game" \
@@ -29,43 +27,16 @@ DESKTOP_ENTRIES="Minecraft" \
"Game;Java;" \
false
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MNATIVE_LIBS}
-USES+= openal:soft
-BUILD_DEPENDS+= ${JAVALIBDIR}/lwjgl/lwjgl_util.jar:${PORTSDIR}/games/lwjgl
-RUN_DEPENDS+= ${JAVALIBDIR}/lwjgl/lwjgl_util.jar:${PORTSDIR}/games/lwjgl
-JAVA_OS= native
-JAVA_VENDOR= openjdk
-PLIST_SUB+= NATIVE=""
-.else
-JAVA_OS= linux
-JAVA_VENDOR= sun
-PLIST_SUB+= NATIVE="@comment "
-.endif
-
do-install:
- @${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/minecraft-client
- @${ECHO_CMD} "export JAVA_HOME=${JAVA_HOME}" >> ${WRKDIR}/minecraft-client
- @${ECHO_CMD} "exec ${JAVA} -Xmx1024M -Xms1024M -jar ${DATADIR}/Minecraft.jar" >> ${WRKDIR}/minecraft-client
@${MKDIR} ${STAGEDIR}${DATADIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${PORTVERSION}.jar \
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/Minecraft.jar \
${STAGEDIR}${DATADIR}/Minecraft.jar
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/Grass.png \
${STAGEDIR}${PREFIX}/share/pixmaps/minecraft-client.png
-.if ${PORT_OPTIONS:MNATIVE_LIBS}
- @${MKDIR} ${WRKSRC}/native-libs
- @${CP} ${PREFIX}/lib/lwjgl*/liblwjgl*.so ${WRKSRC}/native-libs
- @${CP} ${PREFIX}/lib/libopenal.so ${WRKSRC}/native-libs
- @${JAR} cvf ${WRKSRC}/lwjgl-native-libs.jar -C ${WRKSRC}/native-libs .
- ${INSTALL_DATA} -m 644 ${WRKSRC}/lwjgl-native-libs.jar \
- ${STAGEDIR}${DATADIR}
- ${INSTALL_SCRIPT} ${FILESDIR}/${PORTNAME} ${WRKDIR}
- ${REINPLACE_CMD} \
- -e 's|=JAVA_HOME|=${JAVA_HOME}|' \
+ ${SED} -e 's|=JAVA_HOME|=${JAVA_HOME}|' \
-e 's|PREFIX|${PREFIX}|' \
- -e 's|JAVA_CMD|${JAVA}|' ${WRKDIR}/minecraft-client
-.endif
+ -e 's|JAVA_CMD|${JAVA}|' ${FILESDIR}/minecraft-client \
+ > ${WRKDIR}/minecraft-client
${INSTALL_SCRIPT} ${WRKDIR}/minecraft-client ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/games/minecraft-client/distinfo b/games/minecraft-client/distinfo
index 5c0a34b7f5cb..fc864c3900c2 100644
--- a/games/minecraft-client/distinfo
+++ b/games/minecraft-client/distinfo
@@ -1,4 +1,4 @@
-SHA256 (minecraft-client/1.7.5/1.7.5.jar) = 5f83b944b59c48ea7fa8f92fefd491ecb6d1e8d6c9b412fc849f6457c8cee27b
-SIZE (minecraft-client/1.7.5/1.7.5.jar) = 5225771
-SHA256 (minecraft-client/1.7.5/Grass.png) = 438c0f63e379e92af1b5b2e06cc5e3365ee272810af65ebc102304bce4fa8c4b
-SIZE (minecraft-client/1.7.5/Grass.png) = 12586
+SHA256 (minecraft-client/1.7.9/Minecraft.jar) = e8d90b2637b141b556670d8460d317aadb6e4f2e644e519995c428800b25f212
+SIZE (minecraft-client/1.7.9/Minecraft.jar) = 280212
+SHA256 (minecraft-client/1.7.9/Grass.png) = 438c0f63e379e92af1b5b2e06cc5e3365ee272810af65ebc102304bce4fa8c4b
+SIZE (minecraft-client/1.7.9/Grass.png) = 12586
diff --git a/games/minecraft-client/pkg-plist b/games/minecraft-client/pkg-plist
index 21a0c9c4f9fa..20d13f796a06 100644
--- a/games/minecraft-client/pkg-plist
+++ b/games/minecraft-client/pkg-plist
@@ -1,5 +1,4 @@
bin/minecraft-client
-%%NATIVE%%%%DATADIR%%/lwjgl-native-libs.jar
%%DATADIR%%/Minecraft.jar
share/pixmaps/minecraft-client.png
@dirrm %%DATADIR%%