KadathThorn build script contains GNUisms
KadathThorn’s build script contains (at least):
BASEDIR_ABS=`realpath ..`
and expects to find out the absolute path of the parent directory that way. However this is not POSIX conforming. realpath
is not available on a POSIX system (see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html). The “correct” way in POSIX to get the absolute path is:
BASEDIR_ABS=`cd .. ; pwd -P`
Assuming that the thorn name is given by the name of the checked out repository is not correct. People may have a checkout “KadathThorn-devel” which still is the the KadathThorn thorn. If you like to avoid hard-coding KadathThorn
(so that people can rename the thorn eg KadathThorn-rhaas
) then you can use the THORN
variable that make
sets by adding an export THORN
to make.config.deps
.
Note that you are hard-coding THORN
as KadathThorn
in detect.sh
already so you may just as well do it in build.sh
as well (or change both to use THORN
as provided by make
).
build.sh
uses cp -r ${SRCDIR}/${NAME}/ ./
to try and copy the fuka
directory to the current directory. However BSD cp (on macOS) will copy the contents of fuka
when it is given a trailing /
in its argument. The simplest fix is, likely to remove the trailing /
in the source path. Note that -r
is not available in POSIX cp
. Instead the option to use is -R
(capital “R”). See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html#tag_20_24_02
Comments (4)
-
-
@tootle @Roland Haas is this ticket safe to close? Or is there still a problem?
-
reporter I did not explicitly check, but Samuel claims to have removed the GNUisms, which is good enough for me.
We can open a new ticket if more or the same issues are found again.
-
reporter - changed status to resolved
- Log in to comment
@Roland Haas It took me a bit, but I think I have all of these issues resolved. The GNUisms was trivial, but updating to allow for different folder names was less so with the main issue being that `detect.sh` does not have knowledge of
THORN
even aftering adding it tomake.config.deps
. To alleviate this issues, I have resorted to using a static thorn nameKadathThorn
within the*.sh
files andmake.config.deps
since i don’t see any reason for conflicts to be of issues unless one tries to build using two different versions of the same thorn (e.g.KadathThorn
andKadathThorn-rhaas
).