pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/tig Fix compilation issues on glibc-based platforms



details:   https://anonhg.NetBSD.org/pkgsrc/rev/245c38bcde81
branches:  trunk
changeset: 635838:245c38bcde81
user:      pho <pho%pkgsrc.org@localhost>
date:      Thu Jun 12 04:15:48 2014 +0000

description:
Fix compilation issues on glibc-based platforms

diffstat:

 devel/tig/Makefile |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 2ca2763ef1db -r 245c38bcde81 devel/tig/Makefile
--- a/devel/tig/Makefile        Thu Jun 12 00:59:26 2014 +0000
+++ b/devel/tig/Makefile        Thu Jun 12 04:15:48 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2014/04/04 21:00:24 ryoon Exp $
+# $NetBSD: Makefile,v 1.12 2014/06/12 04:15:48 pho Exp $
 
 DISTNAME=      tig-1.2.1
 CATEGORIES=    devel scm
@@ -26,6 +26,16 @@
 CONFIGURE_ARGS+=               ${CONFIGURE_ARGS.${ICONV_TYPE}-iconv}
 CONFIGURE_ARGS.gnu-iconv=      --with-libiconv=${BUILDLINK_PREFIX.iconv}
 
+.include "../../mk/bsd.prefs.mk"
+.if !empty(GLIBC_VERSION)
+# Some version of glibc requires _XOPEN_SOURCE being defined to
+# provide S_IFMT in <sys/stat.h>
+CFLAGS+=       -D_XOPEN_SOURCE
+# It is also required to define _BSD_SOURCE to get struct timezone
+# defined in <sys/time.h>
+CFLAGS+=       -D_BSD_SOURCE
+.endif
+
 BUILD_TARGET=  all doc
 INSTALL_TARGET=        install install-doc
 



Home | Main Index | Thread Index | Old Index