pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/dosbox-staging



Module Name:    pkgsrc
Committed By:   vins
Date:           Thu Dec 11 20:08:51 UTC 2025

Modified Files:
        pkgsrc/emulators/dosbox-staging: Makefile distinfo
Added Files:
        pkgsrc/emulators/dosbox-staging/patches:
            patch-src_libs_loguru_loguru.cpp

Log Message:
dosbox-staging: fix build on NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/emulators/dosbox-staging/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/emulators/dosbox-staging/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/dosbox-staging/patches/patch-src_libs_loguru_loguru.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/dosbox-staging/Makefile
diff -u pkgsrc/emulators/dosbox-staging/Makefile:1.3 pkgsrc/emulators/dosbox-staging/Makefile:1.4
--- pkgsrc/emulators/dosbox-staging/Makefile:1.3        Thu Oct 23 20:36:47 2025
+++ pkgsrc/emulators/dosbox-staging/Makefile    Thu Dec 11 20:08:50 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2025/10/23 20:36:47 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2025/12/11 20:08:50 vins Exp $
 
 DISTNAME=      dosbox-staging-0.82.2
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    emulators
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=dosbox-staging/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -11,9 +11,15 @@ HOMEPAGE=    https://www.dosbox-staging.org
 COMMENT=       Modern continuation of DOSBox
 LICENSE=       gnu-gpl-v2
 
+CONFLICTS=     dosbox-[0-9]*   # bin/dosbox
+
 USE_LANGUAGES= c c++
-USE_TOOLS+=    bash pkg-config
+USE_TOOLS+=    bash:build pkg-config
+
+USE_CXX_FEATURES=      c++20   # notify_all/wait support in struct std::atomic<>
+GCC_REQD+=             11      # which requires gcc-11 at least
 
+.include "../../archivers/zlib-ng/buildlink3.mk"
 .include "../../audio/fluidsynth/buildlink3.mk"
 .include "../../audio/iir1/buildlink3.mk"
 .include "../../audio/mt32emu/buildlink3.mk"
@@ -21,8 +27,12 @@ USE_TOOLS+=  bash pkg-config
 .include "../../audio/speexdsp/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
 .include "../../devel/meson/build.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../net/SDL2_net/buildlink3.mk"
 .include "../../net/libslirp/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/emulators/dosbox-staging/distinfo
diff -u pkgsrc/emulators/dosbox-staging/distinfo:1.1 pkgsrc/emulators/dosbox-staging/distinfo:1.2
--- pkgsrc/emulators/dosbox-staging/distinfo:1.1        Fri Sep 26 18:31:50 2025
+++ pkgsrc/emulators/dosbox-staging/distinfo    Thu Dec 11 20:08:50 2025
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1 2025/09/26 18:31:50 js Exp $
+$NetBSD: distinfo,v 1.2 2025/12/11 20:08:50 vins Exp $
 
 BLAKE2s (dosbox-staging-0.82.2.tar.gz) = 3c87ed08f06ea4b215d952ffea43531d1e8d3e8f04cb3678af4b9e6c4f6a0c63
 SHA512 (dosbox-staging-0.82.2.tar.gz) = 09dfd20f3a749e141a3eca41bd4556fdcb33df864a908710fb6f6163dbdab4f427c2738354c089cea53af0ae8f7cd3f526ad9939e5e562abb9c9705a443c3c5d
 Size (dosbox-staging-0.82.2.tar.gz) = 6691414 bytes
+SHA1 (patch-src_libs_loguru_loguru.cpp) = a64a4d3dcfbc9722dff2f0d39e90ffe939ca5860

Added files:

Index: pkgsrc/emulators/dosbox-staging/patches/patch-src_libs_loguru_loguru.cpp
diff -u /dev/null pkgsrc/emulators/dosbox-staging/patches/patch-src_libs_loguru_loguru.cpp:1.1
--- /dev/null   Thu Dec 11 20:08:51 2025
+++ pkgsrc/emulators/dosbox-staging/patches/patch-src_libs_loguru_loguru.cpp    Thu Dec 11 20:08:51 2025
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_libs_loguru_loguru.cpp,v 1.1 2025/12/11 20:08:51 vins Exp $
+
+Portability fix for pthread_setname_np(3) and pthread_self(3) on NetBSD. 
+
+--- src/libs/loguru/loguru.cpp.orig    2025-06-17 09:01:32.000000000 +0000
++++ src/libs/loguru/loguru.cpp
+@@ -670,6 +670,8 @@ namespace loguru
+                                               pthread_set_name_np(this_thread, main_thread_name);
+                                       #elif defined(__linux__) || defined(__sun)
+                                               pthread_setname_np(this_thread, main_thread_name);
++                                      #elif defined(__NetBSD)
++                                              pthread_setname_np(this_thread, "%s", (gchar *) main_thread_name);
+                                       #else
+                                               // platforms that we don't know how to set the name on
+                                               (void)this_thread; // unused
+@@ -1089,6 +1091,8 @@ namespace loguru
+                               pthread_set_name_np(pthread_self(), name);
+                       #elif defined(__linux__) || defined(__sun)
+                               pthread_setname_np(pthread_self(), name);
++                      #elif defined(__NetBSD)
++                              pthread_setname_np(pthread_self(), "%s", (gchar *) name);
+                       #else
+                               // Platforms that may not support setting a thread name
+                               (void)name; // unused
+@@ -1120,7 +1124,7 @@ namespace loguru
+                       // This is what we *want* to do on all platforms, but
+                       // only some platforms support it (currently).
+ 
+-                      #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(__sun)
++                      #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(__sun) || defined(__NetBSD__)
+                               pthread_getname_np(pthread_self(), buffer, length);
+                       #elif defined(__OpenBSD__)
+                               pthread_get_name_np(pthread_self(), buffer, length);
+@@ -1156,7 +1160,7 @@ namespace loguru
+                               const auto pthread_self_is_pointer = std::is_pointer<decltype(native_id)>::value;
+                               const auto thread_id = pthread_self_is_pointer
+                                                          ? reinterpret_cast<uintptr_t>((void*)native_id)
+-                              #if defined(__OpenBSD__)
++                              #if defined(__OpenBSD__) || defined(__NetBSD__)
+                                                          : reinterpret_cast<uintptr_t>(native_id);
+                               #else
+                                                          : static_cast<uintptr_t>(native_id);



Home | Main Index | Thread Index | Old Index