Jeremie Courreges-Anglas writes:

> Solène Rapenne <[email protected]> writes:

>> I am using a commit of github because the latest release on github
>> doesn't compile so I need to take the latest commit archive. Is it
>> possible to write something cleaner than setting the DISTFILES with the
>> commit name ?
>
> I'd suggest using something like:
>
> DISTNAME =    bastet-0.43.1.2015083000
>
> and getting rid of DISTFILES = ...
>

I found a cleaner solution, I posted a mail two minutes ago with a new
version of the Makefile, I didn't see your mail before posting mine.
I use GH_COMMIT to have the commit, then when downloading, it sets the
name of the archive downloaded to the distname with .tar.gz as
suffix. So I don't need to declare DISTFILES and the DISTNAME is clean.

>> It compiles ONLY with clang, for unknown reason.
>>
>> I used portcheck -N and I fixed the complaints.
>
> Looks fine to me, but... it looks like a patch is missing:
>
> ===>  Building for bastet-0.43.1.2015083000
> c++ -O2 -pipe  -DNDEBUG -Wall -I"/usr/local"/include  -DLOCALSTATEDIR="/var" 
> -c Ui.cpp
> Ui.cpp:479:2: error: use of undeclared identifier 'usleep'
>         usleep(500000/6);
>         ^
> 1 error generated.
> *** Error 1 in 
> /usr/obj/pobj/bastet-0.43.1.2015083000/bastet-5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
>  (<sys.mk>:124 'Ui.o')
> *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2676 
> '/usr/obj/pobj/bastet-0.43.1.2015083000/.build_done')
> *** Error 1 in /usr/ports/mystuff/games/bastet 
> (/usr/ports/infrastructure/mk/bsd.port.mk:2398 'all')
>
> ... using llvm-3.8.0 on -current.  Also,
>

This is weird, on 5.9 there is no such issue. Maybe it's an issue of
llvm in current ?

>> MAKE_FLAGS = CPPFLAGS="-I\"${PREFIX}\"/include \
>>                  -DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"" \
>>              LDFLAGS="-L\"${PREFIX}\"/lib -lcurses -lboost_program_options"
>
> while it's not really incorrect, we tend to use LOCALBASE for "where
> other ports install stuff" and PREFIX for "where this port installs
> stuff".  While I don't really understand the purpose of having two
> variables, it's better to stay consistent.  So that would be LOCALBASE
> here.
>

In the latest version of the port I have been patching bastet's Makefile
to add the CPPFLAGS and LDFLAGS and I used LOCALBASE in it instead of PREFIX.

>> NO_TEST =    Yes
>>
>> do-configure:
>>      ${SUBST_CMD} ${WRKSRC}/Config.cpp
>
> This doesn't do much now.  IIRC I wanted to make sure that we respected
> ${LOCALSTATEDIR}, which is supposed to be a user setting.  I doubt that
> it is actually supported in practice...

I will remove the SUBT_CMD on Config.cpp then.

>
> Updated tarball attached.  Looks like the Enter key doesn't work as
> advertised?

The game works fine on 5.9 amd64. Is the Enter key inactive in the
menu or while playing ?

Reply via email to