Rafael Sadowski writes:
> On Mon May 23, 2016 at 09:49:46PM +0200, Solène Rapenne wrote:
>> Hello,
>>
>> I would like someone to review my port, it is my first one.
>>
>> 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 ?
>>
>> It compiles ONLY with clang, for unknown reason.
>>
>> I used portcheck -N and I fixed the complaints.
>>
>> -- 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
>>
>
> Hi Solène,
>
> only review without runtime tests.
>
> --- Makefile Mon May 23 22:35:17 2016
> +++ Makefile.orig Mon May 23 22:20:51 2016
> @@ -1,8 +1,7 @@
> # $OpenBSD$
>
> COMMENT = bastard tetris
> -VERSION = 0.43.1
> -DISTNAME = bastet-${VERSION}
> +DISTNAME = bastet-0.43.1
>
> CATEGORIES = games
>
> @@ -14,7 +13,8 @@
>
> GH_ACCOUNT = fph
> GH_PROJECT = bastet
> -GH_TAGNAME = ${VERSION}
> +GH_COMMIT = 5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
> +DISTFILES = 5037e410fde6fafe8e6bc4cf17a12ad98e01c17e.tar.gz
>
> MODULES = lang/clang
> MODCLANG_ARCHS = *
>
> need new round `make makesum`
>
>> 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"
>
> ${LOCALBASE} not ${PREFIX} is your friend. Why do you not use the
> Makefilei from project (maybe with patches)?
>>
>> NO_TEST = Yes
>>
>> do-configure:
>> ${SUBST_CMD} ${WRKSRC}/Config.cpp
>>
>> do-install:
>> ${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin/
>> ${INSTALL_MAN} ${WRKSRC}/bastet.6 ${PREFIX}/man/man6
>> ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bastet/
>> cd ${WRKSRC}; ${INSTALL_DATA} AUTHORS LICENSE NEWS README \
>> ${PREFIX}/share/doc/bastet
>> ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bastet/
>> ${INSTALL_DATA} /dev/null \
>> ${PREFIX}/share/examples/bastet/bastet.scores2
>
> LOCALBASE :)
>>
>> .include <bsd.port.mk>
>
>
> Best regards,
>
> Rafael .. happy ports hacking
Hello,
Thanks for your help, I made some changes to the Makefile (I CC the
list if someone wants to review the latest Makefile)
- added the VERSION variable and changed DISTNAME
- Removed DISTFILE as the github downloaded file takes the name of DISTNAME
- GH_COMMIT can't be $VERSION because I need _this_ commit precisely
- Made a patch to the Makefile to remove LDFLAGS and CPPFLAG
- Added SUBST_CMD to the Makefile because I use ${LOCALBASE} in the
patch (is it the right way to do it ?)
Latest version
# $OpenBSD$
COMMENT = bastard tetris
VERSION = 0.43.1
DISTNAME = bastet-${VERSION}
GH_ACCOUNT = fph
GH_PROJECT = bastet
GH_COMMIT = 5037e410fde6fafe8e6bc4cf17a12ad98e01c17e
CATEGORIES = games
HOMEPAGE = http://fph.altervista.org/prog/bastet.html
# GPLv3
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = boost_program_options-mt c curses m
MODULES = lang/clang
MODCLANG_ARCHS = *
MODCLANG_LANGS = c++
LIB_DEPENDS = devel/boost
NO_TEST = Yes
do-configure:
${SUBST_CMD} ${WRKSRC}/Makefile
${SUBST_CMD} ${WRKSRC}/Config.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bastet ${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/bastet.6 ${PREFIX}/man/man6
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bastet/
cd ${WRKSRC}; ${INSTALL_DATA} AUTHORS LICENSE NEWS README \
${PREFIX}/share/doc/bastet
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bastet/
${INSTALL_DATA} /dev/null \
${PREFIX}/share/examples/bastet/bastet.scores2
.include <bsd.port.mk>