OSSP CVS Repository

ossp - Check-in [3635]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3635
Date: 2003-Sep-29 12:11:31 (local)
2003-Sep-29 10:11:31 (UTC)
User:rse
Branch:
Comment: add NetBSD, OpenBSD, HP HP-UX and HP Tru64 support
Tickets:
Inspections:
Files:
ossp-pkg/platform/platform.sh      1.10 -> 1.11     84 inserted, 0 deleted

ossp-pkg/platform/platform.sh 1.10 -> 1.11

--- platform.sh  2003/09/28 12:17:08     1.10
+++ platform.sh  2003/09/29 10:11:31     1.11
@@ -344,6 +344,38 @@
         esac
         ;;
 
+    #   OpenBSD
+    *:OpenBSD:* )
+        #   determine architecture
+        AT="${UNAME_MACHINE}"
+        AP="${AT}"
+        case "${AP}" in
+            i[3-6]86 ) AP="iX86" ;;
+        esac
+        AC="${AP}"
+        #   determine system
+        r=`echo "${UNAME_RELEASE}" | sed -e 's/\(-.*\)$/[\1]/'`
+        ST="OpenBSD ${r}"
+        SP="${ST}"
+        SC="4.4BSD"
+        ;;
+
+    #   NetBSD
+    *:NetBSD:* )
+        #   determine architecture
+        AT="${UNAME_MACHINE}"
+        AP="${AT}"
+        case "${AP}" in
+            i[3-6]86 ) AP="iX86" ;;
+        esac
+        AC="${AP}"
+        #   determine system
+        r=`echo "${UNAME_RELEASE}" | sed -e 's/\(-.*\)$/[\1]/'`
+        ST="NetBSD ${r}"
+        SP="${ST}"
+        SC="4.4BSD"
+        ;;
+
     #   GNU/Linux
     *:Linux:* )
         #   determine architecture
@@ -478,6 +510,58 @@
         SC="BSD"
         ;;
 
+    #   HP HP-UX
+    *:HP-UX:* )
+        #   determine architecture
+        AT="${UNAME_MACHINE}"
+        case "${AT}" in
+            ia64 ) AT="IA64" ;;
+            9000/[34]?? ) AT=M68K ;;
+            9000/[678][0-9][0-9]) 
+                sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                case "${sc_cpu_version}" in
+                    523 ) AT="HPPA1.0" ;;
+                    528 ) AT="HPPA1.1" ;;
+                    532 ) AT="HPPA2.0"
+                        case "${sc_kernel_bits}" in
+                            32 ) AT="${AT}n" ;;
+                            64 ) AT="${AT}w" ;;
+                        esac
+                        ;;
+                esac
+                ;;
+        esac
+        AP="${AT}"
+        case "${AP}" in
+            HPPA* ) AP="HPPA" ;;
+        esac
+        AC="${AP}"
+        #   determine system
+        v=`echo "${UNAME_RELEASE}" | sed -e 's;^[^0-9]*;;'`
+        ST="[HP ]HP-UX ${v}"
+        SP="${ST}"
+        SC="BSD"
+        ;;
+
+    #   HP Tru64 (OSF1)
+    *:OSF1:* )
+        #   determine architecture
+        AP="${UNAME_MACHINE}"
+        case "${AP}" in
+            alpha ) AP="Alpha" ;;
+        esac
+        alpha_type=`(/usr/sbin/psrinfo -v) 2>/dev/null |\
+            sed -n -e 's/^.*The alpha \([^ ][^ ]*\).*processor.*$/\1/p' | head -n 1`
+        AT="${AP}${alpha_type}"
+        AC="${AP}"
+        #   determine system
+        v=`echo "${UNAME_RELEASE}" | sed -e 's;^[VTX];;'`
+        ST="[HP ]Tru64 ${v}"
+        SP="${ST}"
+        SC="BSD"
+        ;;
+
     #   TODO ...ADD YOUR NEW PLATFORM CHECK HERE... TODO
     # *:XXX:* )
     #   ...

CVSTrac 2.0.1