From owner-svn-ports-all@freebsd.org Thu Aug 1 19:17:58 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC215C6AE7; Thu, 1 Aug 2019 19:17:58 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4600S63tNtz48lp; Thu, 1 Aug 2019 19:17:58 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66BDC1EED6; Thu, 1 Aug 2019 19:17:58 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x71JHwJs013330; Thu, 1 Aug 2019 19:17:58 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x71JHvcH013323; Thu, 1 Aug 2019 19:17:57 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201908011917.x71JHvcH013323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Thu, 1 Aug 2019 19:17:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r507824 - in head/emulators/mame: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: in head/emulators/mame: . files X-SVN-Commit-Revision: 507824 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2019 19:17:58 -0000 Author: pkubaj Date: Thu Aug 1 19:17:57 2019 New Revision: 507824 URL: https://svnweb.freebsd.org/changeset/ports/507824 Log: emulators/mame: fix build on powerpc64 powerpc64 requires the same Makefile fix as amd64. Additionally, https://github.com/bkaradzic/bx/commit/684f7ec5d6a8e0d9c396bdd2dfc1f19244800557 is necessary. Approved by: linimon (mentor) Differential Revision: https://reviews.freebsd.org/D21055 Added: head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_endian.inl (contents, props changed) head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_readerwriter.inl (contents, props changed) head/emulators/mame/files/patch-3rdparty_bx_include_bx_readerwriter.h (contents, props changed) head/emulators/mame/files/patch-3rdparty_bx_tests_readerwriter__test.cpp (contents, props changed) Modified: head/emulators/mame/Makefile Modified: head/emulators/mame/Makefile ============================================================================== --- head/emulators/mame/Makefile Thu Aug 1 19:12:17 2019 (r507823) +++ head/emulators/mame/Makefile Thu Aug 1 19:17:57 2019 (r507824) @@ -11,8 +11,8 @@ COMMENT= Multi Arcade Machine Emulator LICENSE= GPLv2 -ONLY_FOR_ARCHS= amd64 i386 -ONLY_FOR_ARCHS_REASON= not yet ported to any arch other than x86 +ONLY_FOR_ARCHS= amd64 i386 powerpc64 +ONLY_FOR_ARCHS_REASON= not yet ported to any arch other than x86 and powerpc64 LIB_DEPENDS= libFLAC.so:audio/flac \ libexpat.so:textproc/expat2 \ @@ -58,7 +58,7 @@ DEBUG_MAKE_ENV= DEBUG=1 .include -.if ${ARCH} == amd64 +.if ${ARCH} == amd64 || ${ARCH} == powerpc64 MAKE_ARGS+= PTR64=1 EMULATOR= ${MSUBTARGET}64 .else Added: head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_endian.inl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_endian.inl Thu Aug 1 19:17:57 2019 (r507824) @@ -0,0 +1,29 @@ +--- 3rdparty/bx/include/bx/inline/endian.inl.orig 2019-04-24 05:00:38 UTC ++++ 3rdparty/bx/include/bx/inline/endian.inl +@@ -46,7 +46,7 @@ namespace bx + } + + template +- inline Ty toLittleEndian(const Ty _in) ++ inline Ty toLittleEndian(Ty _in) + { + #if BX_CPU_ENDIAN_BIG + return endianSwap(_in); +@@ -56,7 +56,7 @@ namespace bx + } + + template +- inline Ty toBigEndian(const Ty _in) ++ inline Ty toBigEndian(Ty _in) + { + #if BX_CPU_ENDIAN_LITTLE + return endianSwap(_in); +@@ -66,7 +66,7 @@ namespace bx + } + + template +- inline Ty toHostEndian(const Ty _in, bool _fromLittleEndian) ++ inline Ty toHostEndian(Ty _in, bool _fromLittleEndian) + { + #if BX_CPU_ENDIAN_LITTLE + return _fromLittleEndian ? _in : endianSwap(_in); Added: head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_readerwriter.inl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/mame/files/patch-3rdparty_bx_include_bx_inline_readerwriter.inl Thu Aug 1 19:17:57 2019 (r507824) @@ -0,0 +1,76 @@ +--- 3rdparty/bx/include/bx/inline/readerwriter.inl.orig 2019-04-24 05:00:38 UTC ++++ 3rdparty/bx/include/bx/inline/readerwriter.inl +@@ -273,7 +273,7 @@ namespace bx + } + + template +- int32_t read(ReaderI* _reader, Ty& _value, Error* _err) ++ inline int32_t read(ReaderI* _reader, Ty& _value, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); +@@ -281,7 +281,7 @@ namespace bx + } + + template +- int32_t readHE(ReaderI* _reader, Ty& _value, bool _fromLittleEndian, Error* _err) ++ inline int32_t readHE(ReaderI* _reader, Ty& _value, bool _fromLittleEndian, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); +@@ -329,7 +329,7 @@ namespace bx + } + + template +- int32_t write(WriterI* _writer, const Ty& _value, Error* _err) ++ inline int32_t write(WriterI* _writer, const Ty& _value, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); +@@ -337,7 +337,7 @@ namespace bx + } + + template +- int32_t writeLE(WriterI* _writer, const Ty& _value, Error* _err) ++ inline int32_t writeLE(WriterI* _writer, const Ty& _value, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); +@@ -346,8 +346,14 @@ namespace bx + return result; + } + ++ template<> ++ inline int32_t writeLE(WriterI* _writer, const float& _value, Error* _err) ++ { ++ return writeLE(_writer, floatToBits(_value), _err); ++ } ++ + template +- int32_t writeBE(WriterI* _writer, const Ty& _value, Error* _err) ++ inline int32_t writeBE(WriterI* _writer, const Ty& _value, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); +@@ -356,6 +362,12 @@ namespace bx + return result; + } + ++ template<> ++ inline int32_t writeBE(WriterI* _writer, const float& _value, Error* _err) ++ { ++ return writeBE(_writer, floatToBits(_value), _err); ++ } ++ + inline int64_t skip(SeekerI* _seeker, int64_t _offset) + { + return _seeker->seek(_offset, Whence::Current); +@@ -392,7 +404,7 @@ namespace bx + } + + template +- int32_t peek(ReaderSeekerI* _reader, Ty& _value, Error* _err) ++ inline int32_t peek(ReaderSeekerI* _reader, Ty& _value, Error* _err) + { + BX_ERROR_SCOPE(_err); + BX_STATIC_ASSERT(isTriviallyCopyable() ); Added: head/emulators/mame/files/patch-3rdparty_bx_include_bx_readerwriter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/mame/files/patch-3rdparty_bx_include_bx_readerwriter.h Thu Aug 1 19:17:57 2019 (r507824) @@ -0,0 +1,10 @@ +--- 3rdparty/bx/include/bx/readerwriter.h.orig 2019-04-24 05:00:38 UTC ++++ 3rdparty/bx/include/bx/readerwriter.h +@@ -10,6 +10,7 @@ + #include "endian.h" + #include "error.h" + #include "filepath.h" ++#include "math.h" + #include "string.h" + #include "uint32_t.h" + Added: head/emulators/mame/files/patch-3rdparty_bx_tests_readerwriter__test.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/mame/files/patch-3rdparty_bx_tests_readerwriter__test.cpp Thu Aug 1 19:17:57 2019 (r507824) @@ -0,0 +1,34 @@ +--- 3rdparty/bx/tests/readerwriter_test.cpp.orig 2019-07-24 09:54:15 UTC ++++ 3rdparty/bx/tests/readerwriter_test.cpp +@@ -0,0 +1,31 @@ ++/* ++ * Copyright 2010-2019 Branimir Karadzic. All rights reserved. ++ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause ++ */ ++ ++#include "test.h" ++#include ++ ++TEST_CASE("writeLE", "") ++{ ++ bx::SizerWriter writer; ++ ++ bx::Error err; ++ ++ int32_t total = bx::writeLE(&writer, 1.0f, &err); ++ ++ REQUIRE(err.isOk() ); ++ REQUIRE(total == 4); ++} ++ ++TEST_CASE("writeBE", "") ++{ ++ bx::SizerWriter writer; ++ ++ bx::Error err; ++ ++ int32_t total = bx::writeBE(&writer, 1.0f, &err); ++ ++ REQUIRE(err.isOk() ); ++ REQUIRE(total == 4); ++}