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

> Hello,
>
> I would like someone to review my port, it is my first one.

Heh, actually it was my first port too, I just didn't submit it. :)

> This is a port of the game bastet which is also called "bastard tetris"
> because this is a tetris game with an algorithm ta always give you the
> worst piece it can.
>
> The base of the port has been done by Jeremie Courreges-Anglas who sent
> me his work. I updated it to get the port to compile successfully.
>
> 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 = ...

> 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,

> -- Makefile so opening the .tar.gz isn't needed --
> COMMENT =     bastard tetris
> DISTNAME =    bastet-0.43.1
> CATEGORIES =  games
>
> HOMEPAGE =    http://fph.altervista.org/prog/bastet.html
>
> # GPLv3
> PERMIT_PACKAGE_CDROM =        Yes
>
> WANTLIB =     boost_program_options-mt c curses m
>
> GH_ACCOUNT =  fph
> GH_PROJECT =  bastet
> GH_COMMIT =   5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
> DISTFILES =     5037e410fde6fafe8e6bc4cf17a12ad98e01c17e.tar.gz
>
> MODULES =     lang/clang
> MODCLANG_ARCHS = *
> MODCLANG_LANGS = c++
> LIB_DEPENDS = devel/boost
>
> 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.

> 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...

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

Attachment: bastet.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to