Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2022 05:57:22 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 0be255af9271 - main - devel/easy-profiler: New port: Library and tool for converting vertex formats
Message-ID:  <202206200557.25K5vMev045882@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0be255af9271989f53058b48e444fe2e8baf41aa

commit 0be255af9271989f53058b48e444fe2e8baf41aa
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-06-20 05:56:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-06-20 05:57:20 +0000

    devel/easy-profiler: New port: Library and tool for converting vertex formats
---
 devel/Makefile                                     |  1 +
 devel/easy-profiler/Makefile                       | 25 ++++++++++++++++++++++
 devel/easy-profiler/distinfo                       |  3 +++
 .../patch-easy__profiler__core_current__thread.h   | 23 ++++++++++++++++++++
 .../files/patch-profiler__gui_thread__pool.cpp     | 11 ++++++++++
 devel/easy-profiler/pkg-descr                      |  8 +++++++
 devel/easy-profiler/pkg-plist                      | 23 ++++++++++++++++++++
 7 files changed, 94 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 855bd8c7ec91..7d9bba5a542c 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -559,6 +559,7 @@
     SUBDIR += dyncall
     SUBDIR += e00compr
     SUBDIR += eastl
+    SUBDIR += easy-profiler
     SUBDIR += easyexif
     SUBDIR += easygit
     SUBDIR += easyloggingpp
diff --git a/devel/easy-profiler/Makefile b/devel/easy-profiler/Makefile
new file mode 100644
index 000000000000..cbb4fd46e2d5
--- /dev/null
+++ b/devel/easy-profiler/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	easy-profiler
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.1.0-41
+DISTVERSIONSUFFIX=	-g3104dd4
+CATEGORIES=	devel
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Library and tool for converting vertex formats
+
+LICENSE=	APACHE20 MIT
+LICENSE_COMB=	dual
+LICENSE_FILE_APACHE20=	${WRKSRC}/easy_profiler_core/LICENSE.APACHE
+LICENSE_FILE_MIT=	${WRKSRC}/easy_profiler_core/LICENSE.MIT
+
+USES=		cmake:testing compiler:c++11-lang qt:5
+USE_QT=		core gui widgets buildtools_build qmake_build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	yse
+GH_PROJECT=	easy_profiler
+
+post-install:
+	@${RM} ${STAGEDIR}${PREFIX}/LICENSE.*
+
+.include <bsd.port.mk>
diff --git a/devel/easy-profiler/distinfo b/devel/easy-profiler/distinfo
new file mode 100644
index 000000000000..c77e3a5896a1
--- /dev/null
+++ b/devel/easy-profiler/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1655701621
+SHA256 (yse-easy_profiler-v2.1.0-41-g3104dd4_GH0.tar.gz) = a619d77cba16eb215b77dd336e4bc9fc24968a14b26f7bf71f9c23576c15a507
+SIZE (yse-easy_profiler-v2.1.0-41-g3104dd4_GH0.tar.gz) = 423101
diff --git a/devel/easy-profiler/files/patch-easy__profiler__core_current__thread.h b/devel/easy-profiler/files/patch-easy__profiler__core_current__thread.h
new file mode 100644
index 000000000000..723b6dbb2d11
--- /dev/null
+++ b/devel/easy-profiler/files/patch-easy__profiler__core_current__thread.h
@@ -0,0 +1,23 @@
+--- easy_profiler_core/current_thread.h.orig	2021-06-09 13:16:22 UTC
++++ easy_profiler_core/current_thread.h
+@@ -60,6 +60,10 @@ The Apache License, Version 2.0 (the "License");
+ # include <sys/syscall.h>
+ #endif
+ 
++#if defined(__DragonFly__) || defined(__FreeBSD__)
++#include <pthread_np.h>
++#endif
++
+ inline profiler::thread_id_t getCurrentThreadId()
+ {
+ #ifdef _WIN32
+@@ -76,6 +80,9 @@ inline profiler::thread_id_t getCurrentThreadId()
+ #   endif
+ #elif defined(__QNX__)
+     EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)gettid();
++    return _id;
++#elif defined(__DragonFly__) || defined(__FreeBSD__)
++    EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)pthread_getthreadid_np();
+     return _id;
+ #else
+     EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)syscall(__NR_gettid);
diff --git a/devel/easy-profiler/files/patch-profiler__gui_thread__pool.cpp b/devel/easy-profiler/files/patch-profiler__gui_thread__pool.cpp
new file mode 100644
index 000000000000..8be92c738d6b
--- /dev/null
+++ b/devel/easy-profiler/files/patch-profiler__gui_thread__pool.cpp
@@ -0,0 +1,11 @@
+--- profiler_gui/thread_pool.cpp.orig	2022-06-20 05:17:12 UTC
++++ profiler_gui/thread_pool.cpp
+@@ -73,7 +73,7 @@ static void setLowestThreadPriority()
+ {
+ #ifdef _WIN32
+     SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_LOWEST);
+-#elif !defined(__APPLE__)
++#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+     pthread_attr_t attr;
+     if (pthread_attr_init(&attr) == 0)
+     {
diff --git a/devel/easy-profiler/pkg-descr b/devel/easy-profiler/pkg-descr
new file mode 100644
index 000000000000..550cc403a18c
--- /dev/null
+++ b/devel/easy-profiler/pkg-descr
@@ -0,0 +1,8 @@
+Lightweight cross-platform profiler library for C++.
+
+You can profile any function in you code. Furthermore this library
+provide measuring time of any block of code. For example, information
+for 12 millions of blocks is using less than 300Mb of memory. Working
+profiler slows your application execution for only 1-2%.
+
+WWW: https://github.com/yse/easy_profiler
diff --git a/devel/easy-profiler/pkg-plist b/devel/easy-profiler/pkg-plist
new file mode 100644
index 000000000000..d7628cd29c7b
--- /dev/null
+++ b/devel/easy-profiler/pkg-plist
@@ -0,0 +1,23 @@
+bin/profiler_converter
+bin/profiler_gui
+include/easy/arbitrary_value.h
+include/easy/details/arbitrary_value_aux.h
+include/easy/details/arbitrary_value_public_types.h
+include/easy/details/easy_compiler_support.h
+include/easy/details/profiler_aux.h
+include/easy/details/profiler_colors.h
+include/easy/details/profiler_in_use.h
+include/easy/details/profiler_public_types.h
+include/easy/easy_net.h
+include/easy/easy_protocol.h
+include/easy/easy_socket.h
+include/easy/profiler.h
+include/easy/reader.h
+include/easy/serialized_block.h
+include/easy/utility.h
+include/easy/writer.h
+lib/cmake/easy_profiler/easy_profilerConfig.cmake
+lib/cmake/easy_profiler/easy_profilerConfigVersion.cmake
+lib/cmake/easy_profiler/easy_profilerTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/easy_profiler/easy_profilerTargets.cmake
+lib/libeasy_profiler.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206200557.25K5vMev045882>