From owner-svn-ports-all@freebsd.org Mon Aug 24 11:20:20 2020 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 A06ED3BABCD; Mon, 24 Aug 2020 11:20:20 +0000 (UTC) (envelope-from danfe@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZqRS3r8kz4bGF; Mon, 24 Aug 2020 11:20:20 +0000 (UTC) (envelope-from danfe@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 66E7617C8C; Mon, 24 Aug 2020 11:20:20 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OBKKtC078331; Mon, 24 Aug 2020 11:20:20 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OBKIMs078323; Mon, 24 Aug 2020 11:20:18 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202008241120.07OBKIMs078323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Mon, 24 Aug 2020 11:20:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r546066 - in head/benchmarks: . mangohud mangohud/files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/benchmarks: . mangohud mangohud/files X-SVN-Commit-Revision: 546066 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.33 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: Mon, 24 Aug 2020 11:20:20 -0000 Author: danfe Date: Mon Aug 24 11:20:18 2020 New Revision: 546066 URL: https://svnweb.freebsd.org/changeset/ports/546066 Log: MangoHud is a Vulkan/OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load, and more. WWW: https://github.com/flightlessmango/MangoHud Added: head/benchmarks/mangohud/ head/benchmarks/mangohud/Makefile (contents, props changed) head/benchmarks/mangohud/distinfo (contents, props changed) head/benchmarks/mangohud/files/ head/benchmarks/mangohud/files/patch-include_elfhacks.h (contents, props changed) head/benchmarks/mangohud/files/patch-meson.build (contents, props changed) head/benchmarks/mangohud/files/patch-src_elfhacks.cpp (contents, props changed) head/benchmarks/mangohud/files/patch-src_meson.build (contents, props changed) head/benchmarks/mangohud/pkg-descr (contents, props changed) Modified: head/benchmarks/Makefile Modified: head/benchmarks/Makefile ============================================================================== --- head/benchmarks/Makefile Mon Aug 24 11:17:19 2020 (r546065) +++ head/benchmarks/Makefile Mon Aug 24 11:20:18 2020 (r546066) @@ -41,6 +41,7 @@ SUBDIR += linux-vdbench SUBDIR += lmbench SUBDIR += lzbench + SUBDIR += mangohud SUBDIR += mdtest SUBDIR += nbench SUBDIR += netio Added: head/benchmarks/mangohud/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/Makefile Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,47 @@ +# Created by: Alexey Dokuchaev +# $FreeBSD$ + +PORTNAME= mangohud +PORTVERSION= 0.5.1 +DISTVERSIONPREFIX= v +CATEGORIES= benchmarks graphics + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Vulkan/OpenGL overlay for CPU/GPU monitoring + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= glslangValidator:devel/glslang \ + ${LOCALBASE}/share/vulkan/registry/vk.xml:devel/vulkan-headers \ + ${PYTHON_PKGNAMEPREFIX}mako>=0:textproc/py-mako@${PY_FLAVOR} +LIB_DEPENDS= libdbus-1.so:devel/dbus \ + libinotify.so:devel/libinotify + +USES= compiler:c++14-lang meson pkgconfig python:build xorg +USE_GITHUB= yes +GH_ACCOUNT= flightlessmango +GH_PROJECT= MangoHud +USE_XORG= x11 +MESON_ARGS= -Duse_system_vulkan=enabled -Dwith_xnvctrl=disabled + +PLIST_FILES= bin/mangohud lib/mangohud/libMangoHud.so \ + lib/mangohud/libMangoHud_dlsym.so man/man1/mangohud.1.gz \ + share/vulkan/implicit_layer.d/MangoHud.json +PORTEXAMPLES= MangoHud.conf.example + +OPTIONS_DEFINE= EXAMPLES + +post-patch: + @${REINPLACE_CMD} -e '/version : /s,0\.4\.0,${PORTVERSION}, ; \ + /^prog_python = /s,3,${PYTHON_VER},' ${WRKSRC}/meson.build + @${REINPLACE_CMD} -e '1s,usr/bin/env ba,bin/,' \ + ${WRKSRC}/bin/mangohud.in + @${REINPLACE_CMD} -e 's,/usr/share/doc,${PREFIX}/share/examples,' \ + ${WRKSRC}/data/mangohud.1 + @${REINPLACE_CMD} -e '/#include /d' \ + ${WRKSRC}/src/overlay_params.cpp + @${REINPLACE_CMD} -e 's,libdl\.so,ld-elf.so,' \ + ${WRKSRC}/src/real_dlsym.cpp + +.include Added: head/benchmarks/mangohud/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/distinfo Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,3 @@ +TIMESTAMP = 1597596860 +SHA256 (flightlessmango-MangoHud-v0.5.1_GH0.tar.gz) = 3e91d4fc7369d46763894c13f3315133871dd02705072981770c3cf58e8081c6 +SIZE (flightlessmango-MangoHud-v0.5.1_GH0.tar.gz) = 15042595 Added: head/benchmarks/mangohud/files/patch-include_elfhacks.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/files/patch-include_elfhacks.h Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,19 @@ +--- include/elfhacks.h.orig 2020-08-16 16:54:20 UTC ++++ include/elfhacks.h +@@ -58,6 +58,16 @@ extern "C" { + # endif + #endif + ++#ifndef __ELF_NATIVE_CLASS ++#define __ELF_NATIVE_CLASS __WORDSIZE ++#endif ++ ++/* We use this macro to refer to ELF types independent of the native wordsize. ++ `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ ++#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) ++#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) ++#define _ElfW_1(e,w,t) e##w##t ++ + /** + * \defgroup elfhacks elfhacks + * Elfhacks is a collection of functions that aim for retvieving Added: head/benchmarks/mangohud/files/patch-meson.build ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/files/patch-meson.build Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,20 @@ +--- meson.build.orig 2020-08-16 16:54:20 UTC ++++ meson.build +@@ -98,7 +98,7 @@ inc_common = [ + include_directories('include'), + ] + +-dep_vulkan = dependency('vulkan', required: get_option('use_system_vulkan')) ++dep_inotify = dependency('libinotify') + dep_pthread = dependency('threads') + dbus_dep = dependency('dbus-1', required: get_option('with_dbus')).partial_dependency(compile_args : true, includes : true) + +@@ -170,7 +170,7 @@ else + dep_rt = cc.find_library('rt') + endif + +-if dep_vulkan.found() ++if true + datadir = get_option('datadir') + if not datadir.startswith('/') + datadir = get_option('prefix') / datadir Added: head/benchmarks/mangohud/files/patch-src_elfhacks.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/files/patch-src_elfhacks.cpp Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,29 @@ +--- src/elfhacks.cpp.orig 2020-08-16 16:54:20 UTC ++++ src/elfhacks.cpp +@@ -195,22 +195,22 @@ int eh_init_obj(eh_obj_t *obj) + if (obj->strtab) + return ENOTSUP; + +- obj->strtab = (const char *) obj->dynamic[p].d_un.d_ptr; ++ obj->strtab = (const char *) (obj->dynamic[p].d_un.d_ptr + obj->addr); + } else if (obj->dynamic[p].d_tag == DT_HASH) { + if (obj->hash) + return ENOTSUP; + +- obj->hash = (ElfW(Word) *) obj->dynamic[p].d_un.d_ptr; ++ obj->hash = (ElfW(Word) *) (obj->dynamic[p].d_un.d_ptr + obj->addr); + } else if (obj->dynamic[p].d_tag == DT_GNU_HASH) { + if (obj->gnu_hash) + return ENOTSUP; + +- obj->gnu_hash = (Elf32_Word *) obj->dynamic[p].d_un.d_ptr; ++ obj->gnu_hash = (Elf32_Word *) (obj->dynamic[p].d_un.d_ptr + obj->addr); + } else if (obj->dynamic[p].d_tag == DT_SYMTAB) { + if (obj->symtab) + return ENOTSUP; + +- obj->symtab = (ElfW(Sym) *) obj->dynamic[p].d_un.d_ptr; ++ obj->symtab = (ElfW(Sym) *) (obj->dynamic[p].d_un.d_ptr + obj->addr); + } + p++; + } Added: head/benchmarks/mangohud/files/patch-src_meson.build ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/files/patch-src_meson.build Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,29 @@ +--- src/meson.build.orig 2020-08-16 16:54:20 UTC ++++ src/meson.build +@@ -3,7 +3,7 @@ glslang = find_program('glslangValidator') + # Needs prefix for configure_file() + if get_option('append_libdir_mangohud') + libdir_mangohud = join_paths(get_option('libdir'), 'mangohud') +- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/' ++ ld_libdir_mangohud = get_option('prefix') + '/lib/mangohud/' + else + libdir_mangohud = get_option('libdir') + ld_libdir_mangohud = get_option('prefix') + '/\$LIB/' +@@ -141,7 +141,7 @@ vklayer_mesa_overlay = shared_library( + dep_dl, + dep_rt, + dep_pthread, +- dep_vulkan], ++ dep_inotify], + include_directories : [inc_common], + link_args : link_args, + install_dir : libdir_mangohud, +@@ -187,7 +187,7 @@ configure_file(input : '../bin/mangohud.in', + if get_option('include_doc') + install_data( + files('../bin/MangoHud.conf'), +- install_dir : join_paths(get_option('datadir'), 'doc', 'mangohud'), ++ install_dir : join_paths(get_option('datadir'), 'examples', 'mangohud'), + rename : ['MangoHud.conf.example'] + ) + endif Added: head/benchmarks/mangohud/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/benchmarks/mangohud/pkg-descr Mon Aug 24 11:20:18 2020 (r546066) @@ -0,0 +1,4 @@ +MangoHud is a Vulkan/OpenGL overlay for monitoring FPS, temperatures, +CPU/GPU load, and more. + +WWW: https://github.com/flightlessmango/MangoHud