├── .gitignore ├── README.md ├── antiword ├── 10_fix_buffer_overflow_wordole_c.patch └── PKGBUILD ├── bar └── PKGBUILD ├── bind-bin ├── PKGBUILD └── bind-bin.install ├── bind ├── 127.0.0.zone ├── PKGBUILD ├── empty.zone ├── localhost.ip6.zone ├── localhost.zone ├── named.conf ├── named.service ├── sysusers.conf └── tmpfiles.conf ├── bviplus └── PKGBUILD ├── cmatrix └── PKGBUILD ├── colordiff └── PKGBUILD ├── cowsay ├── PKGBUILD └── cowsay.patch ├── cygutils └── PKGBUILD ├── figlet └── PKGBUILD ├── hub └── PKGBUILD ├── jq └── PKGBUILD ├── jquery └── PKGBUILD ├── ncdu └── PKGBUILD ├── php-bin └── PKGBUILD ├── php6-bin └── PKGBUILD ├── popt └── PKGBUILD ├── ranger └── PKGBUILD ├── remarshal └── PKGBUILD ├── sl └── PKGBUILD ├── w3m ├── PKGBUILD ├── cygwin.patch ├── file_handle.patch ├── form_unknown.patch └── https.patch ├── wput └── PKGBUILD ├── ydcv └── PKGBUILD ├── zsh-completions ├── ChangeLog ├── LICENSE-BSD ├── LICENSE-MIT └── PKGBUILD └── zsh ├── Makefile.in.patch ├── PKGBUILD ├── add-pwd-W-option.patch ├── msys-symlink-hack.patch ├── msysize.patch ├── zprofile ├── zsh-5.0.6-1.patch ├── zsh-doc.install └── zsh.install /.gitignore: -------------------------------------------------------------------------------- 1 | pkg 2 | src 3 | *.tar.* 4 | *.tgz 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # my-MSYS2-Packages 2 | 3 | ``` 4 | antiword 5 | atool 6 | bar 7 | bind 8 | bind-bin 9 | bviplus 10 | cmatrix 11 | colordiff 12 | cowsay 13 | cygutils 14 | figlet 15 | hub 16 | jq 17 | jquery 18 | ncdu 19 | php6-bin 20 | php-bin 21 | popt 22 | ranger 23 | remarshal 24 | sl 25 | w3m 26 | wput 27 | ydcv 28 | zsh 29 | zsh-completions 30 | ``` 31 | -------------------------------------------------------------------------------- /antiword/10_fix_buffer_overflow_wordole_c.patch: -------------------------------------------------------------------------------- 1 | Description: Add check for buffer overflow with malformed input files 2 | Author: 3 | Bug-Debian: http://bugs.debian.org/407015 4 | Last-Update: 2009-06-03 5 | 6 | --- antiword-0.37~/wordole.c 2005-08-26 21:49:57.000000000 +0200 7 | +++ antiword-0.37/wordole.c 2009-06-03 22:31:15.948014682 +0200 8 | @@ -259,6 +259,10 @@ 9 | } 10 | tNameSize = (size_t)usGetWord(0x40, aucBytes); 11 | tNameSize = (tNameSize + 1) / 2; 12 | + if ( tNameSize > sizeof(atPPSlist[iIndex].szName)) { 13 | + werr(0, "Name Size of PPS %d is too large", iIndex); 14 | + tNameSize = sizeof(atPPSlist[iIndex].szName); 15 | + } 16 | vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize); 17 | atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes); 18 | if (atPPSlist[iIndex].ucType == 5) { 19 | -------------------------------------------------------------------------------- /antiword/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=antiword 4 | pkgver=0.37 5 | pkgrel=5 6 | pkgdesc="A free MS Word reader for Linux and RISC OS" 7 | arch=('i686' 'x86_64') 8 | url="http://www.winfield.demon.nl/" 9 | license=('GPL') 10 | depends=('bash') 11 | source=("http://www.winfield.demon.nl/linux/$pkgname-$pkgver.tar.gz" 12 | '10_fix_buffer_overflow_wordole_c.patch') 13 | md5sums=('f868e2a269edcbc06bf77e89a55898d1' 14 | '3eb02e9d913b355d64d9a30b08fc390f') 15 | 16 | prepare() { 17 | cd "$srcdir/$pkgname-$pkgver" 18 | patch -p1 -i ../10_fix_buffer_overflow_wordole_c.patch 19 | } 20 | 21 | build() { 22 | cd "$srcdir/$pkgname-$pkgver" 23 | 24 | sed -i "s|GLOBAL_INSTALL_DIR =.*|GLOBAL_INSTALL_DIR = /usr/bin|g" Makefile.Linux 25 | make OPT="$CFLAGS -DNDEBUG" LDFLAGS="$LDFLAGS" 26 | } 27 | 28 | package() { 29 | cd "$srcdir/$pkgname-$pkgver" 30 | 31 | make DESTDIR="$pkgdir" global_install 32 | install -Dm644 Docs/antiword.1 "$pkgdir/usr/share/man/man1/antiword.1" 33 | } 34 | -------------------------------------------------------------------------------- /bar/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=bar 4 | pkgver=1.4 5 | pkgrel=4 6 | pkgdesc='A script for showing progress bars.' 7 | arch=('any') 8 | url='http://www.theiling.de/projects/bar.html' 9 | license=('custom') 10 | source=("http://www.theiling.de/downloads/bar-${pkgver}-src.tar.bz2") 11 | md5sums=('4b99147e2efbe678cbcdc985ad2412f4') 12 | 13 | package() { 14 | cd "${srcdir}/${pkgname}-${pkgver}" 15 | 16 | install -Dm0755 bar "${pkgdir}/usr/bin/bar" 17 | install -Dm0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" 18 | } 19 | -------------------------------------------------------------------------------- /bind-bin/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=bind-bin 4 | _realname=bind 5 | _pkgver=9.10.3-P3 6 | pkgver=${_pkgver//-/.} 7 | pkgrel=1 8 | pkgdesc='The ISC DNS Server' 9 | arch=('x86_64') 10 | license=('custom:ISC') 11 | url='http://www.isc.org/software/bind' 12 | source=("http://ftp.isc.org/isc/bind9/$_pkgver/BIND$_pkgver.x64.zip") 13 | md5sums=('4ef25209ed135a3ce63ecdf757fe6566') 14 | OPTIONS=(!strip) 15 | install="$pkgname.install" 16 | 17 | package() { 18 | cd "${srcdir}" 19 | rm BIND$_pkgver.x64.zip 20 | 21 | mkdir doc 22 | mv $(find -type f|grep -v exe|grep -v dll) doc 23 | 24 | mkdir -p "${pkgdir}/opt/$_realname" 25 | cp -r * "${pkgdir}/opt/$_realname" 26 | 27 | mkdir -p "${pkgdir}/usr/bin" 28 | cd "${pkgdir}/usr/bin" 29 | ln -s ../../opt/$_realname/*.exe . 30 | } 31 | -------------------------------------------------------------------------------- /bind-bin/bind-bin.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | vcredist_x64 3 | } 4 | -------------------------------------------------------------------------------- /bind/127.0.0.zone: -------------------------------------------------------------------------------- 1 | @ 1D IN SOA localhost. root.localhost. ( 2 | 42 ; serial (yyyymmdd##) 3 | 3H ; refresh 4 | 15M ; retry 5 | 1W ; expiry 6 | 1D ) ; minimum ttl 7 | 8 | 1D IN NS localhost. 9 | 10 | 1.0.0.127.in-addr.arpa. 1D IN PTR localhost. 11 | -------------------------------------------------------------------------------- /bind/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgbase=bind 4 | pkgname=(bind bind-tools) 5 | _pkgver=9.10.4-P2 6 | pkgver=${_pkgver//-/.} 7 | pkgrel=1 8 | url='http://www.isc.org/software/bind/' 9 | license=('custom:ISC') 10 | arch=('i686' 'x86_64') 11 | options=('!emptydirs') 12 | makedepends=('libxml2-devel' 'zlib-devel' 'openssl-devel' 'libreadline-devel' 13 | 'python' 'perl') 14 | source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz" 15 | 'tmpfiles.conf' 16 | 'sysusers.conf' 17 | 'named.conf' 18 | 'named.service' 19 | 'localhost.zone' 20 | 'localhost.ip6.zone' 21 | '127.0.0.zone' 22 | 'empty.zone') 23 | sha1sums=('b9b944251eeeae6c25b12472c2bac7369501c12c' 24 | 'c5a2bcd9b0f009ae71f3a03fbdbe012196962a11' 25 | '9537f4835a1f736788d0733c7996a10db2d4eee4' 26 | 'c017aae379c32c7cb1aa1ad84776b83e3a5c139f' 27 | 'cb2e81b4cbf9efafb3e81e3752f0154e779cc7ec' 28 | '6704303a6ed431a29b1d8fe7b12decd4d1f2f50f' 29 | '52da8f1c0247a11b16daa4e03d920e8f09315cbe' 30 | '9c33726088342207ad06d33b2c13408290a0c8ad' 31 | '4f4457b310cbbeadca2272eced062a9c2b2b42fe') 32 | 33 | prepare() { 34 | msg2 'Getting a fresh version of root DNS' 35 | # no more using source array, lack of versioning. 36 | curl -o root.hint http://www.internic.net/zones/named.root 37 | [[ -s root.hint ]] 38 | } 39 | 40 | build() { 41 | cd bind-$_pkgver 42 | export CFLAGS+=' -DDIG_SIGCHASE' 43 | ./configure \ 44 | --build=x86_64-pc-msys \ 45 | --without-dlopen \ 46 | --prefix=/usr \ 47 | --sysconfdir=/etc \ 48 | --sbindir=/usr/bin \ 49 | --localstatedir=/var \ 50 | --disable-static \ 51 | --with-python=/usr/bin/python \ 52 | --with-ipv6 \ 53 | --with-openssl \ 54 | --with-libxml2 \ 55 | --with-libtool 56 | make 57 | } 58 | 59 | package_bind() { 60 | pkgdesc='The ISC DNS Server' 61 | provides=('dns-server') 62 | depends=('libxml2' 'openssl' 'bind-tools') 63 | backup=('etc/named.conf' 64 | 'var/named/127.0.0.zone' 65 | 'var/named/localhost.zone' 66 | 'var/named/localhost.ip6.zone' 67 | 'var/named/empty.zone') 68 | 69 | cd "bind-$_pkgver" 70 | install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 71 | for _d in bin/{check,confgen,named,rndc}; do 72 | (cd "$_d" && make DESTDIR="$pkgdir" install) 73 | done 74 | 75 | cd "$srcdir" 76 | install -D -m644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" 77 | install -D -m644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" 78 | 79 | install -D -m644 named.service "$pkgdir/usr/lib/systemd/system/named.service" 80 | install -D -m640 named.conf "$pkgdir/etc/named.conf" 81 | 82 | install -d "$pkgdir/var/named" 83 | install -m640 root.hint "$pkgdir/var/named" 84 | install -m640 localhost.zone "$pkgdir/var/named" 85 | install -m640 localhost.ip6.zone "$pkgdir/var/named" 86 | install -m640 127.0.0.zone "$pkgdir/var/named" 87 | install -m640 empty.zone "$pkgdir/var/named" 88 | } 89 | 90 | package_bind-tools() { 91 | pkgdesc='The ISC DNS tools' 92 | depends=('libxml2' 'zlib' 'openssl' 'libreadline') 93 | optdepends=('python: for python scripts') 94 | 95 | cd "bind-$_pkgver" 96 | install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 97 | make DESTDIR="$pkgdir" SUBDIRS="" install 98 | (cd lib && make DESTDIR="$pkgdir" install) 99 | 100 | sed -i 's/\.exe//g' bin/python/Makefile 101 | for _d in bin/{dig,dnssec,delv,nsupdate,python,tools}; do 102 | (cd "$_d" && make DESTDIR="$pkgdir" install) 103 | done 104 | } 105 | 106 | # vim:set ts=2 sw=2 et: 107 | -------------------------------------------------------------------------------- /bind/empty.zone: -------------------------------------------------------------------------------- 1 | @ 1D IN SOA localhost. root.localhost. ( 2 | 42 ; serial (yyyymmdd##) 3 | 3H ; refresh 4 | 15M ; retry 5 | 1W ; expiry 6 | 1D ) ; minimum ttl 7 | 8 | 1D IN NS localhost. 9 | -------------------------------------------------------------------------------- /bind/localhost.ip6.zone: -------------------------------------------------------------------------------- 1 | @ 1D IN SOA localhost. root.localhost. ( 2 | 42 ; serial (yyyymmdd##) 3 | 3H ; refresh 4 | 15M ; retry 5 | 1W ; expiry 6 | 1D ) ; minimum ttl 7 | 8 | 1D IN NS localhost. 9 | 10 | 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa. 1D IN PTR localhost. 11 | -------------------------------------------------------------------------------- /bind/localhost.zone: -------------------------------------------------------------------------------- 1 | @ 1D IN SOA localhost. root.localhost. ( 2 | 42 ; serial (yyyymmdd##) 3 | 3H ; refresh 4 | 15M ; retry 5 | 1W ; expiry 6 | 1D ) ; minimum ttl 7 | 8 | 1D IN NS localhost. 9 | 10 | localhost. 1D IN A 127.0.0.1 11 | localhost. 1D IN AAAA ::1 12 | -------------------------------------------------------------------------------- /bind/named.conf: -------------------------------------------------------------------------------- 1 | // vim:set ts=4 sw=4 et: 2 | 3 | options { 4 | directory "/var/named"; 5 | pid-file "/run/named/named.pid"; 6 | 7 | // Uncomment these to enable IPv6 connections support 8 | // IPv4 will still work: 9 | // listen-on-v6 { any; }; 10 | // Add this for no IPv4: 11 | // listen-on { none; }; 12 | 13 | allow-recursion { 127.0.0.1; }; 14 | allow-transfer { none; }; 15 | allow-update { none; }; 16 | 17 | version none; 18 | hostname none; 19 | server-id none; 20 | }; 21 | 22 | zone "localhost" IN { 23 | type master; 24 | file "localhost.zone"; 25 | }; 26 | 27 | zone "0.0.127.in-addr.arpa" IN { 28 | type master; 29 | file "127.0.0.zone"; 30 | }; 31 | 32 | zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { 33 | type master; 34 | file "localhost.ip6.zone"; 35 | }; 36 | 37 | zone "255.in-addr.arpa" IN { 38 | type master; 39 | file "empty.zone"; 40 | }; 41 | 42 | zone "0.in-addr.arpa" IN { 43 | type master; 44 | file "empty.zone"; 45 | }; 46 | 47 | zone "." IN { 48 | type hint; 49 | file "root.hint"; 50 | }; 51 | 52 | //zone "example.org" IN { 53 | // type slave; 54 | // file "example.zone"; 55 | // masters { 56 | // 192.168.1.100; 57 | // }; 58 | // allow-query { any; }; 59 | // allow-transfer { any; }; 60 | //}; 61 | 62 | //logging { 63 | // channel xfer-log { 64 | // file "/var/log/named.log"; 65 | // print-category yes; 66 | // print-severity yes; 67 | // severity info; 68 | // }; 69 | // category xfer-in { xfer-log; }; 70 | // category xfer-out { xfer-log; }; 71 | // category notify { xfer-log; }; 72 | //}; 73 | -------------------------------------------------------------------------------- /bind/named.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Internet domain name server 3 | After=network.target 4 | 5 | [Service] 6 | ExecStart=/usr/bin/named -f -u named 7 | ExecReload=/usr/bin/rndc reload 8 | ExecStop=/usr/bin/rndc stop 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /bind/sysusers.conf: -------------------------------------------------------------------------------- 1 | u named 40 "BIND DNS Server" - 2 | -------------------------------------------------------------------------------- /bind/tmpfiles.conf: -------------------------------------------------------------------------------- 1 | d /run/named 0750 named named - 2 | -------------------------------------------------------------------------------- /bviplus/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=bviplus 4 | pkgver=0.9.4 5 | pkgrel=1 6 | pkgdesc="Bviplus is an ncurses based hex editor with a vim-like interface." 7 | arch=(i686 x86_64) 8 | url="http://bviplus.sourceforge.net/" 9 | license=("GPLv3") 10 | depends=("ncurses") 11 | source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tgz) 12 | md5sums=('b814929c439d2ec75cec2597540003e7') 13 | 14 | build() { 15 | cd $srcdir/${pkgname}-${pkgver} 16 | sed -i 's|ncurses.h|ncurses/ncurses.h|g' *.h *.c 17 | sed -i 's|panel.h|ncurses/panel.h|g' *.h *.c 18 | sed -i 's|LIBS += panel|LIBS += panelw|g' Makefile 19 | make PREFIX=/usr 20 | } 21 | 22 | package() { 23 | cd $srcdir/${pkgname}-${pkgver} 24 | make PREFIX=${pkgdir}/usr install 25 | } 26 | -------------------------------------------------------------------------------- /cmatrix/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=cmatrix 4 | pkgver=1.2a 5 | pkgrel=1 6 | pkgdesc="A curses-based scrolling 'Matrix'-like screen" 7 | arch=('i686' 'x86_64') 8 | url="http://www.asty.org/cmatrix/" 9 | license=('GPL2') 10 | depends=('ncurses') 11 | source=("http://www.asty.org/$pkgname/dist/$pkgname-$pkgver.tar.gz") 12 | md5sums=('ebfb5733104a258173a9ccf2669968a1') 13 | 14 | build() { 15 | cd $pkgname-$pkgver 16 | 17 | CPPFLAGS="-D_FORTIFY_SOURCE=0" ./configure \ 18 | --prefix=/usr --mandir=/usr/share/man 19 | 20 | sed -i 's|#include |#include |g' cmatrix.c 21 | 22 | make 23 | } 24 | 25 | package() { 26 | cd $pkgname-$pkgver 27 | 28 | make DESTDIR="$pkgdir" install 29 | 30 | for i in AUTHORS NEWS COPYING README ChangeLog TODO INSTALL; do 31 | install -Dm644 $i "$pkgdir/usr/share/doc/$pkgname/$i" 32 | done 33 | } 34 | -------------------------------------------------------------------------------- /colordiff/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=colordiff 4 | pkgver=1.0.16 5 | pkgrel=1 6 | pkgdesc="A Perl script wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting" 7 | arch=('any') 8 | url="http://www.colordiff.org/" 9 | license=('GPL') 10 | depends=('perl' 'diffutils') 11 | backup=('etc/colordiffrc' 'etc/colordiffrc-lightbg') 12 | source=(http://www.colordiff.org/${pkgname}-${pkgver}.tar.gz) 13 | sha256sums=('eaf1cfe17dd0e820d38a0b24b0a402eba68b32e9bf9e7791ca2d1831029f138b') 14 | 15 | package() { 16 | cd ${pkgname}-${pkgver} 17 | 18 | make DESTDIR="${pkgdir}" INSTALL_DIR=/usr/bin MAN_DIR=/usr/share/man/man1 install 19 | install -m644 colordiffrc-lightbg "${pkgdir}/etc/colordiffrc-lightbg" 20 | } 21 | -------------------------------------------------------------------------------- /cowsay/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=cowsay 4 | pkgver=3.03 5 | pkgrel=9 6 | pkgdesc='Configurable talking cow (and a few other creatures)' 7 | arch=('any') 8 | url='http://www.nog.net/~tony/warez/' 9 | license=('PerlArtistic' 'GPL') 10 | depends=('perl') 11 | source=(http://www.nog.net/~tony/warez/${pkgname}-${pkgver}.tar.gz 12 | cowsay.patch) 13 | sha256sums=('0b8672a7ac2b51183780db72618b42af8ec1ce02f6c05fe612510b650540b2af' 14 | 'aa88442a31f01ffe5884b3ae974ed1ced23d860859d7f2234cdcd3ac437fc17f') 15 | 16 | build() { 17 | cd ${srcdir}/${pkgname}-${pkgver} 18 | patch -p1 -i $srcdir/cowsay.patch 19 | sed -i 's|/man/|/share/man/|' install.sh 20 | } 21 | 22 | package() { 23 | cd ${srcdir}/${pkgname}-${pkgver} 24 | echo "${pkgdir}/usr" | ./install.sh 25 | # This one is not a valid '.cow' file 26 | rm ${pkgdir}/usr/share/cows/mech-and-cow 27 | } 28 | -------------------------------------------------------------------------------- /cowsay/cowsay.patch: -------------------------------------------------------------------------------- 1 | --- cowsay-3.03/install.sh 1999-11-01 21:19:21.000000000 +0100 2 | +++ cowsay-3.03-new/install.sh 2003-08-15 17:14:23.000000000 +0200 3 | @@ -67,7 +67,7 @@ 4 | echo Okay, time to install this puppy. 5 | 6 | echo s,%BANGPERL%,!$usethisperl,\; > install.pl 7 | -echo s,%PREFIX%,$PREFIX,\; >> install.pl 8 | +echo s,%PREFIX%,/usr,\; >> install.pl 9 | set -x 10 | mkdir -p $PREFIX/bin || (mkdir $PREFIX; mkdir $PREFIX/bin) 11 | $usethisperl -p install.pl cowsay > $PREFIX/bin/cowsay 12 | -------------------------------------------------------------------------------- /cygutils/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=cygutils 4 | pkgver=1.4.15 5 | pkgrel=2 6 | pkgdesc="A collection of simple cygwin utilities" 7 | arch=('i686' 'x86_64') 8 | url="http://cygutils.fruitbat.org/cygutils-package/index.html" 9 | license=('custom') 10 | depends=('popt') 11 | makedepends=('gettext-devel' 'libtool') 12 | source=("http://mirror.bit.edu.cn/cygwin/x86_64/release/cygutils/${pkgname}-${pkgver}-${pkgrel}-src.tar.xz") 13 | sha1sums=('85bd85273c20baa1f6d92c374cd15f6aefb8a6b1') 14 | 15 | build() { 16 | cd "${srcdir}" 17 | tar -xf ${pkgname}-${pkgver}-${pkgrel}.src/cygwin-${pkgname}-${pkgver}.tar.bz2 18 | cd cygwin-${pkgname} 19 | ./bootstrap 20 | ./configure --prefix=/usr 21 | 22 | make 23 | } 24 | 25 | package() { 26 | cd "${srcdir}/cygwin-${pkgname}" 27 | make DESTDIR="${pkgdir}" install 28 | install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE 29 | } 30 | -------------------------------------------------------------------------------- /figlet/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=figlet 4 | pkgver=2.2.5 5 | pkgrel=2 6 | pkgdesc="A program for making large letters out of ordinary text" 7 | arch=('i686' 'x86_64') 8 | url="http://www.figlet.org/" 9 | license=('BSD') 10 | source=(ftp://ftp.figlet.org/pub/figlet/program/unix/${pkgname}-${pkgver}.tar.gz) 11 | sha1sums=('dda696958c161bd71d6590152c94c4f705415727') 12 | 13 | build() { 14 | cd ${pkgname}-${pkgver} 15 | sed -i 's/-DTLF_FONTS/# -DTLF_FONTS/g' Makefile 16 | make DEFAULTFONTDIR=/usr/share/figlet/fonts all 17 | } 18 | 19 | check() { 20 | cd ${pkgname}-${pkgver} 21 | # TLF_FONTS disabled 22 | make check || true 23 | } 24 | 25 | package() { 26 | cd ${pkgname}-${pkgver} 27 | make DESTDIR="${pkgdir}" BINDIR=/usr/bin MANDIR=/usr/share/man \ 28 | DEFAULTFONTDIR=/usr/share/figlet/fonts install 29 | install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 30 | } 31 | -------------------------------------------------------------------------------- /hub/PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=hub 2 | pkgver=2.2.3 3 | pkgrel=1 4 | pkgdesc="cli interface for Github" 5 | arch=('any') 6 | url="https://hub.github.com" 7 | depends=('git') 8 | options=('!strip') 9 | license=('MIT') 10 | source=("$pkgname-$pkgver.zip::https://github.com/github/hub/releases/download/v$pkgver/hub-windows-amd64-$pkgver.zip" 11 | "https://raw.githubusercontent.com/github/hub/master/man/hub.1" 12 | "https://raw.githubusercontent.com/github/hub/master/etc/hub.bash_completion.sh" 13 | "https://raw.githubusercontent.com/github/hub/master/etc/hub.zsh_completion" 14 | ) 15 | sha256sums=('3d976de0a9206916d522d4325fee86c5c0de0c11908267f428dcebaff6e30364' 16 | 'c646bcc168ecf619f3d25019ef8bc0b3f90ddd0cba794de89d300e1ac39a99d6' 17 | '3aed893dca5eaf15c584d60e9c837995c960244fea162462cefcc82bf4b59e33' 18 | '9ef7c5493f698a906ae50a5b7bbbff9f97b63871e55efe3fb855cf39d6077a8c') 19 | 20 | package() { 21 | cd "$srcdir" 22 | 23 | install -Dm755 "$srcdir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname" 24 | 25 | install -Dm644 "$srcdir/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 26 | install -Dm644 "$srcdir/hub.bash_completion.sh" "$pkgdir/usr/share/bash-completion/completions/hub" 27 | install -Dm644 "$srcdir/hub.zsh_completion" "$pkgdir/usr/share/zsh/site-functions/_hub" 28 | install -Dm644 "$srcdir/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1" 29 | } 30 | -------------------------------------------------------------------------------- /jq/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=jq 4 | pkgver=1.5 5 | pkgrel=1 6 | pkgdesc='Command-line JSON processor' 7 | arch=('x86_64') 8 | url='http://stedolan.github.io/jq/' 9 | license=('MIT') 10 | source=("https://github.com/stedolan/${pkgname}/releases/download/${pkgname}-1.5/${pkgname}-win64.exe") 11 | md5sums=('5e95f62355b050f7e739fa3660a7cc74') 12 | 13 | package() { 14 | install -Dm755 "${pkgname}-win64.exe" "${pkgdir}/usr/bin/${pkgname}.exe" 15 | } 16 | -------------------------------------------------------------------------------- /jquery/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=jquery 4 | pkgver=2.1.4 5 | pkgrel=1 6 | pkgdesc="Cross-platform JavaScript library designed to simplify the client-side scripting of HTML" 7 | arch=('any') 8 | url="http://jquery.com" 9 | license=('MIT' 'GPL2') 10 | source=("http://code.jquery.com/jquery-${pkgver}.min.js") 11 | sha256sums=('f16ab224bb962910558715c82f58c10c3ed20f153ddfaa199029f141b5b0255c') 12 | 13 | package() { 14 | cd "${srcdir}" 15 | mkdir -p "${pkgdir}/usr/share/${pkgname}" 16 | install -m644 "jquery-${pkgver}.min.js" \ 17 | "${pkgdir}/usr/share/jquery/jquery.min.js" 18 | } 19 | -------------------------------------------------------------------------------- /ncdu/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=ncdu 4 | pkgver=1.11 5 | pkgrel=1 6 | pkgdesc='Disk usage analyzer with an ncurses interface' 7 | url='http://dev.yorhel.nl/ncdu/' 8 | license=('custom:MIT') 9 | depends=('ncurses') 10 | arch=('i686' 'x86_64') 11 | source=("http://dev.yorhel.nl/download/${pkgname}-${pkgver}.tar.gz") 12 | sha1sums=('8f22d713e6d2b28e1f501eee2bd1e03b55550c8d') 13 | 14 | build() { 15 | cd "${srcdir}/${pkgname}-${pkgver}" 16 | sed -i 's|ncurses.h|ncurses/ncurses.h|g' configure src/*.h src/*.c 17 | ./configure --prefix=/usr 18 | make 19 | } 20 | 21 | package() { 22 | cd "${srcdir}/${pkgname}-${pkgver}" 23 | make DESTDIR="${pkgdir}" install 24 | install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 25 | } 26 | -------------------------------------------------------------------------------- /php-bin/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=php-bin 4 | _realname=php 5 | pkgver=7.0.1 6 | pkgrel=1 7 | pkgdesc='An HTML-embedded scripting language' 8 | arch=('x86_64') 9 | license=('PHP') 10 | url='http://www.php.net' 11 | source=("http://windows.php.net/downloads/releases/${_realname}-${pkgver}-nts-Win32-VC14-x64.zip") 12 | md5sums=('d37deceb3ace47783095b94ddeecca59') 13 | OPTIONS=(!strip) 14 | 15 | package() { 16 | cd "${srcdir}" 17 | rm ${_realname}-${pkgver}-nts-Win32-VC14-x64.zip 18 | mkdir -p "${pkgdir}/opt/${pkgname}" 19 | cp -r * "${pkgdir}/opt/${pkgname}" 20 | 21 | mkdir -p "${pkgdir}/usr/bin" 22 | cd "${pkgdir}/usr/bin" 23 | ln -s ../../opt/${pkgname}/*.exe . 24 | } 25 | -------------------------------------------------------------------------------- /php6-bin/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=php6-bin 4 | _realname=php 5 | pkgver=5.6.16 6 | pkgrel=1 7 | pkgdesc='An HTML-embedded scripting language' 8 | arch=('x86_64') 9 | license=('PHP') 10 | url='http://www.php.net' 11 | source=("http://windows.php.net/downloads/releases/${_realname}-${pkgver}-nts-Win32-VC11-x64.zip") 12 | md5sums=('6a15e5aa93a51ea680e105da08e35f1a') 13 | OPTIONS=(!strip) 14 | 15 | package() { 16 | cd "${srcdir}" 17 | rm ${pkgname}-${pkgver}-nts-Win32-VC11-x64.zip 18 | mkdir -p "${pkgdir}/opt/${_realname}" 19 | cp -r * "${pkgdir}/opt/${_realname}" 20 | 21 | mkdir -p "${pkgdir}/usr/bin" 22 | cd "${pkgdir}/usr/bin" 23 | ln -s ../../opt/${_realname}/*.exe . 24 | } 25 | -------------------------------------------------------------------------------- /popt/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=popt 4 | pkgver=1.16 5 | pkgrel=7 6 | pkgdesc="A commandline option parser" 7 | arch=('i686' 'x86_64') 8 | url="http://rpm5.org" 9 | license=('custom') 10 | source=(http://rpm5.org/files/${pkgname}/${pkgname}-${pkgver}.tar.gz) 11 | sha1sums=('cfe94a15a2404db85858a81ff8de27c8ff3e235e') 12 | 13 | build() { 14 | cd "${srcdir}/${pkgname}-${pkgver}" 15 | ./configure --prefix=/usr 16 | 17 | if [ $(grep '^static int$' poptconfig.c | wc -l) -ne 1 ]; then 18 | exit 1 19 | fi 20 | sed -i 's/^static int$/int/g' poptconfig.c 21 | 22 | make 23 | } 24 | 25 | package() { 26 | cd "${srcdir}/${pkgname}-${pkgver}" 27 | make DESTDIR="${pkgdir}" install 28 | install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE 29 | } 30 | -------------------------------------------------------------------------------- /ranger/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=ranger 4 | pkgver=1.7.2 5 | pkgrel=1 6 | pkgdesc='A simple, vim-like file manager' 7 | arch=('any') 8 | url='http://ranger.nongnu.org' 9 | license=('GPL') 10 | depends=('python') 11 | optdepends=( 12 | 'python-chardet: in case of encoding detection problems' 13 | 'sudo: to use the "run as root"-feature' 14 | 'libcaca: for ASCII-art image previews' 15 | 'highlight: for syntax highlighting of code' 16 | 'atool: for previews of archives' 17 | 'w3m: for previews of images and html pages' 18 | 'lynx: for previews of html pages' 19 | 'elinks: for previews of html pages' 20 | 'poppler: for pdf previews' 21 | 'transmission-cli: for viewing bittorrent information' 22 | 'mediainfo: for viewing information about media files' 23 | 'perl-image-exiftool: for viewing information about media files') 24 | conflicts=('ranger-git') 25 | source=("http://ranger.nongnu.org/${pkgname}-${pkgver}.tar.gz") 26 | md5sums=('cc436fe2035a024755a1cad255bffaaf') 27 | 28 | package() { 29 | cd "${srcdir}/${pkgname}-${pkgver}" 30 | 31 | # Replace "python" with the python binary you want ranger to use! 32 | # (python 2.6 and >=3.1 supported, below 2.6 will certainly not work.) 33 | python setup.py -q install --root="${pkgdir}" --optimize=1 34 | } 35 | -------------------------------------------------------------------------------- /remarshal/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=remarshal 4 | pkgver=0.3.0 5 | pkgrel=1 6 | pkgdesc="Convert between TOML, YAML and JSON" 7 | arch=('i686' 'x86_64') 8 | makedepends=('git') # go 9 | url="https://github.com/dbohdan/remarshal" 10 | license=('MIT') 11 | options=('!strip' '!emptydirs') 12 | source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/dbohdan/$pkgname/tar.gz/v$pkgver) 13 | sha256sums=('b011d955bac62253dbfdb79abfa37b0a1f175618f2707ebbd0337532672ce683') 14 | 15 | prepare() { 16 | msg 'Fetching toml go bindings...' 17 | GOPATH="$srcdir" go get -d github.com/BurntSushi/toml 18 | 19 | msg 'Fetching yaml go bindings...' 20 | GOPATH="$srcdir" go get -d gopkg.in/yaml.v2 21 | } 22 | 23 | build() { 24 | cd "$srcdir/$pkgname-$pkgver" 25 | 26 | msg 'Building...' 27 | GOPATH="$srcdir" go build remarshal.go 28 | } 29 | 30 | package() { 31 | cd "$srcdir/$pkgname-$pkgver" 32 | 33 | msg 'Installing license...' 34 | install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 35 | 36 | msg 'Installing documentation...' 37 | install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" 38 | 39 | msg 'Installing...' 40 | install -Dm 755 remarshal "$pkgdir/usr/bin/remarshal" 41 | 42 | msg 'Cleaning up pkgdir...' 43 | find "$pkgdir" -type d -name .git -exec rm -r '{}' + 44 | find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' + 45 | } 46 | -------------------------------------------------------------------------------- /sl/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=sl 4 | pkgver=5.02 5 | pkgrel=1 6 | pkgdesc='Steam Locomotive runs across your terminal when you type "sl" as you meant to type "ls".' 7 | arch=('i686' 'x86_64') 8 | url="http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html" 9 | license=('custom') 10 | depends=('ncurses') 11 | source=("$pkgname-$pkgver.tar.gz::https://github.com/mtoyoda/sl/archive/$pkgver.tar.gz") 12 | md5sums=('5d5fe203eb19598821647ba8db5dde6c') 13 | 14 | build() { 15 | cd "$srcdir/sl-$pkgver" 16 | 17 | cc $CFLAGS -o sl sl.c -lncurses -I/usr/include/ncurses 18 | gzip -9 -f sl.1 19 | } 20 | 21 | package() { 22 | cd "$srcdir/sl-$pkgver" 23 | 24 | install -Dm 775 sl "$pkgdir/usr/bin/sl" 25 | install -Dm 644 sl.1.gz "$pkgdir/usr/share/man/man1/sl.1.gz" 26 | install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 27 | } 28 | -------------------------------------------------------------------------------- /w3m/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=w3m 4 | pkgver=0.5.3 5 | pkgrel=1 6 | pkgdesc='Text-based Web browser, as well as pager' 7 | url='http://w3m.sourceforge.net/' 8 | license=('custom') 9 | arch=('i686' 'x86_64') 10 | makedepends=('libgc-devel' 'openssl-devel' 'ncurses-devel') 11 | depends=('openssl' 'libgc' 'ncurses') 12 | source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz" 13 | 'form_unknown.patch' 14 | 'file_handle.patch' 15 | 'https.patch' 16 | 'cygwin.patch') 17 | sha1sums=('444b6c8cf7094ee95f8e9de96b37f814b9d83237' 18 | '23d648033ad77f3c67d370c62cf7b7ed86b5c6f2' 19 | '457de43be7eabc652614461a7ab25e3ba76b2aff' 20 | '66affb2f695fe0bdde25cf774642bfd6a9404e88' 21 | 'a6ae3127d1e827774cbd26420ea5c0b22437ad48') 22 | 23 | prepare() { 24 | cd "${srcdir}/${pkgname}-${pkgver}" 25 | ls ../*.patch | xargs -i patch -p1 -i {} 26 | } 27 | 28 | build() { 29 | cd "${srcdir}/${pkgname}-${pkgver}" 30 | ./configure \ 31 | --build=x86_64-cygwin \ 32 | --prefix=/usr \ 33 | --libexecdir=/usr/lib \ 34 | --with-termlib=ncurses \ 35 | --disable-w3mmailer \ 36 | --disable-mouse \ 37 | 38 | make 39 | } 40 | 41 | package() { 42 | cd "${srcdir}/${pkgname}-${pkgver}" 43 | make DESTDIR="${pkgdir}" install 44 | 45 | install -d "${pkgdir}"/usr/share/{doc,licenses}/"${pkgname}" 46 | find doc/* | grep -v CVS | xargs -i install -m644 "{}" "${pkgdir}/usr/share/doc/${pkgname}" 47 | ln -s ../../doc/"${pkgname}"/README "${pkgdir}/usr/share/licenses/${pkgname}" 48 | } 49 | -------------------------------------------------------------------------------- /w3m/cygwin.patch: -------------------------------------------------------------------------------- 1 | diff -ur old/config.guess new/config.guess 2 | --- old/config.guess 2004-08-04 13:32:27.000000000 -0400 3 | +++ new/config.guess 2013-04-28 18:43:59.480227700 -0400 4 | @@ -1,13 +1,14 @@ 5 | #! /bin/sh 6 | # Attempt to guess a canonical system name. 7 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 8 | -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 9 | +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 10 | +# 2011, 2012, 2013 Free Software Foundation, Inc. 11 | 12 | -timestamp='2004-03-12' 13 | +timestamp='2012-12-29' 14 | 15 | # This file is free software; you can redistribute it and/or modify it 16 | # under the terms of the GNU General Public License as published by 17 | -# the Free Software Foundation; either version 2 of the License, or 18 | +# the Free Software Foundation; either version 3 of the License, or 19 | # (at your option) any later version. 20 | # 21 | # This program is distributed in the hope that it will be useful, but 22 | @@ -16,24 +17,22 @@ 23 | # General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | -# along with this program; if not, write to the Free Software 27 | -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | +# along with this program; if not, see . 29 | # 30 | # As a special exception to the GNU General Public License, if you 31 | # distribute this file as part of a program that contains a 32 | # configuration script generated by Autoconf, you may include it under 33 | -# the same distribution terms that you use for the rest of that program. 34 | - 35 | -# Originally written by Per Bothner . 36 | -# Please send patches to . Submit a context 37 | -# diff and a properly formatted ChangeLog entry. 38 | +# the same distribution terms that you use for the rest of that 39 | +# program. This Exception is an additional permission under section 7 40 | +# of the GNU General Public License, version 3 ("GPLv3"). 41 | +# 42 | +# Originally written by Per Bothner. 43 | # 44 | -# This script attempts to guess a canonical system name similar to 45 | -# config.sub. If it succeeds, it prints the system name on stdout, and 46 | -# exits with 0. Otherwise, it exits with 1. 47 | +# You can get the latest version of this script from: 48 | +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 49 | # 50 | -# The plan is that this can be called by configure scripts if you 51 | -# don't specify an explicit build system type. 52 | +# Please send patches with a ChangeLog entry to config-patches@gnu.org. 53 | + 54 | 55 | me=`echo "$0" | sed -e 's,.*/,,'` 56 | 57 | @@ -53,8 +52,9 @@ 58 | GNU config.guess ($timestamp) 59 | 60 | Originally written by Per Bothner. 61 | -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 62 | -Free Software Foundation, Inc. 63 | +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 64 | +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 65 | +2012, 2013 Free Software Foundation, Inc. 66 | 67 | This is free software; see the source for copying conditions. There is NO 68 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 69 | @@ -66,11 +66,11 @@ 70 | while test $# -gt 0 ; do 71 | case $1 in 72 | --time-stamp | --time* | -t ) 73 | - echo "$timestamp" ; exit 0 ;; 74 | + echo "$timestamp" ; exit ;; 75 | --version | -v ) 76 | - echo "$version" ; exit 0 ;; 77 | + echo "$version" ; exit ;; 78 | --help | --h* | -h ) 79 | - echo "$usage"; exit 0 ;; 80 | + echo "$usage"; exit ;; 81 | -- ) # Stop option processing 82 | shift; break ;; 83 | - ) # Use stdin as input. 84 | @@ -104,7 +104,7 @@ 85 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 86 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 87 | : ${TMPDIR=/tmp} ; 88 | - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 89 | + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 90 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 91 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 92 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 93 | @@ -123,7 +123,7 @@ 94 | ;; 95 | ,,*) CC_FOR_BUILD=$CC ;; 96 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; 97 | -esac ;' 98 | +esac ; set_cc_for_build= ;' 99 | 100 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 101 | # (ghazi@noc.rutgers.edu 1994-08-24) 102 | @@ -141,7 +141,7 @@ 103 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 104 | *:NetBSD:*:*) 105 | # NetBSD (nbsd) targets should (where applicable) match one or 106 | - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 107 | + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 108 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 109 | # switched to ELF, *-*-netbsd* would select the old 110 | # object file format. This provides both forward 111 | @@ -158,6 +158,7 @@ 112 | arm*) machine=arm-unknown ;; 113 | sh3el) machine=shl-unknown ;; 114 | sh3eb) machine=sh-unknown ;; 115 | + sh5el) machine=sh5le-unknown ;; 116 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 117 | esac 118 | # The Operating System including object format, if it has switched 119 | @@ -166,7 +167,7 @@ 120 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) 121 | eval $set_cc_for_build 122 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 123 | - | grep __ELF__ >/dev/null 124 | + | grep -q __ELF__ 125 | then 126 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 127 | # Return netbsd for either. FIX? 128 | @@ -176,7 +177,7 @@ 129 | fi 130 | ;; 131 | *) 132 | - os=netbsd 133 | + os=netbsd 134 | ;; 135 | esac 136 | # The OS release 137 | @@ -196,71 +197,34 @@ 138 | # contains redundant information, the shorter form: 139 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 140 | echo "${machine}-${os}${release}" 141 | - exit 0 ;; 142 | - amd64:OpenBSD:*:*) 143 | - echo x86_64-unknown-openbsd${UNAME_RELEASE} 144 | - exit 0 ;; 145 | - amiga:OpenBSD:*:*) 146 | - echo m68k-unknown-openbsd${UNAME_RELEASE} 147 | - exit 0 ;; 148 | - arc:OpenBSD:*:*) 149 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} 150 | - exit 0 ;; 151 | - cats:OpenBSD:*:*) 152 | - echo arm-unknown-openbsd${UNAME_RELEASE} 153 | - exit 0 ;; 154 | - hp300:OpenBSD:*:*) 155 | - echo m68k-unknown-openbsd${UNAME_RELEASE} 156 | - exit 0 ;; 157 | - mac68k:OpenBSD:*:*) 158 | - echo m68k-unknown-openbsd${UNAME_RELEASE} 159 | - exit 0 ;; 160 | - macppc:OpenBSD:*:*) 161 | - echo powerpc-unknown-openbsd${UNAME_RELEASE} 162 | - exit 0 ;; 163 | - mvme68k:OpenBSD:*:*) 164 | - echo m68k-unknown-openbsd${UNAME_RELEASE} 165 | - exit 0 ;; 166 | - mvme88k:OpenBSD:*:*) 167 | - echo m88k-unknown-openbsd${UNAME_RELEASE} 168 | - exit 0 ;; 169 | - mvmeppc:OpenBSD:*:*) 170 | - echo powerpc-unknown-openbsd${UNAME_RELEASE} 171 | - exit 0 ;; 172 | - pegasos:OpenBSD:*:*) 173 | - echo powerpc-unknown-openbsd${UNAME_RELEASE} 174 | - exit 0 ;; 175 | - pmax:OpenBSD:*:*) 176 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} 177 | - exit 0 ;; 178 | - sgi:OpenBSD:*:*) 179 | - echo mipseb-unknown-openbsd${UNAME_RELEASE} 180 | - exit 0 ;; 181 | - sun3:OpenBSD:*:*) 182 | - echo m68k-unknown-openbsd${UNAME_RELEASE} 183 | - exit 0 ;; 184 | - wgrisc:OpenBSD:*:*) 185 | - echo mipsel-unknown-openbsd${UNAME_RELEASE} 186 | - exit 0 ;; 187 | + exit ;; 188 | + *:Bitrig:*:*) 189 | + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 190 | + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 191 | + exit ;; 192 | *:OpenBSD:*:*) 193 | - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 194 | - exit 0 ;; 195 | + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 196 | + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 197 | + exit ;; 198 | *:ekkoBSD:*:*) 199 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 200 | - exit 0 ;; 201 | + exit ;; 202 | + *:SolidBSD:*:*) 203 | + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 204 | + exit ;; 205 | macppc:MirBSD:*:*) 206 | - echo powerppc-unknown-mirbsd${UNAME_RELEASE} 207 | - exit 0 ;; 208 | + echo powerpc-unknown-mirbsd${UNAME_RELEASE} 209 | + exit ;; 210 | *:MirBSD:*:*) 211 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 212 | - exit 0 ;; 213 | + exit ;; 214 | alpha:OSF1:*:*) 215 | case $UNAME_RELEASE in 216 | *4.0) 217 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 218 | ;; 219 | *5.*) 220 | - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 221 | + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 222 | ;; 223 | esac 224 | # According to Compaq, /usr/sbin/psrinfo has been available on 225 | @@ -306,40 +270,46 @@ 226 | # A Xn.n version is an unreleased experimental baselevel. 227 | # 1.2 uses "1.2" for uname -r. 228 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 229 | - exit 0 ;; 230 | - Alpha*:OpenVMS:*:*) 231 | - echo alpha-hp-vms 232 | - exit 0 ;; 233 | + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 234 | + exitcode=$? 235 | + trap '' 0 236 | + exit $exitcode ;; 237 | Alpha\ *:Windows_NT*:*) 238 | # How do we know it's Interix rather than the generic POSIX subsystem? 239 | # Should we change UNAME_MACHINE based on the output of uname instead 240 | # of the specific Alpha model? 241 | echo alpha-pc-interix 242 | - exit 0 ;; 243 | + exit ;; 244 | 21064:Windows_NT:50:3) 245 | echo alpha-dec-winnt3.5 246 | - exit 0 ;; 247 | + exit ;; 248 | Amiga*:UNIX_System_V:4.0:*) 249 | echo m68k-unknown-sysv4 250 | - exit 0;; 251 | + exit ;; 252 | *:[Aa]miga[Oo][Ss]:*:*) 253 | echo ${UNAME_MACHINE}-unknown-amigaos 254 | - exit 0 ;; 255 | + exit ;; 256 | *:[Mm]orph[Oo][Ss]:*:*) 257 | echo ${UNAME_MACHINE}-unknown-morphos 258 | - exit 0 ;; 259 | + exit ;; 260 | *:OS/390:*:*) 261 | echo i370-ibm-openedition 262 | - exit 0 ;; 263 | + exit ;; 264 | + *:z/VM:*:*) 265 | + echo s390-ibm-zvmoe 266 | + exit ;; 267 | *:OS400:*:*) 268 | - echo powerpc-ibm-os400 269 | - exit 0 ;; 270 | + echo powerpc-ibm-os400 271 | + exit ;; 272 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 273 | echo arm-acorn-riscix${UNAME_RELEASE} 274 | - exit 0;; 275 | + exit ;; 276 | + arm*:riscos:*:*|arm*:RISCOS:*:*) 277 | + echo arm-unknown-riscos 278 | + exit ;; 279 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 280 | echo hppa1.1-hitachi-hiuxmpp 281 | - exit 0;; 282 | + exit ;; 283 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 284 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 285 | if test "`(/bin/universe) 2>/dev/null`" = att ; then 286 | @@ -347,32 +317,51 @@ 287 | else 288 | echo pyramid-pyramid-bsd 289 | fi 290 | - exit 0 ;; 291 | + exit ;; 292 | NILE*:*:*:dcosx) 293 | echo pyramid-pyramid-svr4 294 | - exit 0 ;; 295 | + exit ;; 296 | DRS?6000:unix:4.0:6*) 297 | echo sparc-icl-nx6 298 | - exit 0 ;; 299 | - DRS?6000:UNIX_SV:4.2*:7*) 300 | + exit ;; 301 | + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 302 | case `/usr/bin/uname -p` in 303 | - sparc) echo sparc-icl-nx7 && exit 0 ;; 304 | + sparc) echo sparc-icl-nx7; exit ;; 305 | esac ;; 306 | + s390x:SunOS:*:*) 307 | + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 308 | + exit ;; 309 | sun4H:SunOS:5.*:*) 310 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 311 | - exit 0 ;; 312 | + exit ;; 313 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 314 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 315 | - exit 0 ;; 316 | - i86pc:SunOS:5.*:*) 317 | - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 318 | - exit 0 ;; 319 | + exit ;; 320 | + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 321 | + echo i386-pc-auroraux${UNAME_RELEASE} 322 | + exit ;; 323 | + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 324 | + eval $set_cc_for_build 325 | + SUN_ARCH="i386" 326 | + # If there is a compiler, see if it is configured for 64-bit objects. 327 | + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 328 | + # This test works for both compilers. 329 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 330 | + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 331 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 332 | + grep IS_64BIT_ARCH >/dev/null 333 | + then 334 | + SUN_ARCH="x86_64" 335 | + fi 336 | + fi 337 | + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 338 | + exit ;; 339 | sun4*:SunOS:6*:*) 340 | # According to config.sub, this is the proper way to canonicalize 341 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but 342 | # it's likely to be more like Solaris than SunOS4. 343 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 344 | - exit 0 ;; 345 | + exit ;; 346 | sun4*:SunOS:*:*) 347 | case "`/usr/bin/arch -k`" in 348 | Series*|S4*) 349 | @@ -381,10 +370,10 @@ 350 | esac 351 | # Japanese Language versions have a version number like `4.1.3-JL'. 352 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 353 | - exit 0 ;; 354 | + exit ;; 355 | sun3*:SunOS:*:*) 356 | echo m68k-sun-sunos${UNAME_RELEASE} 357 | - exit 0 ;; 358 | + exit ;; 359 | sun*:*:4.2BSD:*) 360 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 361 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 362 | @@ -396,10 +385,10 @@ 363 | echo sparc-sun-sunos${UNAME_RELEASE} 364 | ;; 365 | esac 366 | - exit 0 ;; 367 | + exit ;; 368 | aushp:SunOS:*:*) 369 | echo sparc-auspex-sunos${UNAME_RELEASE} 370 | - exit 0 ;; 371 | + exit ;; 372 | # The situation for MiNT is a little confusing. The machine name 373 | # can be virtually everything (everything which is not 374 | # "atarist" or "atariste" at least should have a processor 375 | @@ -409,41 +398,41 @@ 376 | # MiNT. But MiNT is downward compatible to TOS, so this should 377 | # be no problem. 378 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 379 | - echo m68k-atari-mint${UNAME_RELEASE} 380 | - exit 0 ;; 381 | + echo m68k-atari-mint${UNAME_RELEASE} 382 | + exit ;; 383 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 384 | echo m68k-atari-mint${UNAME_RELEASE} 385 | - exit 0 ;; 386 | + exit ;; 387 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 388 | - echo m68k-atari-mint${UNAME_RELEASE} 389 | - exit 0 ;; 390 | + echo m68k-atari-mint${UNAME_RELEASE} 391 | + exit ;; 392 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 393 | - echo m68k-milan-mint${UNAME_RELEASE} 394 | - exit 0 ;; 395 | + echo m68k-milan-mint${UNAME_RELEASE} 396 | + exit ;; 397 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 398 | - echo m68k-hades-mint${UNAME_RELEASE} 399 | - exit 0 ;; 400 | + echo m68k-hades-mint${UNAME_RELEASE} 401 | + exit ;; 402 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 403 | - echo m68k-unknown-mint${UNAME_RELEASE} 404 | - exit 0 ;; 405 | + echo m68k-unknown-mint${UNAME_RELEASE} 406 | + exit ;; 407 | m68k:machten:*:*) 408 | echo m68k-apple-machten${UNAME_RELEASE} 409 | - exit 0 ;; 410 | + exit ;; 411 | powerpc:machten:*:*) 412 | echo powerpc-apple-machten${UNAME_RELEASE} 413 | - exit 0 ;; 414 | + exit ;; 415 | RISC*:Mach:*:*) 416 | echo mips-dec-mach_bsd4.3 417 | - exit 0 ;; 418 | + exit ;; 419 | RISC*:ULTRIX:*:*) 420 | echo mips-dec-ultrix${UNAME_RELEASE} 421 | - exit 0 ;; 422 | + exit ;; 423 | VAX*:ULTRIX*:*:*) 424 | echo vax-dec-ultrix${UNAME_RELEASE} 425 | - exit 0 ;; 426 | + exit ;; 427 | 2020:CLIX:*:* | 2430:CLIX:*:*) 428 | echo clipper-intergraph-clix${UNAME_RELEASE} 429 | - exit 0 ;; 430 | + exit ;; 431 | mips:*:*:UMIPS | mips:*:*:RISCos) 432 | eval $set_cc_for_build 433 | sed 's/^ //' << EOF >$dummy.c 434 | @@ -467,35 +456,36 @@ 435 | exit (-1); 436 | } 437 | EOF 438 | - $CC_FOR_BUILD -o $dummy $dummy.c \ 439 | - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 440 | - && exit 0 441 | + $CC_FOR_BUILD -o $dummy $dummy.c && 442 | + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 443 | + SYSTEM_NAME=`$dummy $dummyarg` && 444 | + { echo "$SYSTEM_NAME"; exit; } 445 | echo mips-mips-riscos${UNAME_RELEASE} 446 | - exit 0 ;; 447 | + exit ;; 448 | Motorola:PowerMAX_OS:*:*) 449 | echo powerpc-motorola-powermax 450 | - exit 0 ;; 451 | + exit ;; 452 | Motorola:*:4.3:PL8-*) 453 | echo powerpc-harris-powermax 454 | - exit 0 ;; 455 | + exit ;; 456 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 457 | echo powerpc-harris-powermax 458 | - exit 0 ;; 459 | + exit ;; 460 | Night_Hawk:Power_UNIX:*:*) 461 | echo powerpc-harris-powerunix 462 | - exit 0 ;; 463 | + exit ;; 464 | m88k:CX/UX:7*:*) 465 | echo m88k-harris-cxux7 466 | - exit 0 ;; 467 | + exit ;; 468 | m88k:*:4*:R4*) 469 | echo m88k-motorola-sysv4 470 | - exit 0 ;; 471 | + exit ;; 472 | m88k:*:3*:R3*) 473 | echo m88k-motorola-sysv3 474 | - exit 0 ;; 475 | + exit ;; 476 | AViiON:dgux:*:*) 477 | - # DG/UX returns AViiON for all architectures 478 | - UNAME_PROCESSOR=`/usr/bin/uname -p` 479 | + # DG/UX returns AViiON for all architectures 480 | + UNAME_PROCESSOR=`/usr/bin/uname -p` 481 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 482 | then 483 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 484 | @@ -508,29 +498,29 @@ 485 | else 486 | echo i586-dg-dgux${UNAME_RELEASE} 487 | fi 488 | - exit 0 ;; 489 | + exit ;; 490 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) 491 | echo m88k-dolphin-sysv3 492 | - exit 0 ;; 493 | + exit ;; 494 | M88*:*:R3*:*) 495 | # Delta 88k system running SVR3 496 | echo m88k-motorola-sysv3 497 | - exit 0 ;; 498 | + exit ;; 499 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 500 | echo m88k-tektronix-sysv3 501 | - exit 0 ;; 502 | + exit ;; 503 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 504 | echo m68k-tektronix-bsd 505 | - exit 0 ;; 506 | + exit ;; 507 | *:IRIX*:*:*) 508 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 509 | - exit 0 ;; 510 | + exit ;; 511 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 512 | - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 513 | - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 514 | + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 515 | + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 516 | i*86:AIX:*:*) 517 | echo i386-ibm-aix 518 | - exit 0 ;; 519 | + exit ;; 520 | ia64:AIX:*:*) 521 | if [ -x /usr/bin/oslevel ] ; then 522 | IBM_REV=`/usr/bin/oslevel` 523 | @@ -538,7 +528,7 @@ 524 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 525 | fi 526 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 527 | - exit 0 ;; 528 | + exit ;; 529 | *:AIX:2:3) 530 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 531 | eval $set_cc_for_build 532 | @@ -553,15 +543,19 @@ 533 | exit(0); 534 | } 535 | EOF 536 | - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 537 | - echo rs6000-ibm-aix3.2.5 538 | + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 539 | + then 540 | + echo "$SYSTEM_NAME" 541 | + else 542 | + echo rs6000-ibm-aix3.2.5 543 | + fi 544 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 545 | echo rs6000-ibm-aix3.2.4 546 | else 547 | echo rs6000-ibm-aix3.2 548 | fi 549 | - exit 0 ;; 550 | - *:AIX:*:[45]) 551 | + exit ;; 552 | + *:AIX:*:[4567]) 553 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 554 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 555 | IBM_ARCH=rs6000 556 | @@ -574,28 +568,28 @@ 557 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 558 | fi 559 | echo ${IBM_ARCH}-ibm-aix${IBM_REV} 560 | - exit 0 ;; 561 | + exit ;; 562 | *:AIX:*:*) 563 | echo rs6000-ibm-aix 564 | - exit 0 ;; 565 | + exit ;; 566 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) 567 | echo romp-ibm-bsd4.4 568 | - exit 0 ;; 569 | + exit ;; 570 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 571 | echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 572 | - exit 0 ;; # report: romp-ibm BSD 4.3 573 | + exit ;; # report: romp-ibm BSD 4.3 574 | *:BOSX:*:*) 575 | echo rs6000-bull-bosx 576 | - exit 0 ;; 577 | + exit ;; 578 | DPX/2?00:B.O.S.:*:*) 579 | echo m68k-bull-sysv3 580 | - exit 0 ;; 581 | + exit ;; 582 | 9000/[34]??:4.3bsd:1.*:*) 583 | echo m68k-hp-bsd 584 | - exit 0 ;; 585 | + exit ;; 586 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 587 | echo m68k-hp-bsd4.4 588 | - exit 0 ;; 589 | + exit ;; 590 | 9000/[34678]??:HP-UX:*:*) 591 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 592 | case "${UNAME_MACHINE}" in 593 | @@ -604,52 +598,52 @@ 594 | 9000/[678][0-9][0-9]) 595 | if [ -x /usr/bin/getconf ]; then 596 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 597 | - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 598 | - case "${sc_cpu_version}" in 599 | - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 600 | - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 601 | - 532) # CPU_PA_RISC2_0 602 | - case "${sc_kernel_bits}" in 603 | - 32) HP_ARCH="hppa2.0n" ;; 604 | - 64) HP_ARCH="hppa2.0w" ;; 605 | + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 606 | + case "${sc_cpu_version}" in 607 | + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 608 | + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 609 | + 532) # CPU_PA_RISC2_0 610 | + case "${sc_kernel_bits}" in 611 | + 32) HP_ARCH="hppa2.0n" ;; 612 | + 64) HP_ARCH="hppa2.0w" ;; 613 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 614 | - esac ;; 615 | - esac 616 | + esac ;; 617 | + esac 618 | fi 619 | if [ "${HP_ARCH}" = "" ]; then 620 | eval $set_cc_for_build 621 | - sed 's/^ //' << EOF >$dummy.c 622 | + sed 's/^ //' << EOF >$dummy.c 623 | 624 | - #define _HPUX_SOURCE 625 | - #include 626 | - #include 627 | - 628 | - int main () 629 | - { 630 | - #if defined(_SC_KERNEL_BITS) 631 | - long bits = sysconf(_SC_KERNEL_BITS); 632 | - #endif 633 | - long cpu = sysconf (_SC_CPU_VERSION); 634 | - 635 | - switch (cpu) 636 | - { 637 | - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 638 | - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 639 | - case CPU_PA_RISC2_0: 640 | - #if defined(_SC_KERNEL_BITS) 641 | - switch (bits) 642 | - { 643 | - case 64: puts ("hppa2.0w"); break; 644 | - case 32: puts ("hppa2.0n"); break; 645 | - default: puts ("hppa2.0"); break; 646 | - } break; 647 | - #else /* !defined(_SC_KERNEL_BITS) */ 648 | - puts ("hppa2.0"); break; 649 | - #endif 650 | - default: puts ("hppa1.0"); break; 651 | - } 652 | - exit (0); 653 | - } 654 | + #define _HPUX_SOURCE 655 | + #include 656 | + #include 657 | + 658 | + int main () 659 | + { 660 | + #if defined(_SC_KERNEL_BITS) 661 | + long bits = sysconf(_SC_KERNEL_BITS); 662 | + #endif 663 | + long cpu = sysconf (_SC_CPU_VERSION); 664 | + 665 | + switch (cpu) 666 | + { 667 | + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 668 | + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 669 | + case CPU_PA_RISC2_0: 670 | + #if defined(_SC_KERNEL_BITS) 671 | + switch (bits) 672 | + { 673 | + case 64: puts ("hppa2.0w"); break; 674 | + case 32: puts ("hppa2.0n"); break; 675 | + default: puts ("hppa2.0"); break; 676 | + } break; 677 | + #else /* !defined(_SC_KERNEL_BITS) */ 678 | + puts ("hppa2.0"); break; 679 | + #endif 680 | + default: puts ("hppa1.0"); break; 681 | + } 682 | + exit (0); 683 | + } 684 | EOF 685 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 686 | test -z "$HP_ARCH" && HP_ARCH=hppa 687 | @@ -657,9 +651,19 @@ 688 | esac 689 | if [ ${HP_ARCH} = "hppa2.0w" ] 690 | then 691 | - # avoid double evaluation of $set_cc_for_build 692 | - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 693 | - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 694 | + eval $set_cc_for_build 695 | + 696 | + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 697 | + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 698 | + # generating 64-bit code. GNU and HP use different nomenclature: 699 | + # 700 | + # $ CC_FOR_BUILD=cc ./config.guess 701 | + # => hppa2.0w-hp-hpux11.23 702 | + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 703 | + # => hppa64-hp-hpux11.23 704 | + 705 | + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 706 | + grep -q __LP64__ 707 | then 708 | HP_ARCH="hppa2.0w" 709 | else 710 | @@ -667,11 +671,11 @@ 711 | fi 712 | fi 713 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} 714 | - exit 0 ;; 715 | + exit ;; 716 | ia64:HP-UX:*:*) 717 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 718 | echo ia64-hp-hpux${HPUX_REV} 719 | - exit 0 ;; 720 | + exit ;; 721 | 3050*:HI-UX:*:*) 722 | eval $set_cc_for_build 723 | sed 's/^ //' << EOF >$dummy.c 724 | @@ -699,224 +703,269 @@ 725 | exit (0); 726 | } 727 | EOF 728 | - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 729 | + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 730 | + { echo "$SYSTEM_NAME"; exit; } 731 | echo unknown-hitachi-hiuxwe2 732 | - exit 0 ;; 733 | + exit ;; 734 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 735 | echo hppa1.1-hp-bsd 736 | - exit 0 ;; 737 | + exit ;; 738 | 9000/8??:4.3bsd:*:*) 739 | echo hppa1.0-hp-bsd 740 | - exit 0 ;; 741 | + exit ;; 742 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 743 | echo hppa1.0-hp-mpeix 744 | - exit 0 ;; 745 | + exit ;; 746 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 747 | echo hppa1.1-hp-osf 748 | - exit 0 ;; 749 | + exit ;; 750 | hp8??:OSF1:*:*) 751 | echo hppa1.0-hp-osf 752 | - exit 0 ;; 753 | + exit ;; 754 | i*86:OSF1:*:*) 755 | if [ -x /usr/sbin/sysversion ] ; then 756 | echo ${UNAME_MACHINE}-unknown-osf1mk 757 | else 758 | echo ${UNAME_MACHINE}-unknown-osf1 759 | fi 760 | - exit 0 ;; 761 | + exit ;; 762 | parisc*:Lites*:*:*) 763 | echo hppa1.1-hp-lites 764 | - exit 0 ;; 765 | + exit ;; 766 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 767 | echo c1-convex-bsd 768 | - exit 0 ;; 769 | + exit ;; 770 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 771 | if getsysinfo -f scalar_acc 772 | then echo c32-convex-bsd 773 | else echo c2-convex-bsd 774 | fi 775 | - exit 0 ;; 776 | + exit ;; 777 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 778 | echo c34-convex-bsd 779 | - exit 0 ;; 780 | + exit ;; 781 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 782 | echo c38-convex-bsd 783 | - exit 0 ;; 784 | + exit ;; 785 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 786 | echo c4-convex-bsd 787 | - exit 0 ;; 788 | + exit ;; 789 | CRAY*Y-MP:*:*:*) 790 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 791 | - exit 0 ;; 792 | + exit ;; 793 | CRAY*[A-Z]90:*:*:*) 794 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 795 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 796 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 797 | -e 's/\.[^.]*$/.X/' 798 | - exit 0 ;; 799 | + exit ;; 800 | CRAY*TS:*:*:*) 801 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 802 | - exit 0 ;; 803 | + exit ;; 804 | CRAY*T3E:*:*:*) 805 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 806 | - exit 0 ;; 807 | + exit ;; 808 | CRAY*SV1:*:*:*) 809 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 810 | - exit 0 ;; 811 | + exit ;; 812 | *:UNICOS/mp:*:*) 813 | - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 814 | - exit 0 ;; 815 | + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 816 | + exit ;; 817 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 818 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 819 | - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 820 | - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 821 | - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 822 | - exit 0 ;; 823 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 824 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 825 | + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 826 | + exit ;; 827 | 5000:UNIX_System_V:4.*:*) 828 | - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 829 | - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 830 | - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 831 | - exit 0 ;; 832 | + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 833 | + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 834 | + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 835 | + exit ;; 836 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 837 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 838 | - exit 0 ;; 839 | + exit ;; 840 | sparc*:BSD/OS:*:*) 841 | echo sparc-unknown-bsdi${UNAME_RELEASE} 842 | - exit 0 ;; 843 | + exit ;; 844 | *:BSD/OS:*:*) 845 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 846 | - exit 0 ;; 847 | + exit ;; 848 | *:FreeBSD:*:*) 849 | - # Determine whether the default compiler uses glibc. 850 | - eval $set_cc_for_build 851 | - sed 's/^ //' << EOF >$dummy.c 852 | - #include 853 | - #if __GLIBC__ >= 2 854 | - LIBC=gnu 855 | - #else 856 | - LIBC= 857 | - #endif 858 | -EOF 859 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 860 | - # GNU/KFreeBSD systems have a "k" prefix to indicate we are using 861 | - # FreeBSD's kernel, but not the complete OS. 862 | - case ${LIBC} in gnu) kernel_only='k' ;; esac 863 | - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 864 | - exit 0 ;; 865 | + UNAME_PROCESSOR=`/usr/bin/uname -p` 866 | + case ${UNAME_PROCESSOR} in 867 | + amd64) 868 | + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 869 | + *) 870 | + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 871 | + esac 872 | + exit ;; 873 | i*:CYGWIN*:*) 874 | echo ${UNAME_MACHINE}-pc-cygwin 875 | - exit 0 ;; 876 | - i*:MINGW*:*) 877 | + exit ;; 878 | + *:MINGW64*:*) 879 | + echo ${UNAME_MACHINE}-pc-mingw64 880 | + exit ;; 881 | + *:MINGW*:*) 882 | echo ${UNAME_MACHINE}-pc-mingw32 883 | - exit 0 ;; 884 | + exit ;; 885 | + i*:MSYS*:*) 886 | + echo ${UNAME_MACHINE}-pc-msys 887 | + exit ;; 888 | + i*:windows32*:*) 889 | + # uname -m includes "-pc" on this system. 890 | + echo ${UNAME_MACHINE}-mingw32 891 | + exit ;; 892 | i*:PW*:*) 893 | echo ${UNAME_MACHINE}-pc-pw32 894 | - exit 0 ;; 895 | - x86:Interix*:[34]*) 896 | - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 897 | - exit 0 ;; 898 | + exit ;; 899 | + *:Interix*:*) 900 | + case ${UNAME_MACHINE} in 901 | + x86) 902 | + echo i586-pc-interix${UNAME_RELEASE} 903 | + exit ;; 904 | + authenticamd | genuineintel | EM64T) 905 | + echo x86_64-unknown-interix${UNAME_RELEASE} 906 | + exit ;; 907 | + IA64) 908 | + echo ia64-unknown-interix${UNAME_RELEASE} 909 | + exit ;; 910 | + esac ;; 911 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 912 | echo i${UNAME_MACHINE}-pc-mks 913 | - exit 0 ;; 914 | + exit ;; 915 | + 8664:Windows_NT:*) 916 | + echo x86_64-pc-mks 917 | + exit ;; 918 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 919 | # How do we know it's Interix rather than the generic POSIX subsystem? 920 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 921 | # UNAME_MACHINE based on the output of uname instead of i386? 922 | echo i586-pc-interix 923 | - exit 0 ;; 924 | + exit ;; 925 | i*:UWIN*:*) 926 | echo ${UNAME_MACHINE}-pc-uwin 927 | - exit 0 ;; 928 | + exit ;; 929 | + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 930 | + echo x86_64-unknown-cygwin 931 | + exit ;; 932 | p*:CYGWIN*:*) 933 | echo powerpcle-unknown-cygwin 934 | - exit 0 ;; 935 | + exit ;; 936 | prep*:SunOS:5.*:*) 937 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 938 | - exit 0 ;; 939 | + exit ;; 940 | *:GNU:*:*) 941 | # the GNU system 942 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 943 | - exit 0 ;; 944 | + exit ;; 945 | *:GNU/*:*:*) 946 | # other systems with GNU libc and userland 947 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 948 | - exit 0 ;; 949 | + exit ;; 950 | i*86:Minix:*:*) 951 | echo ${UNAME_MACHINE}-pc-minix 952 | - exit 0 ;; 953 | + exit ;; 954 | + aarch64:Linux:*:*) 955 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 956 | + exit ;; 957 | + aarch64_be:Linux:*:*) 958 | + UNAME_MACHINE=aarch64_be 959 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 960 | + exit ;; 961 | + alpha:Linux:*:*) 962 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 963 | + EV5) UNAME_MACHINE=alphaev5 ;; 964 | + EV56) UNAME_MACHINE=alphaev56 ;; 965 | + PCA56) UNAME_MACHINE=alphapca56 ;; 966 | + PCA57) UNAME_MACHINE=alphapca56 ;; 967 | + EV6) UNAME_MACHINE=alphaev6 ;; 968 | + EV67) UNAME_MACHINE=alphaev67 ;; 969 | + EV68*) UNAME_MACHINE=alphaev68 ;; 970 | + esac 971 | + objdump --private-headers /bin/sh | grep -q ld.so.1 972 | + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 973 | + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 974 | + exit ;; 975 | arm*:Linux:*:*) 976 | + eval $set_cc_for_build 977 | + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 978 | + | grep -q __ARM_EABI__ 979 | + then 980 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 981 | + else 982 | + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 983 | + | grep -q __ARM_PCS_VFP 984 | + then 985 | + echo ${UNAME_MACHINE}-unknown-linux-gnueabi 986 | + else 987 | + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 988 | + fi 989 | + fi 990 | + exit ;; 991 | + avr32*:Linux:*:*) 992 | echo ${UNAME_MACHINE}-unknown-linux-gnu 993 | - exit 0 ;; 994 | + exit ;; 995 | cris:Linux:*:*) 996 | - echo cris-axis-linux-gnu 997 | - exit 0 ;; 998 | - ia64:Linux:*:*) 999 | - echo ${UNAME_MACHINE}-unknown-linux-gnu 1000 | - exit 0 ;; 1001 | - m32r*:Linux:*:*) 1002 | + echo ${UNAME_MACHINE}-axis-linux-gnu 1003 | + exit ;; 1004 | + crisv32:Linux:*:*) 1005 | + echo ${UNAME_MACHINE}-axis-linux-gnu 1006 | + exit ;; 1007 | + frv:Linux:*:*) 1008 | echo ${UNAME_MACHINE}-unknown-linux-gnu 1009 | - exit 0 ;; 1010 | - m68*:Linux:*:*) 1011 | + exit ;; 1012 | + hexagon:Linux:*:*) 1013 | echo ${UNAME_MACHINE}-unknown-linux-gnu 1014 | - exit 0 ;; 1015 | - mips:Linux:*:*) 1016 | + exit ;; 1017 | + i*86:Linux:*:*) 1018 | + LIBC=gnu 1019 | eval $set_cc_for_build 1020 | sed 's/^ //' << EOF >$dummy.c 1021 | - #undef CPU 1022 | - #undef mips 1023 | - #undef mipsel 1024 | - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 1025 | - CPU=mipsel 1026 | - #else 1027 | - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 1028 | - CPU=mips 1029 | - #else 1030 | - CPU= 1031 | - #endif 1032 | + #ifdef __dietlibc__ 1033 | + LIBC=dietlibc 1034 | #endif 1035 | EOF 1036 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 1037 | - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 1038 | - ;; 1039 | - mips64:Linux:*:*) 1040 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 1041 | + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 1042 | + exit ;; 1043 | + ia64:Linux:*:*) 1044 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1045 | + exit ;; 1046 | + m32r*:Linux:*:*) 1047 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1048 | + exit ;; 1049 | + m68*:Linux:*:*) 1050 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1051 | + exit ;; 1052 | + mips:Linux:*:* | mips64:Linux:*:*) 1053 | eval $set_cc_for_build 1054 | sed 's/^ //' << EOF >$dummy.c 1055 | #undef CPU 1056 | - #undef mips64 1057 | - #undef mips64el 1058 | + #undef ${UNAME_MACHINE} 1059 | + #undef ${UNAME_MACHINE}el 1060 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 1061 | - CPU=mips64el 1062 | + CPU=${UNAME_MACHINE}el 1063 | #else 1064 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 1065 | - CPU=mips64 1066 | + CPU=${UNAME_MACHINE} 1067 | #else 1068 | CPU= 1069 | #endif 1070 | #endif 1071 | EOF 1072 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 1073 | - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 1074 | + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 1075 | + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 1076 | ;; 1077 | - ppc:Linux:*:*) 1078 | - echo powerpc-unknown-linux-gnu 1079 | - exit 0 ;; 1080 | - ppc64:Linux:*:*) 1081 | - echo powerpc64-unknown-linux-gnu 1082 | - exit 0 ;; 1083 | - alpha:Linux:*:*) 1084 | - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 1085 | - EV5) UNAME_MACHINE=alphaev5 ;; 1086 | - EV56) UNAME_MACHINE=alphaev56 ;; 1087 | - PCA56) UNAME_MACHINE=alphapca56 ;; 1088 | - PCA57) UNAME_MACHINE=alphapca56 ;; 1089 | - EV6) UNAME_MACHINE=alphaev6 ;; 1090 | - EV67) UNAME_MACHINE=alphaev67 ;; 1091 | - EV68*) UNAME_MACHINE=alphaev68 ;; 1092 | - esac 1093 | - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 1094 | - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 1095 | - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 1096 | - exit 0 ;; 1097 | + or32:Linux:*:*) 1098 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1099 | + exit ;; 1100 | + padre:Linux:*:*) 1101 | + echo sparc-unknown-linux-gnu 1102 | + exit ;; 1103 | + parisc64:Linux:*:* | hppa64:Linux:*:*) 1104 | + echo hppa64-unknown-linux-gnu 1105 | + exit ;; 1106 | parisc:Linux:*:* | hppa:Linux:*:*) 1107 | # Look for CPU level 1108 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1109 | @@ -924,115 +973,71 @@ 1110 | PA8*) echo hppa2.0-unknown-linux-gnu ;; 1111 | *) echo hppa-unknown-linux-gnu ;; 1112 | esac 1113 | - exit 0 ;; 1114 | - parisc64:Linux:*:* | hppa64:Linux:*:*) 1115 | - echo hppa64-unknown-linux-gnu 1116 | - exit 0 ;; 1117 | + exit ;; 1118 | + ppc64:Linux:*:*) 1119 | + echo powerpc64-unknown-linux-gnu 1120 | + exit ;; 1121 | + ppc:Linux:*:*) 1122 | + echo powerpc-unknown-linux-gnu 1123 | + exit ;; 1124 | s390:Linux:*:* | s390x:Linux:*:*) 1125 | echo ${UNAME_MACHINE}-ibm-linux 1126 | - exit 0 ;; 1127 | + exit ;; 1128 | sh64*:Linux:*:*) 1129 | - echo ${UNAME_MACHINE}-unknown-linux-gnu 1130 | - exit 0 ;; 1131 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1132 | + exit ;; 1133 | sh*:Linux:*:*) 1134 | echo ${UNAME_MACHINE}-unknown-linux-gnu 1135 | - exit 0 ;; 1136 | + exit ;; 1137 | sparc:Linux:*:* | sparc64:Linux:*:*) 1138 | echo ${UNAME_MACHINE}-unknown-linux-gnu 1139 | - exit 0 ;; 1140 | + exit ;; 1141 | + tile*:Linux:*:*) 1142 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1143 | + exit ;; 1144 | + vax:Linux:*:*) 1145 | + echo ${UNAME_MACHINE}-dec-linux-gnu 1146 | + exit ;; 1147 | x86_64:Linux:*:*) 1148 | - echo x86_64-unknown-linux-gnu 1149 | - exit 0 ;; 1150 | - i*86:Linux:*:*) 1151 | - # The BFD linker knows what the default object file format is, so 1152 | - # first see if it will tell us. cd to the root directory to prevent 1153 | - # problems with other programs or directories called `ld' in the path. 1154 | - # Set LC_ALL=C to ensure ld outputs messages in English. 1155 | - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 1156 | - | sed -ne '/supported targets:/!d 1157 | - s/[ ][ ]*/ /g 1158 | - s/.*supported targets: *// 1159 | - s/ .*// 1160 | - p'` 1161 | - case "$ld_supported_targets" in 1162 | - elf32-i386) 1163 | - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 1164 | - ;; 1165 | - a.out-i386-linux) 1166 | - echo "${UNAME_MACHINE}-pc-linux-gnuaout" 1167 | - exit 0 ;; 1168 | - coff-i386) 1169 | - echo "${UNAME_MACHINE}-pc-linux-gnucoff" 1170 | - exit 0 ;; 1171 | - "") 1172 | - # Either a pre-BFD a.out linker (linux-gnuoldld) or 1173 | - # one that does not give us useful --help. 1174 | - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 1175 | - exit 0 ;; 1176 | - esac 1177 | - # Determine whether the default compiler is a.out or elf 1178 | - eval $set_cc_for_build 1179 | - sed 's/^ //' << EOF >$dummy.c 1180 | - #include 1181 | - #ifdef __ELF__ 1182 | - # ifdef __GLIBC__ 1183 | - # if __GLIBC__ >= 2 1184 | - LIBC=gnu 1185 | - # else 1186 | - LIBC=gnulibc1 1187 | - # endif 1188 | - # else 1189 | - LIBC=gnulibc1 1190 | - # endif 1191 | - #else 1192 | - #ifdef __INTEL_COMPILER 1193 | - LIBC=gnu 1194 | - #else 1195 | - LIBC=gnuaout 1196 | - #endif 1197 | - #endif 1198 | - #ifdef __dietlibc__ 1199 | - LIBC=dietlibc 1200 | - #endif 1201 | -EOF 1202 | - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 1203 | - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 1204 | - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 1205 | - ;; 1206 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1207 | + exit ;; 1208 | + xtensa*:Linux:*:*) 1209 | + echo ${UNAME_MACHINE}-unknown-linux-gnu 1210 | + exit ;; 1211 | i*86:DYNIX/ptx:4*:*) 1212 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1213 | # earlier versions are messed up and put the nodename in both 1214 | # sysname and nodename. 1215 | echo i386-sequent-sysv4 1216 | - exit 0 ;; 1217 | + exit ;; 1218 | i*86:UNIX_SV:4.2MP:2.*) 1219 | - # Unixware is an offshoot of SVR4, but it has its own version 1220 | - # number series starting with 2... 1221 | - # I am not positive that other SVR4 systems won't match this, 1222 | + # Unixware is an offshoot of SVR4, but it has its own version 1223 | + # number series starting with 2... 1224 | + # I am not positive that other SVR4 systems won't match this, 1225 | # I just have to hope. -- rms. 1226 | - # Use sysv4.2uw... so that sysv4* matches it. 1227 | + # Use sysv4.2uw... so that sysv4* matches it. 1228 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1229 | - exit 0 ;; 1230 | + exit ;; 1231 | i*86:OS/2:*:*) 1232 | # If we were able to find `uname', then EMX Unix compatibility 1233 | # is probably installed. 1234 | echo ${UNAME_MACHINE}-pc-os2-emx 1235 | - exit 0 ;; 1236 | + exit ;; 1237 | i*86:XTS-300:*:STOP) 1238 | echo ${UNAME_MACHINE}-unknown-stop 1239 | - exit 0 ;; 1240 | + exit ;; 1241 | i*86:atheos:*:*) 1242 | echo ${UNAME_MACHINE}-unknown-atheos 1243 | - exit 0 ;; 1244 | - i*86:syllable:*:*) 1245 | + exit ;; 1246 | + i*86:syllable:*:*) 1247 | echo ${UNAME_MACHINE}-pc-syllable 1248 | - exit 0 ;; 1249 | - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1250 | + exit ;; 1251 | + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1252 | echo i386-unknown-lynxos${UNAME_RELEASE} 1253 | - exit 0 ;; 1254 | + exit ;; 1255 | i*86:*DOS:*:*) 1256 | echo ${UNAME_MACHINE}-pc-msdosdjgpp 1257 | - exit 0 ;; 1258 | + exit ;; 1259 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1260 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1261 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1262 | @@ -1040,15 +1045,16 @@ 1263 | else 1264 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1265 | fi 1266 | - exit 0 ;; 1267 | - i*86:*:5:[78]*) 1268 | + exit ;; 1269 | + i*86:*:5:[678]*) 1270 | + # UnixWare 7.x, OpenUNIX and OpenServer 6. 1271 | case `/bin/uname -X | grep "^Machine"` in 1272 | *486*) UNAME_MACHINE=i486 ;; 1273 | *Pentium) UNAME_MACHINE=i586 ;; 1274 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1275 | esac 1276 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1277 | - exit 0 ;; 1278 | + exit ;; 1279 | i*86:*:3.2:*) 1280 | if test -f /usr/options/cb.name; then 1281 | UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then 1311 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1312 | else # Add other i860-SVR4 vendors below as they are discovered. 1313 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1314 | fi 1315 | - exit 0 ;; 1316 | + exit ;; 1317 | mini*:CTIX:SYS*5:*) 1318 | # "miniframe" 1319 | echo m68010-convergent-sysv 1320 | - exit 0 ;; 1321 | + exit ;; 1322 | mc68k:UNIX:SYSTEM5:3.51m) 1323 | echo m68k-convergent-sysv 1324 | - exit 0 ;; 1325 | + exit ;; 1326 | M680?0:D-NIX:5.3:*) 1327 | echo m68k-diab-dnix 1328 | - exit 0 ;; 1329 | - M68*:*:R3V[567]*:*) 1330 | - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1331 | - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) 1332 | + exit ;; 1333 | + M68*:*:R3V[5678]*:*) 1334 | + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1335 | + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 1336 | OS_REL='' 1337 | test -r /etc/.relid \ 1338 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1339 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1340 | - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 1341 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1342 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1343 | - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 1344 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1345 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1346 | - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1347 | - && echo i486-ncr-sysv4 && exit 0 ;; 1348 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1349 | + && { echo i486-ncr-sysv4; exit; } ;; 1350 | + NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1351 | + OS_REL='.3' 1352 | + test -r /etc/.relid \ 1353 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1354 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1355 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1356 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1357 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1358 | + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1359 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1360 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1361 | echo m68k-unknown-lynxos${UNAME_RELEASE} 1362 | - exit 0 ;; 1363 | + exit ;; 1364 | mc68030:UNIX_System_V:4.*:*) 1365 | echo m68k-atari-sysv4 1366 | - exit 0 ;; 1367 | + exit ;; 1368 | TSUNAMI:LynxOS:2.*:*) 1369 | echo sparc-unknown-lynxos${UNAME_RELEASE} 1370 | - exit 0 ;; 1371 | + exit ;; 1372 | rs6000:LynxOS:2.*:*) 1373 | echo rs6000-unknown-lynxos${UNAME_RELEASE} 1374 | - exit 0 ;; 1375 | - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1376 | + exit ;; 1377 | + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1378 | echo powerpc-unknown-lynxos${UNAME_RELEASE} 1379 | - exit 0 ;; 1380 | + exit ;; 1381 | SM[BE]S:UNIX_SV:*:*) 1382 | echo mips-dde-sysv${UNAME_RELEASE} 1383 | - exit 0 ;; 1384 | + exit ;; 1385 | RM*:ReliantUNIX-*:*:*) 1386 | echo mips-sni-sysv4 1387 | - exit 0 ;; 1388 | + exit ;; 1389 | RM*:SINIX-*:*:*) 1390 | echo mips-sni-sysv4 1391 | - exit 0 ;; 1392 | + exit ;; 1393 | *:SINIX-*:*:*) 1394 | if uname -p 2>/dev/null >/dev/null ; then 1395 | UNAME_MACHINE=`(uname -p) 2>/dev/null` 1396 | @@ -1140,68 +1159,97 @@ 1397 | else 1398 | echo ns32k-sni-sysv 1399 | fi 1400 | - exit 0 ;; 1401 | - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1402 | - # says 1403 | - echo i586-unisys-sysv4 1404 | - exit 0 ;; 1405 | + exit ;; 1406 | + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1407 | + # says 1408 | + echo i586-unisys-sysv4 1409 | + exit ;; 1410 | *:UNIX_System_V:4*:FTX*) 1411 | # From Gerald Hewes . 1412 | # How about differentiating between stratus architectures? -djm 1413 | echo hppa1.1-stratus-sysv4 1414 | - exit 0 ;; 1415 | + exit ;; 1416 | *:*:*:FTX*) 1417 | # From seanf@swdc.stratus.com. 1418 | echo i860-stratus-sysv4 1419 | - exit 0 ;; 1420 | + exit ;; 1421 | + i*86:VOS:*:*) 1422 | + # From Paul.Green@stratus.com. 1423 | + echo ${UNAME_MACHINE}-stratus-vos 1424 | + exit ;; 1425 | *:VOS:*:*) 1426 | # From Paul.Green@stratus.com. 1427 | echo hppa1.1-stratus-vos 1428 | - exit 0 ;; 1429 | + exit ;; 1430 | mc68*:A/UX:*:*) 1431 | echo m68k-apple-aux${UNAME_RELEASE} 1432 | - exit 0 ;; 1433 | + exit ;; 1434 | news*:NEWS-OS:6*:*) 1435 | echo mips-sony-newsos6 1436 | - exit 0 ;; 1437 | + exit ;; 1438 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1439 | if [ -d /usr/nec ]; then 1440 | - echo mips-nec-sysv${UNAME_RELEASE} 1441 | + echo mips-nec-sysv${UNAME_RELEASE} 1442 | else 1443 | - echo mips-unknown-sysv${UNAME_RELEASE} 1444 | + echo mips-unknown-sysv${UNAME_RELEASE} 1445 | fi 1446 | - exit 0 ;; 1447 | + exit ;; 1448 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1449 | echo powerpc-be-beos 1450 | - exit 0 ;; 1451 | + exit ;; 1452 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1453 | echo powerpc-apple-beos 1454 | - exit 0 ;; 1455 | + exit ;; 1456 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1457 | echo i586-pc-beos 1458 | - exit 0 ;; 1459 | + exit ;; 1460 | + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1461 | + echo i586-pc-haiku 1462 | + exit ;; 1463 | + x86_64:Haiku:*:*) 1464 | + echo x86_64-unknown-haiku 1465 | + exit ;; 1466 | SX-4:SUPER-UX:*:*) 1467 | echo sx4-nec-superux${UNAME_RELEASE} 1468 | - exit 0 ;; 1469 | + exit ;; 1470 | SX-5:SUPER-UX:*:*) 1471 | echo sx5-nec-superux${UNAME_RELEASE} 1472 | - exit 0 ;; 1473 | + exit ;; 1474 | SX-6:SUPER-UX:*:*) 1475 | echo sx6-nec-superux${UNAME_RELEASE} 1476 | - exit 0 ;; 1477 | + exit ;; 1478 | + SX-7:SUPER-UX:*:*) 1479 | + echo sx7-nec-superux${UNAME_RELEASE} 1480 | + exit ;; 1481 | + SX-8:SUPER-UX:*:*) 1482 | + echo sx8-nec-superux${UNAME_RELEASE} 1483 | + exit ;; 1484 | + SX-8R:SUPER-UX:*:*) 1485 | + echo sx8r-nec-superux${UNAME_RELEASE} 1486 | + exit ;; 1487 | Power*:Rhapsody:*:*) 1488 | echo powerpc-apple-rhapsody${UNAME_RELEASE} 1489 | - exit 0 ;; 1490 | + exit ;; 1491 | *:Rhapsody:*:*) 1492 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1493 | - exit 0 ;; 1494 | + exit ;; 1495 | *:Darwin:*:*) 1496 | - case `uname -p` in 1497 | - *86) UNAME_PROCESSOR=i686 ;; 1498 | - powerpc) UNAME_PROCESSOR=powerpc ;; 1499 | + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1500 | + case $UNAME_PROCESSOR in 1501 | + i386) 1502 | + eval $set_cc_for_build 1503 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1504 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1505 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1506 | + grep IS_64BIT_ARCH >/dev/null 1507 | + then 1508 | + UNAME_PROCESSOR="x86_64" 1509 | + fi 1510 | + fi ;; 1511 | + unknown) UNAME_PROCESSOR=powerpc ;; 1512 | esac 1513 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1514 | - exit 0 ;; 1515 | + exit ;; 1516 | *:procnto*:*:* | *:QNX:[0123456789]*:*) 1517 | UNAME_PROCESSOR=`uname -p` 1518 | if test "$UNAME_PROCESSOR" = "x86"; then 1519 | @@ -1209,22 +1257,28 @@ 1520 | UNAME_MACHINE=pc 1521 | fi 1522 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1523 | - exit 0 ;; 1524 | + exit ;; 1525 | *:QNX:*:4*) 1526 | echo i386-pc-qnx 1527 | - exit 0 ;; 1528 | + exit ;; 1529 | + NEO-?:NONSTOP_KERNEL:*:*) 1530 | + echo neo-tandem-nsk${UNAME_RELEASE} 1531 | + exit ;; 1532 | + NSE-*:NONSTOP_KERNEL:*:*) 1533 | + echo nse-tandem-nsk${UNAME_RELEASE} 1534 | + exit ;; 1535 | NSR-?:NONSTOP_KERNEL:*:*) 1536 | echo nsr-tandem-nsk${UNAME_RELEASE} 1537 | - exit 0 ;; 1538 | + exit ;; 1539 | *:NonStop-UX:*:*) 1540 | echo mips-compaq-nonstopux 1541 | - exit 0 ;; 1542 | + exit ;; 1543 | BS2000:POSIX*:*:*) 1544 | echo bs2000-siemens-sysv 1545 | - exit 0 ;; 1546 | + exit ;; 1547 | DS/*:UNIX_System_V:*:*) 1548 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1549 | - exit 0 ;; 1550 | + exit ;; 1551 | *:Plan9:*:*) 1552 | # "uname -m" is not consistent, so use $cputype instead. 386 1553 | # is converted to i386 for consistency with other x86 1554 | @@ -1235,36 +1289,55 @@ 1555 | UNAME_MACHINE="$cputype" 1556 | fi 1557 | echo ${UNAME_MACHINE}-unknown-plan9 1558 | - exit 0 ;; 1559 | + exit ;; 1560 | *:TOPS-10:*:*) 1561 | echo pdp10-unknown-tops10 1562 | - exit 0 ;; 1563 | + exit ;; 1564 | *:TENEX:*:*) 1565 | echo pdp10-unknown-tenex 1566 | - exit 0 ;; 1567 | + exit ;; 1568 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1569 | echo pdp10-dec-tops20 1570 | - exit 0 ;; 1571 | + exit ;; 1572 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1573 | echo pdp10-xkl-tops20 1574 | - exit 0 ;; 1575 | + exit ;; 1576 | *:TOPS-20:*:*) 1577 | echo pdp10-unknown-tops20 1578 | - exit 0 ;; 1579 | + exit ;; 1580 | *:ITS:*:*) 1581 | echo pdp10-unknown-its 1582 | - exit 0 ;; 1583 | + exit ;; 1584 | SEI:*:*:SEIUX) 1585 | - echo mips-sei-seiux${UNAME_RELEASE} 1586 | - exit 0 ;; 1587 | + echo mips-sei-seiux${UNAME_RELEASE} 1588 | + exit ;; 1589 | *:DragonFly:*:*) 1590 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1591 | - exit 0 ;; 1592 | + exit ;; 1593 | + *:*VMS:*:*) 1594 | + UNAME_MACHINE=`(uname -p) 2>/dev/null` 1595 | + case "${UNAME_MACHINE}" in 1596 | + A*) echo alpha-dec-vms ; exit ;; 1597 | + I*) echo ia64-dec-vms ; exit ;; 1598 | + V*) echo vax-dec-vms ; exit ;; 1599 | + esac ;; 1600 | + *:XENIX:*:SysV) 1601 | + echo i386-pc-xenix 1602 | + exit ;; 1603 | + i*86:skyos:*:*) 1604 | + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1605 | + exit ;; 1606 | + i*86:rdos:*:*) 1607 | + echo ${UNAME_MACHINE}-pc-rdos 1608 | + exit ;; 1609 | + i*86:AROS:*:*) 1610 | + echo ${UNAME_MACHINE}-pc-aros 1611 | + exit ;; 1612 | + x86_64:VMkernel:*:*) 1613 | + echo ${UNAME_MACHINE}-unknown-esx 1614 | + exit ;; 1615 | esac 1616 | 1617 | -#echo '(No uname command or uname output not recognized.)' 1>&2 1618 | -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1619 | - 1620 | eval $set_cc_for_build 1621 | cat >$dummy.c < 1625 | printf ("m68k-sony-newsos%s\n", 1626 | #ifdef NEWSOS4 1627 | - "4" 1628 | + "4" 1629 | #else 1630 | - "" 1631 | + "" 1632 | #endif 1633 | - ); exit (0); 1634 | + ); exit (0); 1635 | #endif 1636 | #endif 1637 | 1638 | #if defined (__arm) && defined (__acorn) && defined (__unix) 1639 | - printf ("arm-acorn-riscix"); exit (0); 1640 | + printf ("arm-acorn-riscix\n"); exit (0); 1641 | #endif 1642 | 1643 | #if defined (hp300) && !defined (hpux) 1644 | @@ -1380,11 +1453,12 @@ 1645 | } 1646 | EOF 1647 | 1648 | -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 1649 | +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1650 | + { echo "$SYSTEM_NAME"; exit; } 1651 | 1652 | # Apollos put the system type in the environment. 1653 | 1654 | -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1655 | +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1656 | 1657 | # Convex versions that predate uname can use getsysinfo(1) 1658 | 1659 | @@ -1393,22 +1467,22 @@ 1660 | case `getsysinfo -f cpu_type` in 1661 | c1*) 1662 | echo c1-convex-bsd 1663 | - exit 0 ;; 1664 | + exit ;; 1665 | c2*) 1666 | if getsysinfo -f scalar_acc 1667 | then echo c32-convex-bsd 1668 | else echo c2-convex-bsd 1669 | fi 1670 | - exit 0 ;; 1671 | + exit ;; 1672 | c34*) 1673 | echo c34-convex-bsd 1674 | - exit 0 ;; 1675 | + exit ;; 1676 | c38*) 1677 | echo c38-convex-bsd 1678 | - exit 0 ;; 1679 | + exit ;; 1680 | c4*) 1681 | echo c4-convex-bsd 1682 | - exit 0 ;; 1683 | + exit ;; 1684 | esac 1685 | fi 1686 | 1687 | @@ -1419,7 +1493,9 @@ 1688 | the operating system you are using. It is advised that you 1689 | download the most up to date version of the config scripts from 1690 | 1691 | - ftp://ftp.gnu.org/pub/gnu/config/ 1692 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1693 | +and 1694 | + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1695 | 1696 | If the version you run ($0) is already up to date, please 1697 | send the following data and any information you think might be 1698 | diff -ur old/main.c new/main.c 1699 | --- old/main.c 2011-01-04 04:42:19.000000000 -0500 1700 | +++ new/main.c 2013-04-28 18:42:08.408034100 -0400 1701 | @@ -789,7 +789,8 @@ 1702 | } 1703 | 1704 | #ifdef USE_BINMODE_STREAM 1705 | - setmode(fileno(stdout), O_BINARY); 1706 | + /* Seems to only be needed for old versions of Cygwin */ 1707 | + /***setmode(fileno(stdout), O_BINARY);***/ 1708 | #endif 1709 | if (!w3m_dump && !w3m_backend) { 1710 | fmInit(); 1711 | @@ -833,7 +834,9 @@ 1712 | mySignal(SIGPIPE, SigPipe); 1713 | #endif 1714 | 1715 | - orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); 1716 | + orig_GC_warn_proc = GC_get_warn_proc(); 1717 | + GC_set_warn_proc(wrap_GC_warn_proc); 1718 | + 1719 | err_msg = Strnew(); 1720 | if (load_argc == 0) { 1721 | /* no URL specified */ 1722 | -------------------------------------------------------------------------------- /w3m/file_handle.patch: -------------------------------------------------------------------------------- 1 | diff -Naur old/istream.c new/istream.c 2 | --- old/istream.c 2011-01-04 20:22:22.000000000 +1100 3 | +++ new/istream.c 2012-07-04 21:50:51.529661517 +1000 4 | @@ -22,8 +22,8 @@ 5 | static void basic_close(int *handle); 6 | static int basic_read(int *handle, char *buf, int len); 7 | 8 | -static void file_close(struct file_handle *handle); 9 | -static int file_read(struct file_handle *handle, char *buf, int len); 10 | +static void file_close(struct file_handle_rofl *handle); 11 | +static int file_read(struct file_handle_rofl *handle, char *buf, int len); 12 | 13 | static int str_read(Str handle, char *buf, int len); 14 | 15 | @@ -114,7 +114,7 @@ 16 | stream = New(union input_stream); 17 | init_base_stream(&stream->base, STREAM_BUF_SIZE); 18 | stream->file.type = IST_FILE; 19 | - stream->file.handle = New(struct file_handle); 20 | + stream->file.handle = New(struct file_handle_rofl); 21 | stream->file.handle->f = f; 22 | if (closep) 23 | stream->file.handle->close = closep; 24 | @@ -658,13 +658,13 @@ 25 | } 26 | 27 | static void 28 | -file_close(struct file_handle *handle) 29 | +file_close(struct file_handle_rofl *handle) 30 | { 31 | handle->close(handle->f); 32 | } 33 | 34 | static int 35 | -file_read(struct file_handle *handle, char *buf, int len) 36 | +file_read(struct file_handle_rofl *handle, char *buf, int len) 37 | { 38 | return fread(buf, 1, len, handle->f); 39 | } 40 | diff -Naur old/istream.h new/istream.h 41 | --- old/istream.h 2003-10-21 02:41:56.000000000 +1000 42 | +++ new/istream.h 2012-07-04 21:50:51.529661517 +1000 43 | @@ -20,7 +20,7 @@ 44 | 45 | typedef struct stream_buffer *StreamBuffer; 46 | 47 | -struct file_handle { 48 | +struct file_handle_rofl { 49 | FILE *f; 50 | void (*close) (); 51 | }; 52 | @@ -53,7 +53,7 @@ 53 | 54 | struct file_stream { 55 | struct stream_buffer stream; 56 | - struct file_handle *handle; 57 | + struct file_handle_rofl *handle; 58 | char type; 59 | char iseos; 60 | int (*read) (); 61 | -------------------------------------------------------------------------------- /w3m/form_unknown.patch: -------------------------------------------------------------------------------- 1 | See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615843 2 | 3 | Index: w3m-git/form.c 4 | =================================================================== 5 | --- w3m-git.orig/form.c 2011-02-28 15:03:36.000000000 +0100 6 | +++ w3m-git/form.c 2011-02-28 15:32:33.000000000 +0100 7 | @@ -196,7 +196,7 @@ 8 | if (!strcasecmp(typestr, _formtypetbl[i])) 9 | return i; 10 | } 11 | - return FORM_UNKNOWN; 12 | + return FORM_INPUT_TEXT; 13 | } 14 | 15 | void 16 | -------------------------------------------------------------------------------- /w3m/https.patch: -------------------------------------------------------------------------------- 1 | Fedora patch; see https://bugzilla.redhat.com/show_bug.cgi?id=707994 2 | 3 | --- old/url.c 2011-01-04 14:52:24.000000000 +0530 4 | +++ new/url.c 2011-09-02 18:25:43.305652690 +0530 5 | @@ -82,11 +82,11 @@ 6 | {"ftp", SCM_FTP}, 7 | {"local", SCM_LOCAL}, 8 | {"file", SCM_LOCAL}, 9 | - /* {"exec", SCM_EXEC}, */ 10 | + {"exec", SCM_EXEC}, 11 | {"nntp", SCM_NNTP}, 12 | - /* {"nntp", SCM_NNTP_GROUP}, */ 13 | + {"nntp", SCM_NNTP_GROUP}, 14 | {"news", SCM_NEWS}, 15 | - /* {"news", SCM_NEWS_GROUP}, */ 16 | + {"news", SCM_NEWS_GROUP}, 17 | {"data", SCM_DATA}, 18 | #ifndef USE_W3MMAILER 19 | {"mailto", SCM_MAILTO}, 20 | -------------------------------------------------------------------------------- /wput/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=wput 4 | pkgver=0.6.2 5 | pkgrel=1 6 | pkgdesc="A command line tool to upload files to FTP site, the opposite to wget" 7 | arch=('i686' 'x86_64') 8 | url="http://wput.sourceforge.net/" 9 | depends=('gnutls>=2.4.1') 10 | license=('GPL') 11 | source=("http://downloads.sourceforge.net/sourceforge/wput/wput-${pkgver}.tgz") 12 | md5sums=('a14c4c13d91d04d6119bdc977e8a8bdf') 13 | 14 | build() { 15 | cd $srcdir/${pkgname}-${pkgver} 16 | ./configure --prefix=/usr --build=x86_64-unknown-cygwin 17 | make 18 | } 19 | 20 | package() { 21 | cd $srcdir/${pkgname}-${pkgver} 22 | install -m755 -d ${pkgdir}/usr/bin 23 | install -m755 -d ${pkgdir}/usr/share/man/man1 24 | make prefix=${pkgdir}/usr install 25 | ln -sf wput $pkgdir/usr/bin/wdel 26 | } 27 | -------------------------------------------------------------------------------- /ydcv/PKGBUILD: -------------------------------------------------------------------------------- 1 | # $Id: PKGBUILD 140380 2015-09-16 16:10:04Z fyan $ 2 | # Maintainer: Felix Yan 3 | # Contributor : Fernando "Firef0x" G.P. da Silva 4 | 5 | pkgname=ydcv 6 | pkgdesc="YouDao Console Version - Simple wrapper for Youdao online translate (Chinese <-> English) service API, as an alternative to the StarDict Console Version (sdcv)" 7 | pkgver=0.4 8 | pkgrel=1 9 | arch=("any") 10 | url="https://github.com/felixonmars/ydcv" 11 | license=("GPL") 12 | depends=('python') 13 | makedepends=('git') 14 | source=("git+https://github.com/felixonmars/${pkgname}.git#tag=$pkgver") 15 | md5sums=('SKIP') 16 | 17 | package() { 18 | cd $pkgname 19 | install -Dm755 ${pkgname}.py "${pkgdir}/usr/bin/$pkgname" 20 | install -Dm644 contrib/zsh_completion "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" 21 | } 22 | 23 | # vim:set ts=2 sw=2 et: 24 | -------------------------------------------------------------------------------- /zsh-completions/ChangeLog: -------------------------------------------------------------------------------- 1 | 0.12.0-2: 2 | drop _salt completions since it is provided by upstream 3 | 4 | 0.12.0-1: 5 | ustream update 6 | -------------------------------------------------------------------------------- /zsh-completions/LICENSE-BSD: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the zsh-users nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /zsh-completions/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) Igor M. Timoshenko 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /zsh-completions/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Gore Liu 2 | 3 | pkgname=zsh-completions 4 | pkgver=0.17.0 5 | pkgrel=1 6 | pkgdesc="Additional completion definitions for Zsh" 7 | arch=(any) 8 | url="https://github.com/zsh-users/zsh-completions" 9 | license=('BSD' 'MIT' 'unknown') 10 | depends=('zsh') 11 | source=("${pkgname}-${pkgver}.tar.gz::https://github.com/zsh-users/${pkgname}/tarball/${pkgver}" 12 | "LICENSE-BSD" 13 | "LICENSE-MIT") 14 | md5sums=('483a752449b280361c09bfa1c704226a' 15 | '4f686c32a301905655f945fbbdd56880' 16 | '159dd6fa77daca30268c2438111becae') 17 | changelog=ChangeLog 18 | 19 | package() { 20 | install -dm755 "${pkgdir}/usr/share/zsh/site-functions" 21 | install -Dm644 "${srcdir}"/zsh-users-${pkgname}-*/src/* "${pkgdir}/usr/share/zsh/site-functions" 22 | 23 | # license 24 | install -Dm644 "${srcdir}/LICENSE-BSD" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-BSD" 25 | install -Dm644 "${srcdir}/LICENSE-MIT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT" 26 | } 27 | 28 | # vim:set ts=2 sw=2 et: 29 | -------------------------------------------------------------------------------- /zsh/Makefile.in.patch: -------------------------------------------------------------------------------- 1 | --- Doc/Makefile.in.orig 2014-08-01 16:50:26.000000000 +0900 2 | +++ Doc/Makefile.in 2014-08-01 16:51:22.000000000 +0900 3 | @@ -319,7 +319,7 @@ 4 | $(INSTALL_DATA) $(sdir)/help/* $(DESTDIR)$(runhelpdir); \ 5 | while read from to; do \ 6 | rm -f $(DESTDIR)$(runhelpdir)/$$to || : ; \ 7 | - $(LN_S) $$from $(DESTDIR)$(runhelpdir)/$$to; \ 8 | + $(LN_S) $(sdir)/help/$$from $(DESTDIR)$(runhelpdir)/$$to; \ 9 | done < $(sdir)/help.txt; \ 10 | fi 11 | .PHONY: install.runhelp 12 | -------------------------------------------------------------------------------- /zsh/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Alexey Pavlov 2 | 3 | pkgbase=zsh 4 | pkgname=('zsh' 'zsh-doc') 5 | pkgver=5.2 6 | pkgrel=1 7 | arch=('i686' 'x86_64') 8 | url='http://www.zsh.org/' 9 | license=('custom') 10 | makedepends=('ncurses-devel' 'pcre-devel' 'libiconv-devel' 'libgdbm-devel' 'texinfo') 11 | source=("http://www.zsh.org/pub/zsh-${pkgver}.tar.gz" 12 | "http://www.zsh.org/pub/zsh-${pkgver}-doc.tar.gz" 13 | 'config.guess::http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' 14 | 'config.sub::http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' 15 | 'zprofile' 16 | Makefile.in.patch 17 | add-pwd-W-option.patch 18 | msysize.patch 19 | zsh-5.0.6-1.patch 20 | msys-symlink-hack.patch) 21 | md5sums=('e79e3edfc133e2091456ca0be6f2ecb5' 22 | 'ecc3be3f0e465ca3c3c56472312515b9' 23 | '3428a06751c63f7aee005f42c714b00e' 24 | '22953cb71756df39bf8ff31389523225' 25 | '24a9335edf77252a7b5f52e079f7aef7' 26 | 'ca9d481e1aa03e864734734d2267afb0' 27 | '51a8f2979ce99db238bc38c2f477df74' 28 | 'edcafce2abb584422877327a9ca7b9de' 29 | '2b3f986cccd301534909b399557973a5' 30 | '79419542f6c2c33cb1a1e209fcd7e98c') 31 | 32 | prepare() { 33 | cd ${srcdir}/${pkgname}-${pkgver} 34 | 35 | patch -p0 -i "${srcdir}/Makefile.in.patch" 36 | patch -p1 -i "${srcdir}/add-pwd-W-option.patch" 37 | patch -p1 -i "${srcdir}/msysize.patch" 38 | patch -p1 -i "${srcdir}/zsh-5.0.6-1.patch" 39 | patch -p1 -i "${srcdir}/msys-symlink-hack.patch" 40 | 41 | autoreconf -fiv 42 | 43 | mv -f ${srcdir}/config.guess ${srcdir}/config.sub ${srcdir}/${pkgname}-${pkgver}/ 44 | # Set correct keymap path 45 | sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys 46 | 47 | # Remove unneeded and conflicting completion scripts 48 | for _fpath in AIX BSD Cygwin Darwin Debian Mandriva openSUSE Redhat Solaris; do 49 | rm -rf Completion/$_fpath 50 | sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd 51 | done 52 | rm -f Completion/Linux/Command/_{pkgtool,rpmbuild,yast} 53 | rm -f Completion/Unix/Command/_{osc,systemd} 54 | } 55 | 56 | build() { 57 | cd ${srcdir}/${pkgname}-${pkgver} 58 | 59 | ./configure --prefix=/usr \ 60 | --build=${CHOST} \ 61 | --host=${CHOST} \ 62 | --docdir=/usr/share/doc/zsh \ 63 | --enable-etcdir=/etc/zsh \ 64 | --enable-zshenv=/etc/zsh/zshenv \ 65 | --enable-zlogin=/etc/zsh/zlogin \ 66 | --enable-zlogout=/etc/zsh/zlogout \ 67 | --enable-zprofile=/etc/zsh/zprofile \ 68 | --enable-zshrc=/etc/zsh/zshrc \ 69 | --enable-maildir-support \ 70 | --with-term-lib='ncursesw' \ 71 | --enable-multibyte \ 72 | --enable-function-subdirs \ 73 | --enable-fndir=/usr/share/zsh/functions \ 74 | --enable-scriptdir=/usr/share/zsh/scripts \ 75 | --with-tcsetpgrp \ 76 | --enable-pcre \ 77 | --disable-cap \ 78 | --enable-zsh-secure-free 79 | make 80 | } 81 | 82 | package_zsh() { 83 | pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX' 84 | depends=('ncurses' 'pcre' 'libiconv' 'gdbm') 85 | backup=('etc/zsh/zprofile') 86 | install=zsh.install 87 | 88 | cd "${srcdir}/${pkgbase}-${pkgver}" 89 | make DESTDIR="${pkgdir}/" install 90 | install -D -m644 "${srcdir}/zprofile" "${pkgdir}/etc/zsh/zprofile" 91 | install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 92 | } 93 | 94 | package_zsh-doc() { 95 | pkgdesc='Info, HTML and PDF format of the ZSH documentation' 96 | install=zsh-doc.install 97 | 98 | cd "${srcdir}/${pkgbase}-${pkgver}" 99 | make DESTDIR="${pkgdir}/" install.info 100 | install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 101 | } 102 | -------------------------------------------------------------------------------- /zsh/add-pwd-W-option.patch: -------------------------------------------------------------------------------- 1 | diff -rupN zsh-5.0.6/Src/builtin.c zsh-5.0.6-patch/Src/builtin.c 2 | --- zsh-5.0.6/Src/builtin.c 2014-08-01 04:41:49.000000000 +1000 3 | +++ zsh-5.0.6-patch/Src/builtin.c 2014-09-26 22:48:35.215974400 +1000 4 | @@ -103,7 +103,7 @@ static struct builtin builtins[] = 5 | BUILTIN("printf", 0, bin_print, 1, -1, BIN_PRINTF, NULL, NULL), 6 | BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL), 7 | BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"), 8 | - BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL), 9 | + BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLPW", NULL), 10 | BUILTIN("r", 0, bin_fc, 0, -1, BIN_R, "IlLnr", NULL), 11 | BUILTIN("read", 0, bin_read, 0, -1, 0, "cd:ek:%lnpqrst:%zu:AE", NULL), 12 | BUILTIN("readonly", BINF_PLUSOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL | BINF_ASSIGN, (HandlerFunc)bin_typeset, 0, -1, 0, "AE:%F:%HL:%R:%TUZ:%afghi:%lptux", "r"), 13 | @@ -672,7 +672,21 @@ int doprintdir = 0; /* set in exec.c (f 14 | int 15 | bin_pwd(UNUSED(char *name), UNUSED(char **argv), Options ops, UNUSED(int func)) 16 | { 17 | - if (OPT_ISSET(ops,'r') || OPT_ISSET(ops,'P') || 18 | + if (OPT_ISSET(ops,'W')) { 19 | + char *wpath = zalloc(PATH_MAX); 20 | + if (cygwin_conv_path(CCP_POSIX_TO_WIN_A, zgetcwd(), wpath, PATH_MAX) < 0) { 21 | + free(wpath); 22 | + perror("cygwin_conv_path"); 23 | + return 1; 24 | + } 25 | + 26 | + char *c = wpath; 27 | + while ((c = strchr(c, '\\'))) 28 | + *c = '/'; 29 | + 30 | + printf("%s\n", wpath); 31 | + free(wpath); 32 | + } else if (OPT_ISSET(ops,'r') || OPT_ISSET(ops,'P') || 33 | (isset(CHASELINKS) && !OPT_ISSET(ops,'L'))) 34 | printf("%s\n", zgetcwd()); 35 | else { 36 | -------------------------------------------------------------------------------- /zsh/msys-symlink-hack.patch: -------------------------------------------------------------------------------- 1 | --- zsh-5.0.7/Src/zsh_system.h.old 2014-12-28 03:55:04.657231300 +0900 2 | +++ zsh-5.0.7/Src/zsh_system.h 2014-12-28 04:07:32.618012200 +0900 3 | @@ -784,6 +784,13 @@ 4 | # define IS_DIRSEP(c) ((c) == '/') 5 | #endif 6 | 7 | +#ifdef __MSYS__ 8 | +/* MSYS2 Hack! MSYS2 symlink() cannot create a symbolic link to a non existing files */ 9 | +# ifdef HAVE_SYMLINK 10 | +# undef HAVE_SYMLINK 11 | +# endif 12 | +#endif 13 | + 14 | #if defined(__GNUC__) && (!defined(__APPLE__) || defined(__clang__)) 15 | /* Does the OS X port of gcc still gag on __attribute__? */ 16 | #define UNUSED(x) x __attribute__((__unused__)) 17 | -------------------------------------------------------------------------------- /zsh/msysize.patch: -------------------------------------------------------------------------------- 1 | diff -Naur zsh-5.0.7-orig/Completion/Unix/Command/_mount zsh-5.0.7/Completion/Unix/Command/_mount 2 | --- zsh-5.0.7-orig/Completion/Unix/Command/_mount 2014-08-14 22:43:00.000000000 +0300 3 | +++ zsh-5.0.7/Completion/Unix/Command/_mount 2014-11-04 18:45:42.056000000 +0300 4 | @@ -1,6 +1,6 @@ 5 | #compdef mount umount 6 | 7 | -if [[ "$OSTYPE" == cygwin ]]; then 8 | +if [[ "$OSTYPE" == cygwin || $OSTYPE = msys ]]; then 9 | if [[ "$service" == mount ]] ; then 10 | _arguments -s \ 11 | - mount \ 12 | diff -Naur zsh-5.0.7-orig/config.guess zsh-5.0.7/config.guess 13 | --- zsh-5.0.7-orig/config.guess 2013-11-27 22:00:20.000000000 +0300 14 | +++ zsh-5.0.7/config.guess 2014-11-04 18:37:39.158000000 +0300 15 | @@ -840,6 +840,9 @@ 16 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 17 | echo x86_64-unknown-cygwin 18 | exit ;; 19 | + amd64:MSYS*:*:* | x86_64:MSYS*:*:*) 20 | + echo x86_64-unknown-msys 21 | + exit ;; 22 | p*:CYGWIN*:*) 23 | echo powerpcle-unknown-cygwin 24 | exit ;; 25 | diff -Naur zsh-5.0.7-orig/configure.ac zsh-5.0.7/configure.ac 26 | --- zsh-5.0.7-orig/configure.ac 2014-09-23 21:55:05.000000000 +0300 27 | +++ zsh-5.0.7/configure.ac 2014-11-04 18:41:11.052800000 +0300 28 | @@ -2010,7 +2010,7 @@ 29 | AH_TEMPLATE([PATH_DEV_FD], 30 | [Define to the path of the /dev/fd filesystem.]) 31 | AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd, 32 | -[if test "$host_os" = cygwin; then 33 | +[if test "$host_os" = cygwin || test "$host_os" = msys; then 34 | dnl In current (2008/12/01) versions of Cygwin these are present but don't 35 | dnl seem to work smoothly for process substitution; no great surprise 36 | dnl since getting processes to work at all on Cygwin is a big challenge. 37 | @@ -2224,7 +2224,7 @@ 38 | dnl to provide what we want. Simply enable them. 39 | AC_CACHE_CHECK(if named FIFOs work, 40 | zsh_cv_sys_fifo, 41 | -[if test "$host_os" = cygwin; then 42 | +[if test "$host_os" = cygwin || test "$host_os" = msys; then 43 | zsh_cv_sys_fifo=yes 44 | else 45 | AC_TRY_RUN([ 46 | @@ -2698,7 +2698,7 @@ 47 | zsh_cv_sys_dynamic_strip_exe="${zsh_cv_sys_dynamic_strip_exe=yes}" 48 | zsh_cv_sys_dynamic_strip_lib="${zsh_cv_sys_dynamic_strip_lib=yes}" 49 | zsh_cv_shared_environ="${zsh_cv_shared_environ=yes}" 50 | -elif test "$host_os" = cygwin; then 51 | +elif test "$host_os" = cygwin || test "$host_os" = msys; then 52 | DL_EXT="${DL_EXT=dll}" 53 | ##DLLD="${DLLD=dllwrap}" 54 | DLLD="${DLLD=$CC}" 55 | @@ -2972,7 +2972,7 @@ 56 | if $strip_libldflags && test "$zsh_cv_sys_dynamic_strip_lib" = yes; then 57 | LIBLDFLAGS="$LIBLDFLAGS -s" 58 | fi 59 | - if test "$host_os" = cygwin; then 60 | + if test "$host_os" = cygwin || test "$host_os" = msys; then 61 | INSTLIB="install.cygwin-lib" 62 | UNINSTLIB="uninstall.cygwin-lib" 63 | fi 64 | @@ -3010,7 +3010,7 @@ 65 | AC_SUBST(INSTLIB)dnl 66 | AC_SUBST(UNINSTLIB)dnl 67 | 68 | -if test "$host_os" = cygwin; then 69 | +if test "$host_os" = cygwin || test "$host_os" = msys; then 70 | EXTRAZSHOBJS="$EXTRAZSHOBJS zsh.res.o" 71 | fi 72 | 73 | diff -Naur zsh-5.0.7-orig/Src/Makefile.in zsh-5.0.7/Src/Makefile.in 74 | --- zsh-5.0.7-orig/Src/Makefile.in 2013-11-27 22:00:20.000000000 +0300 75 | +++ zsh-5.0.7/Src/Makefile.in 2014-11-04 18:47:07.013600000 +0300 76 | @@ -65,7 +65,7 @@ 77 | NSTMP = stamp-modobjs 78 | NLIST = `cat stamp-modobjs` 79 | 80 | -LIBZSH = libzsh-$(VERSION).$(DL_EXT) 81 | +LIBZSH = msys-zsh-$(VERSION).$(DL_EXT) 82 | NIBZSH = 83 | INSTLIB = @INSTLIB@ 84 | UNINSTLIB = @UNINSTLIB@ 85 | diff -Naur zsh-5.0.7-orig/Src/mkmakemod.sh zsh-5.0.7/Src/mkmakemod.sh 86 | --- zsh-5.0.7-orig/Src/mkmakemod.sh 2014-07-31 21:41:49.000000000 +0300 87 | +++ zsh-5.0.7/Src/mkmakemod.sh 2014-11-04 18:46:59.042000000 +0300 88 | @@ -222,7 +222,7 @@ 89 | export="${depbase}.export" 90 | case "$dep" in 91 | zsh/main ) 92 | - mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) " 93 | + mdll="\$(dir_top)/Src/msys-zsh-\$(VERSION).\$(DL_EXT) " 94 | ;; 95 | * ) 96 | mdll="${depbase}.\$(DL_EXT) " 97 | @@ -242,7 +242,7 @@ 98 | esac 99 | case "$dep" in 100 | zsh/main ) 101 | - mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) " 102 | + mdll="\$(dir_top)/Src/msys-zsh-\$(VERSION).\$(DL_EXT) " 103 | ;; 104 | * ) 105 | mdll="\$(dir_top)/$loc/${depbase}.\$(DL_EXT) " 106 | @@ -266,7 +266,7 @@ 107 | esac 108 | case "$dep" in 109 | zsh/main ) 110 | - mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) " 111 | + mdll="\$(dir_top)/Src/msys-zsh-\$(VERSION).\$(DL_EXT) " 112 | ;; 113 | * ) 114 | mdll="\$(dir_top)/$loc/${depbase}.\$(DL_EXT) " 115 | diff -Naur zsh-5.1.1-orig/Test/C02cond.ztst zsh-5.1.1/Test/C02cond.ztst 116 | --- zsh-5.1.1-orig/Test/C02cond.ztst 2014-05-16 22:21:25.000000000 +0300 117 | +++ zsh-5.1.1/Test/C02cond.ztst 2014-11-04 18:45:27.454400000 +0300 118 | @@ -111,7 +111,7 @@ 119 | if (( EUID == 0 )); then 120 | print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]] (root reads anything)' 121 | [[ -r zerolength && -r unmodish ]] 122 | - elif [[ $OSTYPE = cygwin ]]; then 123 | + elif [[ $OSTYPE = cygwin || $OSTYPE = msys ]]; then 124 | print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]] 125 | (all files created by user may be readable)' 126 | [[ -r zerolength ]] 127 | @@ -150,7 +150,7 @@ 128 | sleep 2 129 | cat $unmodified 130 | touch $newnewnew 131 | - if [[ $OSTYPE == "cygwin" ]]; then 132 | + if [[ $OSTYPE == "cygwin" || $OSTYPE = msys ]]; then 133 | ZTST_skip="[[ -N file ]] not supported on Cygwin" 134 | elif (( isnfs )); then 135 | ZTST_skip="[[ -N file ]] not supported with NFS" 136 | -------------------------------------------------------------------------------- /zsh/zprofile: -------------------------------------------------------------------------------- 1 | emulate sh -c 'source /etc/profile' 2 | -------------------------------------------------------------------------------- /zsh/zsh-5.0.6-1.patch: -------------------------------------------------------------------------------- 1 | diff -urN -x .build -x .inst -x .sinst zsh-5.0.6-orig/Doc/Makefile.in zsh-5.0.6/Doc/Makefile.in 2 | --- zsh-5.0.6-orig/Doc/Makefile.in 2014-08-12 14:31:21.000000000 -0500 3 | +++ zsh-5.0.6/Doc/Makefile.in 2014-09-14 00:05:52.350386400 -0500 4 | @@ -376,8 +376,10 @@ 5 | # install HTML manual 6 | install.html: html 7 | ${SHELL} $(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir) 8 | - for file in *.html; do \ 9 | + for file in ${sdir}/zsh*.html zsh*.html; do \ 10 | + if [ -f "$$file" ]; then \ 11 | $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir) || exit 1; \ 12 | + fi; \ 13 | done 14 | .PHONY: install.html 15 | 16 | diff -urN -x .build -x .inst -x .sinst zsh-5.0.6-orig/Src/zsh_system.h zsh-5.0.6/Src/zsh_system.h 17 | --- zsh-5.0.6-orig/Src/zsh_system.h 2014-07-25 12:56:55.000000000 -0500 18 | +++ zsh-5.0.6/Src/zsh_system.h 2014-09-14 00:05:52.370895000 -0500 19 | @@ -776,6 +776,10 @@ 20 | #ifdef __CYGWIN__ 21 | # include 22 | # define IS_DIRSEP(c) ((c) == '/' || (c) == '\\') 23 | +/* Cygwin Hack! newlib doesn't define STDC ISO 10646, so hack it here */ 24 | +# if defined(HAVE_WCHAR_H) && defined(HAVE_WCTOMB) && !defined(__STDC_ISO_10646__) 25 | +# define __STDC_ISO_10646__ 26 | +# endif 27 | #else 28 | # define IS_DIRSEP(c) ((c) == '/') 29 | #endif 30 | diff -urN -x .build -x .inst -x .sinst zsh-5.0.6-orig/Test/C02cond.ztst zsh-5.0.6/Test/C02cond.ztst 31 | --- zsh-5.0.6-orig/Test/C02cond.ztst 2014-05-16 14:21:25.000000000 -0500 32 | +++ zsh-5.0.6/Test/C02cond.ztst 2014-09-14 00:05:52.389450400 -0500 33 | @@ -187,7 +187,7 @@ 34 | print -u$ZTST_fd "Warning: not testing [[ -e /dev/fd/0 ]] (/dev/fd not supported)" 35 | true 36 | else 37 | - [[ -e /dev/fd/0 ]] 38 | + [[ -e `grep '#define PATH_DEV_FD' $ZTST_testdir/../config.h | awk '{ print $3 }' | tr -d '"'`/0 ]] 39 | fi 40 | 0dD:/dev/fd support in conds handled by access 41 | 42 | @@ -195,7 +195,7 @@ 43 | print -u$ZTST_fd "Warning: not testing [[ -O /dev/fd/0 ]] (/dev/fd not supported)" 44 | true 45 | else 46 | - [[ -O /dev/fd/0 ]] 47 | + [[ -O `grep '#define PATH_DEV_FD' $ZTST_testdir/../config.h | awk '{ print $3 }' | tr -d '"'`/0 ]] 48 | fi 49 | 0dD:/dev/fd support in conds handled by stat 50 | 51 | diff -urN -x .build -x .inst -x .sinst zsh-5.0.6-orig/configure zsh-5.0.6/configure 52 | --- zsh-5.0.6-orig/configure 2014-07-25 12:57:00.000000000 -0500 53 | +++ zsh-5.0.6/configure 2014-09-14 00:05:52.410935600 -0500 54 | @@ -11152,6 +11152,7 @@ 55 | fd = open("/tmp/fifo$$", O_RDONLY); 56 | exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x'); 57 | } 58 | + sleep(1); 59 | fd = open("/tmp/fifo$$", O_WRONLY); 60 | ret = (fd < 0 || write(fd, "x", 1) < 1); 61 | unlink("/tmp/fifo$$"); 62 | -------------------------------------------------------------------------------- /zsh/zsh-doc.install: -------------------------------------------------------------------------------- 1 | infodir=usr/share/info 2 | filelist="zsh.info zsh.info-1 zsh.info-2 zsh.info-3 zsh.info-4 zsh.info-5 zsh.info-6" 3 | 4 | post_install() { 5 | [ -x usr/bin/install-info ] || return 0 6 | for file in ${filelist}; do 7 | install-info $infodir/$file.gz $infodir/dir 2> /dev/null 8 | done 9 | } 10 | 11 | post_upgrade() { 12 | post_install 13 | } 14 | 15 | pre_remove() { 16 | [ -x usr/bin/install-info ] || return 0 17 | for file in ${filelist}; do 18 | install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null 19 | done 20 | } 21 | -------------------------------------------------------------------------------- /zsh/zsh.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | grep -qe '^/bin/zsh$' etc/shells || echo '/bin/zsh' >> etc/shells 3 | grep -qe '^/usr/bin/zsh$' etc/shells || echo '/usr/bin/zsh' >> etc/shells 4 | } 5 | 6 | post_upgrade() { 7 | post_install 8 | } 9 | 10 | pre_remove() { 11 | sed -i -r '/^(\/usr)?\/bin\/zsh$/d' etc/shells 12 | } 13 | --------------------------------------------------------------------------------