summaryrefslogtreecommitdiff
path: root/archivers/gtar-base/Makefile
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2014-07-18 11:12:41 +0000
committerryoon <ryoon@pkgsrc.org>2014-07-18 11:12:41 +0000
commit06b8c29d30c5b1ba3ee3602d5f453f36090d5fa7 (patch)
tree9f4dfea0ebad24f58483ae612d209a74d35cf54d /archivers/gtar-base/Makefile
parent91b518626ab34b5093de9db39b95976c33f150f1 (diff)
downloadpkgsrc-06b8c29d30c5b1ba3ee3602d5f453f36090d5fa7.tar.gz
Fix SCO OpenServer 5.0.7/3.2 build.
SCO OpenServer 5.0.7/3.2 has strtoimax() declaration in inttypes.h, but libc.so has no implementation. And gnulib in GNU tar 1.27 has broken strtoimax() support. We have to use BSDL implementation instead.
Diffstat (limited to 'archivers/gtar-base/Makefile')
-rw-r--r--archivers/gtar-base/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/archivers/gtar-base/Makefile b/archivers/gtar-base/Makefile
index fbc3b741874..beafb96e0a7 100644
--- a/archivers/gtar-base/Makefile
+++ b/archivers/gtar-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.82 2014/03/18 18:11:26 bsiegert Exp $
+# $NetBSD: Makefile,v 1.83 2014/07/18 11:12:41 ryoon Exp $
#
# Please run 'make files/gtar.1' when updating version of this package
# to regenerate the man page. converters/help2man is needed.
@@ -38,12 +38,19 @@ CONFIGURE_ENV+= gt_cv_func_gnugettext2_libintl=yes
# allow configure to run as root
CONFIGURE_ENV+= FORCE_UNSAFE_CONFIGURE=1
+.if ${OS_VARIANT} == "SCOOSR5"
+# SCO OpenServer 5.0.7/3.2 has strtoimax in inttypes.h, but not in library.
+CONFIGURE_ENV+= gl_cv_have_raw_decl_strtoimax=no
+CONFIGURE_ENV+= ac_cv_have_decl_strtoimax=no
+LDFLAGS.SCO_SV+= -lsocket
+.endif
+
PLIST_VARS+= gtar rmt
TEST_TARGET= check
# don't include rmt if gtar won't build it
-.if ${OPSYS} != "Interix" && ${OPSYS} != "Darwin"
+.if ${OPSYS} != "Interix" && ${OPSYS} != "Darwin" && ${OS_VARIANT} != "SCOOSR5"
PLIST.rmt= yes
.endif
@@ -63,6 +70,14 @@ SYMLINKS= bin/gtar ${PKGGNUDIR}bin/tar \
SYMLINKS+= libexec/grmt ${PKGGNUDIR}libexec/rmt
.endif
+.if ${OS_VARIANT} == "SCOOSR5"
+# SCO OpenServer 5.0.7/3.2 has strtoimax() declaration in inttypes.h,
+# but libc.so has no implementation. And gnulib in GNU tar 1.27 has broken
+# strtoimax() support. We have to use BSDL implementation instead.
+pre-configure:
+ cd ${WRKSRC} && ${CC} -c -o strtoimax.o strtoimax.c
+.endif
+
files/gtar.1: build
${ECHO} .\\\" > ${FILESDIR}/gtar.1
${ECHO} .\\\" \$$NetBSD\$$ >> ${FILESDIR}/gtar.1