From nobody Sun Nov 24 20:14:29 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XxKn155qfz5dcFZ; Sun, 24 Nov 2024 20:14:29 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XxKn12Dxfz4Z1V; Sun, 24 Nov 2024 20:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732479269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wAOIuiH5iFxh75BPG5/JbxzDMaDlwEv4a4P1yE3c8bU=; b=KFGY3/BoHWoK5AboC5EQz0ew26g0LSfZd4RAyiWSui5wLtLmcr0AoVK4bXn5tMRXPaBjrs Z64TT3Fzmgf3BWPslsQ1D0smOd8b3XKqbTb8obC4BQn4uY8ykD0JnRJCijaDuiZ0fUnudA K5N6IIZbBHSvXJ5kLDoHv4HJNw8pzBNc5TGz6RzOWZcN1Lbth5kSXxD76FvDYEaLD3N5sJ 3mJ9/qnjZ7W744cSQbhMppELr1j9/zLo8OP3b14B2T+XpNqfAxWmqWge+E6hhYDtm9qRha el6ITLFiHoFXhA3+mIr5KptI0cGvhFOwt95nKhmrKVU5386vP0fLkqrsbSCjdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732479269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wAOIuiH5iFxh75BPG5/JbxzDMaDlwEv4a4P1yE3c8bU=; b=vV9xRUY9Hwz8f9jb78Sv+ssM7NeaDB2pxl7kab1DW/NWNbAtDpjHon34sk1fRPiiI5bMQU IivZMkn2UD7p1FrV/SmwjzOa+OK/TuIkNDetS+ohT00fX+eP9MCSyzETFA61qiDcpEH1sJ S3n1Ty6v7QhNTFpsWxD9Esf/pZsJb6mjVCdwHfiZt9WdSTRwRv8RoYKzozeSmlKvILBOBM /mt1Ri0QtuNA58HcMlq5RYZgQgU8xNMs6BUaOpVtnYIobUnO/gOILmafcGAigSf9ny/jS8 yywQqd1LoQjahSZmrin1nyTFbUpeuyq6l0IZrVnqs4qQfk7k2pbFqoPN0divrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732479269; a=rsa-sha256; cv=none; b=iFkH4BdPQ74E+iyLewZA7VHxERUkaHuWewnxy7aXnc++cOs1enXbvVCs8RuWfXkG36mtTb 83zX1/4nvlLdxnaZRTy1ZH6f90EVgH/PGPn+Fkwsr/Esq6FA3IhJfPP2sTIA/9pcuMw4Bz mYdZQP0Fyi2Ake8k8hZVdsAHSTPwIUZ1ds4ZsJEUV+Z47v/bgM6kg0ILNm3++2Ef8REkTL 1DjL+SyobNf0RaXs/cTlvl2Y06Zh0b+Vspo5NcEayNNYkNvXOH99r20GxQc5fcjhXgy2pg gcNZg4QomtKywTqO0a4SQUfJSW3h9jXwwa8dW/7rCJmBJ/79z6OPHcey2LbVyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XxKn11Xvsz17mN; Sun, 24 Nov 2024 20:14:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AOKETq5028128; Sun, 24 Nov 2024 20:14:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOKETf3028125; Sun, 24 Nov 2024 20:14:29 GMT (envelope-from git) Date: Sun, 24 Nov 2024 20:14:29 GMT Message-Id: <202411242014.4AOKETf3028125@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Christoph Moench-Tegeder Subject: git: 67cb6c7f956a - main - cad/kicad: unbreak build after 33d6f548e666c89bf3feef18e4c0569eac57adaf List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cmt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67cb6c7f956a11720434890bba4266f01b93e8d1 Auto-Submitted: auto-generated The branch main has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=67cb6c7f956a11720434890bba4266f01b93e8d1 commit 67cb6c7f956a11720434890bba4266f01b93e8d1 Author: Christoph Moench-Tegeder AuthorDate: 2024-11-24 20:12:48 +0000 Commit: Christoph Moench-Tegeder CommitDate: 2024-11-24 20:12:48 +0000 cad/kicad: unbreak build after 33d6f548e666c89bf3feef18e4c0569eac57adaf some hacks to get to get the old KiCAD build with modern boost --- cad/kicad/Makefile | 2 - .../files/patch-3d-viewer_3d__cache_3d__cache.cpp | 24 +++++++++++ cad/kicad/files/patch-common_kiid.cpp | 47 ++++++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile index 6cfb1be3d698..664b286d3c7d 100644 --- a/cad/kicad/Makefile +++ b/cad/kicad/Makefile @@ -11,8 +11,6 @@ WWW= https://kicad.org/ LICENSE= GPLv2 -BROKEN= fails to build with boost-1.86+ - BUILD_DEPENDS= ${LOCALBASE}/include/glm/glm.hpp:math/glm \ swig:devel/swig LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ diff --git a/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp b/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp new file mode 100644 index 000000000000..643ed29c8485 --- /dev/null +++ b/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp @@ -0,0 +1,24 @@ +# this is a terrible hack - you can but should not copy this -- cmt +--- 3d-viewer/3d_cache/3d_cache.cpp.orig ++++ 3d-viewer/3d_cache/3d_cache.cpp +@@ -381,14 +381,17 @@ + dblock.process_bytes( block, bsize ); + + fclose( fp ); +- unsigned int digest[5]; +- dblock.get_digest( digest ); ++ union { ++ unsigned int digest[5]; ++ unsigned char boost_digest[20]; ++ } _digest; ++ dblock.get_digest( _digest.boost_digest ); + + // ensure MSB order + for( int i = 0; i < 5; ++i ) + { + int idx = i << 2; +- unsigned int tmp = digest[i]; ++ unsigned int tmp = _digest.digest[i]; + aSHA1Sum[idx+3] = tmp & 0xff; + tmp >>= 8; + aSHA1Sum[idx+2] = tmp & 0xff; diff --git a/cad/kicad/files/patch-common_kiid.cpp b/cad/kicad/files/patch-common_kiid.cpp new file mode 100644 index 000000000000..86b398ae2078 --- /dev/null +++ b/cad/kicad/files/patch-common_kiid.cpp @@ -0,0 +1,47 @@ +--- common/kiid.cpp.orig ++++ common/kiid.cpp +@@ -40,15 +40,15 @@ + + #include + +-// boost:mt19937 is not thread-safe ++// OBSOLTE: boost:mt19937 is not thread-safe + static std::mutex rng_mutex; + + // Static rng and generators are used because the overhead of constant seeding is expensive + // We rely on the default non-arg constructor of basic_random_generator to provide a random seed. + // We use a separate rng object for cases where we want to control the basic_random_generator + // initial seed by calling SeedGenerator from unit tests and other special cases. +-static boost::mt19937 rng; +-static boost::uuids::basic_random_generator randomGenerator; ++static std::mt19937 rng; ++static boost::uuids::basic_random_generator randomGenerator; + + // These don't have the same performance penalty, but we might as well be consistent + static boost::uuids::string_generator stringGenerator; +@@ -235,15 +235,7 @@ + + size_t KIID::Hash() const + { +- size_t hash = 0; +- +- // Note: this is NOT little-endian/big-endian safe, but as long as it's just used +- // at runtime it won't matter. +- +- for( int i = 0; i < 4; ++i ) +- boost::hash_combine( hash, reinterpret_cast( m_uuid.data )[i] ); +- +- return hash; ++ return boost::uuids::hash_value(m_uuid); + } + + +@@ -300,7 +292,7 @@ + void KIID::SeedGenerator( unsigned int aSeed ) + { + rng.seed( aSeed ); +- randomGenerator = boost::uuids::basic_random_generator( rng ); ++ randomGenerator = boost::uuids::basic_random_generator( rng ); + } + +