dotfiles and dotfolders were always a hack.
Using them on Haiku is not welcomed.
Iâm using this topic to deal with a github repo which is using --recursive to build the program.
It means all the modules used by this program will be the dependencies in the recipe file ?
Corresponding repo is : GitHub - niftools/nifskope: A git repository for nifskope.
If I understand correctly I need to check first all the dependencies and if one of it doesnât exist in haikuports, I need to propose a port of this dependency ? Because the first dependency which I think doesnât exist on Haiki is the GLI header lib : GitHub - g-truc/gli: OpenGL Image (GLI)
Thanks
If the project canât handle system libraries you could use SOURCE_URI_2 like itâs done here:
Or you could try to package GLI seperately and see if the project âcanâ handle system libraries.
Ok I will try to add the âgliâ to the system library (even if this library is a header only lib)
If you can include it in the project source itâs an option too, just needs to find the header then
(havenât looked at the source)
a recursive clone clones submodules with the repo, and the submodules of submodules.
Since haikuporter does not use git for cloning anything, and instead only downloads archives you have to either download the archives of the child repos manually, or ask the author to include it in their source distribution.
Ah yes Iâve added SOURCE_URI_2=âhttps://github.com/g-truc/gli/archive/refs/tags/0.8.2.0.tar.gzâ, however the include path is now not found :
./sources-2/gli-0.8.2.0/external/glm/test/external/gli/gli.hpp
where my project is in :
./sources/nifskope/
It means I need to adjust the INCLUDEPATH or to move the ./sources-2/gli directory : what is the best approach ?
you could copy the file manually in BUILD() from $sourceDir2/⌠to $sourceDir/âwhere it can be found dirâ
Ok now the fun part :
I have gli 0.8.2.0 (year 2016âŚ) which is raising compilations because it has a dependency with glm.
HaikuPorts propose glm 0.9.9.8 which is year 2020.
So it means I need to add to HaikuPorts an old version of glm so that gli can compile ok ?
Dependencies fun⌠![]()
Canât it use current version? (know all about the libhell) ![]()
I will double check but I think no as I have compilation error from GLI using GLM when compiling outside GitHub recursive option
Did you add devel:glm in your recipe? (or installed glm)
Yes glm is installed but I will double check that part (I remember of an error regarding glm devel in the recipe )
Ok I have checked the recipe :
REQUIRES="
haiku$secondaryArchSuffix
lib:glm$secondaryArchSuffix
lib:qhull$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:glm$secondaryArchSuffix
"
I have removed the âglmâ installation on my Haiku system in order to use the headers from â$sourceDir2/gli-0.8.2.0/gli/*â which are copied into â$sourceDir/src/â
I have also copied the gli and glm files as per below in the build :
BUILD()
{
cp -r $sourceDir2/gli-0.8.2.0/gli/* $sourceDir/src/
cp -r $sourceDir2/gli-0.8.2.0/external/* $sourceDir/src/
qmake
make $jobArgs
}
However I still have errors like below :
g++ -c -pipe -isystem âŚ/nifskope/lib/qhull/src -isystem âŚ/nifskope/lib/gli/gli -isystem âŚ/nifskope/lib/gli/external -isystem âŚ/nifskope/lib/zlib -O3 -mfpmath=sse -std=c++14 -msse2 -msse -std=gnu++1y -Wall -Wextra -fPIC -DQT_NO_DEBUG_OUTPUT -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING -DQT_DISABLE_DEPRECATED_BEFORE=0x050300 -DNIFSKOPE_VERSION="2.0.dev7" -DNIFSKOPE_REVISION="d433cd7" -DLZ4_STATIC -DXXH_PRIVATE_API -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -Ilib -Ilib/fsengine -Ilib/NvTriStrip -I/boot/system/develop/headers/QtOpenGL -I/boot/system/develop/headers/QtWidgets -I/boot/system/develop/headers/QtGui -I/boot/system/develop/headers/QtXml -I/boot/system/develop/headers/QtNetwork -I/boot/system/develop/headers/QtCore -IGeneratedFiles/.moc -IGeneratedFiles/.ui -I/boot/system/data/Qt5/mkspecs/haiku-g++ -o GeneratedFiles/.obj/material.o src/io/material.cpp
src/texture.hpp: In constructor âgli::texture::cache::cache(gli::texture::storage_type&, gli::texture::format_type, gli::texture::size_type, gli::texture::size_type, gli::texture::size_type, gli::texture::size_type, gli::texture::size_type, gli::texture::size_type)â:
src/texture.hpp:231:44: error: invalid âstatic_castâ from type âglm::vec<3, int, glm::packed_highp>â to type âstd::size_tâ {aka âlong unsigned intâ}
231 | GLI_ASSERT(static_cast<size_t>(gli::levels(Storage.extent(0))) < this->ImageMemorySize.size());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I continue to investigate in order to identify whatâs wrongâŚ
So far is my progress, I think I might have fixed the glm part due to a subfolder in the âexternal/glmâ archive to copy from sources-2
However now libqhull is making headache to me ![]()
Any idea why libqhull is not recognized ?
I have tried to add the below line in the recipe but itâs not recognized :
BUILD_REQUIRES="
...
devel:libqhull$secondaryArchSuffix
Error: unable to resolve required packages for build for nifskope-2.0.dev7
Error: Reason: failed to install package for devel:libqhull.
Error: *** Failed to find a match for "devel:libqhull": Name not found
Below is my entire recipe if it can helps :
SUMMARY="Tool for opening and editing NIF files"
DESCRIPTION="NifSkope is a tool for opening and editing the NetImmerse file format (NIF). \
NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3/NV/4/76, Starfield, \
Civilization IV, and more."
HOMEPAGE="http://www.niftools.org/"
COPYRIGHT="2016-2023 NifTools project"
LICENSE="Nifskope"
REVISION="1"
SOURCE_URI="https://github.com/DigitalBox98/nifskope/archive/refs/tags/v2.0.dev7.tar.gz"
CHECKSUM_SHA256="e6a3648ebe1a88e9c6b5f477c20d3b4e7ec016410119c3246f2fea96787ab3dc"
SOURCE_URI_2="https://github.com/g-truc/gli/archive/refs/tags/0.8.2.0.tar.gz"
CHECKSUM_SHA256_2="9e7024c2df77c011eff4f66667c1834620c70b7902cd50f32ab48edd49fe0139"
#SOURCE_FILENAME="vim-$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
nifskope$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:glm$secondaryArchSuffix
lib:qhull$secondaryArchSuffix
lib:zlib$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libqhull$secondaryArchSuffix
devel:glm$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:qmake$secondaryArchSuffix >= 5
cmd:which
"
BUILD()
{
cp -r $sourceDir2/gli-0.8.2.0/gli/* $sourceDir/src/
cp -r $sourceDir2/gli-0.8.2.0/external/glm/* $sourceDir/src/
qmake
make $jobArgs
}
INSTALL()
{
make install
}
The recipe file for qhull says that it provides lib:libqhull_r$secondaryArchSuffix and devel:libqhull_r$secondaryArchSuffix
Cool I wasnât aware of this parameter indicating the exact name of the devel part.
Thanks !
Not yet working completely and still need some adjustements on the recipe file, but at least Iâve got a first version which is opening ![]()
I currently have a .hpkg generated which is really a first step, however when trying to install it, I have the below error :

Any idea about what needs to be done ?
I have the below recipe file as latest attempt :
SUMMARY="Tool for opening and editing NIF files"
DESCRIPTION="NifSkope is a tool for opening and editing the NetImmerse file format (NIF). \
NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3/NV/4/76, Starfield, \
Civilization IV, and more."
HOMEPAGE="http://www.niftools.org/"
COPYRIGHT="2016-2023 NifTools project"
LICENSE="Nifskope"
REVISION="1"
SOURCE_URI="https://github.com/DigitalBox98/nifskope/archive/refs/tags/v2.0.dev7.tar.gz"
CHECKSUM_SHA256="e6a3648ebe1a88e9c6b5f477c20d3b4e7ec016410119c3246f2fea96787ab3dc"
SOURCE_URI_2="https://github.com/g-truc/gli/archive/refs/tags/0.8.2.0.tar.gz"
CHECKSUM_SHA256_2="9e7024c2df77c011eff4f66667c1834620c70b7902cd50f32ab48edd49fe0139"
SOURCE_URI_3="https://github.com/qhull/qhull/archive/refs/tags/v8.1-alpha1.tar.gz"
CHECKSUM_SHA256_3="09e5e4c5b2b8a9e617a46876fef5a3d33e70aa1d08a163ff05d37701327c3be7"
SOURCE_URI_4="https://github.com/niftools/nifxml/archive/refs/tags/v0.9.0.tar.gz"
CHECKSUM_SHA256_4="984c247115bc49f90ded69b4c8feb9a62a0365ad53f5890312302b6a05bb4ed7"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
nifskope$secondaryArchSuffix = $portVersion
app:NifSkope$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:glm$secondaryArchSuffix
lib:qhull$secondaryArchSuffix
lib:zlib$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5OpenGL$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:glm$secondaryArchSuffix
devel:libqhull_r$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:qmake$secondaryArchSuffix >= 5
cmd:which
cmd:wget
"
BUILD()
{
cp -r $sourceDir2/gli-0.8.2.0/gli/* $sourceDir/src/
cp -r $sourceDir2/gli-0.8.2.0/external/glm/* $sourceDir/src/
cp -r $sourceDir3/qhull-8.1-alpha1/src/libqhull $sourceDir/src/
mkdir -p $sourceDir/build/docsys/nifxml/
cp $sourceDir4/nifxml-0.9.0/nif.xml $sourceDir/build/docsys/nifxml/
mkdir -p $sourceDir/build/docsys/kfmxml/
wget https://github.com/niftools/kfmxml/blob/develop/kfm.xml
cp ./kfm.xml $sourceDir/build/docsys/kfmxml/
qmake
make $jobArgs
}
INSTALL()
{
make install
mkdir -p $appsDir
cp $sourceDir/release/NifSkope $appsDir/
cp $sourceDir/release/nif.xml $appsDir/
cp $sourceDir/release/kfm.xml $appsDir/
}
glm is a header only library and so there is no lib file to depend on. You can just remove the lib:glm$secondaryArchSuffix from the recipe but leave the devel:glm$secondaryArchSuffix line in place so that the headers can be found while building.
Also, you will probably need to change lib:qhull$secondaryArchSuffix to lib:libqhull_r$secondaryArchSuffix as I described in the previous post.
