Changeset 201

Show
Ignore:
Timestamp:
02/20/12 14:05:37 (12 years ago)
Author:
quentin
Message:

Update and fix the macathena-machtype port

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ports/net/macathena-machtype/Portfile

    r36 r201  
    33 
    44name                    macathena-machtype 
    5 version                 20030812 
     5version                 svn25436 
    66distname                machtype-${version} 
    77categories              net 
    88maintainers             mit.edu:sipb-macathena 
    9 description             Hesiod is the Project Athena service name resolution protocol 
     9description             Provides basic information about the running system 
    1010platforms               darwin 
    1111master_sites    http://macathena.mit.edu/dist/ 
    12 patchfiles              patch-configure.in \ 
    13                                 patch-machtype_linux.sh \ 
    14                                 patch-config.sub \ 
    15                                 patch-config.guess 
    16 checksums               md5 377829b5da0c05cf334d2fa2e9124c4f \ 
    17                                 sha1 ea18209e214b35238ed31955c6ceb1fbabcfdcb2 \ 
    18                                 rmd160 021db450b6af4aaa3e46eab678c01e5bcc9cfa4b 
     12patchfiles              patch-machtype_linux.sh \ 
     13                        patch-configure.in 
     14checksums               md5 d01a977c9c6d5b74aa9c0d888d963c28 \ 
     15                                sha1 427dad33c2589136b36b87fd2f4a0d737e61320d \ 
     16                                rmd160 efc130d5cd2cb334f610bffe110b867d52cca519 
    1917 
    2018use_autoconf    yes 
    2119 
    22 configure.env-append    ATHENA_MAJOR_VERSION=9
    23                                                 ATHENA_MINOR_VERSION=4 
     20configure.env-append    ATHENA_MAJOR_VERSION=10
     21                                                ATHENA_MINOR_VERSION=0 
    2422 
    2523depends_lib             port:macathena-base 
    2624 
     25depends_build           port:automake 
     26 
    2727destroot.violate_mtree  yes 
    2828 
     29post-patch { 
     30     file copy ${prefix}/share/automake-1.11/install-sh ${worksrcpath}/ 
     31     file copy ${prefix}/share/automake-1.11/mkinstalldirs ${worksrcpath}/ 
     32     file copy ${prefix}/share/automake-1.11/config.sub ${worksrcpath}/ 
     33     file copy ${prefix}/share/automake-1.11/config.guess ${worksrcpath}/ 
     34} 
     35 
    2936configure.env-append    [exec ${filespath}/getSysnameList.py] 
  • trunk/ports/net/macathena-machtype/files/getSysnameList.py

    r10 r201  
    66darwin_ver = int(getoutput('uname -r').split('.')[0]) * 10 
    77 
    8 ver_list = range(darwin_ver, 40, -10) 
     8ver_list = range(darwin_ver, 70, -10) 
    99x86_list = ["x86_darwin_%d" % ver for ver in ver_list] 
    1010ppc_list = ["ppc_darwin_%d" % ver for ver in ver_list] 
    1111 
    12 if arch == 'i386': 
     12if arch == 'i386' and darwin_ver >= 110: 
     13        versions = x86_list 
     14elif arch == 'i386': 
    1315        versions = [item for items in zip(x86_list, ppc_list) for item in items] 
    1416else: 
    1517        versions = ppc_list 
    1618 
    17 versions += ['share', 'common', 'any'
     19versions += ['share', 'common', 'any', 'all'
    1820 
    1921print 'ATHENA_SYS=%s ATHENA_SYS_COMPAT="%s"' % (versions[0], ':'.join(versions[1:])) 
  • trunk/ports/net/macathena-machtype/files/patch-machtype_linux.sh

    r10 r201  
    1 --- machtype_linux.sh.orig      2007-12-24 21:51:18.000000000 -0600 
    2 +++ machtype_linux.sh   2007-12-25 00:20:57.000000000 -0600 
     1--- machtype_linux.sh.orig      2011-10-28 17:31:43.000000000 -0400 
     2+++ machtype_linux.sh   2012-02-20 12:33:57.000000000 -0500 
    33@@ -1,4 +1,4 @@ 
    44-#!/bin/sh 
    55+#!/bin/bash 
    6  # $Id: machtype_linux.sh,v 1.9 2003/08/12 21:47:50 jweiss Exp $ 
     6 # $Id: machtype_linux.sh,v 1.9 2003-08-12 21:47:50 jweiss Exp $ 
    77  
    88 # We need to support the following options: 
    9 @@ -86,7 +86,7 @@ 
     9@@ -91,7 +91,7 @@ 
    1010 fi 
    1111  
     
    1616 fi 
    1717  
    18 @@ -133,32 +133,31 @@ 
     18@@ -145,27 +145,26 @@ 
    1919 fi 
    2020  
    2121 if [ $display ] ; then 
    22 -        /sbin/lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p 
     22-      lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p 
    2323+       system_profiler SPDisplaysDataType | awk 'NR==3 { print }' | sed "s/^ *\(.*\):$/\1/" 
    2424        printed=1 
     
    2626  
    2727 if [ $rdsk ]; then 
    28 -       awk '/^SCSI device/ { print; } 
    29 -            /^hd[a-z]:/ { print; } 
    30 -            /^Floppy/ { for (i=3; i <= NF; i += 3) print $i ": " $(i+2); }' \ 
    31 -            /var/log/dmesg 
     28-       for d in /sys/block/[fhs]d*; do 
     29-           echo $(basename "$d"): \ 
     30-               $(xargs -I @ expr @ '*' 8 / 15625 < "$d/size")MB \ 
     31-               $(cat "$d/device/model" || 
     32-                 cat "/proc/ide/$(basename "$d")/model") 
     33-       done 2>/dev/null 
    3234+       disks=`ls /dev/disk* | grep 'disk[0-9]*$'` 
    3335+       for disk in $disks 
     
    4244+       usermem=$(($(sysctl -n hw.usermem)/1024)) 
    4345        if [ $verbose ]; then 
    44 -               awk 'BEGIN { FS="[^0-9]+" } 
    45 -                    /^Memory:/ { printf "user=%d, phys=%d (%d M)\n", 
    46 -                                        $2*1.024, $3*1.024, $3/1000; }' \ 
    47 -                   /var/log/dmesg 
     46-               awk '/^MemTotal:/ { printf "user=%d, phys=%d (%d M)\n", 
     47-                                          $2, $2, $2/1024 }' \ 
     48-                   /proc/meminfo 
    4849+               printf "user=%d, phys=%d (%d M)\n" $usermem $physmem $((physmem/1024)) 
    4950        else 
    50 -               awk 'BEGIN { FS="[^0-9]+" } 
    51 -                    /^Memory:/ { printf "%d\n", $3*1.024; }' /var/log/dmesg 
     51-               awk '/^MemTotal:/ { printf "%d\n", $2 }' /proc/meminfo 
    5252+               echo $physmem 
    5353        fi 
    5454        printed=1 
     55 fi 
     56@@ -182,6 +181,6 @@ 
    5557 fi 
    5658