On Thu, Jun 28, 2018 at 10:54:33AM +0300, Leonid Bobrov wrote:
> Argh, I forgot to attach a file to my last mail:
More comments inline:
> -WANTLIB += ${COMPILER_LIBCXX} GL GLU ICE Irrlicht SM X11 Xext
> -WANTLIB += Xxf86vm bz2 c curl curses form freetype gmp iconv intl
> -WANTLIB += jpeg luajit-${MODLUA_VERSION} m ogg openal png pq
> -WANTLIB += spatialindex sqlite3 vorbis vorbisfile z
> +MULTI_PACKAGES = -main -server
>
> -MASTER_SITES = https://github.com/minetest/
> +.include <bsd.port.arch.mk>
>
> -DISTFILES = minetest-{minetest/archive/}${V}${EXTRACT_SUFX} \
> -
> minetest-game-{minetest_game/archive/}${GAME_V}${EXTRACT_SUFX}
> +cWANTLIB += ${COMPILER_LIBCXX} c curl curses form gmp hiredis
> +cWANTLIB += iconv intl jsoncpp leveldb luajit-${MODLUA_VERSION}
> +cWANTLIB += m pq spatialindex sqlite3 z
> +
> +WANTLIB-main += ${cWANTLIB} GL GLU ICE Irrlicht SM X11 Xext
> +WANTLIB-main += Xxf86vm bz2 freetype jpeg ogg openal png
> +WANTLIB-main += vorbis vorbisfile
> +WANTLIB-server = ${cWANTLIB}
I dont think you need to do the extra WANTLIB->cWANTLIB dance. Why ?
> -LIB_DEPENDS = audio/openal \
> - devel/gmp \
> +cLIB_DEPENDS = databases/leveldb \
> + databases/libhiredis \
> databases/sqlite3 \
> databases/postgresql \
> + devel/gmp \
> + devel/jsoncpp \
> geo/spatialindex \
> - audio/libvorbis \
> lang/luajit \
> - net/curl \
> + net/curl
> +
> +LIB_DEPENDS-main = ${cLIB_DEPENDS} \
> + audio/libvorbis \
> + audio/openal \
> x11/irrlicht
>
> -NO_TEST = Yes
> +LIB_DEPENDS-server = ${cLIB_DEPENDS} \
> + devel/gettext
Same thing for LIB_DEPENDS -> cLIB_DEPENDS. Why ?
> +.if ! ${BUILD_PACKAGES:M-main}
> +CONFIGURE_ARGS+= -DBUILD_CLIENT=FALSE
> +.endif
Again, not needed. We dont support make BUILD_PACKAGES=-server, so dont
bother with such convolutions. Remove those specifics, everything is
built (client by default, server because we enable it) and thats all.