pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/inkscape



Module Name:    pkgsrc
Committed By:   kamil
Date:           Wed Aug  5 19:59:19 UTC 2020

Modified Files:
        pkgsrc/graphics/inkscape: distinfo
Added Files:
        pkgsrc/graphics/inkscape/patches: patch-src_path-prefix.cpp

Log Message:
inkscape: Implement get_program_name for NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 pkgsrc/graphics/inkscape/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/inkscape/patches/patch-src_path-prefix.cpp

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

Modified files:

Index: pkgsrc/graphics/inkscape/distinfo
diff -u pkgsrc/graphics/inkscape/distinfo:1.73 pkgsrc/graphics/inkscape/distinfo:1.74
--- pkgsrc/graphics/inkscape/distinfo:1.73      Sun May 17 00:38:47 2020
+++ pkgsrc/graphics/inkscape/distinfo   Wed Aug  5 19:59:19 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.73 2020/05/17 00:38:47 tnn Exp $
+$NetBSD: distinfo,v 1.74 2020/08/05 19:59:19 kamil Exp $
 
 SHA1 (inkscape-1.0.tar.xz) = c59c5195bbd079deb5943686650230ddbdde0569
 RMD160 (inkscape-1.0.tar.xz) = 2350d881891ac60324235a5745f76f21ba3fb3d0
@@ -6,3 +6,4 @@ SHA512 (inkscape-1.0.tar.xz) = 37c18079e
 Size (inkscape-1.0.tar.xz) = 31935616 bytes
 SHA1 (patch-CMakeScripts_Pod2man.cmake) = c7f0c0d3b28604c2594bc9265363c782a57af40c
 SHA1 (patch-src_extension_implementation_script.cpp) = 2c2cbcee2fdda5a274906600930acc0257cc0ea2
+SHA1 (patch-src_path-prefix.cpp) = 1ce20f16063759aab60d9e8da6b25700b44099d2

Added files:

Index: pkgsrc/graphics/inkscape/patches/patch-src_path-prefix.cpp
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_path-prefix.cpp:1.1
--- /dev/null   Wed Aug  5 19:59:19 2020
+++ pkgsrc/graphics/inkscape/patches/patch-src_path-prefix.cpp  Wed Aug  5 19:59:19 2020
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_path-prefix.cpp,v 1.1 2020/08/05 19:59:19 kamil Exp $
+
+Add NetBSD support in get_program_name().
+
+--- src/path-prefix.cpp.orig   2020-05-01 13:17:42.000000000 +0000
++++ src/path-prefix.cpp
+@@ -20,6 +20,11 @@
+ #include <mach-o/dyld.h> // for _NSGetExecutablePath
+ #endif
+ 
++#ifdef __NetBSD__
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#endif
++
+ #include <glib.h>
+ 
+ #include "path-prefix.h"
+@@ -114,6 +119,15 @@ gchar *get_program_name()
+         if (!program_name) {
+             g_warning("get_program_name() - g_file_read_link failed");
+         }
++#elif defined(__NetBSD__)
++        static const int name[] = {CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME};
++        char path[MAXPATHLEN];
++        size_t len = sizeof(path);
++        if (sysctl(name, __arraycount(name), path, &len, NULL, 0) == 0) {
++            program_name = realpath(path, nullptr);
++        } else {
++            g_warning("get_program_name() - sysctl failed");
++        }
+ #else
+ #warning get_program_name() - no known way to obtain executable name on this platform
+         g_info("get_program_name() - no known way to obtain executable name on this platform");



Home | Main Index | Thread Index | Old Index