From owner-svn-ports-all@freebsd.org Sun May 26 04:08:12 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1261D15BEB6C; Sun, 26 May 2019 04:08:12 +0000 (UTC) (envelope-from yuri@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 791BD70104; Sun, 26 May 2019 04:08:11 +0000 (UTC) (envelope-from yuri@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 5CBA7E5BC; Sun, 26 May 2019 04:08:11 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4Q48BHh016383; Sun, 26 May 2019 04:08:11 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4Q489Sj016376; Sun, 26 May 2019 04:08:09 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201905260408.x4Q489Sj016376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 26 May 2019 04:08:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r502676 - in head/science: . opensph opensph/files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/science: . opensph opensph/files X-SVN-Commit-Revision: 502676 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 791BD70104 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Sun, 26 May 2019 04:08:12 -0000 Author: yuri Date: Sun May 26 04:08:09 2019 New Revision: 502676 URL: https://svnweb.freebsd.org/changeset/ports/502676 Log: New port: science/opensph: Library and graphical tools for running SPH and N-body simulations Added: head/science/opensph/ head/science/opensph/Makefile (contents, props changed) head/science/opensph/distinfo (contents, props changed) head/science/opensph/files/ head/science/opensph/files/patch-gui_objects_Palette.cpp (contents, props changed) head/science/opensph/files/patch-lib_math_MathUtils.h (contents, props changed) head/science/opensph/files/patch-lib_objects_geometry_Generic.h (contents, props changed) head/science/opensph/files/patch-lib_system_Platform.cpp (contents, props changed) head/science/opensph/pkg-descr (contents, props changed) Modified: head/science/Makefile Modified: head/science/Makefile ============================================================================== --- head/science/Makefile Sun May 26 04:04:15 2019 (r502675) +++ head/science/Makefile Sun May 26 04:08:09 2019 (r502676) @@ -174,6 +174,7 @@ SUBDIR += openkim SUBDIR += openmx SUBDIR += opensim-core + SUBDIR += opensph SUBDIR += opsin SUBDIR += p5-Algorithm-SVMLight SUBDIR += p5-Chemistry-3DBuilder Added: head/science/opensph/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/Makefile Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +PORTNAME= OpenSPH +DISTVERSIONPREFIX= v +DISTVERSION= g20190519 +CATEGORIES= science + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Library and graphical tools for running SPH and N-body simulations + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libwx_baseu-3.1.so:x11-toolkits/wxgtk31 + +USES= compiler:c++14-lang eigen:3 qmake qt:5 +USE_GITLAB= yes +GL_SITE= https://gitlab.com +GL_ACCOUNT= sevecekp +GL_PROJECT= sph +GL_COMMIT= 06686fa7f7307bdf8c9261e55b9875aafa278a13 + +QMAKE_SOURCE_PATH= ${WRKSRC}/sph.pro + +BINARY_ALIAS= wx-config=${LOCALBASE}/bin/wxgtk3u-3.1-config + +PLIST_FILES= bin/opensph-cli bin/opensph + +do-install: # https://gitlab.com/sevecekp/sph/issues/2 + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/cli/launcher/launcher ${STAGEDIR}${PREFIX}/bin/opensph-cli + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gui/launcherGui/launcherGui ${STAGEDIR}${PREFIX}/bin/opensph + +.include Added: head/science/opensph/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/distinfo Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,3 @@ +TIMESTAMP = 1558839946 +SHA256 (sevecekp-sph-06686fa7f7307bdf8c9261e55b9875aafa278a13_GL0.tar.gz) = c8566141a37461a7445149c7460c6ef8daf630a75a755c7567761d2bb4ea6acc +SIZE (sevecekp-sph-06686fa7f7307bdf8c9261e55b9875aafa278a13_GL0.tar.gz) = 21945021 Added: head/science/opensph/files/patch-gui_objects_Palette.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/files/patch-gui_objects_Palette.cpp Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,42 @@ +--- gui/objects/Palette.cpp.orig 2019-05-26 03:22:37 UTC ++++ gui/objects/Palette.cpp +@@ -2,6 +2,7 @@ + #include "io/Path.h" + #include "objects/utility/StringUtils.h" + #include ++#include + + NAMESPACE_SPH_BEGIN + +@@ -41,12 +42,12 @@ float Palette::paletteToLinear(const float value) cons + case PaletteScale::LINEAR: + return value; + case PaletteScale::LOGARITHMIC: +- return exp10(value); ++ return std::pow(10.,value); + case PaletteScale::HYBRID: + if (value > 1.f) { +- return exp10(value - 1.f); ++ return std::pow(10.,value - 1.f); + } else if (value < -1.f) { +- return -exp10(-value - 1.f); ++ return -std::pow(10.,-value - 1.f); + } else { + return value; + } +@@ -142,12 +143,12 @@ float Palette::relativeToPalette(const float value) co + case PaletteScale::LINEAR: + return interpol; + case PaletteScale::LOGARITHMIC: +- return exp10(interpol); ++ return std::pow(10.,interpol); + case PaletteScale::HYBRID: + if (interpol > 1.f) { +- return exp10(interpol - 1.f); ++ return std::pow(10.,interpol - 1.f); + } else if (interpol < -1.f) { +- return -exp10(-interpol - 1.f); ++ return -std::pow(10.,-interpol - 1.f); + } else { + return interpol; + } Added: head/science/opensph/files/patch-lib_math_MathUtils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/files/patch-lib_math_MathUtils.h Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,10 @@ +--- lib/math/MathUtils.h.orig 2019-05-26 03:08:36 UTC ++++ lib/math/MathUtils.h +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + NAMESPACE_SPH_BEGIN + Added: head/science/opensph/files/patch-lib_objects_geometry_Generic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/files/patch-lib_objects_geometry_Generic.h Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,10 @@ +--- lib/objects/geometry/Generic.h.orig 2019-05-26 03:09:40 UTC ++++ lib/objects/geometry/Generic.h +@@ -7,6 +7,7 @@ + + #include "objects/containers/StaticArray.h" + #include ++#include + + NAMESPACE_SPH_BEGIN + Added: head/science/opensph/files/patch-lib_system_Platform.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/files/patch-lib_system_Platform.cpp Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,57 @@ +--- lib/system/Platform.cpp.orig 2019-05-26 03:11:41 UTC ++++ lib/system/Platform.cpp +@@ -8,14 +8,14 @@ + #include + #include + #include +-#include ++//#include + #include + + NAMESPACE_SPH_BEGIN + + Expected getExecutablePath() { + char result[PATH_MAX]; +- ssize_t count = readlink("/proc/self/exe", result, PATH_MAX); ++ ssize_t count = readlink("/proc/curproc/file", result, PATH_MAX); + if (count != -1) { + Path path(result); + return path.parentPath(); +@@ -103,14 +103,18 @@ class CpuUsage { (private) + + public: + CpuUsage() { ++#if !defined(__FreeBSD__) + FILE* file; ++#endif + struct tms timeSample; ++#if !defined(__FreeBSD__) + char line[128]; ++#endif + + lastCpu = times(&timeSample); + lastSysCpu = timeSample.tms_stime; + lastUserCpu = timeSample.tms_utime; +- ++#if !defined(__FreeBSD__) + file = fopen("/proc/cpuinfo", "r"); + numProcessors = 0; + while (fgets(line, 128, file) != NULL) { +@@ -118,6 +122,8 @@ class CpuUsage { (private) + numProcessors++; + } + fclose(file); ++#endif ++ numProcessors = 8; // TODO + } + + Optional getUsage() { +@@ -151,7 +157,7 @@ bool isDebuggerPresent() { + char buf[1024]; + bool debuggerPresent = false; + +- int status_fd = open("/proc/self/status", O_RDONLY); ++ int status_fd = open("/proc/curproc/status", O_RDONLY); + if (status_fd == -1) { + return false; + } Added: head/science/opensph/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/opensph/pkg-descr Sun May 26 04:08:09 2019 (r502676) @@ -0,0 +1,7 @@ +OpenSPH is an integrator of hydrodynamic equations using SPH discretization in +space, currently specialized on simulations of asteroid impacts. The code is +being developed on Astronomical Institute of Charles University in Prague. It +aims to provide a fast, versatile and easily extensible SPH solver utilizing +modern CPU features (SSE/AVX instruction sets). + +WWW: https://gitlab.com/sevecekp/sph