Compiling VVVVVV on Haiku

I tried making a recipe here, but haikuporter keeps trying to update dependency infos for all packages and not just those mentioned in the recipe. The last error it fails with is:

'utf8' codec can't decode byte 0x89 at position 0: invalid start byte

It should be noted that I referred to the section A Gentle Introduction to HaikuPorter #1 and the recipes for nxengine and openmw for reference.

That’s normal, on the first run it scans the whole ports tree to build its internal cache. This is done only once the first time you run it, however (the next times it will only scan the new/modified files).

Your utf8 error can be because you have invalid characters in the recipe (non breakable space, or something like this, especially if you copied the description from a website, this is likely to happen). But we should improve haikuporter to give the file and line number where the error happened, I guess.

2 Likes

Thanks for the tip, I retyped the description by hand. However now, haikuporter claims that the recipe isn’t in the tree path (set as /boot/home/haikuports) even though the vvvvvv folder is under games-arcade.

Ok, so I figured out that there was no need to type the .recipe extension. However, why is haikuporter trying (and failing) to verify the checksum of a git repo? Isn’t it not supposed to do that?

Update: Tried changing the protocol used in SOURCE_URI to git://, but now it can’t be found?

Read the haikuports wiki.

It may be easier to help if you pasted your recipe somewhere.
Also, much can be learned from studying existing recipes. You can search the haikuports archive at https://xref.landonf.org/source/ .

The recipe is here:
https://github.com/win8linux/haikuports/blob/vvvvvv/games-arcade/vvvvvv/vvvvvv-2.0~git.recipe

You have a space in the filename.

The SOURCE_URI has to point to a specific source archive. 6V doesn’t appear to have stable releases yet. Therefore you need to determine the commit you want package, i.e. find a working/stable one.
The latest commit s of this writing, for example, has the hash f9525020bbcb4c2f5c44218cadcd475bcc1d2037.
You can assign a variable to that so it can be re-used. The recipe would then include this:

srcGitRev="f9525020bbcb4c2f5c44218cadcd475bcc1d2037"
SOURCE_URI="https://github.com/TerryCavanagh/VVVVVV/archive/$srcGitRev.tar.gz"

You’ll have to use that $srcGitRev later in SOURCE_DIR. Compare to other recipes.

1 Like

Alright, just added those details into the recipe linked in my last comment. However, haikuporter claims that the SOURCE_DIR described in the recipe doesn’t exist:

Error: vvvvvv-4ea4a1e6154c249d8ea7b9b31651e94366553c99 doesn't exist in sources! Define SOURCE_DIR in recipe?

Relevant line:

Open the downloaded tar.gz and see if the top folder in there is actually named as you declared.

I expanded the contents of the archive to another directory and the folder does exist.

It would be much better and rewarding if some experienced coder/dev recipe professional would help new user to do the recipes for them… at least at the beginning.

Looks like a hassle for people who never did a recipe to force them to do so…
It is very nice from them already if they did the work to port a program/app/source.

 Those are uppercase VVVVVV…

@brunobastardi: How would anyone learn to create a recipe if others are doing it for them? People learn by getting their questions answered, and that’s what we’re doing in this thread.

Yes, I had realized that shortly after @brunobastardi’s comment showed up in the inbox. Sorry for not updating about this earlier, but I just got back to my computer.

Anyways, haikuporter is now saying that it can’t find the data file in the directory where it is located:

[Errno -2147459069] No such file or directory: u'/boot/home/haikuports/games-arcade/vvvvvv/additional-files/data.zip'

Maybe it’s that u at the start messing it up? I can’t find it anywhere in the recipe though near any $portDir mentions.

“additional_files”, with an underscore.

Yes I know… no question about that…

but… If they do not like to learn how to do a recipe (which is Haiku specific) and if they port something already?

It is additional_files in the recipe:

Edit: Pardon if some parts are still wrong in the recipe, I want to finish it up this time before making any more commits to prevent too many from showing up in the history.

Ok, changing additional_files to additional-files in both the recipe and the folder name did make the error message go away. Currently trying to troubleshoot dep issues.

Errors:

Error: unable to resolve required packages for build for vvvvvv-2.0~git
Error:  dependency-infos:
Error:          /boot/home/haikuports/repository/vvvvvv-2.0~git.DependencyInfo
Error:          /boot/home/haikuports/repository/vvvvvv_source-2.0~git.DependencyInfo
Error:  repositories:
Error:          [u'/boot/home/haikuports/packages', '/boot/system/packages']
Error:

Checked both of the files mentioned in those error messages and vvvvvv_source-2.0~git.DependencyInfo oddly doesn’t seem to have much of anything in it:

{
    "architecture" : "source",
    "buildPrerequires" : [],
    "buildRequires" : [],
    "name" : "vvvvvv_source",
    "provides" : [
        "vvvvvv_source = 2.0~git"
    ],
    "requires" : [],
    "testRequires" : [],
    "version" : "2.0~git"
}

Did I miss something?

You can squash commits. Or just start anew when you’ve all figured out, then create one PR with just one commit.

BTW, you may want to have the data downloaded as SOURCE_URI_2 (or if there are different data files, create separate _data recipes for several data packages).