Instead of relying on /dev/fd/3 being available, make a named pipe to

provide input to crafty.  This should allow package building to succeed
and has no negative consequences that I know of.  It is not clear at
the moment why /dev/fd/3 is not present in the chroot'ed package building
environment, but I wanted to get a fix in before the DP1 ports freeze.

I arrived at this solution after helpful discussions with
<esoha@attbi.com>.
This commit is contained in:
Matthew Hunt 2002-04-02 19:55:23 +00:00
parent 740ec3103f
commit 9e5ab808f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=57235
2 changed files with 6 additions and 2 deletions

View file

@ -22,11 +22,15 @@ DIST_SUBDIR= crafty
NO_WRKSUBDIR= yes
EXTRACT_ONLY=
MKFIFO= /usr/bin/mkfifo
GAMEFIFO= ${WRKDIR}/gamefifo
do-build:
@${ECHO_MSG} '================================================================'
@${ECHO_MSG} 'Ignore warnings about illegal moves. These warnings are normal.'
@${ECHO_MSG} '================================================================'
(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${GUNZIP_CMD}) | (cd ${WRKDIR}; crafty 3<&0 < ${FILESDIR}/book-building)
${MKFIFO} ${GAMEFIFO}
(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${GUNZIP_CMD} > ${GAMEFIFO}) & (cd ${WRKDIR}; crafty < ${FILESDIR}/book-building)
do-install:
${MKDIR} ${PREFIX}/lib/crafty

View file

@ -1,2 +1,2 @@
book create /dev/fd/3 60 3
book create gamefifo 60 3
quit