[Bug 209742] devel/godot: Update to 2.1; add devel/godot-tools port

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Aug 21 09:06:39 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209742

Jan Beich <jbeich at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jbeich at FreeBSD.org

--- Comment #67 from Jan Beich <jbeich at FreeBSD.org> ---
Created attachment 173905
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=173905&action=edit
style cleanup

poudriere bulk -t is green for 9.3R-i386, 9.3R-amd64, 10.1R-i386, 10.3R-amd64,
11.0R-i386 here.

> USE_GITHUB=	yes
> GH_ACCOUNT=	godotengine
> +GH_TAGNAME_DEMOS=	dfa1274
[...]
> +EXAMPLES_GH_TUPLE=	godotengine:godot-demo-projects:${GH_TAGNAME_DEMOS}:DEMOS

GH_TAGNAME_DEMOS kind of defeats the simplicity of GH_TUPLE. "godotengine" can
also be replaced with "${GH_ACCOUNT}". And if you have a rationale to choose a
specific commit then better annotate the line via an inline comment.

> -USES=		scons pkgconfig compiler
> -USE_OPENSSL=	yes
> +USES=		scons ssl pkgconfig compiler

If you have the chance do sort USES value.

> +AUDIO_DESC=		Supported audio

<transitive verb> + <adjective>. Where's a noun? Maybe use "Audio support" or
"Audio backends" instead.

> +GODOTFILE=		${PORTNAME}${PKGNAMESUFFIX}

GODOTFILE=${PKGBASE} would be shorter but I don't understand why you need an
extra variable.

> +.if ${SLAVE_PORT} == yes

SLAVE_PORT conditionals are almost always an abomination and often can be
replaced with ?= variables.

> .if ${CHOSEN_COMPILER_TYPE} == clang
> MAKE_ARGS+=	use_llvm=yes
> .else  # clang
> USE_GCC=	yes
> .if ${ARCH} == i386
> CXXFLAGS+=	-march=i586
> .endif
> .endif # clang

Another case of logic that can be easily moved above .include
<bsd.port.pre.mk>.

> do-install-EXAMPLES-on:
> 	(cd ${WRKSRC_DEMOS} && ${COPYTREE_SHARE} "${PORTDATA}" \
> 		${STAGEDIR}${DATADIR}/demos)

This is confusing. Use PORTEXAMPLES when installing EXMAPLES.

> ++#if defined(__FreeBSD__)
> ++#define SND_DEVICE "/dev/dsp"
> ++#else
> ++#define SND_DEVICE "/dev/mixer"
> ++#endif

__DragonFly__ inherited __FreeBSD__ audio stack, so it may want the same.

> + #elif defined(__FreeBSD__)
[...]
> ++	int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };

Maybe replace with #elif defined(KERN_PROC_PATHNAME) which is available on
FreeBSD, DragonFly and NetBSD.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list