Use REINPLACE_CMD instead of patch files
This commit is contained in:
@@ -30,7 +30,17 @@ USE_GITHUB= yes
|
||||
SHEBANG_GLOB= *.sh
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's| -Wall -Werror||' ${WRKSRC}/configure.ac ${WRKSRC}/build/Makefile.am.common
|
||||
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/README.md
|
||||
@${REINPLACE_CMD} -e '/#define.*_XOPEN_SOURCE/d' \
|
||||
${WRKSRC}/src/configfile.c \
|
||||
${WRKSRC}/src/datasource/sid.c \
|
||||
${WRKSRC}/src/datasource/snoopy_version.c \
|
||||
${WRKSRC}/src/snoopy.h \
|
||||
${WRKSRC}/tests/bin/snoopy-test-threads.c \
|
||||
${WRKSRC}/src/tsrm.c
|
||||
@${REINPLACE_CMD} -e '/features.h/d' ${WRKSRC}/configure.ac ${WRKSRC}/src/output/socketoutput.c ${WRKSRC}/src/snoopy.h
|
||||
@${REINPLACE_CMD} -e 's|#include <wait.h>|#include <sys/wait.h>|' ${WRKSRC}/tests/bin/snoopy-test-exec-in-threads.c ${WRKSRC}/tests/bin/snoopy-test-threads.c
|
||||
|
||||
do-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
--- build/Makefile.am.common.orig 2016-09-14 15:02:26 UTC
|
||||
+++ build/Makefile.am.common
|
||||
@@ -9,4 +9,4 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||
# Note:
|
||||
# -I$(top_srcdir) is here for #include 'lib/iniparser/src/iniparser.h' to work
|
||||
#
|
||||
-AM_CFLAGS = -Wall -Werror -Wextra -Wno-unused-parameter -std=c99 -pedantic -I$(top_srcdir)
|
||||
+AM_CFLAGS = -Wextra -Wno-unused-parameter -std=c99 -pedantic -I$(top_srcdir)
|
||||
@@ -1,15 +1,6 @@
|
||||
--- configure.ac.orig 2016-09-14 15:02:26 UTC
|
||||
+++ configure.ac
|
||||
@@ -30,7 +30,7 @@ AC_CONFIG_SRCDIR([src/eventsource/execve
|
||||
AC_CONFIG_AUX_DIR([build/aux])
|
||||
AC_CONFIG_MACRO_DIR([build/m4])
|
||||
m4_include([build/snoopy.m4])
|
||||
-AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects -Wall -Werror])
|
||||
+AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects])
|
||||
|
||||
|
||||
### Silent make output
|
||||
@@ -125,18 +125,11 @@ SNOOPY_PROG_CHECK([wc], [WC],
|
||||
@@ -125,12 +125,6 @@ SNOOPY_PROG_CHECK([wc], [WC],
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +13,3 @@
|
||||
dnl Checks for header files.
|
||||
AC_CHECK_HEADERS([ \
|
||||
ctype.h \
|
||||
dlfcn.h \
|
||||
errno.h \
|
||||
- features.h \
|
||||
grp.h \
|
||||
limits.h \
|
||||
pwd.h \
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
--- src/configfile.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/configfile.c
|
||||
@@ -35,9 +35,6 @@
|
||||
|
||||
#include "lib/inih/src/ini.h"
|
||||
|
||||
-#ifndef _XOPEN_SOURCE // For strdup
|
||||
-#define _XOPEN_SOURCE 500
|
||||
-#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1,10 +0,0 @@
|
||||
--- src/datasource/sid.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/datasource/sid.c
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "snoopy.h"
|
||||
|
||||
#ifndef _XOPEN_SOURCE /* Needed to get getpgid and getsid on older glibc */
|
||||
-#define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@@ -1,10 +0,0 @@
|
||||
--- src/datasource/snoopy_version.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/datasource/snoopy_version.c
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "snoopy.h"
|
||||
|
||||
#ifndef _XOPEN_SOURCE /* Needed to get getpgid and getsid on older glibc */
|
||||
-#define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@@ -1,10 +0,0 @@
|
||||
--- src/output/socketoutput.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/output/socketoutput.c
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "snoopy.h"
|
||||
#include "configuration.h"
|
||||
|
||||
-#include <features.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1,14 +0,0 @@
|
||||
--- src/snoopy.h.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/snoopy.h
|
||||
@@ -31,11 +31,6 @@
|
||||
/* This must be the first file to be included, or implicit inclusion
|
||||
* (by i.e. <features.h>) does the wrong thing
|
||||
*/
|
||||
-#ifdef _XOPEN_SOURCE
|
||||
-#undef _XOPEN_SOURCE
|
||||
-#endif
|
||||
-#define _XOPEN_SOURCE 500
|
||||
-#include <features.h> /* Needed for GLIBC macros here */
|
||||
#include <syslog.h> /* Needed for syslog defaults */
|
||||
#include <unistd.h> /* Needed for _SC_ARG_MAX constant */
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- src/tsrm.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ src/tsrm.c
|
||||
@@ -25,7 +25,6 @@
|
||||
/*
|
||||
* Includes order: from local to global
|
||||
*/
|
||||
-#define _XOPEN_SOURCE 700 // Required by pthread_mutex_setattr
|
||||
|
||||
#include "tsrm.h"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- tests/bin/snoopy-test-exec-in-threads.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ tests/bin/snoopy-test-exec-in-threads.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
-#include <wait.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
--- tests/bin/snoopy-test-threads.c.orig 2016-09-14 15:02:26 UTC
|
||||
+++ tests/bin/snoopy-test-threads.c
|
||||
@@ -25,7 +25,6 @@
|
||||
/*
|
||||
* Includes order: from local to global
|
||||
*/
|
||||
-#define _XOPEN_SOURCE 500
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <snoopy.h>
|
||||
@@ -42,7 +41,7 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
-#include <wait.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
|
||||
|
||||
@@ -307,7 +306,7 @@ int randomNumberInclusive (int nMin, int
|
||||
--- tests/bin/snoopy-test-threads.c.orig 2017-12-26 01:38:15.298217000 +0800
|
||||
+++ tests/bin/snoopy-test-threads.c 2017-12-26 01:41:42.177506000 +0800
|
||||
@@ -307,7 +307,7 @@
|
||||
int randomNr;
|
||||
|
||||
// Seed
|
||||
|
||||
Reference in New Issue
Block a user