Makefile correction?
Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. From what I make of this it looks like there is an extra / in the path to the distfile location. I am trying to correct the Makefile, I figure this is where it would be, and cannot figure out what to change to correct this. Can anyone help? Thanks Sean Makefile below. tardis# more Makefile # New ports collection makefile for:Gnu Chess # Date created: 04 July 1996 # Whom: markm # # $FreeBSD: ports/games/gnuchess/Makefile,v 1.20 2004/12/28 23:19:42 edwin Exp $ # PORTNAME= gnuchess PORTVERSION=5.07 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= chess MAINTAINER= [EMAIL PROTECTED] COMMENT=Classic Gnu Chess PLIST_FILES=bin/gnuchess \ bin/gnuchessx .if !defined(NOPORTDOCS) PORTDOCS= ChangeLog \ NEWS \ README .endif OPTIONS=OPENING_BOOK Install opening book (24 MB download) on .include bsd.port.pre.mk .if defined(WITH_OPENING_BOOK) DISTFILES+= book_1.01.pgn.gz PLIST_DIRS+=%%DATADIR%% PLIST_FILES+= %%DATADIR%%/book.dat EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} .endif USE_REINPLACE= yes GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= LIBS=${PTHREAD_LIBS} post-patch: @${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS:S///g}|g ; \ s|-pthread ||g' ${WRKSRC}/configure pre-install: .if defined(WITH_OPENING_BOOK) @${SH} ${SCRIPTDIR}/create_opening_book.sh ${DISTDIR} ${WRKSRC} .endif post-install: ${LN} -f ${PREFIX}/bin/gnuchess ${PREFIX}/bin/gnuchessx .if defined(WITH_OPENING_BOOK) @${ECHO_CMD} Installing opening book ${MKDIR} ${DATADIR} \ ${CP} ${WRKSRC}/src/book.dat ${DATADIR} .endif .if !defined(NOPORTDOCS) @${ECHO_CMD} Installing documentation ${MKDIR} ${DOCSDIR} \ ${CP} ${WRKSRC}/NEWS ${DOCSDIR} \ ${CP} ${WRKSRC}/doc/* ${DOCSDIR} .endif .include bsd.port.post.mk ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Makefile correction?
On Sat, Jan 08, 2005 at 04:21:14PM -0500, Sean wrote: Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. From what I make of this it looks like there is an extra / in the path to the distfile location. That doesn't seem to be relevant. Try 'make clean' first, you may already have a stale extracted copy of an old version. Kris pgpkuso5Xhp4W.pgp Description: PGP signature
Re: Makefile correction?
Kris Kennaway wrote: On Sat, Jan 08, 2005 at 04:21:14PM -0500, Sean wrote: Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. From what I make of this it looks like there is an extra / in the path to the distfile location. That doesn't seem to be relevant. Try 'make clean' first, you may already have a stale extracted copy of an old version. Kris Already tried the make clean. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Makefile correction?
Kris Kennaway wrote: On Sat, Jan 08, 2005 at 04:21:14PM -0500, Sean wrote: Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. From what I make of this it looks like there is an extra / in the path to the distfile location. That doesn't seem to be relevant. Try 'make clean' first, you may already have a stale extracted copy of an old version. Kris The two // in '/usr/ports/distfiles//gnuchess-5.07.tar.gz:' would not cause the 'No such file or directory' error? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Makefile correction?
Sean wrote: Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. Hello, I attempted to install the port and recieved the same error as you. The current makefile does not grab the gnuchess.tar.gz, whenever WITH_OPENING_BOOK is specified, because EXTRACT_ONLY is misplaced underneathe of that section. Comment out that EXTRACT_ONLY line and underneathe the MASTER_SITE_SUBDIR line add the following two lines: DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} I suppose someone should submit a patch for this... -Aaron Myles Landwehr ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Makefile correction?
Aaron Myles Landwehr wrote: Sean wrote: Hello All, I am trying to install gnuchess but when I start the build process it errors out as follows. tardis# make install clean === Vulnerability check disabled, database not found === Found saved configuration for gnuchess-5.07 === Extracting for gnuchess-5.07 = Checksum OK for book_1.01.pgn.gz. /usr/ports/distfiles//gnuchess-5.07.tar.gz: No such file or directory tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/games/gnuchess. Hello, I attempted to install the port and recieved the same error as you. The current makefile does not grab the gnuchess.tar.gz, whenever WITH_OPENING_BOOK is specified, because EXTRACT_ONLY is misplaced underneathe of that section. Comment out that EXTRACT_ONLY line and underneathe the MASTER_SITE_SUBDIR line add the following two lines: DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} I suppose someone should submit a patch for this... -Aaron Myles Landwehr ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Thanks Aaron, That did the trick. Questions however. The DISTFILES= statement you added is obviously different from the DISTFILES+= in the (WITH_OPENING_BOOK) section. Does the + symbol just mean in addition to the main file? I am guessing if I am correct in the + comment above that an 'EXTRACT_ONLY statement is not needed because it is an additional file to the main? Looking at another Makefile, the gcompris2 one to be exact, I do not see an EXTRACT_ONLY line. I looked at two others and they also do not have an EXTRACT_ONLY line. This statement is only needed in certain circumstances, or there is more then one way to do the same thing? Thanks Sean ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Makefile correction?
On Sat, Jan 08, 2005 at 04:31:38PM -0500, Sean wrote: The two // in '/usr/ports/distfiles//gnuchess-5.07.tar.gz:' would not cause the 'No such file or directory' error? No, that's a NOP in UNIX. Kris pgpaxFmr6vf1L.pgp Description: PGP signature
Re: Makefile correction?
Sean wrote: Thanks Aaron, That did the trick. Questions however. The DISTFILES= statement you added is obviously different from the DISTFILES+= in the (WITH_OPENING_BOOK) section. Does the + symbol just mean in addition to the main file? Welcome Sean, I believe the '=+' symbol means an addition to the current distfiles. If there are multiple files than all of the distfiles need to be specified(including the main one). When WITH_OPENING_BOOKS is defined that makes multiple distfiles, because of the specific package required by opening books. I am guessing if I am correct in the + comment above that an 'EXTRACT_ONLY statement is not needed because it is an additional file to the main? The statement is needed, because EXTRACT_ONLY is telling 'make' to only attempt to extract the specified files. The second distfile isn't suppose to be unzipped; which, brings me to a certain realization that the EXTRACT_ONLY statement should be in the WITH_OPENING_BOOKS section; as it is only relevant when there are mulitple distfiles. I did a bit more research and realized my modification does not pass through 'portlint' without warnings; as the DISTFILES statement should not be used when only one distfile is needed(this occurs when WITH_OPENING_BOOKS is not used). I came up with a solution that passes through 'portlint' with flying colors. Just add: DISTFILES+= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} to the WITH_OPENING_BOOKS section. I'll send this to the maintainer as well. Looking at another Makefile, the gcompris2 one to be exact, I do not see an EXTRACT_ONLY line. I looked at two others and they also do not have an EXTRACT_ONLY line. This statement is only needed in certain circumstances, or there is more then one way to do the same thing? You are correct, the statement is only needed if one or more distfiles does not need to be unzipped. -Aaron Myles Landwehr ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]