pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/editline Fix build under Solaris 10 and older.
details: https://anonhg.NetBSD.org/pkgsrc/rev/c85d9831615d
branches: trunk
changeset: 648808:c85d9831615d
user: tron <tron%pkgsrc.org@localhost>
date: Thu Mar 19 19:58:28 2015 +0000
description:
Fix build under Solaris 10 and older.
diffstat:
devel/editline/Makefile | 7 ++++++-
devel/editline/files/err.h | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletions(-)
diffs (63 lines):
diff -r 9bbde41fad53 -r c85d9831615d devel/editline/Makefile
--- a/devel/editline/Makefile Thu Mar 19 19:26:28 2015 +0000
+++ b/devel/editline/Makefile Thu Mar 19 19:58:28 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2014/07/02 13:57:18 ryoon Exp $
+# $NetBSD: Makefile,v 1.5 2015/03/19 19:58:28 tron Exp $
#
DISTNAME= libedit-20140620-3.1
@@ -19,7 +19,12 @@
USE_TOOLS+= automake autoreconf
CONFIGURE_ARGS+= --enable-widec
+.include "../../mk/bsd.prefs.mk"
+
pre-configure:
+.if ${OPSYS} == "SunOS" && !exists(/usr/include/err.h)
+ ${CP} ${FILESDIR}/err.h ${BUILDLINK_DIR}/include
+.endif
cd ${WRKSRC} && autoreconf -fiv
.include "../../mk/termcap.buildlink3.mk"
diff -r 9bbde41fad53 -r c85d9831615d devel/editline/files/err.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/editline/files/err.h Thu Mar 19 19:58:28 2015 +0000
@@ -0,0 +1,37 @@
+/* $NetBSD: err.h,v 1.1 2015/03/19 19:58:28 tron Exp $ */
+
+#ifndef PKGSRC_ERR_H
+#define PKGSRC_ERR_H
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#if !defined(__sun__)
+static const char *
+getexecname(void)
+{
+ return "???";
+}
+#endif
+
+static void
+err(int status, char *fmt, ...)
+{
+ (void)fprintf(stderr, "%s: ", getexecname());
+ if (fmt != NULL) {;
+ va_list ap;
+
+ va_start(ap, fmt);
+ (void)vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ }
+ (void)fputc('\n', stderr);
+ (void)fflush(stderr);
+
+ exit(status);
+}
+
+
+#endif
Home |
Main Index |
Thread Index |
Old Index