Basic receipe: expected revision number

Hi there,

I am trying to create simple Receipe file, but when trying to make it, I have the following error:

Warning: failure creating the build package: Parse error in .PackageInfo(2:22) -> expected revision number (-<number> suffix)

I do not find the error message to be very useful.

  • Is it an issue with the $portVersion not being defied (looking at othr receie, looks like I do not need to do it)?
  • Do I need to mention minimum lib versions?
  • Something else?

Here is the receipe file I started :

SUMMARY="Basic to C converter"
DESCRIPTION="The name 'BaCon' is an acronym for 'Basic Converter'. \
It is a free BASIC to C translator for Unix-based systems, which \
runs on most Unix/Linux/BSD platforms, including MacOSX. It intends \
to be a programming aid in creating tools which can be compiled on \
different platforms (both 32bit and 64bit), while trying to revive \
the days of the good old BASIC."
HOMEPAGE="https://chiselapp.com/user/bacon/repository/bacon/home"
COPYRIGHT="2009-2023 Peter van Eerten"
LICENSE="MIT"
REVISION="0"
SOURCE_URI="https://chiselapp.com/user/bacon/repository/bacon/attachdownload/bacon-$portVersion.tar.gz?page=Downloads&file=bacon-$portVersion.tar.gz"
CHECKSUM_SHA256="619b721c820e1b11314cd7b88da39db3e76d9063605ee98aa35fb3fe635ab06c"

ARCHITECTURES="all"

PROVIDES="
	bacon = $portVersion
	cmd:bacon = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgtk_3$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku_devel$secondaryArchSuffix
	devel:libgtk_3$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	"

BUILD()
{
	./configure --enable-gui-gtk3 --prefix=/boot/home/config/non-packaged --datadir=/boot/home/config/non-packaged/data
	make
}

INSTALL()
{
	make install
}

Thanks in advance for the help !

1 Like

REVISION starts at 1

Other notes:

If the app builds on all architectures then you don’t need the $secondaryArchSuffix on the requires entries. If you wanted to set it up for building with a secondary arch, the entry for haiku_devel should be haiku${secondaryArchSuffx}_devel and cmd:gcc should be cmd:gcc$secondaryArchSuffix, along with adding a SECONDARY_ARCHITECTURES section.

The configure command in the BUILD function should be changed to use the runConfigure helper, like runConfigure ./configure --enable-gui-gtk3, so that the correct paths will be automatically passed for prefix/datadir/etc…

REVISION starts at 1

Thanks, that was the “obvious mistake” I kept missing :tired_face:

On top of that, thanks for the other comments. I shall have a PR ready soon.