diff options
author | danilo <danilo@FreeBSD.org> | 2013-10-12 04:46:29 +0800 |
---|---|---|
committer | danilo <danilo@FreeBSD.org> | 2013-10-12 04:46:29 +0800 |
commit | 93d2c9937da972c7d8643714e8baace6ebe7a475 (patch) | |
tree | 1775b72e6bdfdae867bf106c7fe437abdc3e8cbf /misc | |
parent | 62823c933787e8fb984a4fe60ebba5072845ff91 (diff) | |
download | freebsd-ports-gnome-93d2c9937da972c7d8643714e8baace6ebe7a475.tar.gz freebsd-ports-gnome-93d2c9937da972c7d8643714e8baace6ebe7a475.tar.zst freebsd-ports-gnome-93d2c9937da972c7d8643714e8baace6ebe7a475.zip |
- Fix build with clang [1]
- Add stage support
PR: ports/182888
Submitted by: Stefan `Sec` Zehl <sec@42.org> (maintainer) [1]
Approved by: wg/culot (mentors, implicit)
Diffstat (limited to 'misc')
-rw-r--r-- | misc/sls/Makefile | 14 | ||||
-rw-r--r-- | misc/sls/files/patch-aa | 14 | ||||
-rw-r--r-- | misc/sls/files/patch-sls.c | 79 |
3 files changed, 90 insertions, 17 deletions
diff --git a/misc/sls/Makefile b/misc/sls/Makefile index e8d3f5806b62..8e8c3ebc67ff 100644 --- a/misc/sls/Makefile +++ b/misc/sls/Makefile @@ -13,8 +13,16 @@ COMMENT= List information about file(s) and directories WRKSRC= ${WRKDIR}/sls -MAN1= sls.1 -PLIST_FILES= bin/sls +PLIST_FILES= bin/sls \ + man/man1/sls.1.gz + +ALL_TARGET= sls + +post-patch: + @${REINPLACE_CMD} -e 's|CFLAGS|#&|' ${WRKSRC}/Makefile + +do-install: + ${CP} ${WRKSRC}/sls ${STAGEDIR}${PREFIX}/bin + ${CP} ${WRKSRC}/sls.1 ${STAGEDIR}${PREFIX}/man/man1 -NO_STAGE= yes .include <bsd.port.mk> diff --git a/misc/sls/files/patch-aa b/misc/sls/files/patch-aa deleted file mode 100644 index edc564fbd515..000000000000 --- a/misc/sls/files/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ ---- Makefile.orig Sun Aug 20 02:54:45 1989 -+++ Makefile Tue Dec 15 02:29:50 1998 -@@ -1,7 +1,8 @@ --BIN= /usr/local/bin --MAN= /usr/local/man/man1 --CFLAGS= -O -+BIN= ${PREFIX}/bin -+MAN= ${PREFIX}/man/man1 -+#CFLAGS= -O - -+all: sls - sls: sls.o - cc sls.o -o sls - diff --git a/misc/sls/files/patch-sls.c b/misc/sls/files/patch-sls.c new file mode 100644 index 000000000000..b7058c7a31c4 --- /dev/null +++ b/misc/sls/files/patch-sls.c @@ -0,0 +1,79 @@ +--- ./sls.c.orig 2013-10-11 17:05:37.000000000 -0300 ++++ ./sls.c 2013-10-11 17:06:06.000000000 -0300 +@@ -24,7 +24,10 @@ + #include <time.h> + #include <sys/types.h> + #include <sys/stat.h> +-#include <sys/dir.h> ++#include <stdlib.h> ++#include <unistd.h> ++#include <errno.h> ++#include <dirent.h> + + #define ISEXEC(m) (m & (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6))) + #define MAXUIDS 200 /* max #of user names from passwd file */ +@@ -86,12 +89,14 @@ + static int sortsfile(), sortfile(); + static time_t getsixmosago(); /* for emulating 'ls' date silliness */ + +-extern char *getenv(), *malloc(), *realloc(); +-extern int errno; +-extern time_t time(); +- ++void dirread (char *dirname); ++void dofile (register char *fname, int cmdarg); ++void selectfs (register char *fname, register struct stat *psbuf); ++void selectf (register char *fname); ++void display (SFILESTAT *pf); + /******************************************************************************/ + ++int + main (ac, av) + int ac; + char *av[]; +@@ -211,6 +216,7 @@ + + /******************************************************************************/ + ++void + dofile (fname, cmdarg) + register char *fname; /* name of file to stat and list */ + int cmdarg; /* =1 if fname was command line arg */ +@@ -267,11 +273,12 @@ + + /******************************************************************************/ + ++void + dirread (dirname) + char *dirname; + { /* read a directory and everything under it that's on the same device */ + register DIR *dirp; /* ptr to directory list */ +- register struct direct *dentp; /* ptr to directory entry */ ++ register struct dirent *dentp; /* ptr to directory entry */ + register char *pfname; + register int len; + char fname[512]; /* maximum pathname length */ +@@ -314,6 +321,7 @@ + + /******************************************************************************/ + ++void + selectf (fname) + register char *fname; + { /* allocate space for this file name for sorting */ +@@ -356,6 +364,7 @@ + + /******************************************************************************/ + ++void + selectfs (fname, psbuf) + register char *fname; + register struct stat *psbuf; +@@ -594,6 +603,7 @@ + + /******************************************************************************/ + ++void + display (pf) + SFILESTAT *pf; + { /* display info about a file */ |