When making slackbuilds for libretro cores I have to package the source code myself as cloning with git during the build process is not accepted as slackbuilds.org. During this process I remove the .git directory from the source directory as its not needed and can be very large for some cores (mame). However many libretro cores set GIT_VERSION which adds a useful git hash in the RetroArch menu next to the version, but without the git directory the following error will be printed.
fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
This can be easily avoided by using ?= instead of := in the makefile and then adding the following to my slackbuilds which have the git hash already provided in the version.
VERSION=2017.01.18_04df835
make GIT_VERSION=$(echo $VERSION | cut -d '_' -f 2)
Of course if GIT_VERSION is not set then the default behavior will still be used. If this is acceptable for libretro I will submit more PRs for other cores with time.
When making slackbuilds for libretro cores I have to package the source code myself as cloning with git during the build process is not accepted as slackbuilds.org. During this process I remove the
.git
directory from the source directory as its not needed and can be very large for some cores (mame). However many libretro cores setGIT_VERSION
which adds a useful git hash in the RetroArch menu next to the version, but without the git directory the following error will be printed.This can be easily avoided by using ?= instead of := in the makefile and then adding the following to my slackbuilds which have the git hash already provided in the version.
Of course if GIT_VERSION is not set then the default behavior will still be used. If this is acceptable for libretro I will submit more PRs for other cores with time.