From Minecraft site:
"Minecraft is a game about placing blocks while running from skeletons. Or something like that.."
The problem of this game is that the downloadable file is always the same across versions, which are hard to track as they are released quickly and you can't know the exact one unless you run the game.
So this is a live ebuild, not a real one, because it isn't based on svn, git, etc...(as they are missing): it will download the little jar file in "src_prepare".
Steps to Reproduce:
Created attachment 252449 [details]
Created attachment 252451 [details]
Created attachment 252453 [details]
As long as it's redistributable, you can place a copy with a fixed version some place.
EAPI2 can fix this without the horrible hack, although I suspect there aren't new releases of that particular file as often as you think. All that file seems to do is log you in so that you can download the bulk of the game to ~/.minecraft. On the one hand, this means we're not really packaging the game itself but on the other hand, it saves us from having to worry about bumping for those frequent updates.
Even though we obviously can't build the game itself from source, it does download some open source libraries that we can build. I would particularly like to use my own copy of OpenAL as the bundled copy is built against ALSA when I prefer PulseAudio. I will write a wrapper script that symlinks these libraries to where Minecraft looks for them. I have found that the game overwrites these symlinks every time there is an update but you can fool it by making the directory read-only. :) Watch this space for a new ebuild. Luckily I have commit access to java-overlay.
Okay, that is now available at...
I had it done yesterday but I decided to wait until the beta to make sure it still works, which it does. The JAR download didn't even change as I predicted.
I did use the read-only directory trick for the native libraries but for the JAR libraries, I actually strip a string from a class file to prevent them from even being downloaded. Sounds bad but it works a treat!
I've done a server ebuild too but that JAR has probably changed for the beta so I'll look into that later.
Oh, please note you'll need the rest of java-overlay for the dependencies. Probably best to use layman.
The server ebuild is now also up.
Thanks for the ebuild! Works so far fine.
Will be there in future the possibility so set the java options?
Are you talking about mine? What options do you want to set? This uses Gentoo's fairly sophisticated Java launcher but unfortunately all arguments get passed to the application rather than Java itself and there doesn't seem to be any other clean way to insert them at the moment.
Hi guys, i made a new ebuild for minecraft, i hope it works i havent tested it yet and its my first ebuild.
Created attachment 331028 [details]
Created attachment 331030 [details]
Created attachment 331032 [details]
forgot openal, fixed it.
No offence but why did you do that? My ebuild still works, has several enhancements, doesn't use that ugly hack, and is very well established. There's a long thread in the forums about it.
what hack are you talking about? did you even look in my ebuild or not?
(In reply to comment #15)
> No offence but why did you do that? My ebuild still works, has several
> enhancements, doesn't use that ugly hack, and is very well established.
> There's a long thread in the forums about it.
- Download didnt work (URI has changed)
- You are missing dependecies
- An incorrect dependency (sun-jdk)
- Mine is simple
- Mine downloads menu icon from the minecraft website.
Created attachment 331048 [details]
was missing eutils in inheritence.
Created attachment 331052 [details]
added use flag for sound,(still runs without openal i believe)
also changed URI back to the minecraft website i thought that uri didnt work anymore.
and fixed a space error..
i hope it works and quality is fine for portage now.
(In reply to comment #16)
> what hack are you talking about? did you even look in my ebuild or not?
Yes, I did. I guess if you consider yours to be a live ebuild then calling wget in src_prepare is more or less okay but there's really no need for that approach. That download is hardly ever updated. It's only changed about 4 times in the past 2 years.
But did you look at mine? It's not the one attached here, it's in java-overlay. I just verified that the SRC_URI still works. It definitely has no missing dependencies because it builds everything but the game itself from source. "virtual/jre" alone is not sufficient because it needs at least 1.6 and even then, the JREs have be listed explicitly. I doubt it works with IBM's and the X USE flag has to be enabled where applicable. The icon I have provided is 128x128 (not 32x32). Most importantly of all, because the dependencies are built from source, it uses a faster, more reliable, version of LWGJL, and OpenAL is built to suit your system (i.e. PulseAudio vs ALSA). Many users have told me it works for them when the prebuilt libraries from upstream didn't. I've been packaging Java stuff for Gentoo for 7 years so I know what I'm doing.
(In reply to comment #20)
> Yes, I did. I guess if you consider yours to be a live ebuild then calling
> wget in src_prepare is more or less okay but there's really no need for that
> approach. That download is hardly ever updated. It's only changed about 4
> times in the past 2 years.
so what is wrong?
> But did you look at mine? It's not the one attached here, it's in
i dont use java-overlay, this is for portage.
> "virtual/jre" alone is not sufficient because it needs at least
> 1.6 and even then, the JREs have be listed explicitly.
thanks for the tip, might need to print a message to tell the user to use the correct jre.
> Most importantly of all, because the dependencies are built from
> source, it uses a faster, more reliable, version of LWGJL, and OpenAL
> is built to suit your system (i.e. PulseAudio vs ALSA).
The launcher itself doesnt use any of that and i fail to see the difference with my RDEPENDS??? (besides JRE), sound?openal. LWGJL is installed into the home dir by minecraft itself so you lost my there as well.
> Many users have
> told me it works for them when the prebuilt libraries from upstream
> didn't. I've been packaging Java stuff for Gentoo for 7 years so I
> know what I'm doing.
weird, works fine here when downloading minecraft from the website and doing java -jar launcher.jar. your users must be doing something wrong.
(In reply to comment #21)
> so what is wrong?
Live ebuilds are frowned upon as it is. It also doesn't follow the guidelines for Java ebuilds. This would never be accepted into Portage.
> i dont use java-overlay, this is for portage.
If I were developer (sadly I have lacked the time) then mine would be in Portage along with the dependencies. Using java-overlay is not difficult, just install layman.
> The launcher itself doesnt use any of that and i fail to see the difference
> with my RDEPENDS??? (besides JRE), sound?openal. LWGJL is installed into the
> home dir by minecraft itself so you lost my there as well.
The regular upstream jar will not use your system's copy of OpenAL at all, it will use the version downloaded by the game, which only supports ALSA and OSS. As I already said, the version of LWJGL it uses is old and unreliable.
> weird, works fine here when downloading minecraft from the website and doing
> java -jar launcher.jar. your users must be doing something wrong.
It will work for most users but not everybody. PulseAudio users and those with lower-end graphics hardware have had the most trouble with the upstream libraries.
(In reply to comment #22)
> Live ebuilds are frowned upon as it is. It also doesn't follow the
> guidelines for Java ebuilds. This would never be accepted into Portage.
As i said i am new to ebuilds and this my first attempt i was hoping for someone helping me.
> If I were developer (sadly I have lacked the time) then mine would be in
> Portage along with the dependencies. Using java-overlay is not difficult,
> just install layman.
I know how layman works and i dont like it thats why i dont use it.
For example, should minecraft be in java-overlay or gamerlay? or whatever.
> The regular upstream jar will not use your system's copy of OpenAL at all,
> it will use the version downloaded by the game, which only supports ALSA and
> OSS. As I already said, the version of LWJGL it uses is old and unreliable.
It has openal builtin the native binaries, i did not know that. How did you go about and fix that? Doesn't the jar just use the natives in the home dir whether you install something newer/better in your system or not?
> It will work for most users but not everybody. PulseAudio users and those
> with lower-end graphics hardware have had the most trouble with the upstream
If it works so well it should be in portage, that is what bothers me.
BTW, i just tried your ebuild on java-overlay and it doesnt work.
Created attachment 331124 [details]
This is what i get with the java-overlay.
I have now resolved this via e-mail. He had built LWJGL for EGL, which I thought would work, but it doesn't. The game is hardcoded to use GLX. I have now allowed LWJGL to be built for both at the same time and ensured that Minecraft uses the correct version.
Any chance of some love for this? Way out of date, the startup has changed such that the init script fails to stop the service, and can't get server to appear in client list on LAN. Made only marginal progress on it. C'mon, it's Minecraft! :)
I take it you've tried the latest from the overlay? It's true I haven't updated the client in a while and a server update is long overdue. Unfortunately I stopped playing the game a long time ago. My wife still plays but she uses openSUSE these days.
I did step up to do the client update in September because our previous unbundling hack didn't work any more. It was a big job and I knew no one else was going to do it! Because of that, I didn't get around to finishing the server update. I'm afraid it's just not a priority for me right now.
Yeah, I'm on the latest from the overlay. As you alluded to, I was more referring to the server ebuilds (sorry for the lack of clarity - I'm very tired). Just want to run a private LAN server for my family.
Perhaps another dev could take up the mantle? Since Minecraft is one of the most popular games on the planet, surely some devs are playing it and care about it.
Please, please, please, Mr Chewi.
We would all so love to see the Gentoo Minecraft server running again.
It's been soo long!.
Please help the world with your Mad 1337 Guru Gentoo skilz!
(In reply to James Le Cuirot from comment #29)
> I take it you've tried the latest from the overlay? It's true I haven't
> updated the client in a while and a server update is long overdue.
> Unfortunately I stopped playing the game a long time ago. My wife still
> plays but she uses openSUSE these days.
> I did step up to do the client update in September because our previous
> unbundling hack didn't work any more. It was a big job and I knew no one
> else was going to do it! Because of that, I didn't get around to finishing
> the server update. I'm afraid it's just not a priority for me right now.
Everything actually very nearly works. Minor problems are that the initscript can't stop the server, and that you have to download the latest jar manually.
The major problem I have is that the client just wouldn't see the server on the network, but I have since realized that the problem is something deeper than the packaging of this ebuild: I've downloaded the jars manually (even the client in case the problem was there), trying both craftbukkit and vanilla minecraft_server. I've run everything manually (java -jar -style) using both icedtea (what I normally use) and oracle-jdk-bin, and the failure for the server to appear in the world list is consistent.
Strangely, if I run two clients (including the ebuild-installed clients) and turn on "Open to LAN" on one of them, the other sees it and can join it with no problem at all.
Oh, and I also tried the client with and without the minecraft-gentoo wrapper.
It turns out that somewhere along the way, unbeknownst to me, they removed LAN broadcasts from vanilla Minecraft server, which explains why it didn't appear. I actually knew this was removed in Bukkit and put in an external plugin, but the doc page for that plugin only reinforced my misconception about vanilla. Now, as for why the test didn't work with Bukkit, I must have messed up that test.
So, sorry for the bad info. I believe the only issues with the server builds are A. updating, and B. getting the init script to work for stopping the server (its mechanism for determining the PID no longer works).
Created attachment 369944 [details, diff]
Bring all of the minecraft ebuilds in java overlay up to date
chewi, I've gotten everything figured out. It actually took very little tweaking to get it all working again. Please consider merging this patch to the java overlay (git-am formatted for your convenience, manifest updates are excluded).
My son really wants to have this game so I thought I would try to install it from the java-overlay, however when I try to emerge the ebuild I run into a couple of serious Blockers that I can't seem to sort out.
[blocks B ] <dev-java/java-config-2.2 ("<dev-java/java-config-2.2" is blocking app-admin/eselect-java-0.1.0)
[blocks B ] app-admin/eselect-java ("app-admin/eselect-java" is blocking dev-java/java-config-2.1.12-r1)
Even more confusing is
(app-admin/eselect-java-0.1.0::java, ebuild scheduled for merge) pulled in by
app-admin/eselect-java required by (dev-java/icedtea-bin-184.108.40.206::gentoo, installed)
app-admin/eselect-java required by (dev-java/icedtea-web-1.4.1::gentoo, ebuild scheduled for merge)
I have dev-java/icedtea-bin-220.127.116.11 installed but don't have app-admin/eselect-java-0.1.0 installed even though equery would suggest that I do.
* These packages depend on eselect-java:
Is there a way to work around this problem? The Minecraft ebuild from the java overly does not seem to work as is.
I've seen this problem before and it's not specific to the game. Try updating java-config to 2.2 first.
(In reply to James Le Cuirot from comment #37)
> I've seen this problem before and it's not specific to the game. Try
> updating java-config to 2.2 first.
Thanks for the fast response.
Your suggestion worked and solved the blockers.
>>> Downloading 'http://www.paulscode.com/source/SoundSystem/07JAN2012/SoundSystem.zip'
--2014-02-16 09:14:42-- http://www.paulscode.com/source/SoundSystem/07JAN2012/SoundSystem.zip
Resolving www.paulscode.com... 18.104.22.168
Connecting to www.paulscode.com|22.214.171.124|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-02-16 09:14:42 ERROR 404: Not Found.
!!! Couldn't download 'paulscode-soundsystem-20120107.zip'. Aborting.
Calculating dependencies... done!
!!! One or more packages have been dropped due to
!!! masking or unsatisfied dependencies:
(dev-java/paulscode-libraryjavasound-20120107::java, ebuild scheduled for merge) requires dev-java/paulscode-soundsystem:0, dev-java/paulscode-soundsystem:0
(dev-java/paulscode-codecjorbis-20101123::java, ebuild scheduled for merge) requires dev-java/paulscode-soundsystem:0, dev-java/paulscode-soundsystem:0
(dev-java/paulscode-librarylwjglopenal-20130417::java, ebuild scheduled for merge) requires dev-java/paulscode-soundsystem:0, dev-java/paulscode-soundsystem:0
(games-action/minecraft-1.2.1-r4::java, ebuild scheduled for merge) requires dev-java/paulscode-codecjorbis:0, dev-java/paulscode-libraryjavasound:0, dev-java/paulscode-librarylwjglopenal:0, dev-java/paulscode-codecwav:0, dev-java/paulscode-soundsystem:0
(dev-java/paulscode-codecwav-20101023::java, ebuild scheduled for merge) requires dev-java/paulscode-soundsystem:0, dev-java/paulscode-soundsystem:0
It appears the site http://www.paulscode.com is down at the time while I can ping it I can't access it.
Hopefully this a temporary problem.
Created attachment 370704 [details, diff]
Update Minecraft-related ebuilds in java overlay
CraftBukkit 1.7.2-R0.3 has been released. This is an updated all-in-one patch for the java overlay for consideration.
BTW, I'd neglected to mention previously that (Craft)Bukkit is a beta version here. The reason is it was necessary to get it functioning enough like the current vanilla builds that minecraft-common still makes sense. Going forward, it might make sense to slot all of the server ebuilds so that versions can be kept consistent. E.g. minecraft-common:7.2 (which I've done in this patch) would work with craftbukkit:7.2 or minecraft-server:7.2 (which I haven't).
Do you think you can make a slotted ebuild for forge(based on minecraft version)?
(In reply to Mike Nerone from comment #39)
> ... E.g. minecraft-common:7.2 (which I've done
> in this patch) would work with craftbukkit:7.2 or minecraft-server:7.2
> (which I haven't).
Sorry, I meant 1.7 in these examples. Working on too many things concurrently. :P
Created attachment 395440 [details]
packages used on a stable system
Minecraft ebuild from java overlay installed on a mostly stable system with attached packages.
When trying to run minecraft >= 1.8 with *minecraft-gentoo* executable, I'm catching an exception :
> Exception in thread "Client thread" java.lang.NoSuchMethodError:
> at yd.<init>(SourceFile:32)
> at wr.a(SourceFile:249)
> at wr.<clinit>(SourceFile:30)
> at anp.<clinit>(SourceFile:82)
> at aln.t(SourceFile:686)
> at oe.c(SourceFile:482)
> at bss.<init>(SourceFile:296)
> at net.minecraft.client.main.Main.main(SourceFile:124)
> [11:29:16] [Client Shutdown Thread/INFO]: Stopping server
That's not surprising, it hasn't been updated in a very long time. I only just got my commit access back after losing it a year ago. I have a new minecraft-server ebuild waiting to be pushed up, pending updates being applied to the Jackson ebuilds. Once this is up, I'll take a fresh look at the client.
Just a ping, wondering if you might be getting to the client soon, chewi.
As you can see, I'm a dev now. I was about to get the server ebuild into the overlay (to be moved to the tree after some feedback) but between 1.8.1 and 1.8.3, they added another dependency that has sent me on a long trail of subdependencies. These are all packages that are long overdue bumps anyway so it's time well spent. Close now (literally working on it right now) so the client should follow soon.
Yes! Chewi is back and on the job!
All hail the great Chewbacca! :)
Updated ebuild here¹. Works-for-me™ on a stable up-to-date system.
Created attachment 589572 [details]
new minecraft launcher screenshot
For those interested in minecraft, I wrote a new ebuild¹ to install the new launcher. You can find informations about this new launcher here², and it can be officially downloaded from there³.
The bug has been closed via the following commit(s):
Author: Andrew Ammerlaan <email@example.com>
AuthorDate: 2021-05-22 11:52:06 +0000
Commit: Andrew Ammerlaan <firstname.lastname@example.org>
CommitDate: 2021-05-22 12:17:34 +0000
games-action/minecraft-launcher: import from ::guru
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <email@example.com>
games-action/minecraft-launcher/Manifest | 3 ++
games-action/minecraft-launcher/metadata.xml | 8 ++++
.../minecraft-launcher-1.6.93.ebuild | 34 +++++++++++++
.../minecraft-launcher-928.ebuild | 56 ++++++++++++++++++++++
4 files changed, 101 insertions(+)