Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71243 - Adding TripleA v0.5.1.1 Stable to portage
Summary: Adding TripleA v0.5.1.1 Stable to portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL: http://sourceforge.net/project/showfi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-14 22:19 UTC by George .H
Modified: 2005-01-30 00:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
triplea-0.5.1.ebuild (triplea-0.5.1.ebuild,2.22 KB, text/plain)
2004-11-30 12:52 UTC, Mr. Bones. (RETIRED)
Details
modifications to the e-build previous (triplea-0.5.1.ebuild,2.22 KB, text/plain)
2004-11-30 15:48 UTC, George .H
Details
ebuild tarball (triplea-0.5.1-r1.tar.bz2,1.60 KB, application/octet-stream)
2004-12-07 14:09 UTC, George .H
Details
The new ebuild that I got to work on my gentoo system, see my comments (triplea-0.5.1.ebuild,1.95 KB, text/plain)
2004-12-10 16:50 UTC, George .H
Details
triplea-0.5.1.ebuild (triplea-0.5.1.ebuild,2.21 KB, text/plain)
2004-12-17 02:37 UTC, Mr. Bones. (RETIRED)
Details
fixed ebuild (triplea-0.5.1.ebuild,2.10 KB, text/plain)
2004-12-17 07:45 UTC, Thomas Matthijs (RETIRED)
Details
patch (triplea-0.5.1.patch,3.18 KB, patch)
2004-12-17 07:45 UTC, Thomas Matthijs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George .H 2004-11-14 22:19:07 UTC
Adding TripleA v0.5.1 Stable to portage

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-11-21 01:30:19 UTC
providing a working ebuild would speed this along...
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2004-11-30 12:52:08 UTC
Created attachment 45022 [details]
triplea-0.5.1.ebuild

Here's a start at an ebuild for 0.5.1 but it doesn't work for me.  Patches
welcome.
Comment 3 George .H 2004-11-30 15:48:05 UTC
Created attachment 45026 [details]
modifications to the e-build previous

I made some modifications, based on an external e-build I saw at Denix's home
page http://denics.free.fr/english.html

Though we don't use the -Xmx96m  flag anymore. It just tells java to restrict
memory usage to 96megs, we abandoned it since v0.4.9.

I did not test the e-build.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-11-30 17:54:54 UTC
yeah, no real change from the failure I see with my ebuild.  Here it is:

java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:61)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
	at games.strategy.util.PointFileReaderWriter.readOneToMany(PointFileReaderWriter.java:177)
	at games.strategy.triplea.ui.TerritoryData.<init>(TerritoryData.java:89)
	at games.strategy.triplea.ui.TerritoryData.setMapDir(TerritoryData.java:63)
	at games.strategy.triplea.TripleA.startGame(TripleA.java:87)
	at games.strategy.engine.framework.ui.LauncherFrame$5.run(LauncherFrame.java:301)
	at java.lang.Thread.run(Thread.java:536)


Could one of the java folks take a look at this please?
Comment 5 George .H 2004-12-01 00:47:37 UTC
I looked at the error, it seems that it cannot read a file.
This error should not happen, unless you don't have the proper data files in the "classes/games/strategy/triplea/image/images/maps/" directory.

I have this feeling that when it is compiling TripleA it is not copying the data files.

One more thing that concerns me, this header is still in the 0.5.1 ebuild
"# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/triplea-0.4.8.ebuild,v 1.2 2004/07/24 10:34:08 "
Comment 6 George .H 2004-12-01 00:53:41 UTC
I re-created the exact error you got.

This error happens when your missing the "place.txt" file in the 
"classes/games/strategy/triplea/image/images/maps/<GameName>" directory

These data files are located in "data/games/strategy/triplea/image/images/maps/<GameName>" and when compiling TripleA they get copied over into the classes dir as shown above. For some reason you don't have them.

Downloading TripleA, and compiling it off the bat with ant, and running it works perfectly. This seems to be an ebuild related problem.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2004-12-01 01:53:01 UTC
If you tell me the exact commands you used to be able to run it from the downloaded file that might be helpful to me.  I agree that it is an ebuild problem but I'm not very familiar with java.
Comment 8 George .H 2004-12-01 08:18:12 UTC
Simply put, all that needs to be done are these 3 steps:

1: Unzip the package anywhere.
2: edit .ant.properties so it points to the proper path for Junit.jar file
3: in the same directory as the "build.xml" run "ant compile"

(refer to http://triplea.sourceforge.net/TripleA_User_Documentation.html#sec_b  for a full detailed description and step-by-step instructions for compiling from source, should it help you further)

Thats all.

There is as well pre-compiled version of TripleA where all that needs to be done is unzip and run, without needing ant, junit.
Comment 9 George .H 2004-12-07 14:09:26 UTC
Created attachment 45468 [details]
ebuild tarball

I was sent this tarball from Denis denics(AT)free.fr
Does this work for portage? Any comments on the ebuild please contact Denis.
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2004-12-07 14:30:17 UTC
the tarball doesn't include an ebuild?
Comment 11 George .H 2004-12-10 16:49:31 UTC
OK, I don't know why no one figured this out sooner as it was pretty simple. I managed to make a working ebuild by modifying the 0.4.8 ebuild and editing a little extra files.

I'll List you the steps below

1. (See attachment triplea-0.5.1.ebuild) place in  /usr/portage/games-strategy/triplea
2. Download triplea_source_0_5_1.zip and put it in /usr/portage/distfiles
3. create a file called "digest-triplea-0.5.1" and put the MD5 sum, name, and file size of the downloaded zip file.
4. edit the "Manifest" file and add the MD5 sums, name, and file size of the 0.5.1 ebuild and digest files.
5. Run  env-update && source /etc/profile
6. Run  emerge triplea.0.5.1.ebuild
7. Exit root, run "triplea"
8. It all works

I think for the CVS repo of gentoo you need to have some other md5 sum or something.. but the steps above is exactly how I got it to work. Please look at hte ebuild! it is the most important, NOTHING HAS CHANGED from the 0.4.8 except that I made the dependency ant-core and removed the -mx96M flag.

I did not add anything for the ai scripts as they are not needed and it is experimental anyways.
Comment 12 George .H 2004-12-10 16:50:59 UTC
Created attachment 45712 [details]
The new ebuild that I got to work on my gentoo system, see my comments

Read my comments below about the steps I took to get this e-build to work.
Thanks.
Comment 13 George .H 2004-12-14 17:26:03 UTC
You wrote....

yeah, no real change from the failure I see with my ebuild.  Here it is:

java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:61)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
	at games.strategy.util.PointFileReaderWriter.readOneToMany(PointFileReaderWriter.java:177)
	at games.strategy.triplea.ui.TerritoryData.<init>(TerritoryData.java:89)
	at games.strategy.triplea.ui.TerritoryData.setMapDir(TerritoryData.java:63)
	at games.strategy.triplea.TripleA.startGame(TripleA.java:87)
	at games.strategy.engine.framework.ui.LauncherFrame$5.run(LauncherFrame.java:301)
	at java.lang.Thread.run(Thread.java:536)


Could one of the java folks take a look at this please?
---

I actually found out what causes this problem. Actually has nothing to do with the files. Try  rm -R ~/.java

I got that error happen to me when I was running triplea from 2 different directories several times.. it seems to mess things up.
Comment 14 Mr. Bones. (RETIRED) gentoo-dev 2004-12-17 02:37:36 UTC
Created attachment 46199 [details]
triplea-0.5.1.ebuild

"The new ebuild that I got to work on my gentoo system"

You're kidding, right?	That's basically the same ebuild as what's in portage
right now as 0.4.8.  There's no reason to attach the same file to a bug.

Removing the .java directory and using that ebuild shows the traceback
everytime on my system.

This ebuild at least starts up for me.	It works fine until the autosave kicks
in.  Then it does a traceback, I assume because it can't write to the directory
it's trying to write to.
Comment 15 George .H 2004-12-17 03:50:52 UTC
You got me on that one, there already is a /usr/share/games/triplea/data/triplea.properties  file that tells triplea to save in the users home dir

I set up triplea again on gentoo, compiled, ran, but I get this damn stack trace when trying to run a game. I don't know what happens to triplea when you guys port it to an ebuild thingy, that causes this error.

I normally only get it when I run my cvs and non-cvs copies and they read the same system preferences in .java

But dunno. All these problems seem related to how triplea gets installed by protage it seems.
Comment 16 Mr. Bones. (RETIRED) gentoo-dev 2004-12-17 04:19:10 UTC
with the ebuild I just posted, and doing rm -rf ~/.java/  the game works but the autosave doesn't because I think the save path is hard-coded or is getting set wrong in the game.  I'm pretty sure that the reason it works for you without the ebuild if you run it out of your home directory or something is that it tries to write the autosave file to a place in the same directory tree as the libs and data, etc.  Once it's installed the game can't write the autosave because it doesn't have permissions to write there.  So far I think it's a bug in the autosave code in triplea.
Comment 17 George .H 2004-12-17 05:24:25 UTC
The autosave works with 0.4.8, and I am scanning most of the CVS tree in triplea and I made some comparisons between the several java files (triplea/src/games/strategy/engine/framework/ui/SaveGameFileChooser.java) as it holds the directories... but nothing has changed between it and 0.4.8 and 0.5.1.

Can you paste the stack trace your getting ? maybe that will clear things up.
Comment 18 Thomas Matthijs (RETIRED) gentoo-dev 2004-12-17 07:45:05 UTC
Created attachment 46215 [details]
fixed ebuild
Comment 19 Thomas Matthijs (RETIRED) gentoo-dev 2004-12-17 07:45:19 UTC
Created attachment 46216 [details, diff]
patch
Comment 20 Dnix 2005-01-26 10:48:45 UTC
New ebuild! 0.5.1.1

http://denics.free.fr/various/triplea/

ciao ciao
Comment 21 Mr. Bones. (RETIRED) gentoo-dev 2005-01-30 00:08:42 UTC
triplea-0.5.1.1.ebuild added to portage.  Thanks for the bug report.