Fix for '+=' backward-incompatibility in upcoming gmake 4.3.
The affected *.make files are produced by the genie build tool. The genie bootstrap build uses pre-generated sources and does not pick up the patched file. We add a pre-build target that first builds genie, then runs genie to regenerate the source files. The main build will then create a fixed genie. ok fcambus@
This commit is contained in:
parent
0570696bc0
commit
0520f1493d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.34 2019/12/25 15:17:33 fcambus Exp $
|
||||
# $OpenBSD: Makefile,v 1.35 2020/01/29 20:29:21 naddy Exp $
|
||||
|
||||
BROKEN-i386 = broken on 32-bit; enum in src/frontend/mame/ui/videoopt.h starting at 0x80000000
|
||||
ONLY_FOR_ARCHS = amd64 i386
|
||||
@ -84,9 +84,16 @@ post-extract:
|
||||
xargs sed -i 's|"png.h"|"localpng.h"|'
|
||||
@perl -pi -e 's/\r//g' ${WRKSRC}/makefile ${WRKSRC}/scripts/genie.lua \
|
||||
${WRKSRC}/3rdparty/genie/build/gmake.bsd/genie.make \
|
||||
${WRKSRC}/3rdparty/genie/src/actions/make/make_cpp.lua \
|
||||
${WRKSRC}/3rdparty/asio/include/asio/detail/config.hpp \
|
||||
${WRKSRC}/docs/man/* ${WRKSRC}/keymaps/*
|
||||
|
||||
# Bootstrap genie, regenerate host/scripts.c from patched *.lua files
|
||||
pre-build:
|
||||
@cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
|
||||
${MAKE_FLAGS} -f ${MAKE_FILE} 3rdparty/genie/bin/bsd/genie
|
||||
cd ${WRKBUILD}/3rdparty/genie && bin/bsd/genie embed
|
||||
|
||||
do-install:
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/mame64 ${PREFIX}/bin/mame
|
||||
|
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-3rdparty_genie_src_actions_make_make_cpp_lua,v 1.1 2020/01/29 20:29:21 naddy Exp $
|
||||
|
||||
gmake 4.2.1 > 4.3 backward-incompatibility
|
||||
|
||||
Index: 3rdparty/genie/src/actions/make/make_cpp.lua
|
||||
--- 3rdparty/genie/src/actions/make/make_cpp.lua.orig
|
||||
+++ 3rdparty/genie/src/actions/make/make_cpp.lua
|
||||
@@ -73,8 +73,8 @@
|
||||
if (prj.kind == "StaticLib" and prj.options.ArchiveSplit) then
|
||||
_p('define max_args')
|
||||
_p('\t$(eval _args:=)')
|
||||
- _p('\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1$(_args)$(EOL)$(eval _args:=)))')
|
||||
- _p('\t$(if $(_args),$1$(_args))')
|
||||
+ _p('\t$(foreach obj,$3,$(eval _args+=$(obj))$(if $(word $2,$(_args)),$1 $(_args)$(EOL)$(eval _args:=)))')
|
||||
+ _p('\t$(if $(_args),$1 $(_args))')
|
||||
_p('endef')
|
||||
_p('')
|
||||
_p('define EOL')
|
Loading…
Reference in New Issue
Block a user