forked from Lainports/opnsense-ports
misc/gnu-watch: sync with upstream
Taken from: HardenedBSD
This commit is contained in:
parent
b6c7fa291f
commit
89089cc09b
5 changed files with 25 additions and 210 deletions
|
|
@ -2,32 +2,41 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= watch
|
||||
DISTVERSION= 3.3.16
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.3.17
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= SF/procps-ng/Production \
|
||||
LOCAL/ehaupt
|
||||
PKGNAMEPREFIX= gnu-
|
||||
DISTNAME= procps-ng-${DISTVERSION}
|
||||
|
||||
MAINTAINER= ehaupt@FreeBSD.org
|
||||
COMMENT= GNU watch command
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= autoreconf gettext gmake libtool localbase:ldflags ncurses \
|
||||
pkgconfig tar:xz
|
||||
USE_CSTD= gnu99
|
||||
|
||||
USE_HARDENING= safestack
|
||||
|
||||
OPTIONS_DEFINE= UNICODE
|
||||
OPTIONS_DEFAULT=UNICODE
|
||||
USES= autoreconf gmake libtool localbase:ldflags ncurses pkgconfig \
|
||||
tar:xz
|
||||
USE_CSTD= gnu99
|
||||
USE_GITLAB= yes
|
||||
GL_SITE= https://gitlab.com
|
||||
GL_ACCOUNT= procps-ng
|
||||
GL_PROJECT= procps
|
||||
GL_COMMIT= 19a508ea121c0c4ac6d0224575a036de745eaaf8
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
ALL_TARGET= watch
|
||||
|
||||
PLIST_FILES= bin/${PKGBASE} \
|
||||
man/man1/gnu-watch.1.gz
|
||||
|
||||
OPTIONS_DEFINE= NLS UNICODE
|
||||
OPTIONS_DEFAULT= UNICODE
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CONFIGURE_OFF= --disable-nls
|
||||
NLS_LDFLAGS= -lintl
|
||||
UNICODE_CONFIGURE_ENABLE= watch8bit
|
||||
|
||||
PLIST_FILES= bin/${PKGBASE} man/man1/gnu-watch.1.gz
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} 's/ncursesw/${NCURSES_IMPL}/g' ${WRKSRC}/configure.ac
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1576075311
|
||||
SHA256 (procps-ng-3.3.16.tar.xz) = 925eacd65dedcf9c98eb94e8978bbfb63f5de37294cc1047d81462ed477a20af
|
||||
SIZE (procps-ng-3.3.16.tar.xz) = 859736
|
||||
TIMESTAMP = 1613036979
|
||||
SHA256 (procps-ng-procps-19a508ea121c0c4ac6d0224575a036de745eaaf8_GL0.tar.gz) = 0c05f1db1166a1591e70a19a9cc6c2c15b70c1a9bdb3ad61e18f8dd89c54f508
|
||||
SIZE (procps-ng-procps-19a508ea121c0c4ac6d0224575a036de745eaaf8_GL0.tar.gz) = 1410394
|
||||
|
|
|
|||
|
|
@ -1,130 +0,0 @@
|
|||
--- Makefile.am.orig 2018-05-19 21:35:23 UTC
|
||||
+++ Makefile.am
|
||||
@@ -1,8 +1,6 @@
|
||||
-CYGWINFLAGS =
|
||||
-if CYGWIN
|
||||
-CYGWINFLAGS += -lintl
|
||||
+CYGWINFLAGS = -lintl
|
||||
+
|
||||
usrbin_exec_PROGRAMS =
|
||||
-endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-include $(top_builddir)/config.h \
|
||||
@@ -30,24 +28,7 @@ transform =
|
||||
|
||||
if !CYGWIN
|
||||
transform += s/pscommand/ps/; $(program_transform_name)
|
||||
-sbin_PROGRAMS = \
|
||||
- sysctl
|
||||
-else
|
||||
-transform += s/pscommand/procps/; $(program_transform_name)
|
||||
-endif
|
||||
-
|
||||
-if !CYGWIN
|
||||
-bin_PROGRAMS = \
|
||||
- ps/pscommand \
|
||||
- free \
|
||||
- pgrep \
|
||||
- pkill \
|
||||
- pmap \
|
||||
- pwdx \
|
||||
- tload \
|
||||
- uptime \
|
||||
- vmstat \
|
||||
- w
|
||||
+sbin_PROGRAMS = #
|
||||
else
|
||||
usrbin_exec_PROGRAMS += \
|
||||
ps/pscommand \
|
||||
@@ -104,38 +85,10 @@ EXTRA_DIST += \
|
||||
sysctl.conf
|
||||
endif
|
||||
|
||||
-if BUILD_PIDOF
|
||||
-if !CYGWIN
|
||||
-bin_PROGRAMS += pidof
|
||||
-else
|
||||
-usrbin_exec_PROGRAMS += pidof
|
||||
-endif
|
||||
-dist_man_MANS += pidof.1
|
||||
-pidof_SOURCES = pidof.c lib/fileutils.c
|
||||
-else
|
||||
- EXTRA_DIST += pidof.1
|
||||
-endif
|
||||
-
|
||||
-if BUILD_KILL
|
||||
-if CYGWIN
|
||||
-transform += ;s/^kill/prockill/; $(program_transform_name)
|
||||
-usrbin_exec_PROGRAMS += kill
|
||||
-else
|
||||
-bin_PROGRAMS += kill
|
||||
-endif
|
||||
-
|
||||
-dist_man_MANS += kill.1
|
||||
-kill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||
-else
|
||||
- EXTRA_DIST += kill.1
|
||||
-endif
|
||||
-
|
||||
if WITH_NCURSES
|
||||
if !CYGWIN
|
||||
-bin_PROGRAMS += \
|
||||
- slabtop \
|
||||
- watch \
|
||||
- top/top
|
||||
+bin_PROGRAMS = \
|
||||
+ watch
|
||||
else
|
||||
usrbin_exec_PROGRAMS += \
|
||||
watch \
|
||||
@@ -143,8 +96,7 @@ usrbin_exec_PROGRAMS += \
|
||||
endif
|
||||
|
||||
dist_man_MANS += \
|
||||
- watch.1 \
|
||||
- top/top.1
|
||||
+ watch.1
|
||||
watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c
|
||||
watch_LDADD = @WATCH_NCURSES_LIBS@ $(CYGWINFLAGS)
|
||||
watch_CFLAGS = @WATCH_NCURSES_CFLAGS@
|
||||
@@ -167,27 +119,6 @@ endif
|
||||
top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
|
||||
endif
|
||||
|
||||
-if BUILD_SKILL
|
||||
-if !CYGWIN
|
||||
-bin_PROGRAMS += \
|
||||
- skill \
|
||||
- snice
|
||||
-else
|
||||
-usrbin_exec_PROGRAMS += \
|
||||
- skill \
|
||||
- snice
|
||||
-endif
|
||||
-skill_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||
-snice_SOURCES = skill.c lib/strutils.c lib/fileutils.c lib/nsutils.c
|
||||
-dist_man_MANS += \
|
||||
- skill.1 \
|
||||
- snice.1
|
||||
-else
|
||||
- EXTRA_DIST += \
|
||||
- skill.1 \
|
||||
- snice.1
|
||||
-endif
|
||||
-
|
||||
free_SOURCES = free.c lib/strutils.c lib/fileutils.c
|
||||
pgrep_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
pkill_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
@@ -250,10 +181,7 @@ proc_libprocps_la_SOURCES = \
|
||||
proc/sysinfo.h \
|
||||
proc/version.c \
|
||||
proc/version.h \
|
||||
- proc/wchan.c \
|
||||
- proc/wchan.h \
|
||||
- proc/whattime.c \
|
||||
- proc/whattime.h
|
||||
+ proc/wchan.h
|
||||
|
||||
proc_libprocps_la_includedir = $(includedir)/proc/
|
||||
proc_libprocps_la_include_HEADERS = \
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
--- proc/sig.c.orig 2018-05-18 21:32:21 UTC
|
||||
+++ proc/sig.c
|
||||
@@ -87,7 +87,11 @@ static const mapstruct sigtable[] = {
|
||||
{"LOST", SIGLOST}, /* Hurd-specific */
|
||||
#endif
|
||||
{"PIPE", SIGPIPE},
|
||||
+#ifdef __FreeBSD__
|
||||
+ {"POLL", SIGIO},
|
||||
+#else
|
||||
{"POLL", SIGPOLL}, /* IO */
|
||||
+#endif
|
||||
{"PROF", SIGPROF},
|
||||
#ifdef SIGPWR
|
||||
{"PWR", SIGPWR},
|
||||
@@ -145,7 +149,11 @@ int signal_name_to_number(const char *re
|
||||
if(!strncasecmp(name,"SIG",3)) name += 3;
|
||||
|
||||
if(!strcasecmp(name,"CLD")) return SIGCHLD;
|
||||
+#ifdef __FreeBSD__
|
||||
+ if(!strcasecmp(name,"IO")) return SIGIO;
|
||||
+#else
|
||||
if(!strcasecmp(name,"IO")) return SIGPOLL;
|
||||
+#endif
|
||||
if(!strcasecmp(name,"IOT")) return SIGABRT;
|
||||
|
||||
/* search the table */
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
--- proc/sysinfo.c.orig 2018-05-18 21:32:22 UTC
|
||||
+++ proc/sysinfo.c
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
-#ifdef __CYGWIN__
|
||||
+#ifdef __FreeBSD__
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include "alloc.h"
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <netinet/in.h> /* htons */
|
||||
#endif
|
||||
|
||||
-#ifndef __CYGWIN__
|
||||
+#ifndef __FreeBSD__
|
||||
#include <link.h>
|
||||
#endif
|
||||
#include <elf.h>
|
||||
@@ -98,7 +98,7 @@ static char buf[8192];
|
||||
#define SET_IF_DESIRED(x,y) do{ if(x) *(x) = (y); }while(0)
|
||||
|
||||
/* return minimum of two values */
|
||||
-#ifndef __CYGWIN__
|
||||
+#ifndef __FreeBSD__
|
||||
#define MIN(x,y) ((x) < (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
@@ -264,7 +264,7 @@ extern char** environ;
|
||||
|
||||
static unsigned long find_elf_note(unsigned long type)
|
||||
{
|
||||
-#ifdef __CYGWIN__
|
||||
+#ifdef __FreeBSD__
|
||||
return NOTE_NOT_FOUND;
|
||||
#else
|
||||
ElfW(auxv_t) auxv_struct;
|
||||
Loading…
Add table
Reference in a new issue