View previous topic :: View next topic |
Author |
Message |
roger_lf n00b
Joined: 05 Jul 2011 Posts: 12
|
Posted: Wed Oct 24, 2012 4:41 pm Post subject: Is there an ebuild for openttd with cargodist? |
|
|
Hello all,
does anyone know if there is an overlay that has OpenTTD with cargodist (as in here: http://wiki.openttd.org/Passenger_and_cargo_distribution ).
I know that I could use git to pull it down and install localy, but I would prefer to keep everything tidy and do it through Portage. So far, I could not find an overlay that has this.
If such overlay doesn't exist, can someone help me write an ebuild for it? I know that I can have local overlays, but I have never wrote an ebuild. I guess I could just grab the normal games-simulation/openttd ebuild and just change from where to download (and save it on a local overlay with a different name, say games-simulation/openttd-cargodist). I guess I should just change this line in the ebuild:
Code: | SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz" |
The thing is, the cargodist version uses git, and I don't know how to use it beyond "git clone"... So I don't know how to properly replace this line (and the variables PV and P also appear elsewhere in the ebuild, so I guess I would need to change those too).
Thanks for the help! |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Sun May 04, 2014 9:02 pm Post subject: |
|
|
OpenTTD 1.4.0, with cargodist included, was released on April 1 (no joke!), and the dev team just released 14.1-rc1. I don't know when 1.4.0 will arrive in portage, but several other games are usually in ~arch within hours of the release. Like a kid waiting for Christmas, I'm checking "emerge --sync && emerge -avuDN world" every day for the 1.4.0 package, but still no luck. _________________ Grumpy old man |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun May 04, 2014 11:00 pm Post subject: |
|
|
step by step, howto reuse current ebuild to build trunk openttd
- download nightly -> http://www.openttd.org/en/download-trunk
- let's pickup current :
Code: | wget http://binaries.openttd.org/nightlies/trunk/r26563/openttd-trunk-r26563-source.tar.xz |
- open the file with archive editor (ie: fileroller) and just rename directory in the archive to openttd-1.4.0
- convert xz to gz
Code: | xz -dc < openttd-trunk-r26563-source.tar.xz | gzip -c > openttd-1.4.0-source.tar.gz |
- copy converted file to your distfiles directory
Code: | cp openttd-1.4.0-source.tar.gz /pathto/distfiles |
- create new ebuild using older one
Code: | cd /usr/portage/games/simulation/openttd
cp openttd-1.3.3.ebuild openttd-1.4.0.ebuild |
- add patch for 1.4
Code: | cp files/openttd-1.3.3-cflags.patch files/openttd-1.4.0-cflags.patch |
- register new ebuild & patch files
Code: | ebuild --force openttd-1.4.0.ebuild manifest |
- just emerge openttd now, remember to update opengfx |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun May 04, 2014 11:04 pm Post subject: |
|
|
For non trunk version (the real 1.4.0) just jump at step "create new ebuild using older one", while creating the manifest emerge will download the source itself
edit: of course next --sync will remove it, better copy it and emerge from your local overlay |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Mon May 05, 2014 6:39 am Post subject: |
|
|
@Krinn, thank you very much for your stepwise instructions, and for giving me some courage to do things on my own. I read up a bit about local overlays, and ended up with this copy-and-paste job:
Code: | mkdir -p /usr/local/portage/{metadata,profiles}
echo 'MyOverlay' > /usr/local/portage/profiles/repo_name
echo 'masters = gentoo' > /usr/local/portage/metadata/layout.conf
chown -R portage:portage /usr/local/portage
echo 'PORTDIR_OVERLAY="/usr/local/portage ${PORTDIR_OVERLAY}"' >> /etc/portage/make.conf
mkdir -p /usr/local/portage/games-simulation/openttd
cp -pr /usr/portage/games-simulation/openttd/* /usr/local/portage/games-simulation/openttd
cd /usr/local/portage/games-simulation/openttd/
cp -p files/openttd-1.3.3-cflags.patch files/openttd-1.4.0-cflags.patch
cp -p openttd-1.3.3.ebuild openttd-1.4.0.ebuild
ebuild --force openttd-1.4.0.ebuild manifest
cd
emerge -av openttd |
I started OpenTTD, and after a quick in-game upgrade of stuff, which I suppose included the OpenGFX, I'm now in 1.4.0
I just can't believe it's that simple to tweak portage
Edit: Removed "repoman manifest" from the code, as it seems totally unneccessary.
Edit2: -p added to 2 last cp lines to preserve portage as owner.
Edit3: remove old 1.3.3 files
Edit4: Undid Edit3 _________________ Grumpy old man
Last edited by leifbk on Sat May 17, 2014 11:47 am; edited 5 times in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Tue May 06, 2014 5:08 am Post subject: |
|
|
Looks like Christmas comes earlier this year |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri May 16, 2014 11:11 am Post subject: |
|
|
I ran into a problem today:
Code: | balapapa ~ # emerge -avuDN world
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U ] sys-libs/timezone-data-2014a [2013d] USE="nls" 385 kB
[ebuild R ] media-libs/libsdl-1.2.15-r4 USE="X aalib alsa directfb joystick opengl oss sound%* video xinerama xv -custom-cflags -dga -fbcon -ggi -libcaca -nas (-ps3) -pulseaudio -static-libs (-svga) -tslib (-audio%*)" 0 kB
Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 385 kB
!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:
media-libs/libsdl:0
(media-libs/libsdl-1.2.15-r4::gentoo, ebuild scheduled for merge) pulled in by
>=media-libs/libsdl-1.2.13-r1[sound,video] required by (media-video/libav-0.8.7::gentoo, installed)
(media-libs/libsdl-1.2.15-r4::gentoo, installed) pulled in by
media-libs/libsdl[audio,X,video] required by (games-simulation/openttd-1.4.0::MyOverlay, installed)
|
It looks like my overlaid openttd is screwed _________________ Grumpy old man |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri May 16, 2014 11:28 am Post subject: |
|
|
(Answering myself)
It seems like a trivial change in keywords, replacing "audio" with "sound". I edited my openttd-1.4.0.ebuild and changed the word "audio" to "sound" in the line
Code: | media-libs/libsdl[audio,X,video] |
and then did an
Code: | ebuild --force openttd-1.4.0.ebuild manifest |
This apparently has resolved the issue. _________________ Grumpy old man
Last edited by leifbk on Fri May 16, 2014 12:13 pm; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri May 16, 2014 12:29 pm Post subject: |
|
|
Thanks for the Bugzilla link, which confirms my hunch about the change in use flags. It's also obvious from the official ebuild, updated yesterday:
Code: | balapapa ~ # grep libsdl /usr/portage/games-simulation/openttd/openttd-1.3.3.ebuild
media-libs/libsdl[sound,X,video]
|
_________________ Grumpy old man |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri May 16, 2014 1:19 pm Post subject: |
|
|
I did post a link to this thread at the bugzilla a few minutes before your previous reply.
«women falling in your arms while yelling your name» sounds interesting, but I believe that I'm past that age _________________ Grumpy old man |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Wed Jun 04, 2014 5:55 am Post subject: |
|
|
Bump:
Code: | cd /usr/local/portage/games-simulation/openttd/
cp -p openttd-1.4.0.ebuild openttd-1.4.1.ebuild
cp -p files/openttd-1.4.0-cflags.patch files/openttd-1.4.1-cflags.patch
ebuild --force openttd-1.4.1.ebuild manifest
cd
emerge -av openttd |
_________________ Grumpy old man |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Tue Aug 19, 2014 6:34 am Post subject: |
|
|
Bump to 1.4.2:
Code: | cd /usr/local/portage/games-simulation/openttd/
cp -p openttd-1.4.1.ebuild openttd-1.4.2.ebuild
cp -p files/openttd-1.4.1-cflags.patch files/openttd-1.4.2-cflags.patch
ebuild --force openttd-1.4.2.ebuild manifest
cd
emerge -av openttd |
_________________ Grumpy old man |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri Dec 12, 2014 12:55 am Post subject: |
|
|
krinn wrote: | Looks like Christmas comes earlier this year |
It's soon regular Christmas time, and I was lucky to find this 1.4.4 bump on your favourite bugzilla.
You can either use the thanatos overlay directly (I think), or you can do like I did:
Code: | cd /usr/local/portage/games-simulation/openttd
rm -r *
# copy the raw contents of the openttd-1.4.4.ebuild from Roy's repo to this file in your own overlay:
nano -w openttd-1.4.4.ebuild
mkdir files
# copy the raw contents of the files/openttd-1.4.4-cflags.patch from Roy's repo to this file in your own overlay:
nano -w files/openttd-1.4.4-cflags.patch
# create manifest
ebuild --force openttd-1.4.4.ebuild manifest
# set appropriate ownership:
chown -R portage:portage *
cd
emerge -av openttd |
And it gloriously works.
And please try andythenorth's Road Hog when you start your next game. _________________ Grumpy old man |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Dec 25, 2014 12:49 am Post subject: |
|
|
Just to wish you a real merry Christmas this time |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Thu Dec 25, 2014 6:19 pm Post subject: |
|
|
krinn wrote: | Just to wish you a real merry Christmas this time |
The same to you, Krinn
Right now I'm playing with the 1.5.0 beta-1. I just downloaded the generic Linux binary x86_64 and untarred it to /usr/local/games. I had to download the nightly opengfx too and put it in the ~/.openttd/baseset folder, but it seems to work perfectly. I may try to build it from source later. _________________ Grumpy old man |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Dec 26, 2014 9:16 am Post subject: |
|
|
leifbk wrote: | I had to download the nightly opengfx too and put it in the ~/.openttd/baseset folder |
something the content download would had done for you |
|
Back to top |
|
|
leifbk Guru
Joined: 05 Jan 2004 Posts: 420 Location: Bærum, Norway
|
Posted: Fri Dec 26, 2014 9:51 am Post subject: |
|
|
krinn wrote: | leifbk wrote: | I had to download the nightly opengfx too and put it in the ~/.openttd/baseset folder |
something the content download would had done for you |
I looked for it in the content download, but I couldn't find it. _________________ Grumpy old man |
|
Back to top |
|
|
|