Bug 220806 - games/crafty: Incorrect DISTFILES after last update
Summary: games/crafty: Incorrect DISTFILES after last update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Johan van Selst
Keywords: needs-qa, regression
Depends on:
Reported: 2017-07-17 16:58 UTC by Martin Birgmeier
Modified: 2018-09-03 19:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (johans)
koobs: merge-quarterly?

svn-diff-crafty (1.76 KB, patch)
2018-02-08 22:30 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2017-07-17 16:58:16 UTC
The latest update to games/crafty tries to download the following files:

bitmaps.tgz             crafty.doc.ascii        sound.zip
books.bin               crafty.doc.ps           start.pgn

However, instead of these files the home page of uab.edu is being retrieved. This can also easily be seen by observing that the distinfo for these files contains the same checksum/size for each of the files, reflecting what the submitter by chance downloaded on the day the port was "updated".

The port should be corrected to either download the correct files from a usable location or to recreate them according to the instructions given in http://www.craftychess.com/

-- Martin
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-16 11:09:00 UTC
Maintainer feedback?
Comment 2 Johan van Selst freebsd_committer 2018-02-06 11:51:54 UTC
Sorry for the delay. Installation should be corrected now.
Docs are no longer included.
Comment 3 Martin Birgmeier 2018-02-08 21:48:18 UTC
Build fails:

# make                                       
===>   crafty-25.2 depends on executable: gmake - found
===>  Configuring for crafty-25.2

This port has the following tunables:
WITH_BOOKDIR (default: /usr/local/lib/crafty
WITH_LOGDIR  (default: /tmp)
WITH_RCDIR   (default: ~/)
WITH_TBDIR   (default: /usr/local/lib/crafty/TB)
WITH_PERSDIR (default: /usr/local/lib/crafty/cpf)

To alter any of these, press CTRL-C now, and 
simply set your desired variable with one or more of:


Changing BOOKDIR or TBDIR is not recommended, as other
ports depend on these being in a standard location
===>  Building for crafty-25.2
gmake[1]: Entering directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
gmake -j target=UNIX \
        CC=cc \
        opt='-DHASHSTATS -DTRACE -DBOOKDIR=\"/usr/local/lib/crafty\"  -DLOGDIR=\"/tmp\"  -DRCDIR=\"~/\"  -DTBDIR=\"/usr/local/lib/crafty/TB\"  -DPERSDIR=\"/usr/local/lib/crafty/cpf\" -DSKILL -DCPUS=4 -DSYZYGY -DTEST -DCPUS=4' \
        CFLAGS='-O2 -pipe  -fstack-protector -fno-strict-aliasing -Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
        -mpopcnt -fprofile-correction -pthread' \
        LDFLAGS=' -fstack-protector -fprofile-use -pthread -lstdc++' \
gmake[2]: Entering directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
gmake[2]: warning: -jN forced in submake: disabling jobserver mode.
gmake[3]: Entering directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
cc -O2 -pipe  -fstack-protector -fno-strict-aliasing -Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
-mpopcnt -fprofile-correction -pthread -DHASHSTATS -DTRACE -DBOOKDIR=\"/usr/local/lib/crafty\"  -DLOGDIR=\"/tmp\"  -DRCDIR=\"~/\"  -DTBDIR=\"/usr/local/lib/crafty/TB\"  -DPERSDIR=\"/usr/local/lib/crafty/cpf\" -DSKILL -DCPUS=4 -DSYZYGY -DTEST -DCPUS=4 -DUNIX -c crafty.c
cc: warning: optimization flag '-fprofile-correction' is not supported [-Wignored-optimization-argument]
error: Could not read profile default.profdata: No such file or directory
1 error generated.
gmake[3]: *** [Makefile:199: crafty.o] Error 1
gmake[3]: Leaving directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
gmake[2]: *** [Makefile:184: crafty-make] Error 2
gmake[2]: Leaving directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
gmake[1]: *** [Makefile:85: unix-gcc] Error 2
gmake[1]: Leaving directory '/usr/tmp/z/SRC/FreeBSD-ports/head/games/crafty/work'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make: stopped in /z/SRC/FreeBSD-ports/head/games/crafty
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-02-08 21:56:50 UTC
It is a typo in the Makefile
        cd ${DISTDIR}/${DIST_SUBDIR} && ${CP} book.bin start.pgn.gz ${WRKSRC}
should be books.bin
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-02-08 21:57:50 UTC
and in pkg-plist
=> lib/crafty/book.bin
@mode 775
@dir lib/crafty/cpf
@dir lib/crafty
@group wheel
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-02-08 22:01:58 UTC
Seems I was wrong, they are two different files.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-02-08 22:09:18 UTC
There are missed two lines
MASTER_SITES=   http://www.craftychess.com/downloads/source/:src \
=>                http://www.craftychess.com/downloads/book/:data \
DISTFILES=      crafty-${PORTVERSION}.zip:src \
=>                book.bin:data \
                books.bin:data \
(and update distinfo)
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-02-08 22:30:39 UTC
Created attachment 190448 [details]

It compiles and installs on my system if I change it like in the svn-diff. I don't know if I am right with the change in books-building.
Comment 9 Walter Schwarzenfeld freebsd_triage 2018-02-08 23:03:39 UTC
To compile with clang50 maybe remove -fprofile-use  and -fprofile-correction from Makefile.
--- Makefile    2018-02-08 22:55:44 UTC
+++ Makefile
@@ -83,11 +83,11 @@ quick:
        $(MAKE) -j target=UNIX \
-               CC=gcc \
-               opt='-DSYZYGY -DTEST -DCPUS=4' \
-               CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
-               -mpopcnt -fprofile-correction -pthread' \
-               LDFLAGS='$(LDFLAGS) -fprofile-use -pthread -lstdc++' \
+               CC=$(CC) \
+               opt='$(opt) -DSYZYGY -DTEST -DCPUS=4' \
+               CFLAGS='$(CFLAGS) -Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
+               -mpopcnt -pthread' \
+               LDFLAGS='$(LDFLAGS) -pthread -lstdc++' \
Comment 10 commit-hook freebsd_committer 2018-02-09 16:10:30 UTC
A commit references this bug:

Author: johans
Date: Fri Feb  9 16:09:43 UTC 2018
New revision: 461318
URL: https://svnweb.freebsd.org/changeset/ports/461318

  Remove profile options to fix build with Clang

  PR:		220806
  Submitted by:	jbeich, Martin Birgmeier

Comment 11 Walter Schwarzenfeld freebsd_triage 2018-02-09 19:10:41 UTC
Thanks, this is working.