aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2019-04-16 00:20:22 +0800
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2019-04-16 00:20:22 +0800
commit345816483c960eab2cd3e9bf681d1d1e01ed5bc4 (patch)
tree27b8cdb642d08853c2fcc102ba9d82493454801e /deskutils
parent86c3f76bc236cc0d1099b48c3b603fa184a5a846 (diff)
downloadfreebsd-ports-gnome-345816483c960eab2cd3e9bf681d1d1e01ed5bc4.tar.gz
freebsd-ports-gnome-345816483c960eab2cd3e9bf681d1d1e01ed5bc4.tar.zst
freebsd-ports-gnome-345816483c960eab2cd3e9bf681d1d1e01ed5bc4.zip
deskutils/sysctlview: fix build with GCC-based architectures
PR: 237159 Submitted by: pkubaj@anongoth.pl Approved by: alfix86@gmail.com (maintainer)
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/sysctlview/Makefile6
-rw-r--r--deskutils/sysctlview/files/patch-mytreeview.cc27
2 files changed, 32 insertions, 1 deletions
diff --git a/deskutils/sysctlview/Makefile b/deskutils/sysctlview/Makefile
index 9a0555742d0b..aa568852a63f 100644
--- a/deskutils/sysctlview/Makefile
+++ b/deskutils/sysctlview/Makefile
@@ -2,6 +2,7 @@
PORTNAME= sysctlview
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= deskutils
MAINTAINER= alfix86@gmail.com
@@ -12,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libsysctlmibinfo.so:devel/libsysctlmibinfo
-USES= pkgconfig gettext-runtime gnome
+USES= compiler:c++11-lang pkgconfig gettext-runtime gnome
USE_GNOME= gtkmm30 atkmm glibmm pangomm glibmm gtk30 pango atk \
cairo glib20 cairomm libsigc++20 gdkpixbuf2 glib20
@@ -31,6 +32,9 @@ OPTIONS_SUB= yes
NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls
+post-patch:
+ @${REINPLACE_CMD} '/CXX =/d; s/^CXXFLAGS =/CXXFLAGS +=/; s/^LDFLAGS =/LDFLAGS +=/' ${WRKSRC}/Makefile
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sysctlview ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/sysctlview.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
diff --git a/deskutils/sysctlview/files/patch-mytreeview.cc b/deskutils/sysctlview/files/patch-mytreeview.cc
new file mode 100644
index 000000000000..ec714ec5e6c7
--- /dev/null
+++ b/deskutils/sysctlview/files/patch-mytreeview.cc
@@ -0,0 +1,27 @@
+--- mytreeview.cc.orig 2019-03-29 02:24:01 UTC
++++ mytreeview.cc
+@@ -29,23 +29,7 @@
+
+ #include "mytreeview.h"
+
+-static const char *ctl_typename[CTLTYPE+1] = {
+- [CTLTYPE_INT] = "integer",
+- [CTLTYPE_UINT] = "unsigned integer",
+- [CTLTYPE_LONG] = "long integer",
+- [CTLTYPE_ULONG] = "unsigned long",
+- [CTLTYPE_U8] = "uint8_t",
+- [CTLTYPE_U16] = "uint16_t",
+- [CTLTYPE_U32] = "uint32_t",
+- [CTLTYPE_U64] = "uint64_t",
+- [CTLTYPE_S8] = "int8_t",
+- [CTLTYPE_S16] = "int16_t",
+- [CTLTYPE_S32] = "int32_t",
+- [CTLTYPE_S64] = "int64_t",
+- [CTLTYPE_NODE] = "node",
+- [CTLTYPE_STRING] = "string",
+- [CTLTYPE_OPAQUE] = "opaque",
+-};
++static const char *ctl_typename[CTLTYPE+1] = { "ZEROUNUSED", "node", "integer", "string", "int64_t", "opaque", "unsigned integer", "long integer", "unsigned long", "uint64_t", "uint8_t", "uint16_t", "int8_t","int16_t", "int32_t", "uint32_t" };
+
+ /* Public Methods */
+