pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/misc/autocue Simplify:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3916c2647942
branches:  trunk
changeset: 363085:3916c2647942
user:      agc <agc%pkgsrc.org@localhost>
date:      Wed May 31 23:05:55 2017 +0000

description:
Simplify:

+ don't use cdefs
+ use (c) as nearest approximation to a copyright symbol in ASCII

and so:

+ don't try to compile libnbcompat on non-NetBSD platforms for no reason
+ don't try to work out whether we're using clang, and then whether clang
will have an issue with an 8-bit character in a comment

diffstat:

 misc/autocue/Makefile        |  10 +---------
 misc/autocue/files/autocue.c |  28 +++++++---------------------
 2 files changed, 8 insertions(+), 30 deletions(-)

diffs (88 lines):

diff -r de0ee252e984 -r 3916c2647942 misc/autocue/Makefile
--- a/misc/autocue/Makefile     Wed May 31 22:56:41 2017 +0000
+++ b/misc/autocue/Makefile     Wed May 31 23:05:55 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2013/09/10 14:23:45 joerg Exp $
+# $NetBSD: Makefile,v 1.10 2017/05/31 23:05:55 agc Exp $
 #
 
 DISTNAME=      autocue-20070224
@@ -12,8 +12,6 @@
 
 DEPENDS+=      xcb-[0-9]*:../../x11/xcb
 
-USE_FEATURES+= cdefs
-
 do-extract:
        @${CP} -R ${FILESDIR} ${WRKSRC}
 
@@ -23,10 +21,4 @@
        ${INSTALL_MAN_DIR} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
        ${INSTALL_MAN} ${WRKSRC}/autocue.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-BUILDLINK_TRANSFORM+=  rm:-Wno-traditional
-CFLAGS+=       -Wno-invalid-source-encoding
-.endif
-
 .include "../../mk/bsd.pkg.mk"
diff -r de0ee252e984 -r 3916c2647942 misc/autocue/files/autocue.c
--- a/misc/autocue/files/autocue.c      Wed May 31 22:56:41 2017 +0000
+++ b/misc/autocue/files/autocue.c      Wed May 31 23:05:55 2017 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: autocue.c,v 1.4 2015/07/09 09:44:18 jperkin Exp $ */
+/* $NetBSD: autocue.c,v 1.5 2017/05/31 23:05:55 agc Exp $ */
 
 /*
- * Copyright © 2006 Alistair Crooks.  All rights reserved.
+ * Copyright (c) 2006,2017 Alistair Crooks.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,20 +27,6 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
-#if defined(HAVE_NBCOMPAT_H)
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#else
-#include <sys/cdefs.h>
-#endif
-
-#ifndef lint
-__COPYRIGHT("@(#) Copyright © 2006 \
-               The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: autocue.c,v 1.4 2015/07/09 09:44:18 jperkin Exp $");
-#endif
-
 #include <err.h>
 #include <signal.h>
 #include <stdio.h>
@@ -84,10 +70,10 @@
 static void
 showbuffer(char *buf, int cc, int maxcut)
 {
-       static int      cut;
-       char            cmd[BUFSIZ * 20];
+       static int       cut;
+       char             cmd[BUFSIZ * 20];
        FILE            *pp;
-       int             s;
+       int              s;
 
        (void) snprintf(cmd, sizeof(cmd), "fmt %d %d | xcb -s %d", FmtGoal, FmtMax, cut);
        if ((pp = popen(cmd, "w")) == NULL) {
@@ -106,8 +92,8 @@
 int
 main(int argc, char **argv)
 {
-       char    buf[BUFSIZ * 20];
-       char    line[BUFSIZ];
+       char     buf[BUFSIZ * 20];
+       char     line[BUFSIZ];
        FILE    *fp;
        int      maxcut;
        int      cc;



Home | Main Index | Thread Index | Old Index