You are not logged in.

#1 2013-04-20 23:34:48

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Starflight: the lost colony package

So I've decided to attempt putting a package together for this software, but I haven't done it before so hopefully people can help along the journey. I'm hoping to better understand the arch package process, plus I would like to try out the program since I loved the original games when I was a kid smile

This is an open source project and they offer binaries for windows but just instructions on how to compile it for linux. Would it be better for the package to download and compile the source on each system or for me to create a binary source package and have it install that? I ask because I do see a bunch of git based packages that check out the source from sites like github. This project is in svn on google code.

Instructions:
https://code.google.com/p/starflighttlc … gWithCmake

Also, the second is the technical snag I'm on with it. It requires allegro 4.2.2 but the package of allegro4 is 4.4.2. The problem that seems to be the issue is that the CMake script seems to think that it also requires the allegrogl package to be installed, but from what I've read, the allegrogl has been incorporated into allegro after version 4.3. So I may be looking at changing the CMake instructions, but I'm not familiar with CMake. I'm hoping some one who is familiar with allegro can shed some light if this seems reasonable.

The next issue is only relevant if the allegrogl package does in fact need to be installed. There is a package in AUR for allegrogl, but it does not correctly go through the makepkg process. The error is documented by others in the AUR package's comments.
https://aur.archlinux.org/packages/allegrogl/


MacAnthony
@MacAnthony

Offline

#2 2013-04-20 23:44:03

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Starflight: the lost colony package

First of all, that allegrogl is very out-of-date with makepkg syntax. On a related note, the best way PKGBUILD requests work is if the requester tries their hand at it first. Take a crack at throwing together a PKGBUILD and we'll help you work out the kinks smile

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#3 2013-04-21 00:19:26

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

HalosGhost wrote:

First of all, that allegrogl is very out-of-date with makepkg syntax. On a related note, the best way PKGBUILD requests work is if the requester tries their hand at it first. Take a crack at throwing together a PKGBUILD and we'll help you work out the kinks smile

All the best,

-HG

Thanks for the info. I wasn't requesting some one to do this for me, I was specifically stating that I was taking a crack at this but since it's my first exposure, I was just asking for advice. I tried to be clear on that smile


MacAnthony
@MacAnthony

Offline

#4 2013-04-21 06:44:31

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Starflight: the lost colony package

Alright, well the best way to start then is for you to read through the PKGBUILD man page and the relevant wiki pages and dive right in. Then, when you feel you're having trouble, post your progress on the PKGBUILD, and we'll help you troubleshoot it.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#5 2013-04-21 15:16:09

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

If you read my post, you will see that I have an issue prior to getting to the point of making the pkgbuild script. I have read through that documentation on the wiki several times, but it doesn't offer suggestions to my problems.

I'm not sure if it's correct form to use a binary as the source for the package or if it's ok to have pkgbuild script go through downloading the svn source and compiling it on the host machine. Even before either of that question, I still have the issue that I'm attempting to get it to even compile cleanly on my system. Even if I would be having the pkgbuild do the compile, I can't expect it to work correctly if I can't do it correctly myself. I'm still working through that on my own, but if people who have more experience with the cmake or allegro packages can offer assistance, it's greatly appreciated.

I understand that you guys often get requests for people to do it for them which is likely why you are giving canned suggestions, but if you read what I am presenting, I think you would see that it doesn't apply to me. I will continue to post my progress so people know where I'm at and possibly as help for people who go down a similar path in the future.


MacAnthony
@MacAnthony

Offline

#6 2013-04-21 15:39:36

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Starflight: the lost colony package

Okay, well to answer your questions. You can do whichever you'd prefer, build from sources checking out from svn or use the binary packages. Your call. You could also write both, giving users the option of having an always-up-to-date version with the -svn version and the typically considered more stable non-vcs version. As for the snags regarding dependencies, in my initial check over the build, you may run into some troubles with alfont and with allegrogl (as you mentioned). Allegro4 from the repos looks like it will work fine, and it's possible that there may be a way to modify the source in a prepare function to use the packaged allegrogl instead of having to install it as an extra depends.

The troubles you'll have with alfont relate to the fact that the upstream sources have changed, and the PKGBUILD in the AUR is woefully out-of-date in terms of syntax and (due to the upstream source shifts) sources.

Lastly, there's nothing stopping you from trying to compile using the PKGBUILD right now. I didn't mean to belittle your attempts, I just wanted to try and push you to try and dive in, as that's the best way to get these types of things sorted. As I enjoy a challenge, I've started work on updating the alfont PKGBUILD. I do hope you get it worked out, but feel free to ask for help.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#7 2013-04-21 15:52:38

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

TYVM. I have been trying to get this to work, but didn't work on it at all yesterday due to being busy. My only progress with it was to make this post smile

That was my assumption. My plan for the first attempt is to get the compile to work by modifying the CMakeList.txt file to remove those dependencies (allegrogl and alfont). I think I will then provide a patch file that will be listed in the sources to make the necessary corrections after an svn co is done.

As for doing the compile in the pkgbuild file right away, I've decided to compartmentalize my two issues since both using cmake and creating a package are new too me. It will make this process less confusing, I hope.

I am currently working through that, but I have to check it out clean due to a mistake I made trying to remove the files from the build directory and deleted all the source. Oops.

Your response is very helpful and makes me feel better about my approach. I'll post once I've made more progress. Hopefully soon.

Anthony


MacAnthony
@MacAnthony

Offline

#8 2013-04-21 15:57:08

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Starflight: the lost colony package

MacAnthony wrote:

TYVM. I have been trying to get this to work, but didn't work on it at all yesterday due to being busy. My only progress with it was to make this post smile

That was my assumption. My plan for the first attempt is to get the compile to work by modifying the CMakeList.txt file to remove those dependencies (allegrogl and alfont). I think I will then provide a patch file that will be listed in the sources to make the necessary corrections after an svn co is done.

As for doing the compile in the pkgbuild file right away, I've decided to compartmentalize my two issues since both using cmake and creating a package are new too me. It will make this process less confusing, I hope.

I am currently working through that, but I have to check it out clean due to a mistake I made trying to remove the files from the build directory and deleted all the source. Oops.

Your response is very helpful and makes me feel better about my approach. I'll post once I've made more progress. Hopefully soon.

Anthony

I don't think removing the dependencies from CMakeList is the right call here. Certainly not for alfont since it doesn't have a comparable library packaged with allegro. I'm very near finishing the alfont PKGBUILD update, so that will be one issue down. I suspect that modifying the CMakeList (even just using sed) in the prepare function to use the packaged agl library from allegro will be much easier than alfont. I'll let you know if I make progress on that front as well.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#9 2013-04-21 16:11:07

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

I hadn't done any research to see if alfont was incorporated into allegro like allegrogl was. I was just removing them to see if I could get it to work or at least to get the cmake process beyond dependency checks.

I'm not sure if I follow what you mean by modifying the CMakeList in the prepare function means. I may ask further once I get to that point.


MacAnthony
@MacAnthony

Offline

#10 2013-04-21 16:20:11

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

Not being familiar with the cmake process messed me up a bit. Apparently it makes a copy of the CMakeList.txt in the directory you are running the build that can be modified to make changes without changing the original. I was making changes to the original, but it was reading from the file in the directory. Starting from scratch got me past the issue. I am to the point of running make and yes, you are right, it appears to be getting hung up on the alfont during compile, but I didn't get any errors on allegrogl.

I did try and install alfont, but it did not work correctly for me. I appreciate the help with this.


MacAnthony
@MacAnthony

Offline

#11 2013-04-21 16:28:31

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: Starflight: the lost colony package

Alright, well, here's the work-in-progress update I have going for alfont:

pkgname=alfont
pkgver=2.0.7
pkgrel=1
epoch=1
pkgdesc="Allegro wrapper for FreeType2 enabling the use of various font formats"
arch=('i686' 'x86_64')
url="http://helixsoft.nl/project_page.php?file_name=alfont.proj"
license=(custom:FreeType2)
depends=('allegro4' 'freetype2')
source=("http://www.helixsoft.nl/download/${pkgname}_${pkgver}.tar.gz")
sha256sums=('3ddfbd32c8b0cb9a800c7e12b32c1c1ac8e98c754ba09df29847685d32cd04ca')

prepare() {
    cd "${pkgname}_${pkgver}"
    ./fixunix.sh
    sed -e 's/TARGET=MINGW32_STATIC/#TARGET=MINGW32_STATIC/'
        -e 's/#TARGET=LINUX/TARGET=LINUX/' -i Makefile
}

build() {
    cd "${pkgname}_${pkgver}"
    make
}

package() {
    cd "${pkgname}_${pkgver}"
    make DESTDIR="${pkgdir}" PREFIX=/usr install
}

It hangs sometime between the build and the package functions, and it doesn't seem to be throwing errors which is making it very difficult to troubleshoot. The edits you make to CMakeList should either be done with a patch file as you mentioned or using sed to make the necessary adjustments. Either way, the sed commands or the patching should be put in a prepare function before the build function (see the alfont PKGBUILD I posted above for an example).

All the best,

-HG

Last edited by HalosGhost (2013-04-21 16:31:48)


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#12 2013-04-24 01:17:06

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

Made a bit of progress by starting the PKGBUILD file. I'm still kinda stuck until I can install alfont, but I'm making progress.
https://github.com/MacAnthony/starfligh … r/PKGBUILD


MacAnthony
@MacAnthony

Offline

#13 2013-04-24 03:02:42

progandy
Member
Registered: 2012-05-17
Posts: 2,146

Re: Starflight: the lost colony package

Installing alfont is no problem. Just use the mirror to get the source: http://opensnc.sourceforge.net/alfont/mirror/
The real problem is allegrogl I think.

Last edited by progandy (2013-04-24 03:03:35)

Offline

#14 2013-04-24 03:13:57

MacAnthony
Member
Registered: 2013-04-08
Posts: 13

Re: Starflight: the lost colony package

From what I've determined, the allegrogl isn't needed with the allegro 4.4 version installed from the allegro4 package. It doesn't complain about it when I try to compile it. I've just been removing the reference to the library in the cmake file. As far as alfont, I was just waiting on HalosGhost since he said he was trying to update the package so I can get the requirement portion of the package to work. If there is some other way I should treat this, I certainly am all ears. Since this is my first attempt, I'm trying to not cut any corners.


MacAnthony
@MacAnthony

Offline

Board footer

Powered by FluxBB