pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/compat_headers Import compat_headers-0.1 as p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a1737ad1950e
branches: trunk
changeset: 542634:a1737ad1950e
user: tnn <tnn%pkgsrc.org@localhost>
date: Sat May 24 03:35:38 2008 +0000
description:
Import compat_headers-0.1 as pkgtools/compat_headers.
This package attempts to resolve deficiencies in system headers by
providing missing types, definitions and prototypes in shadow headers.
New in this version:
- Rewrote all of the tests to use autoconf.
- Implemented tests and support for more standard integer types.
diffstat:
pkgtools/compat_headers/DESCR | 9 +
pkgtools/compat_headers/Makefile | 21 +
pkgtools/compat_headers/buildlink3.mk | 21 +
pkgtools/compat_headers/files/Makefile.in | 61 +
pkgtools/compat_headers/files/config.guess | 1516 ++++
pkgtools/compat_headers/files/config.h.in | 268 +
pkgtools/compat_headers/files/config.sub | 1622 ++++
pkgtools/compat_headers/files/configure | 9290 +++++++++++++++++++++++++++
pkgtools/compat_headers/files/configure.in | 690 ++
pkgtools/compat_headers/files/install-sh | 291 +
pkgtools/compat_headers/files/inttypes.h.in | 229 +
pkgtools/compat_headers/files/math.h.in | 35 +
pkgtools/compat_headers/files/mkhdr.sh | 18 +
pkgtools/compat_headers/files/resolv.h.in | 21 +
pkgtools/compat_headers/files/select.h.in | 1 +
pkgtools/compat_headers/files/stdint.h.in | 1 +
pkgtools/compat_headers/files/stdlib.h.in | 10 +
17 files changed, 14104 insertions(+), 0 deletions(-)
diffs (truncated from 14173 to 300 lines):
diff -r 52de6b2f86e7 -r a1737ad1950e pkgtools/compat_headers/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/compat_headers/DESCR Sat May 24 03:35:38 2008 +0000
@@ -0,0 +1,9 @@
+This package attempts to resolve deficiencies in system headers by
+providing missing types, definitions and prototypes in shadow headers.
+
+When use of compat_headers has been enabled on a platform, this package will
+become a compile-time dependency for every package. It will provide customized
+header files that take preference over some system provided ones (that may
+not even exist). This happens transparently through use of buildlink3.
+
+To enable use of this package, set FIX_SYSTEM_HEADERS=yes in mk.conf.
diff -r 52de6b2f86e7 -r a1737ad1950e pkgtools/compat_headers/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/compat_headers/Makefile Sat May 24 03:35:38 2008 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/05/24 03:35:38 tnn Exp $
+
+DISTNAME= compat_headers-0.1
+CATEGORIES= pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= tnn%NetBSD.org@localhost
+HOMEPAGE= http://www.pkgsrc.org/
+COMMENT= compatibility headers
+
+NO_CHECKSUM= yes
+GNU_CONFIGURE= yes
+PKG_DESTDIR_SUPPORT= user-destdir
+
+PLIST_SRC+= ${WRKSRC}/PLIST
+
+do-extract:
+ cp -R ${FILESDIR} ${WRKSRC}
+
+.include "../../mk/bsd.pkg.mk"
diff -r 52de6b2f86e7 -r a1737ad1950e pkgtools/compat_headers/buildlink3.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/compat_headers/buildlink3.mk Sat May 24 03:35:38 2008 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/05/24 03:35:38 tnn Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+COMPAT_HEADERS_BUILDLINK3_MK:= ${COMPAT_HEADERS_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= compat_headers
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncompat_headers}
+BUILDLINK_PACKAGES+= compat_headers
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}compat_headers
+
+.if !empty(COMPAT_HEADERS_BUILDLINK3_MK:M+)
+BUILDLINK_API_DEPENDS.compat_headers+= compat_headers>=0.1
+BUILDLINK_ABI_DEPENDS.compat_headers+= compat_headers>=0.1
+BUILDLINK_PKGSRCDIR.compat_headers?= ../../pkgtools/compat_headers
+BUILDLINK_DEPMETHOD.compat_headers?= build
+.endif # COMPAT_HEADERS_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff -r 52de6b2f86e7 -r a1737ad1950e pkgtools/compat_headers/files/Makefile.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/compat_headers/files/Makefile.in Sat May 24 03:35:38 2008 +0000
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile.in,v 1.1.1.1 2008/05/24 03:35:41 tnn Exp $
+
+REPLACE_stdint= @REPLACE_stdint@
+REPLACE_inttypes= @REPLACE_inttypes@
+REPLACE_resolv= @REPLACE_resolv@
+REPLACE_sys_select= @REPLACE_sys_select@
+REPLACE_math= @REPLACE_math@
+REPLACE_stdlib= @REPLACE_stdlib@
+
+PREFIX= @prefix@
+DESTDIR?=
+INSTALL?= @INSTALL@
+
+all: .PHONY
+.if ${REPLACE_stdint} == "yes"
+ ./mkhdr.sh stdint.h < stdint.h.in > stdint.h
+.endif
+.if ${REPLACE_inttypes} == "yes"
+ ./mkhdr.sh inttypes.h < inttypes.h.in > inttypes.h
+.endif
+.if ${REPLACE_resolv} == "yes"
+ ./mkhdr.sh resolv.h < resolv.h.in > resolv.h
+.endif
+.if ${REPLACE_sys_select} == "yes"
+ ./mkhdr.sh sys/select.h < select.h.in > select.h
+.endif
+.if ${REPLACE_math} == "yes"
+ ./mkhdr.sh math.h < math.h.in > math.h
+.endif
+.if ${REPLACE_stdlib} == "yes"
+ ./mkhdr.sh stdlib.h < stdlib.h.in > stdlib.h
+.endif
+
+install: .PHONY
+ printf "" > PLIST
+ ${INSTALL} -m 755 -d ${DESTDIR}${PREFIX}/include
+.if ${REPLACE_stdint} == "yes"
+ ${INSTALL} -m 644 -c stdint.h ${DESTDIR}${PREFIX}/include
+ echo include/stdint.h >> PLIST
+.endif
+.if ${REPLACE_inttypes} == "yes"
+ ${INSTALL} -m 644 -c inttypes.h ${DESTDIR}${PREFIX}/include
+ echo include/inttypes.h >> PLIST
+.endif
+.if ${REPLACE_resolv} == "yes"
+ ${INSTALL} -m 644 -c resolv.h ${DESTDIR}${PREFIX}/include
+ echo include/resolv.h >> PLIST
+.endif
+.if ${REPLACE_sys_select} == "yes"
+ ${INSTALL} -m 755 -d ${DESTDIR}${PREFIX}/include/sys
+ ${INSTALL} -m 644 select.h ${DESTDIR}${PREFIX}/include/sys
+ echo include/sys/select.h >> PLIST
+.endif
+.if ${REPLACE_math} == "yes"
+ ${INSTALL} -m 644 math.h ${DESTDIR}${PREFIX}/include
+ echo include/math.h >> PLIST
+.endif
+.if ${REPLACE_stdlib} == "yes"
+ ${INSTALL} -m 644 stdlib.h ${DESTDIR}${PREFIX}/include
+ echo include/stdlib.h >> PLIST
+.endif
diff -r 52de6b2f86e7 -r a1737ad1950e pkgtools/compat_headers/files/config.guess
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/compat_headers/files/config.guess Sat May 24 03:35:38 2008 +0000
@@ -0,0 +1,1516 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-03-06'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per%bothner.com@localhost>.
+# Please send patches to <config-patches%gnu.org@localhost>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches%gnu.org@localhost>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi%noc.rutgers.edu@localhost 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
Home |
Main Index |
Thread Index |
Old Index