From nobody Mon Oct 21 09:37:13 2024 X-Original-To: dev-commits-ports-all@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 4XX9FQ1cB1z5YlVK; Mon, 21 Oct 2024 09:37:14 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XX9FP3s1rz4nbq; Mon, 21 Oct 2024 09:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729503433; 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=uXjtk88NFIt3Vb22CwF2ooVWkAmP4UExaf04dKNeVjw=; b=ugS9GDFGCUiSakXmEh1kl9PdXjrSHkPxO7bAVCQwmJLGfoUot45FmfBZhDmDKxWhNfgYuS 2yU1Gpow2MHsTifaa7a7nMDEAV1YivvLMD0lkeYSy4lXKurrzO/qipdHvLcaWsc49h7vmI mVznzqfJpvoJKC5kC6HpoUAhoCTDPaaXnja5wB0UffDJun+V58iUmDQhzR7Z324MWqr+5C vQnQMcgfWqHRN8ZV15Xwpfx29VqlgzSoe6d6zgILefNu2ze/8H78Lb1KzMWrXmjaES1OlT gddQ76obDeZ7m0lnMu8la1ufbglKQvTE1xvh4DPQgnOj5sn77tlH3xjha6uktA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729503433; 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=uXjtk88NFIt3Vb22CwF2ooVWkAmP4UExaf04dKNeVjw=; b=Yp0OxNOJmQ6oKPEKEJovV1JKAnO6udiExTxgVTq9t/yjwlF2N6re0hbh7W9oo+LJmDo6FX xjG45I2aiBEwIcUvRrqeOB8LeRO0k4ibgQ//ZFNzB41IumlXg6Yqo0i3mvrYSij19++NlE IF/k/IVLUIo/6/XO5m/seebNZqvdTCvCDgSijbjyzLCnl1Tv6Wm2g4H1lPK+uLZzhhO0Hm OUiZ8xnRALRiS1Olb6RPYanKNrQq/fb+rAHPhVKcTFYrtreF2P0aO00Mg2gCpk/1PGzYhd 8S9YqBqJnLqPAyF5MefiE/0EZUK3ZN3wnbyixbAdydgLlInrprU70MXkUQJOAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729503433; a=rsa-sha256; cv=none; b=J3kj2NO5LJj2GO+JIZgRjlPC8jJTfA1KlfIdboDlnA00fGfd7RUmML2zFXXgM4RLiB2y6O gyphd5yWTR+WRRMpDUZtURnnBH9a7zxJ1r6fUzDZcnboCxImY+Eldfab9EiyrTz1I4nlK8 dp2kEFD9P5LiG9jnjtKK1iuF63m24mFmxhmjznLK7adybDeUk+sfHqTJuZ8gb1jWVW0nbv V64MztgSFJs1pwWJurU3c7ZALHrrUfm281p1PJ98VJVB1I9KLE1NYwz6YucogZvOkSj5St z8ZyBnMNwoKm0YQhz1ZlHLZXiY/fTyGnKzKEjzM0TmjE2CIlo4mrYZHRQT4Prw== 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 4XX9FP2qTxzPfJ; Mon, 21 Oct 2024 09:37:13 +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 49L9bDMO032870; Mon, 21 Oct 2024 09:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49L9bDr4032867; Mon, 21 Oct 2024 09:37:13 GMT (envelope-from git) Date: Mon, 21 Oct 2024 09:37:13 GMT Message-Id: <202410210937.49L9bDr4032867@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 75ecc581ae83 - main - science/opensph: port to aarch64 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75ecc581ae83c4eb358f0f62e7de97b6e85ffc44 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=75ecc581ae83c4eb358f0f62e7de97b6e85ffc44 commit 75ecc581ae83c4eb358f0f62e7de97b6e85ffc44 Author: Robert Clausecker AuthorDate: 2024-10-15 22:07:41 +0000 Commit: Robert Clausecker CommitDate: 2024-10-21 09:36:01 +0000 science/opensph: port to aarch64 - use sse2neon to build this port on aarch64 - armv7 might work too, but I can't test it due to dependent ports not building right now Approved by: yuri (maintainer) Differential Revision: https://reviews.freebsd.org/D47140 --- science/opensph/Makefile | 10 +++++++--- .../patch-core_objects_containers_BasicAllocators.h | 13 +++++++++++++ .../opensph/files/patch-core_objects_geometry_Vector.h | 17 +++++++++++++++++ .../files/patch-core_objects_wrappers_AlignedStorage.h | 13 +++++++++++++ science/opensph/files/patch-core_system_Platform.cpp | 8 ++++---- 5 files changed, 54 insertions(+), 7 deletions(-) diff --git a/science/opensph/Makefile b/science/opensph/Makefile index e6251857ecac..3be2e90bfb20 100644 --- a/science/opensph/Makefile +++ b/science/opensph/Makefile @@ -1,6 +1,6 @@ PORTNAME= OpenSPH DISTVERSION= 0.4.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -10,9 +10,11 @@ WWW= https://gitlab.com/sevecekp/sph LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS= aarch64 amd64 i386 ONLY_FOR_ARCHS_REASON= unconditional use of -msse4.1 and inclusion of immintrin.h +BUILD_DEPENDS_aarch64= ${LOCALBASE}/include/sse2neon.h:devel/sse2neon +BUILD_DEPENDS+= ${BUILD_DEPENDS_${ARCH}} TEST_DEPENDS= catch>0:devel/catch USES= compiler:c++17-lang qmake qt:5 @@ -28,6 +30,8 @@ QMAKE_SOURCE_PATH= ${WRKSRC}/sph.pro QMAKE_ARGS= CONFIG+=release CXXFLAGS+= -DSPH_CONFIG_SET +CXXFLAGS_amd64= -msse4.1 +CXXFLAGS_i386= -msse4.1 TEST_WRKSRC= ${WRKDIR}/test @@ -63,7 +67,7 @@ VDB_LIB_DEPENDS= libImath.so:math/Imath \ libtbb.so:devel/onetbb post-patch: # workaround for https://gitlab.com/sevecekp/sph/-/issues/48 - @${FIND} ${WRKSRC} -name "*.pro" | ${XARGS} ${REINPLACE_CMD} -e 's|c++14|c++17|' + @${FIND} ${WRKSRC} -name "*.pro" | ${XARGS} ${REINPLACE_CMD} -e 's|c++14|c++17|' -e 's|-msse4.1||' do-test: @${REINPLACE_CMD} -e 's|Path(.*|Path("${TEST_WRKSRC}");|' ${WRKSRC}/test/utils/Config.h diff --git a/science/opensph/files/patch-core_objects_containers_BasicAllocators.h b/science/opensph/files/patch-core_objects_containers_BasicAllocators.h new file mode 100644 index 000000000000..bb1fc5a255de --- /dev/null +++ b/science/opensph/files/patch-core_objects_containers_BasicAllocators.h @@ -0,0 +1,13 @@ +--- core/objects/containers/BasicAllocators.h.orig 2024-10-15 17:04:09 UTC ++++ core/objects/containers/BasicAllocators.h +@@ -6,7 +6,9 @@ + /// \date 2016-2021 + + #include "common/Assert.h" +-#ifndef SPH_WIN ++#if defined(__arm__) || defined(__aarch64__) ++#include ++#elif !defined(SPH_WIN) + #include + #else + #include diff --git a/science/opensph/files/patch-core_objects_geometry_Vector.h b/science/opensph/files/patch-core_objects_geometry_Vector.h new file mode 100644 index 000000000000..8cb10a70ecec --- /dev/null +++ b/science/opensph/files/patch-core_objects_geometry_Vector.h @@ -0,0 +1,17 @@ +--- core/objects/geometry/Vector.h.orig 2024-10-15 17:00:09 UTC ++++ core/objects/geometry/Vector.h +@@ -9,9 +9,13 @@ + #include "objects/containers/Tuple.h" + #include "objects/geometry/Generic.h" + #include "objects/wrappers/Interval.h" +-#include + #include ++#if defined(__arm__) || defined(__aarch64__) ++#include ++#else ++#include + #include ++#endif + + NAMESPACE_SPH_BEGIN + diff --git a/science/opensph/files/patch-core_objects_wrappers_AlignedStorage.h b/science/opensph/files/patch-core_objects_wrappers_AlignedStorage.h new file mode 100644 index 000000000000..c07146ada5cc --- /dev/null +++ b/science/opensph/files/patch-core_objects_wrappers_AlignedStorage.h @@ -0,0 +1,13 @@ +--- core/objects/wrappers/AlignedStorage.h.orig 2024-10-15 17:05:35 UTC ++++ core/objects/wrappers/AlignedStorage.h +@@ -7,7 +7,9 @@ + + #include "common/Assert.h" + #include "common/Traits.h" +-#ifndef SPH_WIN ++#if defined(__arm__) || defined(__aarch64__) ++#include ++#elif !defined(SPH_WIN) + #include + #else + #include diff --git a/science/opensph/files/patch-core_system_Platform.cpp b/science/opensph/files/patch-core_system_Platform.cpp index 54324cc45a0c..6f25b44906e2 100644 --- a/science/opensph/files/patch-core_system_Platform.cpp +++ b/science/opensph/files/patch-core_system_Platform.cpp @@ -1,6 +1,6 @@ ---- core/system/Platform.cpp.orig 2021-04-08 21:23:28 UTC +--- core/system/Platform.cpp.orig 2022-11-16 12:31:25 UTC +++ core/system/Platform.cpp -@@ -102,14 +106,18 @@ class CpuUsage { (private) +@@ -117,14 +117,18 @@ class CpuUsage { (public) public: CpuUsage() { @@ -20,7 +20,7 @@ file = fopen("/proc/cpuinfo", "r"); numProcessors = 0; while (fgets(line, 128, file) != NULL) { -@@ -117,6 +125,8 @@ class CpuUsage { (private) +@@ -132,6 +136,8 @@ class CpuUsage { (public) numProcessors++; } fclose(file); @@ -29,7 +29,7 @@ } Optional getUsage() { -@@ -150,7 +160,7 @@ bool isDebuggerPresent() { +@@ -176,7 +182,7 @@ bool isDebuggerPresent() { char buf[1024]; bool debuggerPresent = false;