Hey there everyone. I just recently installed Haiku nightly on an old Core2Duo machine, and have been looking for something to help learn about the system and possibly contribute. I’m not really a serious programmer, but the build recipies in Haikuporter looked like a good place to start, since some of them have gone unmaintained for a while.
I’ve been trying to get the recipe for OpenXcom 1.0 working, since it’s been listed on the OpenXcom page as a legit port while not being updated since 2014.
I created a new directory in my local copy of the ports tree, copied over the existing recipe/etc. files, then renamed the directory and recipe to “openxcom-fixed” (I’ll change that if I can get it working).
I figured maybe it might be as simple as fixing the web link to the proper source code archive, so I changed the SOURCE_URI and CHECKSUM_SHA256 entries to the current correct location. Then, I started troubleshooting the build to see what other config lines/files need to be changed. I got the archve to download and the checksum to match, but after that, running the recipe results in the following:
~> haikuporter -S openxcom-fixed
Checking if any package-infos need to be updated …
updating dependency infos of openxcom-fixed
Looking for stale dependency-infos …games-strategy::openxcom-fixed
/boot/home/haikuports/games-strategy/openxcom-fixed/openxcom-fixed.recipeSkipping download of source for v1.0.tar.gz
Skipping checksum validation of v1.0.tar.gz
Skipping unpack of v1.0.tar.gz
fatal: ambiguous argument ‘ORIGIN’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
Command ‘[‘git’, ‘reset’, ‘–hard’, ‘ORIGIN’]’ returned non-zero exit status 128
Does this mean that the directory structure of the archive is something unexpected, or is the problem in a different config file? For reference, here’s what I currently have in my recipe file:
SUMMARY=“Open-source clone of the original X-Com”
DESCRIPTION=“OpenXcom is an open-source clone of the original UFO: Enemy
Unknown (X-Com: UFO Defense in USA), licensed under the GPL and written in
C++ / SDL. It was originally founded by SupSuper in February 2010, and has
since grown into a small development team surrounded by a very supporting
community.”
HOMEPAGE=“http://openxcom.org/”
COPYRIGHT=“2010-2014 OpenXcom Developers”
LICENSE=“GNU GPL v3”
REVISION=“1”
SOURCE_URI=“https://github.com/SupSuper/OpenXcom/archive/v1.0.tar.gz”
CHECKSUM_SHA256=“45acb280010a01d60506b1c5f2951ae501c012cc6161aac470bd15c1e6981246”
SOURCE_DIR=“OpenXcom-fixed”
PATCHES=“openxcom-fixed.patchset”
ADDITIONAL_FILES=“openxcom.rdef”
ARCHITECTURES=“!x86_gcc2 ?x86_64 ?x86”
SECONDARY_ARCHITECTURES=“x86”
PROVIDES="
openxcom = $portVersion
app:OpenXcom
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
lib:libsdl_gfx$secondaryArchSuffix
lib:libsdl_image$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
lib:libyaml_cpp$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libsdl$secondaryArchSuffix
devel:libsdl_gfx$secondaryArchSuffix
devel:libsdl_image$secondaryArchSuffix
devel:libsdl_mixer$secondaryArchSuffix
devel:libyaml_cpp$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
GLOBAL_WRITABLE_FILES="
settings/OpenXcom directory keep-old
"
BUILD()
{
cmake .
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir
mkdir -p $settingsDir
cp $sourceDir/bin/openxcom $appsDir/OpenXcom
cp -r $sourceDir/bin/data $settingsDir/OpenXcom
addResourcesToBinaries $portDir/additional-files/openxcom.rdef $appsDir/OpenXcom
addAppDeskbarSymlink $appsDir/OpenXcom OpenXcom
}