diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-04 19:56:52 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-04 19:58:55 +0200 |
commit | 02f832195a83a556e2a20768d1c07762f90973dd (patch) | |
tree | ae84affbeb994d2fba257021fadb403f37e28e0a /package | |
parent | 3679bdb27c6c0a73a01c2b27485b503033517f53 (diff) |
add xbmc for imx6
Diffstat (limited to 'package')
38 files changed, 20238 insertions, 0 deletions
diff --git a/package/xbmc-imx6/Makefile b/package/xbmc-imx6/Makefile new file mode 100644 index 000000000..27162332f --- /dev/null +++ b/package/xbmc-imx6/Makefile @@ -0,0 +1,173 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= xbmc-imx6 +PKG_VERSION:= 13.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 1998e1c767e358e4df8b6a578f54a8d2 +PKG_DESCR:= software media player (imx6 flavour) +PKG_SECTION:= mm/video +PKG_DEPENDS:= boost python2 libstdcxx glibc-gconv +PKG_DEPENDS+= libglew mesalib libass libmpeg2 libmad libdbus +PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl +PKG_DEPENDS+= libflac libopenssl libbz2 libtiff liblzo +PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses +PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate +PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd +PKG_DEPENDS+= libgpg-error libudev python2-mod-sqlite ffmpeg +PKG_DEPENDS+= libxslt libvorbisenc alsa-lib glib libglu librt +PKG_BUILDDEP:= boost python2 mesalib libglew libass +PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis +PKG_BUILDDEP+= curl flac openssl bzip2 libtiff liblzo yajl +PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype +PKG_BUILDDEP+= libsamplerate taglib libjasper lame libmicrohttpd +PKG_BUILDDEP+= eudev alsa-lib glib glu libmodplug +PKG_BUILDDEP+= libgpg-error dbus libxslt libvorbis +PKG_BUILDDEP+= swig-host sdl-host sdl-image-host liblzo-host +PKG_BUILDDEP+= zip-host unzip-host ffmpeg +PKG_DEPENDS+= libfslvpuwrap gpu-viv-bin-mx6q +PKG_BUILDDEP+= libfslvpuwrap gpu-viv-bin-mx6q +PKG_URL:= http://xbmc.org/ +PKG_SITES:= http://www.openadk.org/distfiles/ + +PKG_FLAVOURS_XBMC_IMX6:= WITH_SMB WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC +PKG_FLAVOURS_XBMC_IMX6+= WITH_AFP WITH_WEBSERVER WITH_RTMP WITH_BLURAY + +PKGFD_WITH_SMB:= enable samba support +PKGFB_WITH_SMB:= samba +PKGFS_WITH_SMB:= samba-lib +PKGFD_WITH_NFS:= enable nfs support +PKGFB_WITH_NFS:= libnfs +PKGFS_WITH_NFS:= libnfs +PKGFD_WITH_SSH:= enable ssh support +PKGFB_WITH_SSH:= libssh +PKGFS_WITH_SSH:= libssh +PKGFD_WITH_AVAHI:= enable avahi support +PKGFB_WITH_AVAHI:= avahi +PKGFS_WITH_AVAHI:= libavahi +PKGFD_WITH_CEC:= enable cec support +PKGFB_WITH_CEC:= libcec +PKGFS_WITH_CEC:= libcec +PKGFD_WITH_AFP:= enable afp support +PKGFB_WITH_AFP:= afpfs-ng +PKGFS_WITH_AFP:= libafpclient +PKGFD_WITH_RTMP:= enable rtmp support +PKGFB_WITH_RTMP:= rtmpdump +PKGFS_WITH_RTMP:= librtmp +PKGFD_WITH_BLURAY:= enable bluray support +PKGFB_WITH_BLURAY:= libbluray +PKGFS_WITH_BLURAY:= libbluray +PKGFD_WITH_WEBSERVER:= enable internal webserver support + +PKG_SYSTEM_DEPENDS:= solidrun-imx6 + +DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \ + aclocal.m4 config.h.in + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,XBMC_IMX6,xbmc-imx6,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +HOST_CXXFLAGS+= $(HOST_CPPFLAGS) +XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s +TARGET_CPPFLAGS+= -I. -I./utils \ + -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \ + -DTIXML_USE_STL=1 -DHAS_SIMPLEPM=1 -DLINUX + +AUTOTOOL_STYLE:= autoreconf +CONFIGURE_ENV+= DESTDIR='${WRKINST}' \ + TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr' +CONFIGURE_ARGS+= --disable-optical-drive \ + --disable-optimizations \ + --disable-mysql \ + --disable-rsxs \ + --disable-projectm \ + --disable-crystalhd \ + --disable-mdnsembedded \ + --disable-libusb \ + --disable-libcap \ + --disable-joystick \ + --disable-dvdcss \ + --disable-debug \ + --disable-gtest \ + --disable-ccache \ + --disable-wayland \ + --disable-pulse \ + --disable-mid \ + --enable-alsa \ + --enable-libmp3lame \ + --enable-libvorbisenc \ + --enable-udev \ + --enable-external-libraries + +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_BLURAY),) +CONFIGURE_ARGS+= --enable-libbluray +else +CONFIGURE_ARGS+= --disable-libbluray +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_AFP),) +CONFIGURE_ARGS+= --enable-afpclient +else +CONFIGURE_ARGS+= --disable-afpclient +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_SMB),) +CONFIGURE_ARGS+= --enable-samba +else +CONFIGURE_ARGS+= --disable-samba +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_SSH),) +CONFIGURE_ARGS+= --enable-ssh +else +CONFIGURE_ARGS+= --disable-ssh +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_NFS),) +CONFIGURE_ARGS+= --enable-nfs +else +CONFIGURE_ARGS+= --disable-nfs +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_CEC),) +CONFIGURE_ARGS+= --enable-libcec +else +CONFIGURE_ARGS+= --disable-libcec +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_RTMP),) +CONFIGURE_ARGS+= --enable-rtmp +else +CONFIGURE_ARGS+= --disable-rtmp +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_AVAHI),) +CONFIGURE_ARGS+= --enable-avahi +else +CONFIGURE_ARGS+= --disable-avahi +endif +ifneq ($(ADK_PACKAGE_XBMC_IMX6_WITH_WEBSERVER),) +CONFIGURE_ARGS+= --enable-webserver +else +CONFIGURE_ARGS+= --disable-webserver +endif + +CONFIGURE_ARGS+= --disable-x11 \ + --disable-sdl \ + --disable-external-ffmpeg \ + --enable-debug \ + --enable-gles \ + --enable-neon \ + --enable-codec=imxvpu + +pre-configure: + (cd $(WRKBUILD)/lib/cpluff && env PATH=$(AUTOTOOL_PATH) ./autogen.sh) + +xbmc-imx6-install: + $(INSTALL_DIR) $(IDIR_XBMC_IMX6)/usr/lib/xbmc/addons + $(CP) $(WRKINST)/usr/lib/xbmc/* \ + $(IDIR_XBMC_IMX6)/usr/lib/xbmc + $(INSTALL_DIR) $(IDIR_XBMC_IMX6)/usr/share/xbmc + $(CP) $(WRKINST)/usr/share/xbmc/* \ + $(IDIR_XBMC_IMX6)/usr/share/xbmc + $(INSTALL_DIR) $(IDIR_XBMC_IMX6)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/xbmc \ + $(IDIR_XBMC_IMX6)/usr/bin + +include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xbmc-imx6/files/xbmc.init b/package/xbmc-imx6/files/xbmc.init new file mode 100644 index 000000000..bbe65c1c2 --- /dev/null +++ b/package/xbmc-imx6/files/xbmc.init @@ -0,0 +1,30 @@ +#!/bin/sh +#PKG xbmc +#INIT 95 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${xbmc:-NO}" = x"NO" && exit 0 + test x"$xbmc" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + export LD_LIBRARY_PATH=/opt/vc/lib + xbmc & + ;; +stop) + kill $(pgrep -f /usr/lib/xbmc/xbmc.bin) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/xbmc-imx6/files/xbmc.postinst b/package/xbmc-imx6/files/xbmc.postinst new file mode 100644 index 000000000..45274da68 --- /dev/null +++ b/package/xbmc-imx6/files/xbmc.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf xbmc NO diff --git a/package/xbmc-imx6/patches/patch-Makefile_include_in b/package/xbmc-imx6/patches/patch-Makefile_include_in new file mode 100644 index 000000000..e73d0b4c7 --- /dev/null +++ b/package/xbmc-imx6/patches/patch-Makefile_include_in @@ -0,0 +1,10 @@ +--- xbmc-imx6-13.2.orig/Makefile.include.in 2014-09-02 13:26:10.000000000 +0200 ++++ xbmc-imx6-13.2/Makefile.include.in 2014-09-02 20:41:40.075316050 +0200 +@@ -32,6 +32,7 @@ CC=@CC@ + CXXFLAGS+=@CXXFLAGS@ + CFLAGS+=@CFLAGS@ + LDFLAGS+=@LDFLAGS@ ++INCLUDES+=@CPPFLAGS@ + INCLUDES+=-I@abs_top_srcdir@/lib + INCLUDES+=-I@abs_top_srcdir@/xbmc + INCLUDES+=$(sort @INCLUDES@) diff --git a/package/xbmc-imx6/patches/patch-configure_in b/package/xbmc-imx6/patches/patch-configure_in new file mode 100644 index 000000000..1360492e4 --- /dev/null +++ b/package/xbmc-imx6/patches/patch-configure_in @@ -0,0 +1,11 @@ +--- xbmc-imx6-13.2.orig/configure.in 2014-09-02 13:26:12.000000000 +0200 ++++ xbmc-imx6-13.2/configure.in 2014-09-04 16:22:35.671588472 +0200 +@@ -553,7 +553,7 @@ OBJDUMP="${OBJDUMP:-objdump}" + # so we have to use our own var here + # defaults to the build side target_os + # and should be overridden for cross below (see android) +-ffmpeg_target_os=$(tolower $(uname -s)) ++ffmpeg_target_os=linux + + # host detection and setup + case $host in diff --git a/package/xbmc-imx6/patches/patch-lib_cpluff_Makefile_am b/package/xbmc-imx6/patches/patch-lib_cpluff_Makefile_am new file mode 100644 index 000000000..fb70c6993 --- /dev/null +++ b/package/xbmc-imx6/patches/patch-lib_cpluff_Makefile_am @@ -0,0 +1,11 @@ +--- xbmc-13.0rc1.orig/lib/cpluff/Makefile.am 2014-04-30 15:43:53.000000000 +0200 ++++ xbmc-13.0rc1/lib/cpluff/Makefile.am 2014-05-05 13:03:15.329450196 +0200 +@@ -6,7 +6,7 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = libcpluff loader console po test docsrc doc ++SUBDIRS = libcpluff loader console test docsrc doc + DIST_SUBDIRS = $(SUBDIRS) examples + + EXTRA_DIST = COPYRIGHT.txt INSTALL.txt ChangeLog.txt Roadmap.txt autogen.sh plugin.xsd diff --git a/package/xbmc-imx6/patches/patch-lib_cpluff_autogen_sh b/package/xbmc-imx6/patches/patch-lib_cpluff_autogen_sh new file mode 100644 index 000000000..24a84ea38 --- /dev/null +++ b/package/xbmc-imx6/patches/patch-lib_cpluff_autogen_sh @@ -0,0 +1,10 @@ +--- xbmc-13.0rc1.orig/lib/cpluff/autogen.sh 2014-04-30 15:43:53.000000000 +0200 ++++ xbmc-13.0rc1/lib/cpluff/autogen.sh 2014-05-05 12:15:29.307227206 +0200 +@@ -15,7 +15,6 @@ fi + + # Generate files in top level directory + cd "$basedir" +-autopoint + rm -f ABOUT-NLS + test -d auxliary || mkdir auxliary + libtoolize --automake -f diff --git a/package/xbmc-imx6/patches/patch-lib_cpluff_configure_ac b/package/xbmc-imx6/patches/patch-lib_cpluff_configure_ac new file mode 100644 index 000000000..d38754bfd --- /dev/null +++ b/package/xbmc-imx6/patches/patch-lib_cpluff_configure_ac @@ -0,0 +1,11 @@ +--- xbmc-13.0rc1.orig/lib/cpluff/configure.ac 2014-04-30 15:43:53.000000000 +0200 ++++ xbmc-13.0rc1/lib/cpluff/configure.ac 2014-05-05 13:03:32.437577723 +0200 +@@ -46,8 +46,6 @@ AC_SUBST([CP_CXX_LIB_VERSION]) + # ----------------------- + AM_INIT_AUTOMAKE([foreign]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +-AM_GNU_GETTEXT([external]) +-AM_GNU_GETTEXT_VERSION([0.16.1]) + + # C/C++ compiler settings + # ------------------- diff --git a/package/xbmc-imx6/patches/patch-lib_cpluff_libcpluff_Makefile_am b/package/xbmc-imx6/patches/patch-lib_cpluff_libcpluff_Makefile_am new file mode 100644 index 000000000..ffa9a1529 --- /dev/null +++ b/package/xbmc-imx6/patches/patch-lib_cpluff_libcpluff_Makefile_am @@ -0,0 +1,11 @@ +--- xbmc-13.0rc1.orig/lib/cpluff/libcpluff/Makefile.am 2014-04-30 15:43:53.000000000 +0200 ++++ xbmc-13.0rc1/lib/cpluff/libcpluff/Makefile.am 2014-05-05 13:53:11.766461900 +0200 +@@ -6,7 +6,7 @@ + + SUBDIRS = docsrc + +-LIBS = @LIBS_LIBCPLUFF@ @LTLIBINTL@ @LIBS@ ++LIBS = @LIBS_LIBCPLUFF@ @LIBS@ + + CPPFLAGS = @CPPFLAGS@ + CPPFLAGS += -I. -DCP_C_API=CP_EXPORT -DCP_HOST="\"$(host)\"" -DCP_DATADIR="\"$(datadir)\"" diff --git a/package/xbmc-imx6/patches/patch-lib_enca_config_guess b/package/xbmc-imx6/patches/patch-lib_enca_config_guess new file mode 100644 index 000000000..93f98365a --- /dev/null +++ b/package/xbmc-imx6/patches/patch-lib_enca_config_guess @@ -0,0 +1,1814 @@ +--- xbmc-imx6-13.2.orig/lib/enca/config.guess 2014-09-02 13:26:13.000000000 +0200 ++++ xbmc-imx6-13.2/lib/enca/config.guess 2014-08-18 15:18:32.461397057 +0200 +@@ -1,13 +1,12 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++# Copyright 1992-2014 Free Software Foundation, Inc. + +-timestamp='2003-06-17' ++timestamp='2014-01-25' + + # 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 ++# the Free Software Foundation; either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but +@@ -16,24 +15,22 @@ timestamp='2003-06-17' + # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# along with this program; if not, see <http://www.gnu.org/licenses/>. + # + # 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>. +-# Please send patches to <config-patches@gnu.org>. Submit a context +-# diff and a properly formatted ChangeLog entry. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + # +-# 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. ++# Originally written by Per Bothner. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++# ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. ++ + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,8 +50,7 @@ version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright 1992-2014 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." +@@ -66,11 +62,11 @@ Try \`$me --help' for more information." + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -104,7 +100,7 @@ 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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$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 ; } ; +@@ -123,7 +119,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ;' ++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 1994-08-24) +@@ -136,19 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +-## for Red Hat Linux +-if test -f /etc/redhat-release ; then +- VENDOR=redhat ; +-else +- VENDOR= ; +-fi ++case "${UNAME_SYSTEM}" in ++Linux|GNU|GNU/*) ++ # If the system lacks a compiler, then just pick glibc. ++ # We could probably try harder. ++ LIBC=gnu ++ ++ eval $set_cc_for_build ++ cat <<-EOF > $dummy.c ++ #include <features.h> ++ #if defined(__UCLIBC__) ++ LIBC=uclibc ++ #elif defined(__dietlibc__) ++ LIBC=dietlibc ++ #else ++ LIBC=gnu ++ #endif ++ EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ ;; ++esac + + # 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*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -165,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + 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 +@@ -173,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -183,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -203,50 +214,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU +@@ -284,42 +281,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; +- Alpha*:OpenVMS:*:*) +- echo alpha-hp-vms +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm*:riscos:*:*|arm*:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -327,32 +334,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 +- exit 0 ;; +- DRS?6000:UNIX_SV:4.2*:7*) ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -361,10 +387,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) |