diff options
author | root <root@rshg047.dnsready.net> | 2011-05-28 22:47:00 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-05-28 22:47:00 +0000 |
commit | a0a7a3e16a1399233b436e64dba17a6cca315393 (patch) | |
tree | 1c5528cb95a0d908a4699db32bb7b999ee53ecad | |
parent | 4d22176132f4a830ab0cc510dabbc9f8c1c362ea (diff) |
Sat May 28 22:47:00 UTC 2011
49 files changed, 4986 insertions, 1706 deletions
diff --git a/community-staging/rss-glx/PKGBUILD b/community-staging/rss-glx/PKGBUILD new file mode 100644 index 000000000..37c440cf4 --- /dev/null +++ b/community-staging/rss-glx/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 48037 2011-05-27 16:21:40Z spupykin $ +# Maintainer : Ionut Biru <ibiru@archlinux.org> +# Contributor: Corrado 'bardo' Primier <corrado.primier@mail.polimi.it> +# Contributor: Tate "Tatey" Johnson <tatey86@tpg.com.au> + +pkgname=rss-glx +pkgver=0.9.1 +pkgrel=6 +pkgdesc="The Really Slick Screensavers port to GLX" +arch=('i686' 'x86_64') +url="http://rss-glx.sourceforge.net/" +license=('GPL') +depends=('desktop-file-utils' 'freealut' 'glew' 'imagemagick') +optdepends=('xscreensaver: xscreensaver integration') +install=rss-glx.install +options=('!libtool') +source=(http://downloads.sourceforge.net/rss-glx/${pkgname}_${pkgver}.tar.bz2 + rss-glx-desktops.tar.bz2) +md5sums=('a772bd143cd8d141edf4d9eff9860ab3' + '4211215c9a4918b0dff30a7000647dd9') + +build() { + cd ${srcdir}/${pkgname}_${pkgver} + + [ "$CARCH" = "x86_64" ] && (sed -i -e 's|@LIBS@|@LIBS@ -fopenmp|g' src/Makefile.in) + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --program-transform-name='s/plasma/plasma_rss/' \ + --with-configdir=/usr/share/xscreensaver/config \ + --with-kdessconfigdir=/usr/share/applnk/System/ScreenSavers \ + --enable-shared=yes --enable-static=no + make CFLAGS="$CFLAGS -I/usr/include/ImageMagick" + make DESTDIR=${pkgdir} install + + # FS#18300 + install -d ${pkgdir}/usr/lib/xscreensaver/ + list=$(ls ${pkgdir}/usr/bin --ignore rss-glx_install.pl) + for i in $list; do + ln -s "/usr/bin/$i" "$pkgdir/usr/lib/xscreensaver/" + done + + install -d ${pkgdir}/usr/share/applications/screensavers + install -m644 ${srcdir}/${pkgname}-desktops/*.desktop ${pkgdir}/usr/share/applications/screensavers +} diff --git a/community-staging/rss-glx/rss-glx-desktops.tar.bz2 b/community-staging/rss-glx/rss-glx-desktops.tar.bz2 Binary files differnew file mode 100644 index 000000000..940fd5277 --- /dev/null +++ b/community-staging/rss-glx/rss-glx-desktops.tar.bz2 diff --git a/community-staging/rss-glx/rss-glx.install b/community-staging/rss-glx/rss-glx.install new file mode 100644 index 000000000..758642618 --- /dev/null +++ b/community-staging/rss-glx/rss-glx.install @@ -0,0 +1,12 @@ +post_install() { + cat << 'EOM' + --> If you want to integrate the RSS screen savers with xscreensaver + --> for your user, then install the xscreensaver package and launch + --> the command "rss-glx_install.pl" +EOM + update-desktop-database -q +} + +post_remove() { + update-desktop-database -q +} diff --git a/community/deadbeef/PKGBUILD b/community/deadbeef/PKGBUILD index e0e61edd6..ed938ccc1 100644 --- a/community/deadbeef/PKGBUILD +++ b/community/deadbeef/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 47194 2011-05-18 15:41:47Z lfleischer $ +# $Id: PKGBUILD 48027 2011-05-27 16:02:04Z lfleischer $ # Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> # Contributor: Alexey Yakovenko <waker@users.sourceforge.net> pkgname=deadbeef -pkgver=0.5.0 -pkgrel=2 +pkgver=0.5.1 +pkgrel=1 pkgdesc='An audio player for GNU/Linux based on GTK2.' arch=('i686' 'x86_64') url='http://deadbeef.sourceforge.net' @@ -29,7 +29,7 @@ optdepends=('libvorbis: for Ogg Vorbis playback' options=('!libtool') install='deadbeef.install' source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}.tar.bz2") -md5sums=('713c47c5e7bb9a29cd0de877aff04ae6') +md5sums=('be8359d1bd9cf7679cf2ca748996e726') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/community/gambas2/PKGBUILD b/community/gambas2/PKGBUILD index eeffdef55..80d18e1bd 100644 --- a/community/gambas2/PKGBUILD +++ b/community/gambas2/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 44283 2011-04-05 06:25:28Z lcarlier $ +# $Id: PKGBUILD 48045 2011-05-27 17:00:59Z lcarlier $ # Maintainer : Laurent Carlier <lordheavym@gmail.com> # Contributor: Biru Ionut <ionut@archlinux.ro> # Contributor: Andrea Scarpino <andrea@archlinux.org> @@ -19,7 +19,7 @@ pkgname=('gambas2-meta' 'gambas2-runtime' 'gambas2-devel' 'gambas2-ide' 'gambas2 'gambas2-gb-qt-kde' 'gambas2-gb-qt-kde-html' 'gambas2-gb-report' 'gambas2-gb-sdl' 'gambas2-gb-sdl-sound' 'gambas2-gb-settings' 'gambas2-gb-v4l' 'gambas2-gb-vb' 'gambas2-gb-web' 'gambas2-gb-xml' 'gambas2-gb-xml-rpc' 'gambas2-gb-xml-xslt') -pkgver=2.23.0 +pkgver=2.23.1 pkgrel=1 pkgdesc="A free development environment based on a Basic interpreter." arch=('i686' 'x86_64') @@ -35,10 +35,11 @@ groups=('gambas2') replaces=('gambas2') conflicts=('gambas2') source=(http://downloads.sourceforge.net/gambas/$pkgbase-$pkgver.tar.bz2 - 'fix-gbi-gba-path.patch' 'gambas2-script.install' - 'gambas2-runtime.install') -md5sums=('f777cfe187ba58c176f90a85e33a9758' + 'fix-gbi-gba-path.patch' 'db.firebird.gcc-4.6.0-fix.patch' + 'gambas2-script.install' 'gambas2-runtime.install') +md5sums=('ff8d2c1f310222c150b114e7ce247dfd' '9dda03a1bbfb7e7ba8b6a4ae91b6752b' + 'ac9703b390502ed3242c8d34485c9236' '870ff5b4b33cd75aa9c290539e6fdd5d' 'ab5667175c4945282d2f40a35d0e9e5b') _gbfiles="${srcdir}/$pkgbase-$pkgver/main/gbc" @@ -67,6 +68,8 @@ build() { ## workaround to allow package splitting msg "Applying patches ..." patch -Np1 -i "${srcdir}/fix-gbi-gba-path.patch" + # merged upstream + patch -Np3 -i "${srcdir}/db.firebird.gcc-4.6.0-fix.patch" ./reconf-all ## diff --git a/community/gambas2/db.firebird.gcc-4.6.0-fix.patch b/community/gambas2/db.firebird.gcc-4.6.0-fix.patch new file mode 100644 index 000000000..0b6e68df3 --- /dev/null +++ b/community/gambas2/db.firebird.gcc-4.6.0-fix.patch @@ -0,0 +1,35 @@ +--- gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:01:54 3864 ++++ gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:26:41 3865 +@@ -1216,7 +1216,8 @@ + GB.StoreVariant(&fantom, &buffer[i]); + } + else{ +- GB.StoreVariant(&res->GetData(pos,i), &buffer[i]); ++ GB_VARIANT val = res->GetData(pos,i); ++ GB.StoreVariant(&val , &buffer[i]); + } + } + } +@@ -1874,6 +1875,8 @@ + static char query[SQLMAXLEN]; + int type; + std::string str1,str2; ++ GB_VARIANT varval; ++ char* charval; + snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field); + if (do_query(db, query, &res, "Unable to get the field from the table")){ + delete res; +@@ -1900,9 +1903,11 @@ + str1=res->GetData(0,3).value.value._string; + if(str1!="") + str2=str1.assign(str1,8,str1.length()-8); +- GB.FreeString(&res->GetData(0,3).value.value._string); ++ charval = res->GetData(0,3).value.value._string; ++ GB.FreeString(&charval); + res->SetData(0,3,str2); +- GB.StoreVariant(&res->GetData(0,3), &info->def); ++ varval = res->GetData(0,3); ++ GB.StoreVariant(&varval, &info->def); + } + delete res; + return FALSE; diff --git a/community/lightspark/PKGBUILD b/community/lightspark/PKGBUILD index 36d912b1e..328e44a6a 100644 --- a/community/lightspark/PKGBUILD +++ b/community/lightspark/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> pkgname=lightspark -pkgver=0.4.7.1 -pkgrel=3 +pkgver=0.4.8.1 +pkgrel=1 pkgdesc='An alternative Flash Player for Linux.' arch=('i686' 'x86_64') url='http://lightspark.sourceforge.net' @@ -12,9 +12,9 @@ conflicts=('lightspark-git') depends=('mesa' 'ftgl' 'sdl' 'gtk2' 'curl' 'zlib' 'ffmpeg' 'glew' 'pcre' 'libpulse' 'libffi' 'boost-libs' 'glibmm' 'gtkglext' 'desktop-file-utils' 'libxml++' 'libxml2') makedepends=('cmake' 'nasm' 'xulrunner' 'llvm' 'glproto' 'boost' 'pkgconfig' 'fontconfig') optdepends=('gnash-gtk: fallback support') -install="${pkgname}.install" -source=("http://launchpad.net/${pkgname}/trunk/${pkgname}-${pkgver:0:5}/+download/${pkgname}-${pkgver}.tar.gz") -md5sums=('fee5cd52a8a23e858979a8f4ec778266') +install="lightspark.install" +source=("http://launchpad.net/lightspark/trunk/lightspark-${pkgver:0:5}/+download/lightspark-${pkgver}.tar.gz") +md5sums=('296b859ea2b5c126e899e609014f2786') build() { rm -rf build @@ -26,7 +26,7 @@ build() { -DCOMPILE_PLUGIN=1 \ -DCMAKE_BUILD_TYPE=Release \ -DGNASH_EXE_PATH=/usr/bin/gtk-gnash \ - ../${pkgname}-${pkgver} + ../lightspark-${pkgver} make } diff --git a/community/megaglest/PKGBUILD b/community/megaglest/PKGBUILD index d45274aa7..828d91eac 100644 --- a/community/megaglest/PKGBUILD +++ b/community/megaglest/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 46547 2011-05-09 02:22:08Z svenstaro $ +# $Id: PKGBUILD 48032 2011-05-27 16:13:36Z svenstaro $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Larry Hajali <larryhaja [at] gmail [dot] com> pkgname=megaglest -pkgver=3.5.1 +pkgver=3.5.2 pkgrel=1 pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world." arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ license=('GPL3') depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'mesa' 'lua' 'icu') makedepends=('ftjam' 'p7zip' 'wxgtk' 'cmake') source=("http://downloads.sourceforge.net/project/${pkgname}/current_release/${pkgname}-source-${pkgver}.tar.xz") -md5sums=('924a02881b2e7e2fc68910d41ce51d8a') +md5sums=('90e0bdcbdfa95cb0322c04082418a56c') build() { cd ${srcdir}/${pkgname}-${pkgver}/ diff --git a/community/nbd/PKGBUILD b/community/nbd/PKGBUILD index 64cf20044..5a43aea69 100644 --- a/community/nbd/PKGBUILD +++ b/community/nbd/PKGBUILD @@ -1,8 +1,9 @@ -# $Id: PKGBUILD 38970 2011-02-04 10:43:11Z ibiru $ -# Maintainer : Ionut Biru <ibiru@archlinux.org> +# $Id: PKGBUILD 48022 2011-05-27 15:14:57Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor : Ionut Biru <ibiru@archlinux.org> # Contributor: Gerhard Brauer <gerbra@archlinux.de> pkgname=nbd -pkgver=2.9.20 +pkgver=2.9.21a pkgrel=1 pkgdesc="Tools for network block devices, allowing you to use remote block devices over TCP/IP." arch=('i686' 'x86_64') @@ -11,7 +12,7 @@ license=('GPL') source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 nbd.conf.d nbd) depends=('glib2') -md5sums=('aec35f6beb7bb4cb2ee267fe0f72c8d6' +md5sums=('4028c77d52a13f16be5e9bf3d3bab27d' '6d746f377a28b92dd2c80f01176cb811' 'ab9c431881f5e3c98a8f6c04016f0e00') diff --git a/community/sage-mathematics/PKGBUILD b/community/sage-mathematics/PKGBUILD index 2a321f237..7b50171ae 100644 --- a/community/sage-mathematics/PKGBUILD +++ b/community/sage-mathematics/PKGBUILD @@ -4,13 +4,14 @@ # Special thanks to Nareto for moving the compile from the .install to the PKGBUILD pkgname=sage-mathematics -pkgver=4.6.2 -pkgrel=2 +pkgver=4.7 +pkgrel=1 pkgdesc='SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.' url='http://www.sagemath.org' arch=('i686' 'x86_64') license=('GPL') -depends=('readline') +#depends=('readline') +depends=('ppl') makedepends=('gcc-fortran' 'gcc-libs' 'desktop-file-utils' 'imagemagick' 'texlive-core') optdepends=('imagemagick: some plotting functionality benefits from it' 'texlive-core: some plotting functionality benefits from it, also to use SageTeX' @@ -19,8 +20,8 @@ options=('!makeflags') install="${pkgname}.install" source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar" 'SAGE-notebook.desktop') -md5sums=('0dc2c9e9cc593685bb039085900ddfeb' - 'bcd01b7863794431f8f208ed96fd108d') +md5sums=('db4d891feed487e1696b8d01ae3b6469' + 'dc391f12b7d17dd37326343ec0e99bbd') build() { cd sage-${pkgver} @@ -30,8 +31,10 @@ build() { # bash: symbol lookup error: bash: undefined symbol: rl_filename_rewrite_hook # remove this hack when sage uses a readline 6.1 or greater, or when sage uses its own internal bash # this is for people who have custom kernels (sage works this around by checking uname -r) + #mkdir -p spkg/installed + #touch spkg/installed/readline-6.1 mkdir -p spkg/installed - touch spkg/installed/readline-6.1 + touch spkg/installed/ppl-0.11.2 # fix "missing sage.all error" during build unset CFLAGS @@ -61,6 +64,9 @@ build() { # only build sage, no documents #make build make + + # uncomment if we want to run all the tests (warning: very long) + #make ptestlong } package() { diff --git a/community/sage-mathematics/SAGE-notebook.desktop b/community/sage-mathematics/SAGE-notebook.desktop index 87496030b..26a35d3ac 100644 --- a/community/sage-mathematics/SAGE-notebook.desktop +++ b/community/sage-mathematics/SAGE-notebook.desktop @@ -9,7 +9,6 @@ GenericName[de]= Icon=/opt/sage/data/extcode/notebook/images/sageicon.png MimeType= Name[de]=SAGE -Path=/opt/sage/notebook StartupNotify=true Terminal=true Type=Application diff --git a/community/sage-mathematics/sage-mathematics.install b/community/sage-mathematics/sage-mathematics.install index f5c16308e..6caa5299e 100644 --- a/community/sage-mathematics/sage-mathematics.install +++ b/community/sage-mathematics/sage-mathematics.install @@ -5,6 +5,9 @@ post_install() { # the files it writes to ~/.sage can be safely ignored HOME=/tmp ./sage -c + # add sagemath user for the daemon + useradd -r -c 'Sage daemon' -d /opt/sage -s /bin/false sagemath + # Update LaTeX db to point to SageTeX if [ -f /usr/bin/texhash ]; then /usr/bin/texhash /usr/share/texmf @@ -23,11 +26,14 @@ echo ' \___/ | |_/|/\__/ \_/|/o /| /| \| \| - ___ __ _ __ _ ___ -/ __|/ _` |/ _` |/ _ \ -\__ \ (_| | (_| | __/ -|___/\__,_|\__, |\___| - |___/ + ________________________________ +< sage-mathematics, I mean, MOO! > + -------------------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || ' } @@ -42,6 +48,9 @@ post_remove() { /usr/bin/texhash /usr/share/texmf fi + # remove the sagemath daemon user + userdel sagemath + # clean up left overs rm -rf /opt/sage } diff --git a/community/wine/PKGBUILD b/community/wine/PKGBUILD new file mode 100644 index 000000000..c9bc1dae8 --- /dev/null +++ b/community/wine/PKGBUILD @@ -0,0 +1,144 @@ +# $Id: PKGBUILD 48061 2011-05-27 19:54:08Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Contributor: Eduardo Romero <eduardo@archlinux.org> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> + +pkgname=wine +pkgver=1.3.21 +pkgrel=1 + +_pkgbasever=${pkgver/rc/-rc} + +source=(http://ibiblio.org/pub/linux/system/emulators/$pkgname/$pkgname-$_pkgbasever.tar.bz2) +md5sums=('dfcefe48a9aae82f7f1aa4d2c6617961') + +pkgdesc="A compatibility layer for running Windows programs" +url="http://www.winehq.com" +arch=(i686 x86_64) +license=(LGPL) +install=wine.install + +depends=( + fontconfig lib32-fontconfig + mesa lib32-mesa + libxcursor lib32-libxcursor + libxrandr lib32-libxrandr + libxdamage lib32-libxdamage + libxxf86dga lib32-libxxf86dga + alsa-lib lib32-alsa-lib + desktop-file-utils +) + +makedepends=(autoconf ncurses bison perl fontforge flex prelink + 'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2' + giflib lib32-giflib + libxpm lib32-libxpm + libpng lib32-libpng + libxinerama lib32-libxinerama + libxcomposite lib32-libxcomposite + libxmu lib32-libxmu + libxxf86vm lib32-libxxf86vm + libxml2 lib32-libxml2 + libxslt lib32-libxslt + libldap lib32-libldap + lcms lib32-lcms + mpg123 lib32-mpg123 + openal lib32-openal + jack lib32-jack + libcups lib32-libcups + gnutls lib32-gnutls + v4l-utils lib32-v4l-utils + oss +) + +optdepends=( + giflib lib32-giflib + libpng lib32-libpng + libldap lib32-libldap + lcms lib32-lcms + libxml2 lib32-libxml2 + mpg123 lib32-mpg123 + openal lib32-openal + jack lib32-jack + libcups lib32-libcups + gnutls lib32-gnutls + v4l-utils lib32-v4l-utils + oss +) + +if [[ $CARCH == i686 ]]; then + # Strip lib32 etc. on i686 + depends=(${depends[@]/*32-*/}) + makedepends=(${makedepends[@]/*32-*/}) + makedepends=(${makedepends[@]/*-multilib*/}) + optdepends=(${optdepends[@]/*32-*/}) +else + provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver") + conflicts=('bin32-wine' 'wine-wow64') + replaces=('bin32-wine') +fi + +build() { + cd "$srcdir" + + # Allow ccache to work + mv $pkgname-$_pkgbasever $pkgname + + # Get rid of old build dirs + rm -rf $pkgname-{32,64}-build + mkdir $pkgname-32-build + + if [[ $CARCH == x86_64 ]]; then + msg2 "Building Wine-64..." + + mkdir $pkgname-64-build + cd "$srcdir/$pkgname-64-build" + ../$pkgname/configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --with-x \ + --enable-win64 + + make + + _wine32opts=( + --libdir=/usr/lib32 + --with-wine64="$srcdir/$pkgname-64-build" + ) + + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + fi + + msg2 "Building Wine-32..." + cd "$srcdir/$pkgname-32-build" + ../$pkgname/configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --with-x \ + "${_wine32opts[@]}" + + make +} + +package() { + msg2 "Packaging Wine-32..." + cd "$srcdir/$pkgname-32-build" + + if [[ $CARCH == i686 ]]; then + make prefix="$pkgdir/usr" install + else + make prefix="$pkgdir/usr" \ + libdir="$pkgdir/usr/lib32" \ + dlldir="$pkgdir/usr/lib32/wine" install + + msg2 "Packaging Wine-64..." + cd "$srcdir/$pkgname-64-build" + make prefix="$pkgdir/usr" \ + libdir="$pkgdir/usr/lib" \ + dlldir="$pkgdir/usr/lib/wine" install + fi +} + +# vim:set ts=8 sts=2 sw=2 et: diff --git a/community/wine/wine.install b/community/wine/wine.install new file mode 100644 index 000000000..f71262186 --- /dev/null +++ b/community/wine/wine.install @@ -0,0 +1,12 @@ +post_install() { + update-desktop-database -q + echo "This wine package is wow64 enabled. This means it can run 32bit/64bit Windows apps on x86_64." + echo "If you are on x86_64, the default WINEARCH will be win64." + echo "This will cause a lot of Windows applications to malfunction even if they usually work in wine." + echo "Please create your ~/.wine with 'WINEARCH=win32 winecfg' if you are unsure and on x86_64." + echo "See the Arch wiki on wine for more information." +} + +post_remove() { + update-desktop-database -q +} diff --git a/extra/allegro/PKGBUILD b/extra/allegro/PKGBUILD index c7083b60f..582e292cc 100644 --- a/extra/allegro/PKGBUILD +++ b/extra/allegro/PKGBUILD @@ -1,21 +1,20 @@ -# $Id: PKGBUILD 91255 2010-09-25 13:05:55Z ibiru $ +# $Id: PKGBUILD 125663 2011-05-27 21:50:52Z ibiru $ # Maintainer: Ionut Biru <ibiru@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> # Contributor: arjan <arjan@archlinux.org> pkgname=allegro -pkgver=4.4.1.1 -pkgrel=2 +pkgver=4.4.2 +pkgrel=1 pkgdesc="Portable library mainly aimed at video game and multimedia programming" arch=('i686' 'x86_64') url="http://alleg.sourceforge.net/" license=('custom') depends=('jack' 'libxpm' 'libxxf86vm' 'libxxf86dga' 'libxcursor' 'libpng') makedepends=('cmake') -options=('!makeflags') source=(http://downloads.sourceforge.net/alleg/${pkgname}-${pkgver}.tar.gz LICENSE) -md5sums=('0f1cfff8f2cf88e5c91a667d9fd386ec' +md5sums=('4db71b0460fc99926ae91d223199c2e6' 'cd97e2992e8e66b9e6a449d832dc9c7a') build() { @@ -28,6 +27,11 @@ build() { -DWANT_DOCS=OFF make +} + +package() { + cd "${srcdir}"/build + make DESTDIR="${pkgdir}" install install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" diff --git a/extra/cmus/PKGBUILD b/extra/cmus/PKGBUILD index 05c833387..d9fd473a7 100644 --- a/extra/cmus/PKGBUILD +++ b/extra/cmus/PKGBUILD @@ -1,16 +1,17 @@ -# $Id: PKGBUILD 120673 2011-04-25 22:55:12Z eric $ +# $Id: PKGBUILD 125618 2011-05-27 08:07:05Z eric $ # Maintainer: Aaron Griffin <aaron@archlinux.org> # Contributor: dorphell <dorphell@archlinux.org> pkgname=cmus -pkgver=2.4.0 +pkgver=2.4.1 pkgrel=1 pkgdesc="A very feature-rich ncurses-based music player" arch=('i686' 'x86_64') url="http://cmus.sourceforge.net/" license=('GPL') depends=('ncurses') -makedepends=('libao' 'libmpcdec' 'ffmpeg' 'flac' 'libmad' 'faad2' 'libmodplug' 'libvorbis' 'libpulse' 'wavpack') +makedepends=('libao' 'libmpcdec' 'ffmpeg' 'flac' 'libmad' 'faad2' 'libmodplug' + 'libvorbis' 'libpulse' 'wavpack' 'libmp4v2') optdepends=('alsa-lib: for ALSA output plugin support' 'libao: for AO output plugin support' 'libpulse: for PulseAudio output plugin support' @@ -21,10 +22,11 @@ optdepends=('alsa-lib: for ALSA output plugin support' 'libmpcdec: for musepack input plugin support' 'wavpack: for wavpack input plugin support' 'libvorbis: for vorbis input plugin support' - 'flac: for flac input plugin support') + 'flac: for flac input plugin support' + 'libmp4v2: for mp4 input plugin support') source=("http://downloads.sourceforge.net/$pkgname/$pkgname-v$pkgver.tar.bz2") -md5sums=('0c5a9f4032e632e5f6b6a49f53df1e7e') -sha1sums=('cbd80d1ff12be5dbf9a3b8b6494381f8b3073761') +md5sums=('7932bbada04bc9a273c332a323fc5704') +sha1sums=('918c637becdcbca3652b836b38b164eb852fa896') build() { cd "$srcdir/$pkgname-v$pkgver" diff --git a/extra/dcraw/PKGBUILD b/extra/dcraw/PKGBUILD index 2334cc49b..eb35b2e1a 100644 --- a/extra/dcraw/PKGBUILD +++ b/extra/dcraw/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 109077 2011-02-05 18:14:46Z eric $ +# $Id: PKGBUILD 125668 2011-05-27 23:18:08Z eric $ # Maintainer: tobias <tobias@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> pkgname=dcraw -pkgver=9.06 +pkgver=9.08 pkgrel=1 pkgdesc="A command line based converter for digicams raw output" arch=('i686' 'x86_64') @@ -12,8 +12,10 @@ license=('custom') depends=('lcms') source=(http://www.cybercom.net/~dcoffin/dcraw/archive/${pkgname}-${pkgver}.tar.gz license.txt) -md5sums=('22921c24c697bbe43c1010f463176921' '110b4604a6dacd5537339c4082e9e12a') -sha1sums=('7bd7b2283cf1ad1cb1591d0f69fd6831689b20b0' '502c8f0ac7434d48f5dcb2eefe7599627cb69454') +md5sums=('eb1d365c27495a513c0768b2f696ba66' + '110b4604a6dacd5537339c4082e9e12a') +sha1sums=('1282402201ca48f922d9167ad078aa58cb18593e' + '502c8f0ac7434d48f5dcb2eefe7599627cb69454') build() { cd "${srcdir}/${pkgname}" @@ -26,26 +28,21 @@ package() { install -Dm644 dcraw.1 "${pkgdir}"/usr/share/man/man1/dcraw.1 for langchar in \ - fr.latin1 it.latin1 de.latin1 pt.latin1 es.latin1 sv.latin1 \ + fr.latin1 it.latin1 de.latin1 pt.latin1 es.latin1 nl.latin1 sv.latin1 \ ca.latin1 da.latin1 cs.latin2 hu.latin2 pl.latin2 eo.latin3 ru.koi8-r \ zh_TW.big5 zh_CN.gb2312 do lang=$(echo $langchar | cut -d. -f1) char=$(echo $langchar | cut -d. -f2-) - mkdir -p -m 755 "${pkgdir}"/usr/share/man/$lang/man1 - iconv -f utf-8 -t $char dcraw_$lang.1 > "${pkgdir}"/usr/share/man/$lang/man1/dcraw.1 - mkdir -p -m 755 "${pkgdir}"/usr/share/man/$lang.UTF-8/man1 - cp dcraw_$lang.1 "${pkgdir}"/usr/share/man/$lang.UTF-8/man1/dcraw.1 + if [ -f dcraw_${lang}.1 ]; then + mkdir -p -m 755 "${pkgdir}"/usr/share/man/$lang/man1 + iconv -f utf-8 -t $char dcraw_$lang.1 > "${pkgdir}"/usr/share/man/$lang/man1/dcraw.1 + mkdir -p -m 755 "${pkgdir}"/usr/share/man/$lang.UTF-8/man1 + cp dcraw_$lang.1 "${pkgdir}"/usr/share/man/$lang.UTF-8/man1/dcraw.1 + fi mkdir -p -m 755 "${pkgdir}"/usr/share/locale/$lang/LC_MESSAGES msgfmt -o "${pkgdir}"/usr/share/locale/$lang/LC_MESSAGES/dcraw.mo dcraw_$lang.po done -# dcraw_nl.1 is missing - langchar=nl.latin1 - lang=$(echo $langchar | cut -d. -f1) - char=$(echo $langchar | cut -d. -f2-) - mkdir -p -m 755 "${pkgdir}"/usr/share/locale/$lang/LC_MESSAGES - msgfmt -o "${pkgdir}"/usr/share/locale/$lang/LC_MESSAGES/dcraw.mo dcraw_$lang.po - install -Dm644 "${srcdir}/license.txt" "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt } diff --git a/extra/gnome-bluetooth/PKGBUILD b/extra/gnome-bluetooth/PKGBUILD index 1d8830ea2..2417f82cc 100644 --- a/extra/gnome-bluetooth/PKGBUILD +++ b/extra/gnome-bluetooth/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 117688 2011-04-04 16:21:47Z ibiru $ +# $Id: PKGBUILD 125640 2011-05-27 17:23:17Z ibiru $ # Maintainer: # Contributor: Roman Kyrylych <roman@archlinux.org> pkgname=gnome-bluetooth -pkgver=3.0.0 +pkgver=3.0.1 pkgrel=1 pkgdesc="The GNOME Bluetooth Subsystem" arch=('i686' 'x86_64') @@ -15,7 +15,7 @@ options=('!libtool' '!emptydirs') install=gnome-bluetooth.install source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/3.0/${pkgname}-${pkgver}.tar.bz2 61-gnome-bluetooth-rfkill.rules) -sha256sums=('bdfa7986b8b7f622b48a70b29a48016482190d240de499da5d7fddb48ed4c211' +sha256sums=('bce843f7cf690c595678fd554b546bd35175f6e7afa70a1463037a0367b3fd38' 'b8acb8ea2e7f3588575cffd8ea14ec50c8641f518f2ea899771a508b299ea474') build() { diff --git a/extra/most/PKGBUILD b/extra/most/PKGBUILD index bf03914bc..0cea27712 100644 --- a/extra/most/PKGBUILD +++ b/extra/most/PKGBUILD @@ -1,20 +1,28 @@ -# $Id: PKGBUILD 57012 2009-10-31 08:10:58Z allan $ +# $Id: PKGBUILD 125648 2011-05-27 17:52:54Z stephane $ # Maintainer: juergen <juergen@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=most pkgver=5.0.0a -pkgrel=2 +pkgrel=3 pkgdesc="A terminal pager similar to 'more' and 'less'" arch=('i686' 'x86_64') depends=('slang') license=('GPL') url="ftp://space.mit.edu/pub/davis/most/" -source=(ftp://space.mit.edu/pub/davis/$pkgname/$pkgname-$pkgver.tar.gz) -md5sums=('30f2131b67f61716f6fe1f65205da48b') +source=(ftp://space.mit.edu/pub/davis/${pkgname}/${pkgname}-${pkgver}.tar.gz most-debian.patch) +sha1sums=('99eedb7169754b9a47c7755ac48949d76531e3b2' + '937796040c69bae3bf735fa3cd734775c582e7d0') + build() { - cd $srcdir/$pkgname-$pkgver - ./configure --prefix=/usr --sysconfdir=/etc || return 1 - make DESTDIR=$pkgdir install || return 1 + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i ../most-debian.patch + ./configure --prefix=/usr --sysconfdir=/etc + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR=$pkgdir install } diff --git a/extra/most/most-debian.patch b/extra/most/most-debian.patch index 4387420e8..292c83b5a 100644 --- a/extra/most/most-debian.patch +++ b/extra/most/most-debian.patch @@ -1,1655 +1,2313 @@ ---- most-4.10.2.orig/most.1 -+++ most-4.10.2/most.1 -@@ -134,7 +134,7 @@ - Use this switch when you want to view files - containing 8 bit characters. - .I most --will display the file 16 bytes per line in hexidecimal notation. -+will display the file 16 bytes per line in hexadecimal notation. - A typical line looks like: - .IP - .Ds -@@ -185,12 +185,13 @@ - This option is meaningful only when used with the - .B \-v - option. -+.TP - .BI + lineno - Start up at - .IR lineno . +--- most-5.0.0a.orig/lesskeys.rc ++++ most-5.0.0a/lesskeys.rc +@@ -57,3 +57,8 @@ + setkey goto_mark "'" + setkey find_file "E" + setkey edit "v" ++setkey bob "^[[7~" ++setkey eob "^[[8~" ++setkey bob "^[OH" ++setkey eob "^[OF" ++ +--- most-5.0.0a.orig/most.1 ++++ most-5.0.0a/most.1 +@@ -203,7 +203,7 @@ + .TP + .B +u + Force UTF-8 mode. By default most will use the current locale to +-determine if UTF-8 mode shoul be used. The ++determine if UTF-8 mode should be used. The + .B +u + and + .B \-u +@@ -224,20 +224,28 @@ + Start up at the line containing the first occurrence of + .IR string . + .SH "COMMAND USAGE" +-The commands take effect immediately; it is not necessary to type a +-carriage return. +-.PP +-In the following commands, +-.I i +-is a numerical argument +-(1 by default). +-.TP +-.BR SPACE ", " CTRL-D ", " NEXT_SCREEN +-Display another windowful, or jump +-.I i +-windowfuls if +-.I i +-is specified. ++Some commands have an optional numeric argument ++.I id ++,entered before the command. If not given, the ++default value of ++.I i ++is 1. ++.PP ++Commands take effect immediately; typing a ++.I RETURN ++after isn't necessary or correct. (Besides, ++.I RETURN ++itself is a command.) ++.PP ++Example: to go down one line, press the ++.I DOWN_ARROW ++key. To go down 20 lines, press ++.I 2 ++then ++.I 0 ++then the ++.I DOWN_ARROW ++key. + .TP + \fBRETURN\fR, \fBDOWN_ARROW\fR, \fBV\fR, \fBCTRL-N\fR + Display another line, or +@@ -341,7 +349,7 @@ + .PD + Set a mark on the current line for later reference. .TP --.B +c --Make search case sensitive. -+.B -c -+Make searches case sensitive. - By default, they are not. +-.BR "INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD" ++.BR "INSERT_HERE" ", " "CTRL-X CTRL-X" ", " "COMMA" ", " "CTRL-K RETURN" ", " "GOLD PERIOD" + Set a mark on the current line but return to previous mark. + This allows the user to toggle back and forth between two positions + in the file. +@@ -355,7 +363,7 @@ + .BR "CTRL-X 2" ", " "CTRL-W 2" ", " "GOLD X" + Split this window in half. .TP - .B +d -@@ -482,7 +483,7 @@ - descriptors that represent the file name and line number, - respectively. For example, if JED is your editor, then set - .B MOST_EDITOR --to 'jed %s -g %d'. -+to 'jed %s -g %d'. This will only work where the %s preceeds the %d. +-.BR "CTRL-X o" ", " "CTRL-W o" ", " o ", " GOLD UP ", " GOLD DOWN ++.BR "CTRL-X o" ", " "CTRL-W o" ", " o ", " "GOLD UP" ", " "GOLD DOWN" + Move to other window. .TP - .B MOST_HELP - This variable may be used to specify an alternate help file. -@@ -496,7 +497,7 @@ - .I most.rc - on other systems. + .BR "CTRL-X 0" ", " "CTRL-W 0" ", " "GOLD V" +@@ -506,13 +514,15 @@ + .B MOST_INITFILE + Set this variable to specify the initialization file to load during + startup. The default action is to load the system configuration file +-and then a personal configuration file called +-.I .mostrc +-on Unix, and +-.I most.rc +-on other systems. ++from ++.I /etc/most.conf ++and then a personal configuration file located at ++.I $HOME/.mostrc ++. .SH CONFIGURATION FILE SYNTAX --When most starts up, it tries to read a system confiuration file and -+When most starts up, it tries to read a system configuration file and +-When most starts up, it tries to read a system configuration file and ++When ++.I most ++starts up, it tries to read a system configuration file and then a personal configuration file. These files may be used to specify keybindings and colors. .PP ---- most-4.10.2.orig/src/buffer.c -+++ most-4.10.2/src/buffer.c -@@ -44,10 +44,10 @@ - - Most_Buffer_Type *Most_Buf; - --int Most_Num_Lines; -+long long Most_Num_Lines; - --unsigned int Most_C_Offset; --int Most_C_Line; -+unsigned long long Most_C_Offset; -+long long Most_C_Line; - - static unsigned char *beg_of_line1(void) - { -@@ -61,24 +61,29 @@ - { - if (*pos == '\n') - { -- pos--; -- while ((pos > Most_Beg) -- && (*pos != '\n')) -+ pos--; /* Skip back the new-line. */ -+ /* This block is UTF-8 safe, because it only scans the -+ buffer for a new-line, and doesn't count -+ characters. */ -+ while ((pos > Most_Beg) && (*pos != '\n')) - pos--; - -- if (*pos != '\n') return pos; -+ if (*pos != '\n') return Most_Beg; -+ /* from here on *pos == '\n' */ - if (pos + 1 != cpos) - return pos + 1; - } - } -- else pos--; -+ else -+ pos = SLutf8_bskip_char(Most_Beg, pos); - - if (*pos != '\n') - { -- while ((pos > Most_Beg) -- && (*pos != '\n')) -+ /* This block is UTF-8 safe. See comment above. */ -+ while ((pos > Most_Beg) && (*pos != '\n')) - pos--; - if (*pos != '\n') return Most_Beg; -+ /* from here on *pos == '\n' */ - return pos + 1; - } - -@@ -93,55 +98,6 @@ - return pos; - } - -- --static unsigned char *forward_columns (unsigned char *b, unsigned char *e, unsigned int num_cols) --{ -- unsigned int col = 0; -- -- while ((b < e) -- && (col < num_cols)) -- { -- unsigned char ch = *b++; -- if (((ch >= ' ') && (ch < 0x7F)) -- || (ch >= SLsmg_Display_Eight_Bit)) -- { -- col++; -- continue; -- } -- -- if ((ch == '\b') || (ch == '\t') || (ch == '\r')) -- switch (ch) -- { -- case '\b': -- if (Most_V_Opt == 0) -- { -- if (col > 0) col--; -- } -- else col += 2; -- break; -- -- case '\r': -- if (Most_V_Opt == 0) -- col = 0; -- else -- col += 2; -- break; -- -- case '\t': -- if (Most_T_Opt == 0) -- col = Most_Tab_Width * (col/Most_Tab_Width + 1); -- else -- col += 2; -- break; -- } -- else if (ch & 0x80) -- col += 3; -- else -- col += 2; -- } -- return b; --} -- - /* does not move point */ - static unsigned char *end_of_line1(void) - { -@@ -164,6 +120,9 @@ - - if (*pos != '\n') - { -+ /* This block is UTF-8 safe, because it only scans the buffer -+ for a new-line, and doesn't count characters. */ -+ - n = pmax - pos; - n2 = n % 8; - pmax = pos + (n - 8); -@@ -215,7 +174,7 @@ - ncols = SLtt_Screen_Cols-1; - while (1) - { -- unsigned char *next_b = forward_columns (b, e, ncols); -+ unsigned char *next_b = most_forward_columns (b, e, ncols, 1); - if ((next_b == e) || (next_b == b)) - break; - -@@ -237,11 +196,12 @@ - return e; - - if (b == NULL) b = most_beg_of_line (); -- b = forward_columns (b, e, SLtt_Screen_Cols-1); -+ b = most_forward_columns (b, e, SLtt_Screen_Cols-1, 1); - - /* Do not wrap the line if the last character falls on the last column - * of the display. - */ -+ /* FIXME potential bug if dealing with multi-byte char. */ - if ((b + 1 <= e) - && (b + 1 < Most_Eob) - && (b[1] == '\n')) -@@ -250,10 +210,10 @@ - return b; - } - --int most_forward_line(int save) -+long long most_forward_line(long long save) - { -- int m; -- register int n = save; -+ long long m; -+ register long long n = save; - unsigned char *p; - unsigned char *pmax; - -@@ -346,14 +306,14 @@ - } - - /* Count lines in the region. A half line counts as 1 */ --int most_count_lines(unsigned char *beg, unsigned char *end) -+long long most_count_lines(unsigned char *beg, unsigned char *end) - { -- int save_line, n; -+ long long save_line, n; - unsigned char *save_beg, *save_eob; -- unsigned int save_pos; -+ unsigned long long save_pos; - int dn = 1000; - -- if (Most_B_Opt) return(1 + (int)(end - beg) / 16); -+ if (Most_B_Opt) return(1 + (long long)(end - beg) / 16); - - save_line = Most_C_Line; save_beg = Most_Beg; save_eob = Most_Eob; - save_pos = Most_C_Offset; -@@ -371,9 +331,9 @@ - return(n); - } - --void most_goto_line(int line) -+void most_goto_line(long long line) - { -- int dif_c, dif_b,dif_t; -+ long long dif_c, dif_b,dif_t; - - if (line < 1) line = 1; - most_read_to_line(line); -@@ -420,7 +380,7 @@ - } - - /* return line the point is on without the final '\n's */ --int most_extract_line(unsigned char **beg, unsigned char **end) -+long long most_extract_line(unsigned char **beg, unsigned char **end) - { - *beg = most_beg_of_line(); - *end = end_of_line (*beg); -@@ -428,12 +388,12 @@ - return 0; - } - --int most_what_line(unsigned char *pos) -+long long most_what_line(unsigned char *pos) - { -- unsigned int save_pos; -- int save_line, dir; -- register int dif_c, dif_b,dif_t; -- int ret; -+ unsigned long long save_pos; -+ long long save_line, dir; -+ register long long dif_c, dif_b,dif_t; -+ long long ret; - - if (Most_B_Opt) - { -@@ -517,7 +477,7 @@ - } - - /* given a buffer position, find the line and column */ --void most_find_row_column(unsigned char *pos, int *r, int *c) -+void most_find_row_column(unsigned char *pos, long long *r, long long *c) - { - unsigned char *beg; - unsigned int save_offset; -@@ -545,7 +505,10 @@ - /* Now we have found the line it is on so.... */ - beg = most_beg_of_line(); - *c = 1; -- while (beg++ < pos) *c = *c + 1; -+ if (Most_UTF8_Mode) -+ while ((beg = SLutf8_skip_char(beg, pos)) < pos) *c = *c + 1; -+ else -+ while (beg++ < pos) *c = *c + 1; - Most_C_Line = save_line; - Most_C_Offset = save_offset; - } ---- most-4.10.2.orig/src/buffer.h -+++ most-4.10.2/src/buffer.h -@@ -23,12 +23,12 @@ - - extern Most_Buffer_Type *Most_Buf; - extern unsigned char *Most_Beg, *Most_Eob; --extern int Most_Num_Lines; -+extern long long Most_Num_Lines; - - /* Offset of current position from beginning of buffer */ --extern unsigned int Most_C_Offset; -+extern unsigned long long Most_C_Offset; - --extern int Most_C_Line; -+extern long long Most_C_Line; - /* - * Current line number. If at the beginning of the buffer, it is 1. If - * we are at the last point of the buffer it is the number of lines. -@@ -37,26 +37,26 @@ - /* This routine does not move the point */ - extern unsigned char *most_beg_of_line(void); - --extern int most_forward_line(int); -+extern long long most_forward_line(long long); - /* This routine moves the point forward n lines. n can be negative. - It returns the number moved. */ - --extern void most_goto_line(int); -+extern void most_goto_line(long long); - /* Move the point somewhere on the nth line of the buffer returning - C_POS */ - --extern int most_what_line(unsigned char *); -+extern long long most_what_line(unsigned char *); - /* return the line number of position 'argument'. Does not move point */ - - /* count the number of lines in the region delimited by beg and end. - Counts lines from beg up to end but does not count end. - Does not move point. */ --extern int most_count_lines(unsigned char *, unsigned char *); --extern int most_extract_line(unsigned char **, unsigned char **); -+extern long long most_count_lines(unsigned char *, unsigned char *); -+extern long long most_extract_line(unsigned char **, unsigned char **); - - extern Most_Buffer_Type *most_switch_to_buffer(Most_Buffer_Type *); - extern Most_Buffer_Type *most_create_buffer(char *); --extern void most_find_row_column(unsigned char *, int *, int *); -+extern void most_find_row_column(unsigned char *, long long *, long long *); - - #endif - ---- most-4.10.2.orig/src/keym.c -+++ most-4.10.2/src/keym.c -@@ -228,7 +228,7 @@ - static void goto_percent_cmd(void) - { - unsigned char *pos; -- int n; -+ long long n; - - if (Most_Digit_Arg != (int *) NULL) n = *Most_Digit_Arg; - else -@@ -282,7 +282,7 @@ - - static void find_next_cmd(void) - { -- int col, line, n = 1; -+ long long col, line, n = 1; - unsigned long ofs; - - if (Most_Digit_Arg != NULL) n = *Most_Digit_Arg; -@@ -309,7 +309,7 @@ - #else - "Search: ", - #endif -- Most_Search_Str, -+ (char *) Most_Search_Str, - MOST_SEARCH_BUF_LEN - ) == -1) return; - Most_Curs_Offset = Most_C_Offset; -@@ -325,7 +325,7 @@ - #else - "Search Backwards: ", - #endif -- Most_Search_Str, -+ (char *) Most_Search_Str, - MOST_SEARCH_BUF_LEN) == -1) return; - find_next_cmd(); - } ---- most-4.10.2.orig/src/line.c -+++ most-4.10.2/src/line.c -@@ -87,8 +87,7 @@ - while (b < end) - { - ch = *b++; -- if (((ch >= ' ') && (ch < 0x7F)) -- || (ch >= SLsmg_Display_Eight_Bit)) -+ if (most_isprint(ch)) - { - *s++ = ch; - continue; -@@ -108,103 +107,156 @@ - - if (end > Most_Eob) end = Most_Eob; - -- sprintf (buf, "0x%08X: ", Most_C_Offset); -+ sprintf (buf, "0x%08llX: ", Most_C_Offset); - ascii_format_line (beg, end, buf + 12); - SLsmg_write_string (buf); - SLsmg_erase_eol (); - } - --static int most_analyse_line(unsigned char *begg, unsigned char *endd, -- char *out, char *attributes) -+int most_isprint(unsigned char ch) - { -- unsigned char *beg, *end; -- unsigned int min_col, max_col; -- unsigned int i, i_max; -+ /* Can this be directly replaced with isprint? */ -+ return (ch >= ' ' && ch < 0x7F) || ch >= SLsmg_Display_Eight_Bit; -+} -+ -+static void most_analyse_line(unsigned char *beg, unsigned char *end, -+ unsigned char *out, char *attributes) -+{ -+ unsigned char *pout; -+ char* pattributes; -+ -+ /* Holds the number of columns for the current character counting -+ * from the left margin (in contrast to the leftmost visible -+ * column). -+ */ -+ unsigned int col; -+ -+ /* Holds the number of the column up to which to apply the -+ * current/following formatting. Only meaningful when format_rlim > i. -+ */ -+ unsigned int format_rlim; - -- beg = begg; -- end = endd; -- i = i_max = 0; -- min_col = Most_Column - 1; -- max_col = min_col + SLtt_Screen_Cols; -+ beg = most_forward_columns(beg, end, Most_Column - 1, 0); -+ pout = out; -+ pattributes = attributes; -+ col = format_rlim = 0; - - while (beg < end) - { - char attr = ' '; -- unsigned char ch; -+ unsigned char ch = *beg++; - -- if ('\n' == (ch = *beg++)) -+ if ('\n' == ch) - break; - - if ((ch == '\r') && (Most_V_Opt == 0)) - { -- if (i > i_max) i_max = i; -- i = 0; -+ if (col > format_rlim) format_rlim = col; -+ col = 0; - continue; - } - - if ((ch == '\b') && (Most_V_Opt == 0)) - { -- if (i > i_max) i_max = i; -- if (i > 0) -- i--; -+ if (col > format_rlim) format_rlim = col; -+ if (col > 0) -+ { -+ if (Most_UTF8_Mode) -+ { -+ SLwchar_Type wc; -+ pout = SLutf8_bskip_char(out, pout); -+ if (SLutf8_decode(pout, pout + SLUTF8_MAX_MBLEN, &wc, NULL)) -+ { -+ unsigned int char_len = SLwchar_wcwidth(wc); -+ if (char_len > 1) -+ col -= char_len - 1; -+ } -+ } -+ else -+ pout--; -+ pattributes--; -+ col--; -+ } - continue; - } - -- if (i < i_max) /* overstrike */ -+ if (col < format_rlim) /* overstrike */ - { - attr = 'b'; -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- if (out[i-min_col] == '_') -+ if (*pout == '_') - attr = 'u'; - else if (ch == '_') - { - attr = 'u'; -- ch = out[i - min_col]; -+ ch = *pout; - } - } - if (ch == ' ') - { -- i++; -+ col++; - continue; - } - /* drop */ - } -- -- if ((ch >= ' ') && (ch < 0x7F)) -- { -- if ((i >= min_col) && (i < max_col)) -+ -+ if (Most_UTF8_Mode) { -+ unsigned char *prev = --beg; -+ SLwchar_Type wc; -+ unsigned int len; -+ -+ if (SLutf8_decode(beg, end, &wc, NULL)) -+ { -+ unsigned int char_len = SLwchar_wcwidth(wc); -+ if (char_len > 1) -+ col += char_len - 1; -+ } -+ -+ beg = SLutf8_skip_char(beg, end); -+ len = beg - prev; -+ -+ if (len > 1) { -+ /* Non-ASCII char, display it. */ -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = ch; -- attributes[i-min_col] = attr; -+ memcpy(pout, prev, len); -+ pout += len; -+ *pattributes++ = attr; - } -- i++; -+ col++; - continue; -- } -- -- if (ch >= SLsmg_Display_Eight_Bit) -+ } -+ } -+ -+ if (most_isprint(ch)) - { -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = ch; -- attributes[i-min_col] = attr; -+ *pout++ = ch; -+ *pattributes++ = attr; - } -- i++; -+ col++; - continue; - } - - if ((ch == '\t') && (Most_T_Opt == 0) && (Most_Tab_Width)) - { -- -- int nspaces = Most_Tab_Width * (i/Most_Tab_Width + 1) - i; -+ /* Tab expansion must take into consideration the -+ * leftmost visible column. However, variable col holds the -+ * number of columns from the left margin and must be -+ * corrected. -+ */ -+ int vis_col = col + Most_Column - 1; -+ int nspaces = Most_Tab_Width - (vis_col % Most_Tab_Width); - while (nspaces > 0) - { -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = ' '; -- attributes[i-min_col] = attr; -+ *pout++ = ' '; -+ *pattributes++ = attr; - } -- i++; -+ col++; - nspaces--; - } - continue; -@@ -212,36 +264,36 @@ - - if (ch & 0x80) - { -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = '~'; -- attributes[i-min_col] = attr; -+ *pout++ = '~'; -+ *pattributes++ = attr; - } -- i++; -+ col++; - ch &= 0x7F; - /* drop */ - } - -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = '^'; -- attributes[i-min_col] = attr; -+ *pout++ = '^'; -+ *pattributes++ = attr; - } -- i++; -+ col++; - - if (ch == 0x7F) ch = '?'; - else ch += '@'; - -- if ((i >= min_col) && (i < max_col)) -+ if (col < SLtt_Screen_Cols) - { -- out[i-min_col] = ch; -- attributes[i-min_col] = attr; -+ *pout++ = ch; -+ *pattributes++ = attr; - } -- i++; -+ col++; - } - -- if (i < i_max) -- i = i_max; -+ if (col < format_rlim) -+ col = format_rlim; - - /* Now add "..." if selective display. To do that, the next line needs to - * be dealt with to determine whether or not it will be hidden. -@@ -249,7 +301,7 @@ - if (Most_Selective_Display - && (Most_W_Opt == 0) - && (beg < Most_Eob) -- && ((i >= min_col) && (i < max_col))) -+ && (col < SLtt_Screen_Cols)) - { - if (*beg == '\n') beg++; - -@@ -260,37 +312,29 @@ - if ((beg >= Most_Eob) || (*beg == '\n') - || (most_apparant_distance(beg) >= Most_Selective_Display)) - { -- i_max = i + 3; -- while (i < i_max) -+ /* Add an ellipsis, if they fit on the screen. */ -+ int rlimit = col + 3; -+ while (col < rlimit) - { -- if (i < max_col) -+ if (col < SLtt_Screen_Cols) - { -- out[i] = '.'; -- attributes[i] = ' '; -+ *pout++ = '.'; -+ *pattributes++ = ' '; - } -- i++; -+ col++; - } - } - } -- -- i_max = i; - -- if (i < min_col) -- i = min_col; -- else if (i >= max_col) -- i = max_col; -- -- i -= min_col; -- -- out[i] = 0; -- attributes[i] = 0; -- return i_max; -+ *pout = 0; -+ *pattributes = 0; - } - --static void output_with_attr (unsigned char *out, unsigned char *attr) -+static void output_with_attr (unsigned char *out, char *attr) - { -- unsigned char at, ch, lat; -+ unsigned char at, lat; - unsigned char *p = out; -+ unsigned char *pmax = p + strlen((char *) p); - - if (Most_V_Opt) - { -@@ -299,7 +343,7 @@ - } - - lat = ' '; -- while ((ch = *p) != 0) -+ while (p < pmax) - { - if (lat != *attr) - { -@@ -321,7 +365,7 @@ - else most_tt_normal_video (); - lat = at; - } -- p++; -+ p = SLutf8_skip_char(p, pmax); - attr++; - } - -@@ -340,10 +384,11 @@ - void most_display_line (void) +@@ -520,13 +530,13 @@ + .PP + .B setkey function-name key-sequence + .PP +-The ++The + .I setkey + command requires two arguments. The + .I function-name + argument specifies the function that is to be executed as a response + to the keys specified by the +-.I key-sequence ++.I key-sequence + argument are pressed. For example, + .PP + setkey "up" "^P" +@@ -544,9 +554,9 @@ + .PP + unsetkey "^F" + .PP +-Colors may be defined through the use of the ++Colors may be defined through the use of the + .I color +-keyword in the the configuration file using the syntax: ++keyword in the configuration file using the syntax: + .PP + .B color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR + .PP +@@ -589,19 +599,19 @@ + for valuable comments and criticisms. + I would especially like to thank those individuals + who have contributed code to +-.IR most. ++.IR most . + .PP + Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark + Pizzolato contributed to the early VMS versions of +-.IR most. ++.IR most . + In particular, Mark worked on it to get it ready for DECUS. + .PP + Foteos Macrides <MACRIDES@SCI.WFEB.EDU> adapted + .IR most +-for use in ++for use in + .IR cswing + and +-.IR gopher. ++.IR gopher . + A few features of the present version of + .IR most + was inspired from his work. +@@ -613,7 +623,7 @@ + automatic detection of zipped files. + .PP + I would also like to thank Shinichi Hama for his valuable criticisms of +-.IR most. ++.IR most . + .PP + Javier Kohen was instrumental in the support for UTF-8. + .PP +--- most-5.0.0a.orig/src/file.h ++++ most-5.0.0a/src/file.h +@@ -22,6 +22,7 @@ + #define MOST_MAX_FILES 4096 + #define MOST_GUNZIP_POPEN_FORMAT "gzip -dc \"%s\"" + #define MOST_BZIP2_POPEN_FORMAT "bzip2 -dc \"%s\"" ++#define MOST_LZMA_POPEN_FORMAT "lzma -dc '%s'" + + extern void most_reread_file (void); + extern void most_read_to_line (int); +--- most-5.0.0a.orig/src/file.c ++++ most-5.0.0a/src/file.c +@@ -77,7 +77,7 @@ + static int open_compressed_file(char *file, int mode, int *size) { - unsigned char *beg, *end; -- unsigned int len; -+#if 0 - unsigned char dollar; -+#endif - static unsigned char *line; -- static unsigned char *attr; -+ static char *attr; - static unsigned int line_len; - - if (Most_B_Opt) -@@ -357,37 +402,43 @@ - if (line_len < (unsigned int)(SLtt_Screen_Cols + 1) * SLUTF8_MAX_MBLEN) - { - SLfree ((char *) line); -- SLfree ((char *) attr); -+ SLfree (attr); - - line_len = (SLtt_Screen_Cols + 1) * SLUTF8_MAX_MBLEN; - - if ((NULL == (line = (unsigned char *) SLmalloc (line_len))) -- || (NULL == (attr = (unsigned char *) SLmalloc (line_len)))) -+ || (NULL == (attr = SLmalloc (line_len)))) - most_exit_error ("Out of memory"); - } + int fd; +- char buf[4], cmdbuf[2*MAX_PATHLEN]; ++ char buf[6], cmdbuf[2*MAX_PATHLEN]; + struct stat st; - (void) most_extract_line (&beg, &end); + # ifdef O_BINARY +@@ -97,7 +97,7 @@ -- len = most_analyse_line(beg, end, (char *) line, (char *) attr); -+ most_analyse_line(beg, end, line, attr); + if (fd < 0) return fd; -+#if 0 -+ /* Currently the dollar sign is not always being written at the -+ rightmost column when displaying multi-byte characters. */ - dollar = 0; - if (Most_W_Opt) - { -- if ((end < Most_Eob) -- && (*end != '\n')) -- dollar = '\\'; -+ if ((end < Most_Eob) -+ && (*end != '\n')) -+ dollar = '\\'; - } - else if (len > (unsigned int) SLtt_Screen_Cols + (Most_Column - 1)) - dollar = '$'; -- -+ - if (dollar) +- if (4 == read(fd, buf, 4)) ++ if (6 == read(fd, buf, 6)) { -- line[SLtt_Screen_Cols-1] = dollar; -- attr[SLtt_Screen_Cols-1] = ' '; -- line[SLtt_Screen_Cols] = 0; -- attr[SLtt_Screen_Cols] = 0; -+ unsigned char *pline = -+ most_forward_columns(line, line + line_len, SLtt_Screen_Cols-1, 1); -+ *pline = dollar; -+ *(pline+1) = 0; -+ attr[SLtt_Screen_Cols-1] = ' '; -+ attr[SLtt_Screen_Cols] = 0; - } -- -+#endif -+ - output_with_attr (line, attr); - SLsmg_erase_eol (); - } -@@ -398,21 +449,34 @@ - int most_apparant_distance (unsigned char *pos) - { - int i; -- unsigned char *save_pos, ch; -+ unsigned char *save_pos, *beg, ch; - unsigned int save_offset; + char *cmd = NULL; - save_offset = Most_C_Offset; - save_pos = pos; - Most_C_Offset = (unsigned int) (pos - Most_Beg); -- pos = most_beg_of_line(); -+ beg = pos = most_beg_of_line(); - Most_C_Offset = save_offset; - - i = 0; - while (pos < save_pos) - { -- ch = *pos++; -- if (((ch >= ' ') && (ch < 0x7F)) -- || (ch >= SLsmg_Display_Eight_Bit)) -+ ch = *pos; -+ -+ if (Most_UTF8_Mode) { -+ unsigned char *prev = pos; -+ int len; -+ pos = SLutf8_skip_char(pos, save_pos); -+ len = pos - prev; -+ if (len > 1) { -+ i++; -+ continue; -+ } -+ } else { -+ pos++; -+ } -+ -+ if (most_isprint(ch)) +@@ -113,6 +113,13 @@ { - i++; - continue; -@@ -420,7 +484,13 @@ - - if (!Most_V_Opt && (ch == '\b')) - { -- if (i > 0) i--; -+ if (i > 0) -+ { -+ if (Most_UTF8_Mode) -+ i -= pos - SLutf8_bskip_char(beg, pos); -+ else -+ i--; -+ } + cmd = MOST_BZIP2_POPEN_FORMAT; } - else if (!Most_V_Opt && (ch == '\015')) /* ^M */ - { -@@ -439,3 +509,95 @@ - } - return i; - } -+ -+/* -+ * Returns a pointer to the num_cols'th character after the one -+ * pointed at b. Invisible character runs are not counted toward this -+ * limit, i.e. strings that represent attributes, such as "_\b" for -+ * underlines. -+ * -+ * If multi_column is non-zero, characters spanning more than one -+ * column will add their extra width to the column count. -+ * -+ * If there the end of the buffer is reached, as delimited by argument -+ * e, then e is returned. -+ */ -+unsigned char *most_forward_columns (unsigned char *beg, unsigned char *e, unsigned int num_cols, int multi_column) -+{ -+ unsigned int col = 0; -+ unsigned int prev_width = 1; -+ unsigned char* b = beg; -+ -+ while ((b < e) -+ && ((col < num_cols) -+ || (*b == '\b') -+ || (*b == '\r'))) -+ { -+ unsigned char ch = *b; -+ -+ if (Most_UTF8_Mode) ++ else if ((buf[0] == (char) 0xff) ++ && (buf[1] == 'L') && (buf[2] == 'Z') ++ && (buf[3] == 'M') && (buf[4] == 'A') ++ && (buf[5] == (char) 0x00)) + { -+ unsigned char *prev = b; -+ int len; -+ b = SLutf8_skip_char(b, e); -+ len = b - prev; -+ if (len > 1) -+ { -+ if (multi_column) -+ { -+ SLwchar_Type wc; -+ if (SLutf8_decode(prev, e, &wc, NULL)) -+ col += prev_width = SLwchar_wcwidth(wc); -+ } -+ else -+ col++; -+ continue; -+ } ++ cmd = MOST_LZMA_POPEN_FORMAT; + } -+ else -+ b++; -+ -+ if (most_isprint(ch)) -+ { -+ col++; -+ prev_width = 1; -+ continue; -+ } -+ -+ if ((ch == '\b') || (ch == '\t') || (ch == '\r')) -+ switch (ch) -+ { -+ case '\b': -+ if (Most_V_Opt == 0) -+ { -+ if (col > 0) col -= prev_width; -+ } -+ else col += 2; -+ break; -+ -+ case '\r': -+ if (Most_V_Opt == 0) -+ col = 0; -+ else -+ col += 2; -+ break; + + if (cmd != NULL) + { +--- most-5.0.0a.orig/autoconf/config.guess ++++ most-5.0.0a/autoconf/config.guess +@@ -1,9 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2005-04-22' ++timestamp='2009-12-30' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,23 +18,25 @@ + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + +-# Originally written by Per Bothner <per@bothner.com>. +-# Please send patches to <config-patches@gnu.org>. Submit a context +-# diff and a properly formatted ChangeLog entry. + -+ case '\t': -+ if (Most_T_Opt == 0) -+ col = Most_Tab_Width * (col/Most_Tab_Width + 1); -+ else -+ col += 2; /* ^I is two chars long. */ -+ break; -+ } -+ else if (ch & 0x80) -+ col += 3; -+ else -+ col += 2; -+ } ++# Originally written by Per Bothner. Please send patches (context ++# diff format) to <config-patches@gnu.org> and include a ChangeLog ++# entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,8 +56,9 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -66,11 +70,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -104,7 +108,7 @@ + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; +- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +@@ -123,7 +127,7 @@ + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ;' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -158,6 +162,7 @@ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -166,7 +171,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -196,55 +201,23 @@ + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amd64:OpenBSD:*:*) +- echo x86_64-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- cats:OpenBSD:*:*) +- echo arm-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- luna88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mips64-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; + macppc:MirBSD:*:*) +- echo powerppc-unknown-mirbsd${UNAME_RELEASE} +- exit 0 ;; ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) +@@ -297,40 +270,43 @@ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; ++ exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe +- exit 0 ;; ++ exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 +- exit 0 ;; ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm:riscos:*:*|arm:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -338,32 +314,51 @@ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 +- exit 0 ;; ++ exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -372,10 +367,10 @@ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -387,10 +382,10 @@ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -401,40 +396,40 @@ + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -458,32 +453,33 @@ + exit (-1); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c \ +- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +@@ -499,29 +495,29 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -529,7 +525,7 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -544,15 +540,19 @@ + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; +- *:AIX:*:[45]) ++ exit ;; ++ *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -565,28 +565,28 @@ + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -648,9 +648,19 @@ + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then +- # avoid double evaluation of $set_cc_for_build +- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build +- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ eval $set_cc_for_build + -+ /* Last character was too wide. Backstep it. */ -+ if (col > num_cols) -+ b = SLutf8_bskip_char(beg, b); ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 + -+ return b; -+} ---- most-4.10.2.orig/src/line.h -+++ most-4.10.2/src/line.h -@@ -7,5 +7,7 @@ - - extern void most_display_line(void); - extern int most_apparant_distance(unsigned char *); -+extern int most_isprint(unsigned char); -+extern unsigned char *most_forward_columns (unsigned char *, unsigned char *, unsigned int, int); - #endif - ---- most-4.10.2.orig/src/most.c -+++ most-4.10.2/src/most.c -@@ -125,7 +125,7 @@ - ch = *(++str); - if ( ch == '/') - { -- strcpy (Most_Search_Str,++str); -+ strcpy ((char *) Most_Search_Str,++str); - return; - } - -@@ -329,7 +329,8 @@ - - static void do_most (char *file, int start) - { -- int piped, row, col; -+ int piped; -+ long long row, col; - - most_get_cdir(Most_C_Dir); - -@@ -347,7 +348,7 @@ - Most_Curs_Offset = Most_C_Offset; - - if (*Most_Search_Str -- && ((row = most_search (Most_Beg + Most_C_Offset, 1, &col)) > 0)) -+ && ((row = most_search (Most_Beg + Most_C_Offset, 1LL, &col)) > 0)) - most_goto_line(row); - else - { -@@ -455,13 +456,7 @@ - - SLtt_get_terminfo(); - #if SLANG_VERSION >= 20000 --#if 0 -- Most_UTF8_Mode = SLutf8_enable (1); -- if (Most_UTF8_Mode) -- { -- fprintf (stderr, "UTF-8 Mode is in effect\n"); -- } --#endif -+ Most_UTF8_Mode = SLutf8_enable (-1); - #endif - SLtt_Ignore_Beep = 1; - if (No_Colors) ---- most-4.10.2.orig/src/most.h -+++ most-4.10.2/src/most.h -@@ -1,4 +1,5 @@ - #include "config.h" -+#define SLANG_REGEXP - extern int Most_S_Opt; - extern int Most_A_Opt; /* automatically choose -b if necessary */ - extern int Most_V_Opt; /* display control chars */ ---- most-4.10.2.orig/src/search.c -+++ most-4.10.2/src/search.c -@@ -20,6 +20,7 @@ - */ - #include "config.h" - -+#include <ctype.h> - #include <stdio.h> - #include <string.h> - #include <slang.h> -@@ -31,18 +32,18 @@ - #include "display.h" - #include "search.h" - --/* Note!!! The regular expression searches may not work. I have not -- * tested them. -- * FIXME!!! -- */ -- - int Most_Case_Sensitive = 0; --char Most_Search_Str[256]; -+unsigned char Most_Search_Str[256]; - int Most_Search_Dir = 1; - - #include "jdmacros.h" - --#define UPCASE(ch) ((!Most_Case_Sensitive && (ch <= 'z') && (ch >= 'a')) ? (ch - 32) : ch) -+#if SLANG_VERSION < 20000 -+# define NORM_CHAR(ch) ((!Most_Case_Sensitive) ? toupper(ch) : ch) -+# define UPCASE(ch) NORM_CHAR(ch) -+#else -+# define NORM_CHAR(ch) (ch) -+#endif - - #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP) - -@@ -78,7 +79,7 @@ - * This function is called by the V8 regcomp to report - * errors in regular expressions. - */ --static void regerror(char *s) -+static void regerror(const char *s) - { - char string[256]; - -@@ -95,13 +96,17 @@ - * 0 error - * - */ --static int do_regcomp(unsigned char *key) -+static int do_regcomp(const unsigned char *key) - { - static int old_Most_Case_Sensitive; -- unsigned char UpCaseKey[sizeof(savepattern)]; - # ifndef HAVE_V8_REGCOMP - int posn; /* reg exp error at this offset */ - # endif -+# if SLANG_VERSION < 20000 -+ unsigned char UpCaseKey[sizeof(savepattern)]; -+# else -+ int re_flags = 0; -+# endif - - /* - * Only recompile search string if it has changed -@@ -124,6 +129,7 @@ - - old_Most_Case_Sensitive = Most_Case_Sensitive; - -+# if SLANG_VERSION < 20000 - if ( Most_Case_Sensitive == 0 ) - { - register unsigned char *p; /* ptr to UpCaseKey */ -@@ -141,6 +147,7 @@ - - *p = '\0'; - } -+# endif - - strcpy((char *)savepattern, (char *)key); - -@@ -162,7 +169,12 @@ - # else - if (Regexp != NULL) - SLregexp_free (Regexp); -- if (NULL == (Regexp = SLregexp_compile ((char *)key, Most_Case_Sensitive ? 0 : SLREGEXP_CASELESS))) -+ -+ if (!Most_Case_Sensitive) -+ re_flags |= SLREGEXP_CASELESS; -+ if (Most_UTF8_Mode) -+ re_flags |= SLREGEXP_UTF8; -+ if (NULL == (Regexp = SLregexp_compile ((char *)key, re_flags))) - posn = -1; - else - posn = 0; -@@ -187,7 +199,7 @@ - * Call the appropriate regular expression execute function - */ - --static unsigned char *do_regexec(unsigned char *string) -+static unsigned char *do_regexec(const unsigned char *string, size_t length) - { - # ifdef HAVE_V8_REGCOMP - if ( regexec(regpattern, (char *)string) ) -@@ -196,40 +208,46 @@ - return( NULL ); - # else - # if SLANG_VERSION < 20000 -- return ( SLang_regexp_match(string, strlen((char *)string), ®data) ); -+ return ( SLang_regexp_match(string, length, ®data) ); - # else -- return (unsigned char *)SLregexp_match (Regexp, (char *)string, strlen ((char *)string)); -+ return (unsigned char *)SLregexp_match (Regexp, (char *)string, length); - # endif - # endif /* HAVE_V8_REGCOMP */ - } - - /* -- * Make a upper case copy of a string. Also changes any "c\b" character -- * strings into just "" so that highlighted and underlined characters -- * can be searched. -+ * Changes any "c\b" character strings into just "" so that -+ * highlighted and underlined characters can be searched. Stores in -+ * length the new size of the string, after the aforementioned -+ * changes. -+ * -+ * If using a version of S-Lang that does not support case -+ * insensitive regular expressions, this function upper cases the -+ * input string, as well. - * - * Reuses malloced memory, so a copy cannot be retained between calls. - */ - --static unsigned char *StrUpCaseCopy(unsigned char *input) -+static const unsigned char *StrNormCopy(const unsigned char *input, -+ size_t *length) - { - static unsigned char *uppercase; /* ptr to malloced area */ - static size_t bufsize; /* size of malloced area */ -- unsigned char *src; /* ptr to source */ -+ const unsigned char *src; /* ptr to source */ -+ const unsigned char *end; /* ptr to end of source */ - register unsigned char *dest; /* ptr to destination */ - register int idx; /* index into uppercase[] */ -- register unsigned char c; /* source character */ -- size_t length; /* size of string to copy */ - - src = input; -- length = strlen((char *)src) + 1; /* len of line plus terminator */ -+ end = input + *length; - -- if ( length > bufsize ) -+ if ( *length >= bufsize ) - { - if ( uppercase != (unsigned char *)NULL ) - free(uppercase); - -- bufsize = (length > 256 ) ? length : 256; /* 256 byte default */ -+ /* len of line plus terminator */ -+ bufsize = (*length >= 256 ) ? *length + 1 : 256; /* 256 byte default */ - - uppercase = (unsigned char *)malloc(bufsize); - if ( uppercase == (unsigned char *)NULL ) -@@ -242,8 +260,9 @@ - - dest = uppercase; - -- for ( idx = 0 ; (c = *src) != '\0' ; src++ ) -+ for ( idx = 0 ; src < end ; src++ ) - { -+ unsigned char c = *src; - if ( c == '\b' ) /* backspace */ - { - if ( idx-- > 0 ) -@@ -252,54 +271,79 @@ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -658,11 +668,11 @@ + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -690,219 +700,248 @@ + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 +- exit 0 ;; ++ exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd +- exit 0 ;; ++ exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd +- exit 0 ;; ++ exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix +- exit 0 ;; ++ exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf +- exit 0 ;; ++ exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf +- exit 0 ;; ++ exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk else - { - if ( idx++ >= 0 ) -- *dest++ = UPCASE(c); -+ *dest++ = NORM_CHAR(c); - } - } - - *dest = '\0'; /* add termination */ - -+ *length = dest - uppercase; - return(uppercase); - } - - /* -- * Given an offset into a copy made by StrUpCaseCopy() and a pointer to the -+ * Given an offset into a copy made by StrNormCopy() and a pointer to the - * original string, returns a pointer into the original string corresponding - * to this offset. - */ - --static unsigned char *GetOrigPtr(unsigned char *original, int offset) -+static const unsigned char * -+GetOrigPtr(const unsigned char *original, int offset, -+ const unsigned char *end) - { -- register unsigned char *p = original; -+ const unsigned char *p = original; - register int j = offset; - - /* - * Step through, adjusting offset according to backspaces found - */ -- while ( *p != '\0' ) -+ while ( p < end ) - { -+ const unsigned char *next; -+ if (Most_UTF8_Mode) -+ next = SLutf8_skip_char((unsigned char*) p, (unsigned char*) end); + echo ${UNAME_MACHINE}-unknown-osf1 + fi +- exit 0 ;; ++ exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites +- exit 0 ;; ++ exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:FreeBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` +- exit 0 ;; ++ case ${UNAME_MACHINE} in ++ pc98) ++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +- exit 0 ;; +- i*:MINGW*:*) ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 +- exit 0 ;; ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 +- exit 0 ;; +- x86:Interix*:[34]*) +- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' +- exit 0 ;; ++ exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +- exit 0 ;; ++ exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix +- exit 0 ;; ++ exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +- exit 0 ;; +- amd64:CYGWIN*:*:*) ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin +- exit 0 ;; ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin +- exit 0 ;; ++ exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` +- exit 0 ;; ++ exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu +- exit 0 ;; ++ exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix +- exit 0 ;; ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + else -+ next = p + 1; -+ size_t length_last = next - p; -+ - if ( *p == '\b' ) -- j++; -+ j += length_last; ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu +- exit 0 ;; ++ exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu +- exit 0 ;; ++ exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- mips:Linux:*:*) ++ exit ;; ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips +- #undef mipsel ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; +- mips64:Linux:*:*) +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #undef CPU +- #undef mips64 +- #undef mips64el +- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mips64el +- #else +- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips64 +- #else +- CPU= +- #endif +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 +- ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit 0 ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu +- exit 0 ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit 0 ;; ++ or32:Linux:*:*) ++ echo or32-unknown-linux-gnu ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -910,87 +949,40 @@ + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac +- exit 0 ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux +- exit 0 ;; ++ exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu +- exit 0 ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit 0 ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit 0 ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit 0 ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include <features.h> +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #ifdef __INTEL_COMPILER +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 +- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 +- ;; ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 +- exit 0 ;; ++ exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... +@@ -998,27 +990,27 @@ + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; ++ exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; ++ exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; +- i*86:syllable:*:*) ++ exit ;; ++ i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable +- exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp +- exit 0 ;; ++ exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -1026,15 +1018,16 @@ else -- j--; -+ j -= length_last; - - if ( j < 0 ) - break; + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi +- exit 0 ;; +- i*86:*:5:[78]*) ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` +@@ -1052,73 +1045,86 @@ else -- p++; -+ p = next; - } - - return(p); - } - #endif /* HAVE_V8_REGCOMP || SLANG_REGEXP */ - -+/* Returns a pointer to the first occurrence of '\n' in string beg, or -+ * end if no '\n' can be found between inclusive beg and exclusive -+ * end. -+ */ -+static const unsigned char * -+find_eol(const unsigned char *beg, const unsigned char *end) -+{ -+ const unsigned char *p; -+ if ( (p = memchr(beg, '\n', end - beg)) != NULL) -+ return p; -+ else -+ return end; -+} -+ - /* This routine returns the 1 + position of first match of key in str. - key is modified to match the case of str. */ - /* We should try to optimize this routine */ - /* searches from beg up to but not including end */ - --static unsigned char *forw_search_region(unsigned char *beg, -- unsigned char *end, -- unsigned char *key) -+static const unsigned char * -+forw_search_region(const unsigned char *beg, -+ const unsigned char *end, -+ const unsigned char *key) - { - #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP) - /* -@@ -307,10 +351,11 @@ - * to be broken into lines. - * - */ -- unsigned char *p; /* temp pointer */ -- unsigned char *linebeg; /* beginning of working line */ -- unsigned char *copy; /* ptr to upper case copy */ -+ const unsigned char *linebeg; /* beginning of working line */ -+ const unsigned char *lineend; /* end of working line */ -+ const unsigned char *norm_line; /* ptr to normalized line */ - unsigned char *match; /* ptr to matching string */ -+ int anchored_re; - - /* - * Compile "key" into an executable regular expression -@@ -318,58 +363,35 @@ - if ( do_regcomp(key) == 0 ) - return(Most_Eob); - -- /* -- * For regular expression searches we need to do a line by line -- * search, so it is necessary to temporarily replace '\n' with '\0' -- * characters. -- */ -- p = beg; -- linebeg = beg; -+ anchored_re = key[0] == '^'; - -- while (linebeg < end) -+ for ( linebeg = beg ; linebeg < end ; linebeg = lineend + 1 ) - { -- while ((p < end) && (*p != '\n')) p++; -- if (p == end) break; -- *p = 0; -+ size_t length; - -- if ( Most_Case_Sensitive == 0 ) /* i.e. case insensitive */ -- { -- copy = StrUpCaseCopy(linebeg); -- if ( copy == (unsigned char *)NULL ) -- return(Most_Eob); -- } -+ lineend = find_eol(linebeg, end); -+ -+ length = lineend - linebeg; -+ if (0 == length) continue; /* Skip empty lines. */ -+ -+ norm_line = StrNormCopy(linebeg, &length); -+ if ( norm_line == NULL ) -+ return(Most_Eob); - - /* - * Quick sanity check for beginning of line archored tests. -- * If 1st char of key is "^", then the character before linebeg (which -- * must be beyond the start of the window), must be a "\n", -- * otherwise do_regexec() isn't called. -+ * If 1st char of key is "^", then the character before -+ * linebeg (which must be within the buffer), must be a "\n". - */ -- if ( --# if 0 -- ((*key != '^') -- || (linebeg > Most_Win->beg_pos && linebeg[-1] == '\n')) -- && --#endif -- (match = do_regexec(Most_Case_Sensitive ? linebeg : copy))) -+ if ( !(anchored_re && (linebeg <= Most_Beg || linebeg[-1] != '\n')) -+ && (match = do_regexec(norm_line, length)) ) - { -- *p = '\n'; -- if ( Most_Case_Sensitive == 0 ) -- { -- /* -- * Use offset into "copy" as idx to find point in -- * real line. -- */ -- return( GetOrigPtr(linebeg, match - copy) ); -- } -- else -- { -- return( match ); -- } -+ /* -+ * Use offset into "norm_line" as idx to find point in -+ * real line. -+ */ -+ return( GetOrigPtr(linebeg, match - norm_line, lineend) ); - } -- -- *p++ = '\n'; -- linebeg = p; - } - - return(Most_Eob); -@@ -475,23 +497,18 @@ - * pattern "key". - */ - --static unsigned char *back_search_region(unsigned char *beg, -- unsigned char *end, -- unsigned char *key) -+static const unsigned char * -+back_search_region(const unsigned char *beg, -+ const unsigned char *end, -+ const unsigned char *key) - { - #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP) -- register unsigned char *p; -- unsigned char *endp, /* end of line */ -- *lastmatch, /* last match in line */ -+ const unsigned char *p; -+ const unsigned char *endp, /* end of line */ -+ *lastmatch, /* last match in line */ - *endprevline, /* end of line before this one */ - *match; /* ptr to matching string */ -- unsigned char savec; /* last char on line */ -- -- /* -- * Compile "key" into an executable regular expression -- */ -- if ( do_regcomp(key) == 0 ) -- return(Most_Eob); -+ int anchored_re; + echo ${UNAME_MACHINE}-pc-sysv32 + fi +- exit 0 ;; ++ exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about +- # the processor, so we play safe by assuming i386. +- echo i386-pc-msdosdjgpp +- exit 0 ;; ++ # the processor, so we play safe by assuming i586. ++ # Note: whatever this is, it MUST be the same as what config.sub ++ # prints for the "djgpp" host, or else GDB configury will decide that ++ # this is a cross-build. ++ echo i586-pc-msdosdjgpp ++ exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 +- exit 0 ;; ++ exit ;; + paragon:*:*:*) + echo i860-intel-osf1 +- exit 0 ;; ++ exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi +- exit 0 ;; ++ exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv +- exit 0 ;; ++ exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv +- exit 0 ;; ++ exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix +- exit 0 ;; ++ exit ;; + M68*:*:R3V[5678]*:*) +- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 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) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ +- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4 && exit 0 ;; ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 +- exit 0 ;; ++ exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` +@@ -1126,73 +1132,94 @@ + else + echo ns32k-sni-sysv + fi +- exit 0 ;; ++ exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 +- exit 0 ;; ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 +- exit 0 ;; ++ exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 +- exit 0 ;; ++ exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos +- exit 0 ;; ++ exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos +- exit 0 ;; ++ exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 +- exit 0 ;; ++ exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos +- exit 0 ;; ++ exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos +- exit 0 ;; ++ exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos +- exit 0 ;; ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in +- *86) UNAME_PROCESSOR=i686 ;; ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then +@@ -1200,25 +1227,25 @@ + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:QNX:*:4*) + echo i386-pc-qnx +- exit 0 ;; ++ exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux +- exit 0 ;; ++ exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv +- exit 0 ;; ++ exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 +@@ -1229,41 +1256,50 @@ + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 +- exit 0 ;; ++ exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 +- exit 0 ;; ++ exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex +- exit 0 ;; ++ exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 +- exit 0 ;; ++ exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 +- exit 0 ;; ++ exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 +- exit 0 ;; ++ exit ;; + *:ITS:*:*) + echo pdp10-unknown-its +- exit 0 ;; ++ exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` +- exit 0 ;; ++ exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in +- A*) echo alpha-dec-vms && exit 0 ;; +- I*) echo ia64-dec-vms && exit 0 ;; +- V*) echo vax-dec-vms && exit 0 ;; ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix +- exit 0 ;; ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 +@@ -1295,7 +1331,7 @@ + #endif - /* - * Starting from the end of the buffer, break the buffer into lines -@@ -501,84 +518,60 @@ - * and isn't that what we want to do in a reverse search. - */ - endp = end; -- lastmatch = Most_Eob; -- while ( 1 ) /* forever loop */ -- { -- if ( (endp < beg) ) -- return(Most_Eob); /* Reach start of buffer, no match */ -+ endprevline = end; -+ match = Most_Eob; + #if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix"); exit (0); ++ printf ("arm-acorn-riscix\n"); exit (0); + #endif -- /* Find the real end of current line */ -- if ( (p = (unsigned char *)strchr((char *)endp, '\n')) != NULL ) -- endp = p; + #if defined (hp300) && !defined (hpux) +@@ -1384,11 +1420,12 @@ + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + + # Apollos put the system type in the environment. + +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + + # Convex versions that predate uname can use getsysinfo(1) + +@@ -1397,22 +1434,22 @@ + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + c34*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + c38*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + c4*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + esac + fi + +@@ -1423,9 +1460,9 @@ + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + and +- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +--- most-5.0.0a.orig/autoconf/config.sub ++++ most-5.0.0a/autoconf/config.sub +@@ -1,9 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ++# Free Software Foundation, Inc. + +-timestamp='2005-04-22' ++timestamp='2010-01-22' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -21,22 +22,26 @@ + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, +-# Boston, MA 02111-1307, USA. - -- savec = *endp; -- *endp = '\0'; /* terminate line with NULL */ -+ /* Find out whether the regexp attempts to match a line boundary. -+ * In this case, only a match on the full line should be attempted. -+ */ -+ anchored_re = key[strlen((const char *) key)-1] == '$'; ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA ++# 02110-1301, USA. ++# + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. -+ while ( endp > beg ) -+ { - /* Find the beginning of line */ - for ( p = endp - 1 ; (p >= beg) && (*p != '\n') ; p-- ) - { - } - -+ if ( p < beg ) -+ break; + - endprevline = p; - -- p++; /* point to 1st char after newline */ -+ /* -+ * Quick sanity check for end of line archored tests. If last -+ * char of key is "$", then the character after endp (which -+ * must be within the buffer), must be a "\n". -+ */ -+ if ( anchored_re && endp < Most_Eob && endp[0] != '\n' ) -+ { -+ endp = p; -+ continue; -+ } - - /* - * Keep searching forward in this line till no more matches - */ -- if ( Most_Case_Sensitive == 0 ) /* i.e. case insensitive */ -+ do - { -- unsigned char *copy; /* ptr to upper case copy */ -- unsigned char *savecopy; /* copy of "copy" */ -- -- copy = StrUpCaseCopy(p); -- if ( copy == (unsigned char *)NULL ) -- return(Most_Eob); -+ lastmatch = match; - -- savecopy = copy; -- -- /* -- * Quick sanity check for beginning of line archored tests. -- * Must be at start of line. -- */ -- while ( ((*key != '^') || (copy == savecopy)) -- && (match = do_regexec(copy)) ) -- { -- if ( GetOrigPtr(p, match - savecopy) > end ) -- break; -- lastmatch = match; -- if ( *lastmatch == '\0' ) /* key must be "$" or "^" */ -- break; -- copy = lastmatch + 1; /* character after match */ -- } -+ if (Most_UTF8_Mode) -+ p = SLutf8_skip_char((unsigned char*) p, (unsigned char*) endp); -+ else -+ p++; - -- if ( lastmatch != Most_Eob ) /* found a match */ -- lastmatch = GetOrigPtr(p, lastmatch - savecopy); -- } -- else -- { -- /* -- * Quick sanity check for beginning of line archored tests. -- * Must be at start of buffer or start of line -- */ -- while ( ( (*key != '^') || (p == endprevline + 1) ) -- && (match = do_regexec(p)) ) -- { -- if ( match > end ) -- break; -- lastmatch = match; -- if ( *lastmatch == '\0' ) /* key must be "$" or "^" */ -- break; -- p = lastmatch + 1; /* character after match */ -- } -+ match = forw_search_region(p, endp, key); - } -+ while ( match <= endp ); - -- *endp = savec; - if ( lastmatch != Most_Eob ) /* found a match */ - return(lastmatch); - - endp = endprevline; - } + # Please send patches to <config-patches@gnu.org>. Submit a context +-# diff and a properly formatted ChangeLog entry. ++# diff and a properly formatted GNU ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + -+ return(Most_Eob); /* Reached start of buffer, no match */ - #else - char ch, char1, work[256]; - unsigned char *pos; -@@ -670,15 +663,15 @@ - #endif /* HAVE_V8_REGCOMP || SLANG_REGEXP */ - } - --int most_search(unsigned char *from, int repeat, int *col) -+long long most_search(const unsigned char *from, int repeat, long long *col) - { - /* return the line match was found as well as line number, - * search from i on; assume that line_array match the i so we need - * no initial lookup */ - -- int test, save_line, the_col, row, s_len; -+ long long test, save_line, the_col, row, s_len; - char string[300]; -- unsigned char *pos; -+ const unsigned char *pos; - unsigned int save_ofs; - unsigned int found_ofs; - -@@ -687,7 +680,10 @@ - save_line = Most_C_Line; - found_ofs = Most_Eob - Most_Beg; - *col = 0; -- s_len = strlen (Most_Search_Str); -+ if (Most_UTF8_Mode) -+ s_len = SLutf8_strlen (Most_Search_Str, 0); -+ else -+ s_len = strlen ((char *) Most_Search_Str); - pos = from; - - if (*Most_Search_Str) ---- most-4.10.2.orig/src/search.h -+++ most-4.10.2/src/search.h -@@ -6,7 +6,7 @@ - extern int Most_Case_Sensitive; - extern int Most_Search_Dir; - #define MOST_SEARCH_BUF_LEN 256 --extern char Most_Search_Str[MOST_SEARCH_BUF_LEN]; --extern int most_search(unsigned char *, int, int *); -+extern unsigned char Most_Search_Str[MOST_SEARCH_BUF_LEN]; -+extern long long most_search(const unsigned char *, int, long long *); - #endif - ---- most-4.10.2.orig/src/window.c -+++ most-4.10.2/src/window.c -@@ -48,10 +48,11 @@ - - Most_Window_Type *Most_Win; - Most_Window_Type *Most_Top_Win; --int Most_Top_Line; /* row number of top window */ --int Most_Curs_Row; --int Most_Curs_Col; --int Most_Column = 1; -+long long Most_Top_Line; /* row number of top window */ -+long long Most_Curs_Row; -+long long Most_Curs_Col; -+/* The leftmost visible column. */ -+long long Most_Column = 1; - int Most_Restore_Width_To = 0; - char Most_Mini_Buf[256]; - unsigned long Most_Curs_Offset; -@@ -156,7 +157,7 @@ - SLsmg_write_nchars (buf + point, len - point); - if (col < SLtt_Screen_Cols) - break; -- buf++; point--; len--; /* FIXME for UTF-8 */ -+ buf++; point--; len--; - } - SLsmg_erase_eol (); - SLsmg_gotorc (SLtt_Screen_Rows - 1, col); -@@ -227,6 +228,8 @@ - { - SLang_RLine_Info_Type *rli; - unsigned int flags = SL_RLINE_BLINK_MATCH; -+ if (Most_UTF8_Mode) -+ flags |= SL_RLINE_UTF8_MODE; - - if (NULL == (rli = SLrline_open (SLtt_Screen_Cols, flags))) - return NULL; -@@ -258,7 +261,7 @@ - - /* do not use default. The up arrow can always get it back. */ - if ((what != NULL) -- && (*what) && (what != Most_Search_Str)) -+ && (*what) && (what != (char *) Most_Search_Str)) - { - if (-1 == SLrline_set_line (Most_RLI, what)) - return -1; -@@ -593,7 +596,8 @@ - unsigned int num_chars; - unsigned int field_width, info_len; - unsigned char *eob; -- int r, x; -+ int r; -+ long long x; - - eob = Most_Eob; - #if MOST_HAS_MMAP -@@ -601,20 +605,20 @@ - eob = Most_Beg + Most_Buf->mmap_size; - #endif - -- if (eob == Most_Beg) x = 100; -+ if (eob == Most_Beg) x = 100LL; - else - { -- x = Most_C_Offset * 100; -+ x = Most_C_Offset * 100LL; - x = x / (eob - Most_Beg); - } - - if (Most_C_Line + (Most_Win->bot - Most_Win->top + 1) >= Most_Num_Lines) -- x = 100; -+ x = 100LL; - - /* for files with end of file above the bottom row (due to window manipulations) */ -- if (x > 100) x = 100; -+ if (x > 100LL) x = 100LL; - -- sprintf (info, "(%d,%d) %d%%", Most_C_Line, Most_Column, x); -+ sprintf (info, "(%lld,%lld) %d%%", Most_C_Line, Most_Column, (int)x); - - r = Most_Win->bot + 1; - most_goto_rc (r,1); ---- most-4.10.2.orig/src/window.h -+++ most-4.10.2/src/window.h -@@ -5,11 +5,11 @@ - typedef struct _Most_Window_Type - { - unsigned long top_offset; /* offset of top line of window from bob */ -- int beg_line; /* line number of top */ -- int curs_line; /* line number of curs pos */ -- int curs_col; /* column number of curs pos */ -+ long long beg_line; /* line number of top */ -+ long long curs_line; /* line number of curs pos */ -+ long long curs_col; /* column number of curs pos */ - unsigned long curs_offset; /* pos of cursor from bob*/ -- int col; /* column offset */ -+ long long col; /* column offset */ - int n_lines; /* number of lines of buffer (mode dependent) */ - int top; /* screen location of top */ - int bot; /* screen location of bot */ -@@ -29,9 +29,9 @@ - extern Most_Window_Type *Most_Win; - extern Most_Window_Type *Most_Top_Win; - extern unsigned long Most_Curs_Offset; --extern int Most_Column; --extern int Most_Curs_Row; --extern int Most_Curs_Col; -+extern long long Most_Column; -+extern long long Most_Curs_Row; -+extern long long Most_Curs_Col; - #define MOST_MINI_BUF_LEN 256 - extern char Most_Mini_Buf[MOST_MINI_BUF_LEN]; - extern int Most_Selective_Display; + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -70,8 +75,9 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free ++Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -83,11 +89,11 @@ + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -99,7 +105,7 @@ + *local*) + # First pass through any local machine types. + echo $1 +- exit 0;; ++ exit ;; + + * ) + break ;; +@@ -118,8 +124,10 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ +- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ ++ storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -145,10 +153,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray) ++ -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -170,6 +181,10 @@ + -hiux*) + os=-hiuxwe2 + ;; ++ -sco6) ++ os=-sco5v6 ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -186,6 +201,10 @@ + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -sco5v6*) ++ # Don't forget version if it is 3.2v4 or newer. ++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ++ ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` +@@ -230,23 +249,28 @@ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | fr30 | frv \ ++ | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ ++ | lm32 \ ++ | m32c | m32r | m32rle | m68000 | m68k | m88k \ ++ | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +- | mips64vr | mips64vrel \ ++ | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ ++ | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ +@@ -255,31 +279,40 @@ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | moxie \ ++ | mt \ + | msp430 \ ++ | nios | nios2 \ + | ns16k | ns32k \ +- | openrisc | or32 \ ++ | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ++ | rx \ ++ | score \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ +- | sparcv8 | sparcv9 | sparcv9b \ +- | strongarm \ ++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ ++ | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ ++ | ubicom32 \ + | v850 | v850e \ + | we32k \ +- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ +- | z8k) ++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ ++ | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) ++ m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ ms1) ++ basic_machine=mt-unknown ++ ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and +@@ -299,28 +332,32 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ ++ | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32r-* | m32rle-* \ ++ | lm32-* \ ++ | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +- | mips64vr-* | mips64vrel-* \ ++ | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ ++ | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ +@@ -329,27 +366,35 @@ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ ++ | mt-* \ + | msp430-* \ ++ | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ ++ | romp-* | rs6000-* | rx-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tile-* | tilegx-* \ + | tron-* \ ++ | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ +- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ +- | xstormy16-* | xtensa-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ +- | z8k-*) ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +@@ -413,6 +458,10 @@ + basic_machine=m68k-apollo + os=-bsd + ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -421,10 +470,26 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -453,8 +518,8 @@ + basic_machine=craynv-cray + os=-unicosmp + ;; +- cr16c) +- basic_machine=cr16c-unknown ++ cr16) ++ basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) +@@ -492,6 +557,10 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp +@@ -646,6 +715,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -657,10 +734,17 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze) ++ basic_machine=microblaze-xilinx ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +@@ -686,6 +770,9 @@ + basic_machine=i386-pc + os=-msdos + ;; ++ ms1-*) ++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs +@@ -761,9 +848,8 @@ + basic_machine=hppa1.1-oki + os=-proelf + ;; +- or32 | or32-*) ++ openrisc | openrisc-*) + basic_machine=or32-unknown +- os=-coff + ;; + os400) + basic_machine=powerpc-ibm +@@ -785,6 +871,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -794,6 +888,12 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; ++ pc98) ++ basic_machine=i386-pc ++ ;; ++ pc98-*) ++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +@@ -850,6 +950,10 @@ + basic_machine=i586-unknown + os=-pw32 + ;; ++ rdos) ++ basic_machine=i386-pc ++ os=-rdos ++ ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff +@@ -876,6 +980,10 @@ + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; ++ sde) ++ basic_machine=mipsisa32-sde ++ os=-elf ++ ;; + sei) + basic_machine=mips-sei + os=-seiux +@@ -887,6 +995,9 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; + sh64) + basic_machine=sh64-unknown + ;; +@@ -976,6 +1087,15 @@ + basic_machine=tic6x-unknown + os=-coff + ;; ++ # This must be matched before tile*. ++ tilegx*) ++ basic_machine=tilegx-unknown ++ os=-linux-gnu ++ ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +@@ -1051,6 +1171,10 @@ + basic_machine=z8k-unknown + os=-sim + ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -1089,13 +1213,10 @@ + we32k) + basic_machine=we32k-att + ;; +- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sh64) +- basic_machine=sh64-unknown +- ;; +- sparc | sparcv8 | sparcv9 | sparcv9b) ++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) +@@ -1142,6 +1263,9 @@ + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1162,26 +1286,30 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ ++ | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ +- | -chorusos* | -chorusrdb* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ +- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) ++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1199,7 +1327,7 @@ + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) +@@ -1311,6 +1439,11 @@ + -zvmoe) + os=-zvmoe + ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -nacl*) ++ ;; + -none) + ;; + *) +@@ -1333,6 +1466,12 @@ + # system, and we'll never get to this point. + + case $basic_machine in ++ score-*) ++ os=-elf ++ ;; ++ spu-*) ++ os=-elf ++ ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1342,9 +1481,9 @@ + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff +- ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 +@@ -1370,6 +1509,9 @@ + m68*-cisco) + os=-aout + ;; ++ mep-*) ++ os=-elf ++ ;; + mips*-cisco) + os=-elf + ;; +@@ -1388,6 +1530,9 @@ + *-be) + os=-beos + ;; ++ *-haiku) ++ os=-haiku ++ ;; + *-ibm) + os=-aix + ;; +@@ -1496,7 +1641,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) +@@ -1559,7 +1704,7 @@ + esac + + echo $basic_machine$os +-exit 0 ++exit + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/kde-unstable/kdebindings-python/fix-build.patch b/kde-unstable/kdebindings-python/fix-build.patch new file mode 100644 index 000000000..6a3d0c9cf --- /dev/null +++ b/kde-unstable/kdebindings-python/fix-build.patch @@ -0,0 +1,96 @@ +--- a/python/pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp
++++ b/python/pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp
+@@ -18,6 +18,7 @@
+ Boston, MA 02111-1307, USA.
+ */
+
++#include <Python.h>
+ #include <QtCore/QCoreApplication>
+ #include <QFileInfo>
+ #include <QDir>
+@@ -25,7 +26,6 @@
+ #include <klibloader.h>
+ #include <kstandarddirs.h>
+ #include <kcmodule.h>
+-#include <Python.h>
+ #include <kcomponentdata.h>
+ #include <kdebug.h>Index: b/python/pykde4/CMakeLists.txt
+===================================================================
+--- a/python/pykde4/CMakeLists.txt
++++ b/python/pykde4/CMakeLists.txt
+@@ -87,6 +87,9 @@
+ ${KDEPIMLIBS_INCLUDE_DIRS}
+ )
+
++# Pull in ARM configuration options if needed
++STRING(REGEX MATCH "PyQt_qreal_double" SIP_ARM_HACK ${PYQT4_SIP_FLAGS} "")
++
+ SET(SIP_INCLUDES ${PYQT4_SIP_DIR} sip)
+ SET(SIP_CONCAT_PARTS 8)
+ IF (WIN32)
+@@ -94,7 +97,7 @@
+ ELSE (WIN32)
+ SET(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
+ ENDIF (WIN32)
+-SET(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug)
++SET(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug ${SIP_ARM_HACK})
+
+ # Use an extra option when compiling on Python 3.
+ IF (PYTHON_3)diff -ur kdebindings-4.5.95/python/pykde4/sip/nepomuk/nuao.sip kdebindings-4.5.95.mine/python/pykde4/sip/nepomuk/nuao.sip
+--- kdebindings-4.5.95/python/pykde4/sip/nepomuk/nuao.sip 2010-12-22 09:55:07.000000000 +0000
++++ kdebindings-4.5.95.mine/python/pykde4/sip/nepomuk/nuao.sip 2011-01-07 00:04:41.157926502 +0000
+@@ -32,7 +32,7 @@
+ QUrl Event ();
+ QUrl ModificationEvent ();
+ QUrl UsageEvent ();
+-QUrl duration ();
++QUrl end ();
+ QUrl eventCount ();
+ QUrl firstEvent ();
+ QUrl firstModification ();--- a/python/pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp
++++ b/python/pykde4/kpythonpluginfactory/kpythonpluginfactory.cpp
+@@ -297,7 +297,7 @@ QLibrary *LoadPythonLibrary()
+ {
+ QLibrary *pythonLib = new QLibrary();
+ pythonLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
+- pythonLib->setFileName(LIB_PYTHON);
++ pythonLib->setFileName(LIB_PYTHON ".1");
+ pythonLib->load();
+ return pythonLib;
+ }Index: b/python/pykde4/CMakeLists.txt
+===================================================================
+--- a/python/pykde4/CMakeLists.txt
++++ b/python/pykde4/CMakeLists.txt
+@@ -15,6 +15,18 @@
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/pykde)
+ ENDIF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 6)
+
++# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
++set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
++
++# search packages used by KDE
++find_package(KDE4 REQUIRED)
++include (KDE4Defaults)
++include (MacroLibrary)
++include(MacroOptionalAddSubdirectory)
++
++add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
++
++
+ FIND_PACKAGE(PythonLibrary REQUIRED)
+ INCLUDE(PythonMacros)Do not link python modules against -lpython2.X. Since KDE4's cmake file uses --no-undefined by default, we have to remove that from the default CMAKE_SHARED_LINKER_FLAGS variable, but only for the pykde4 subdirectory.
+
+Index: b/python/pykde4/CMakeLists.txt
+===================================================================
+--- a/python/pykde4/CMakeLists.txt
++++ b/python/pykde4/CMakeLists.txt
+@@ -93,6 +93,9 @@
+
+ ADD_DEFINITIONS(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API)
+
++# Do not use --no-undefined for python modules.
++STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
++
+ FILE(GLOB kdecore_files_sip sip/kdecore/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
+ ADD_SIP_PYTHON_MODULE(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})
diff --git a/multilib-testing/lib32-mesa/PKGBUILD b/multilib-testing/lib32-mesa/PKGBUILD index da624adfc..bcb02cb8c 100644 --- a/multilib-testing/lib32-mesa/PKGBUILD +++ b/multilib-testing/lib32-mesa/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 47149 2011-05-17 17:48:52Z lcarlier $ +# $Id: PKGBUILD 48014 2011-05-27 05:54:14Z lcarlier $ # Contributor: Jan de Groot <jgc@archlinux.org> # Contributor: Andreas Radke <andyrtr@archlinux.org> @@ -10,7 +10,7 @@ _git=true #_git=false if [ "${_git}" = "true" ]; then - pkgver=7.10.99.git20110429 + pkgver=7.10.99.git20110526 else pkgver=7.10.2 fi @@ -22,9 +22,9 @@ makedepends=('glproto>=1.4.12' 'pkgconfig' 'lib32-libdrm>=2.4.25' 'lib32-libxxf8 url="http://mesa3d.sourceforge.net" license=('custom') if [ "${_git}" = "true" ]; then - # mesa git shot from 7.11 branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?id=608a4a17feea9fba2812d4e5c01dd6dbadc5d6e0 - source=('ftp://ftp.archlinux.org/other/mesa/mesa-608a4a17feea9fba2812d4e5c01dd6dbadc5d6e0.tar.bz2') - md5sums=('8d1a895110a6d3b7c51b3521f794bae2') + # mesa git shot from mastee (will become 7.11) branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7b3f40b70dc7dd602897d364011089047583c5d + source=('ftp://ftp.archlinux.org/other/mesa/mesa-f7b3f40b70dc7dd602897d364011089047583c5d.tar.bz2') + md5sums=('ca2b343a0b8077fda38077c547b80fc3') else source=("ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2" nouveau-fix-header.patch) md5sums=('f5de82852f1243f42cc004039e10b771' '67c87b77cc2236b52a3b47dad3fbb5d4') diff --git a/multilib-testing/lib32-udev/PKGBUILD b/multilib-testing/lib32-udev/PKGBUILD new file mode 100644 index 000000000..081db8c4a --- /dev/null +++ b/multilib-testing/lib32-udev/PKGBUILD @@ -0,0 +1,36 @@ +# $Id$ +# Maintainer: Aaron Griffin <aaron@archlinux.org> +# Maintainer: Tobias Powalowski <tpowa@archlinux.org> +# Maintainer: Thomas Bächler <thomas@archlinux.org> + +pkgname=('lib32-udev') +pkgver=171 +pkgrel=1 +arch=('x86_64') +pkgdesc="The userspace dev tools (udev) (32-bit)" +url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" +license=('GPL') +options=(!makeflags !libtool) +depends=('lib32-glibc' 'lib32-glib2' 'lib32-acl' 'lib32-libusb-compat' 'udev') +makedepends=('gcc-multilib' 'coreutils' 'util-linux' 'pciutils' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection') +source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-$pkgver.tar.bz2) +md5sums=('bdf4617284be2ecac11767437417e209') + +build() { + export CC="gcc -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + + cd $srcdir/udev-$pkgver + + ./configure --libdir=/usr/lib32 + make +} + +package() { + + cd $srcdir/udev-$pkgver + + make DESTDIR=${pkgdir} install + rm -rf ${pkgdir}/usr/{etc,include,lib,libexec,sbin,share} + rm -rf ${pkgdir}/usr/lib32/girepository* +} diff --git a/staging/koffice/PKGBUILD b/staging/koffice/PKGBUILD new file mode 100644 index 000000000..1884dd92c --- /dev/null +++ b/staging/koffice/PKGBUILD @@ -0,0 +1,301 @@ +# $Id: PKGBUILD 125678 2011-05-28 00:58:39Z andrea $ +# Maintainer: Ronald van Haren <ronald.archlinux.org> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com > + +pkgbase=koffice +pkgname=( + 'koffice-filters' + 'koffice-interfaces' + 'koffice-libs' + 'koffice-plugins' + 'koffice-pics' + 'koffice-servicetypes' + 'koffice-templates' + 'koffice-tools' + 'koffice-karbon' + 'koffice-karbon-doc' +# 'koffice-kchart' +# 'koffice-kchart-doc' + 'koffice-kexi' + 'koffice-kexi-doc' + 'koffice-kformula' + 'koffice-kformula-doc' + 'koffice-kounavail' + 'koffice-kplato' +# 'koffice-kplato-doc' + 'koffice-kpresenter' + 'koffice-kpresenter-doc' + 'koffice-krita' +# 'koffice-krita-doc' # no krita-doc anymore upstream + 'koffice-kspread' + 'koffice-kspread-doc' + 'koffice-kword' +# 'koffice-kword-doc' # see http://userbase.kde.org/KWord/Manual for documentation (not supplied by upstream anymore in the sources) + 'koffice-handbook' + 'koffice-thesaurus-doc' +# 'koffice-kdgantt' # still an empty package +) +pkgver=2.3.3 +pkgrel=4 +arch=('i686' 'x86_64') +url='http://koffice.kde.org' +license=('GPL' 'LGPL' 'FDL') +makedepends=('pkg-config' 'cmake' 'automoc4' 'boost' 'eigen' 'gsl' 'lcms' + 'glew' 'qimageblitz' 'kdepimlibs' 'pstoedit' 'poppler-qt' 'libwpd' + 'libwpg' 'opengtl' 'kdegraphics-libs') +groups=('koffice') +source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2" + 'kde4-koffice-libwpg02.patch' 'gcc46.patch') +sha256sums=('31ba0d98c0d29c7b8ab97efdeb6c618b82177b2b0ec85da088178254da43c099' + '69106deb4081d71b5bd8f2e4f5af67ca689e4ce9f2bb49c11dbce5fb3409d612' + 'e095c0b2bbedf41da6535a68b2275464dafd3f194566028d0135322f596e4739') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + + patch -p1 -i "${srcdir}/kde4-koffice-libwpg02.patch" + patch -p1 -i "${srcdir}"/gcc46.patch + + cd "${srcdir}" + mkdir build + cd build + cmake ../${pkgbase}-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_INSTALL_PREFIX=/usr + make +} + +##### 1st package common files, depends, optdepends of the koffice applications ##### + +package_koffice-filters(){ + pkgdesc="Filters for the KDE office suite" + optdepends=('libgsf: Microsoft Word document importer' 'libwpd: WordPerfect document importer' + 'libwpg: Corel WordPerfect Graphics image importer' 'pstoedit: Karbon EPS import filter' + 'kdegraphics-libs: support for raw images') + install=filters.install + cd "${srcdir}/build/filters" + make DESTDIR="${pkgdir}" install +} + +package_koffice-interfaces(){ + pkgdesc="Interfaces for the KDE office suite" + depends=('kdelibs' 'koffice-libs') + cd "${srcdir}/build/interfaces" + make DESTDIR="${pkgdir}" install +} + +package_koffice-libs(){ + pkgdesc="Libs for the KDE office suite" + depends=('kdepimlibs' 'qca' 'lcms' 'koffice-servicetypes') + cd "${srcdir}/build/libs" + make DESTDIR="${pkgdir}" install +} + +package_koffice-plugins(){ + pkgdesc="Plugins for the KDE office suite" + depends=('koffice-libs') + replaces=('koffice-kchart') + conflicts=('koffice-kchart') + cd "${srcdir}/build/plugins" + make DESTDIR="${pkgdir}" install +} + +package_koffice-pics(){ + pkgdesc="Icons for the KDE office suite" + install=koffice.install + cd "${srcdir}/build/pics" + make DESTDIR="${pkgdir}" install +} + +package_koffice-servicetypes(){ + pkgdesc="Servicetypes for the KDE office suite" + cd "${srcdir}/build/servicetypes" + make DESTDIR="${pkgdir}" install +} + +package_koffice-templates(){ + pkgdesc="Templates for the KDE office suite" + cd "${srcdir}/build/templates" + make DESTDIR="${pkgdir}" install +} + +package_koffice-tools(){ + pkgdesc="Tools for the KDE office suite" + depends=('koffice-libs') + cd "${srcdir}/build/tools" + make DESTDIR="${pkgdir}" install +} + +#### package common files done ##### + +#### package apps and their docs ##### + +package_koffice-karbon(){ + pkgdesc="Vector drawing application for KDE" + depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates') + optdepends=('koffice-filters: import/export filters') + install=koffice.install + cd "${srcdir}/build/karbon" + make DESTDIR="${pkgdir}" install +} + +package_koffice-karbon-doc(){ + pkgdesc="Documentation for karbon" + cd "${srcdir}/build/doc/karbon" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kexi(){ + pkgdesc="Integrated data management application for the KDE office suite" + depends=('kdelibs' 'koffice-libs' 'koffice-kspread' 'sqlite3') + cd "${srcdir}/build/kexi" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kexi-doc(){ + pkgdesc="Documentation for kexi" + cd "${srcdir}/build/doc/kexi" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kformula(){ + pkgdesc="Formula editor for the KDE office suite" + depends=('kdelibs' 'koffice-libs') + cd "${srcdir}/build/kformula" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kformula-doc() { + pkgdesc="Documentation for koffice-kformula" + cd "${srcdir}/build/doc/kformula" + make DESTDIR="${pkgdir}" install +} + + +package_koffice-kounavail(){ + pkgdesc="Kounavail for the KDE office suite" + depends=('kdelibs' 'koffice-libs') + cd "${srcdir}/build/kounavail" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kplato(){ + pkgdesc="Project management application for KDE" + depends=('hicolor-icon-theme' 'koffice-libs' 'kdepimlibs' 'koffice-templates' \ + 'koffice-plugins' 'koffice-kword') + install=koffice.install + cd "${srcdir}/build/kplato" + make DESTDIR="${pkgdir}" install +} + +#package_koffice-kplato-doc(){ +# pkgdesc="Documentation for kplato" +# cd ${srcdir}/build/doc/kplato +# make DESTDIR="${pkgdir}" install +#} + +package_koffice-kpresenter(){ + pkgdesc="Presentation tool for KDE" + depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates') + optdepends=('koffice-filters: import/export filters') + install=koffice.install + cd "${srcdir}/build/kpresenter" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kpresenter-doc(){ + pkgdesc="Documentation for kpresenter" + cd "${srcdir}/build/doc/kpresenter" + make DESTDIR="${pkgdir}" install +} + +package_koffice-krita(){ + pkgdesc="Graphics editor for KDE" + depends=('hicolor-icon-theme' 'glew' 'qimageblitz' 'koffice-libs' \ + 'koffice-templates' 'koffice-plugins' 'poppler-qt' 'shared-mime-info' \ + 'openexr' 'opengtl') + optdepends=('koffice-filters: import/export filters') + install=krita.install + cd "${srcdir}/build/krita" + make DESTDIR="${pkgdir}" install +} + +#package_koffice-krita-doc(){ +# pkgdesc="Documentation for krita" +# cd ${srcdir}/build/doc/krita +# make DESTDIR="${pkgdir}" install +#} + + +package_koffice-kspread(){ + pkgdesc="Spreadsheet application for KDE" + depends=('hicolor-icon-theme' 'gsl' 'koffice-libs' 'koffice-templates' 'koffice-plugins') + optdepends=('koffice-filters: import/export filters') + install=koffice.install + cd "${srcdir}/build/kspread" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kspread-doc(){ + pkgdesc="Documentation for kspread" + cd "${srcdir}/build/doc/kspread" + make DESTDIR="${pkgdir}" install +} + +package_koffice-kword(){ + pkgdesc="Wordprocessor for KDE" + depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates' 'koffice-pics' \ + 'koffice-kounavail' 'koffice-plugins') + optdepends=('koffice-filters: import/export filters') + install=koffice.install + cd "${srcdir}/build/kword" + make DESTDIR="${pkgdir}" install + + # some sed lines to have python2 in extension scripts + sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/oouno.py" + sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/importdoxyxml.py" + sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/onlinehelp.py" +} + +#package_koffice-kword-doc(){ +# pkgdesc="Documentation for kword" +# cd ${srcdir}/build/doc/kword +# make DESTDIR="${pkgdir}" install +#} + +##### package apps done ##### + +#package_koffice-kchart(){ +# pkgdesc="Charting tool for KDE" +# depends=('hicolor-icon-theme' 'koffice-interfaces' 'koffice-templates') +# optdepends=('koffice-filters: import/export filters') +# install=koffice.install +# cd "${srcdir}/build/kchart" +# make DESTDIR="${pkgdir}" install +#} + +#package_koffice-kchart-doc(){ +# pkgdesc="Documentation for kchart" +# cd "${srcdir}/build/doc/kchart" +# make DESTDIR="${pkgdir}" install +#} + +#package_koffice-kdgantt(){ +# pkgdesc="Gantt for KDE" +# cd "${srcdir}/build/kdgantt" +# make DESTDIR="${pkgdir}" install +#} + +package_koffice-handbook() { + pkgdesc="Documentation for koffice" + cd "${srcdir}/build/doc/koffice" + make DESTDIR="${pkgdir}" install +} + +package_koffice-thesaurus-doc(){ + pkgdesc="Documentation for koffice-thesaurus" + cd "${srcdir}/build/doc/thesaurus" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/koffice/filters.install b/staging/koffice/filters.install new file mode 100644 index 000000000..7c8a8bd2b --- /dev/null +++ b/staging/koffice/filters.install @@ -0,0 +1,11 @@ +post_install() { + update-mime-database usr/share/mime &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/staging/koffice/gcc46.patch b/staging/koffice/gcc46.patch new file mode 100644 index 000000000..dcf8a4f85 --- /dev/null +++ b/staging/koffice/gcc46.patch @@ -0,0 +1,23 @@ +diff -up koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc.gcc46 koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc +--- koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc.gcc46 2011-02-17 06:13:40.000000000 -0600 ++++ koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc 2011-02-19 21:15:56.597142885 -0600 +@@ -80,6 +80,9 @@ ImageType imfTypeToKisType(Imf::PixelTyp + return IT_FLOAT16; + case Imf::FLOAT: + return IT_FLOAT32; ++ default: ++ // shouldn't reach here ++ return IT_UNSUPPORTED; + } + } + +@@ -93,6 +96,9 @@ const KoColorSpace* kisTypeToColorSpace( + case IT_UNKNOWN: + case IT_UNSUPPORTED: + return 0; ++ default: ++ // shouldn't reach here ++ return 0; + } + } + diff --git a/staging/koffice/kde4-koffice-libwpg02.patch b/staging/koffice/kde4-koffice-libwpg02.patch new file mode 100644 index 000000000..e2a55a216 --- /dev/null +++ b/staging/koffice/kde4-koffice-libwpg02.patch @@ -0,0 +1,1323 @@ +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/CMakeLists.txt koffice-2.3.1-libwpg02/filters/karbon/wpg/import/CMakeLists.txt +--- koffice-2.3.1/filters/karbon/wpg/import/CMakeLists.txt 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/CMakeLists.txt 2011-01-18 07:40:25.000000000 +0100 +@@ -1,16 +1,11 @@ + +- + include_directories(${CMAKE_BINARY_DIR}/filters/ ${WPD_INCLUDE_DIR} ${LIBWPG_INCLUDE_DIR}/) + +-set(wpgimport_PART_SRCS +-WPGImport.cpp +-OdgExporter.cxx +-FileOutputHandler.cxx +-GraphicsElement.cxx) ++set(wpgimport_PART_SRCS WPGImport.cpp) + + kde4_add_plugin(wpgimport ${wpgimport_PART_SRCS}) + +-target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES}) ++target_link_libraries(wpgimport komain ${LIBWPG_LIBRARIES} ${LIBWPG_STREAM_LIBRARIES} ${WPD_LIBRARIES}) + + install(TARGETS wpgimport DESTINATION ${PLUGIN_INSTALL_DIR}) + install(FILES karbon_wpg_import.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.cxx +--- koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.cxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.cxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,95 +0,0 @@ +-/* libwpg +- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch) +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpg.sourceforge.net +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#include "FileOutputHandler.hxx" +- +-FileOutputHandler::FileOutputHandler(std::ostringstream &contentStream) : +- mbIsTagOpened(false), +- mContentStream(contentStream) +-{ +-} +- +-void FileOutputHandler::startDocument() +-{ +-} +- +-void FileOutputHandler::startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList) +-{ +- if (mbIsTagOpened) +- { +- mContentStream << ">"; +- mbIsTagOpened = false; +- } +- mContentStream << "<" << psName; +- +- for (std::vector<std::pair<std::string, std::string> >::const_iterator i = xPropList.begin(); i != xPropList.end(); i++) +- { +- mContentStream << " " << (*i).first.c_str() << "=\"" << (*i).second.c_str() << "\""; +- } +- mbIsTagOpened = true; +- msOpenedTagName = psName; +-} +- +-void FileOutputHandler::endElement(const char *psName) +-{ +- if (mbIsTagOpened) +- { +- if( msOpenedTagName == psName ) +- { +- mContentStream << "/>"; +- mbIsTagOpened = false; +- } +- else // should not happen, but handle it +- { +- mContentStream << ">"; +- mContentStream << "</" << psName << ">"; +- mbIsTagOpened = false; +- } +- } +- else +- { +- mContentStream << "</" << psName << ">"; +- mbIsTagOpened = false; +- } +-} +- +-void FileOutputHandler::characters(const std::string &sCharacters) +-{ +- if (mbIsTagOpened) +- { +- mContentStream << ">"; +- mbIsTagOpened = false; +- } +- mContentStream << sCharacters.c_str(); +-} +- +-void FileOutputHandler::endDocument() +-{ +- if (mbIsTagOpened) +- { +- mContentStream << ">"; +- mbIsTagOpened = false; +- } +-} +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.hxx +--- koffice-2.3.1/filters/karbon/wpg/import/FileOutputHandler.hxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/FileOutputHandler.hxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,49 +0,0 @@ +-/* libwpg +- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch) +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpg.sourceforge.net +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#ifndef FILEOUTPUTHANDLER_H +-#define FILEOUTPUTHANDLER_H +- +-#include <iostream> +-#include <sstream> +-#include <string> +-#include "GraphicsHandler.hxx" +- +-class FileOutputHandler : public GraphicsHandler +-{ +- public: +- explicit FileOutputHandler(std::ostringstream &contentStream); +- virtual void startDocument(); +- virtual void endDocument(); +- virtual void startElement(const char *psName, const std::vector<std::pair<std::string, std::string> > &xPropList); +- virtual void endElement(const char *psName); +- virtual void characters(const std::string &sCharacters); +- +- private: +- bool mbIsTagOpened; +- std::string msOpenedTagName; +- std::ostringstream &mContentStream; +-}; +-#endif +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.cxx +--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.cxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.cxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,66 +0,0 @@ +-/* GraphicsElement: The items we are collecting to be put into the Writer +- * document: paragraph and spans of text, as well as section breaks. +- * +- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca) +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Lesser General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpg.sourceforge.net +- * +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#include "GraphicsElement.hxx" +-#include "GraphicsHandler.hxx" +-#include <string.h> +- +-#define ASCII_SPACE 0x0020 +- +-void TagGraphicsElement::print() const +-{ +-} +- +-void OpenTagGraphicsElement::write(GraphicsHandler *pHandler) const +-{ +- pHandler->startElement(getTagName().c_str(), maAttrList); +-} +- +-void OpenTagGraphicsElement::print() const +-{ +- TagGraphicsElement::print(); +-} +- +-void OpenTagGraphicsElement::addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue) +-{ +- std::pair<std::string, std::string> tmpAttribute; +- tmpAttribute.first = szAttributeName; +- tmpAttribute.second = sAttributeValue; +- maAttrList.push_back(tmpAttribute); +-} +- +-void CloseTagGraphicsElement::write(GraphicsHandler *pHandler) const +-{ +- +- pHandler->endElement(getTagName().c_str()); +-} +- +-void CharDataGraphicsElement::write(GraphicsHandler *pHandler) const +-{ +- pHandler->characters(msData); +-} +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.hxx +--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsElement.hxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsElement.hxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,84 +0,0 @@ +-/* GraphicsElement: The items we are collecting to be put into the Writer +- * document: paragraph and spans of text, as well as section breaks. +- * +- * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca) +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Lesser General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpd.sourceforge.net +- * +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#ifndef _GRAPHICSELEMENT_H +-#define _GRAPHICSELEMENT_H +-#include <string> +-#include <map> +-#include <vector> +- +-#include "GraphicsHandler.hxx" +- +-class GraphicsElement +-{ +-public: +- virtual ~GraphicsElement() {} +- virtual void write(GraphicsHandler *pHandler) const = 0; +- virtual void print() const {} +-}; +- +-class TagGraphicsElement : public GraphicsElement +-{ +-public: +- explicit TagGraphicsElement(const char *szTagName) : msTagName(szTagName) {} +- const std::string &getTagName() const { return msTagName; } +- virtual void print() const; +-private: +- const std::string msTagName; +-}; +- +-class OpenTagGraphicsElement : public TagGraphicsElement +-{ +-public: +- explicit OpenTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {} +- ~OpenTagGraphicsElement() {} +- void addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue); +- virtual void write(GraphicsHandler *pHandler) const; +- virtual void print () const; +-private: +- std::vector<std::pair<std::string, std::string> > maAttrList; +-}; +- +-class CloseTagGraphicsElement : public TagGraphicsElement +-{ +-public: +- explicit CloseTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {} +- virtual void write(GraphicsHandler *pHandler) const; +-}; +- +-class CharDataGraphicsElement : public GraphicsElement +-{ +-public: +- CharDataGraphicsElement(const char *sData) : GraphicsElement(), msData(sData) {} +- virtual void write(GraphicsHandler *pHandler) const; +-private: +- std::string msData; +-}; +- +- +-#endif +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/GraphicsHandler.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsHandler.hxx +--- koffice-2.3.1/filters/karbon/wpg/import/GraphicsHandler.hxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/GraphicsHandler.hxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,43 +0,0 @@ +-/* +- * Copyright (C) 2004 William Lachance (wlach@interlog.com) +- * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com) +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * as published by the Free Software Foundation; either version 2 +- * of the License, or (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * Contributor(s): Martin Gallwey (gallwey@sun.com) +- * +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +-#ifndef _GRAPHICSHANDLER_H +-#define _GRAPHICSHANDLER_H +-#include <string> +-#include <map> +-#include <vector> +- +-class GraphicsHandler +-{ +-public: +- virtual ~GraphicsHandler() {} +- virtual void startDocument() = 0; +- virtual void endDocument() = 0; +- virtual void startElement(const char *psName, const std::vector< std::pair <std::string, std::string> > &xPropList) = 0; +- virtual void endElement(const char *psName) = 0; +- virtual void characters(const std::string &sCharacters) = 0; +-}; +-#endif +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.cxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.cxx +--- koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.cxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.cxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,662 +0,0 @@ +-/* libwpg +- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) +- * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch) +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpg.sourceforge.net +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#include "OdgExporter.hxx" +-#include "GraphicsElement.hxx" +-#include "GraphicsHandler.hxx" +-#include <locale.h> +- +-static std::string doubleToString(const double value) +-{ +- std::ostringstream tempStream; +- tempStream << value; +- std::string decimalPoint(localeconv()->decimal_point); +- if ((decimalPoint.size() == 0) || (decimalPoint == ".")) +- return tempStream.str(); +- std::string stringValue(tempStream.str()); +- if (!stringValue.empty()) +- { +- std::string::size_type pos; +- while ((pos = stringValue.find(decimalPoint)) != std::string::npos) +- stringValue.replace(pos,decimalPoint.size(),"."); +- } +- return stringValue; +-} +- +- +-OdgExporter::OdgExporter(GraphicsHandler *pHandler, const bool isFlatXML): +- mpHandler(pHandler), +- m_fillRule(AlternatingFill), +- m_gradientIndex(1), +- m_dashIndex(1), +- m_styleIndex(1), +- m_width(0.0f), +- m_height(0.0f), +- m_isFlatXML(isFlatXML) +-{ +-} +- +-OdgExporter::~OdgExporter() +-{ +- for (std::vector <GraphicsElement *>::iterator iterStroke = mStrokeDashElements.begin(); +- iterStroke != mStrokeDashElements.end(); iterStroke++) +- delete (*iterStroke); +- +- for (std::vector <GraphicsElement *>::iterator iterGradient = mGradientElements.begin(); +- iterGradient != mGradientElements.end(); iterGradient++) +- delete (*iterGradient); +- +- for (std::vector <GraphicsElement *>::iterator iterAutomaticStyles = mAutomaticStylesElements.begin(); +- iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++) +- delete (*iterAutomaticStyles); +- +- for (std::vector<GraphicsElement *>::iterator bodyIter = mBodyElements.begin(); +- bodyIter != mBodyElements.end(); bodyIter++) +- delete (*bodyIter); +-} +- +-void OdgExporter::startGraphics(double width, double height) +-{ +- m_gradientIndex = 1; +- m_dashIndex = 1; +- m_styleIndex = 1; +- m_width = width; +- m_height = height; +- +- +- mpHandler->startDocument(); +- OpenTagGraphicsElement tmpOfficeDocumentContent("office:document"); +- tmpOfficeDocumentContent.addAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); +- tmpOfficeDocumentContent.addAttribute("xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:config", "urn:oasis:names:tc:opendocument:xmlns:config:1.0"); +- tmpOfficeDocumentContent.addAttribute("xmlns:ooo", "http://openoffice.org/2004/office"); +- tmpOfficeDocumentContent.addAttribute("office:version", "1.0"); +- if (m_isFlatXML) +- tmpOfficeDocumentContent.addAttribute("office:mimetype", "application/x-vnd.oasis.openoffice.drawing"); +- tmpOfficeDocumentContent.write(mpHandler); +- +- OpenTagGraphicsElement("office:settings").write(mpHandler); +- +- OpenTagGraphicsElement configItemSetOpenElement("config:config-item-set"); +- configItemSetOpenElement.addAttribute("config:name", "ooo:view-settings"); +- configItemSetOpenElement.write(mpHandler); +- +- OpenTagGraphicsElement configItemOpenElement1("config:config-item"); +- configItemOpenElement1.addAttribute("config:name", "VisibleAreaTop"); +- configItemOpenElement1.addAttribute("config:type", "int"); +- configItemOpenElement1.write(mpHandler); +- mpHandler->characters("0"); +- mpHandler->endElement("config:config-item"); +- +- OpenTagGraphicsElement configItemOpenElement2("config:config-item"); +- configItemOpenElement2.addAttribute("config:name", "VisibleAreaLeft"); +- configItemOpenElement2.addAttribute("config:type", "int"); +- configItemOpenElement2.write(mpHandler); +- mpHandler->characters("0"); +- mpHandler->endElement("config:config-item"); +- +- OpenTagGraphicsElement configItemOpenElement3("config:config-item"); +- configItemOpenElement3.addAttribute("config:name", "VisibleAreaWidth"); +- configItemOpenElement3.addAttribute("config:type", "int"); +- configItemOpenElement3.write(mpHandler); +- m_value.str(""); +- m_value << (unsigned)(2540 * width); +- mpHandler->characters(m_value.str()); +- mpHandler->endElement("config:config-item"); +- +- OpenTagGraphicsElement configItemOpenElement4("config:config-item"); +- configItemOpenElement4.addAttribute("config:name", "VisibleAreaHeight"); +- configItemOpenElement4.addAttribute("config:type", "int"); +- configItemOpenElement4.write(mpHandler); +- m_value.str(""); +- m_value << (unsigned)(2540 * height); +- mpHandler->characters(m_value.str()); +- mpHandler->endElement("config:config-item"); +- +- mpHandler->endElement("config:config-item-set"); +- +- mpHandler->endElement("office:settings"); +- +-} +- +-void OdgExporter::endGraphics() +-{ +- OpenTagGraphicsElement("office:styles").write(mpHandler); +- +- for (std::vector <GraphicsElement *>::const_iterator iterStroke = mStrokeDashElements.begin(); +- iterStroke != mStrokeDashElements.end(); iterStroke++) +- (*iterStroke)->write(mpHandler); +- +- for (std::vector <GraphicsElement *>::const_iterator iterGradient = mGradientElements.begin(); +- iterGradient != mGradientElements.end(); iterGradient++) +- (*iterGradient)->write(mpHandler); +- +- mpHandler->endElement("office:styles"); +- +- OpenTagGraphicsElement("office:automatic-styles").write(mpHandler); +- +- for (std::vector <GraphicsElement *>::const_iterator iterAutomaticStyles = mAutomaticStylesElements.begin(); +- iterAutomaticStyles != mAutomaticStylesElements.end(); iterAutomaticStyles++) +- (*iterAutomaticStyles)->write(mpHandler); +- +- OpenTagGraphicsElement tmpStylePageLayoutOpenElement("style:page-layout"); +- tmpStylePageLayoutOpenElement.addAttribute("style:name", "PM0"); +- tmpStylePageLayoutOpenElement.write(mpHandler); +- +- OpenTagGraphicsElement tmpStylePageLayoutPropertiesOpenElement("style:page-layout-properties"); +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-top", "0in"); +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-bottom", "0in"); +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-left", "0in"); +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-right", "0in"); +- m_value.str(""); +- m_value << doubleToString(m_width) << "in"; +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-width", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(m_height) << "in"; +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-height", m_value.str()); +- m_value.str(""); +- tmpStylePageLayoutPropertiesOpenElement.addAttribute("style:print-orientation", "portrait"); +- tmpStylePageLayoutPropertiesOpenElement.write(mpHandler); +- +- mpHandler->endElement("style:page-layout-properties"); +- +- mpHandler->endElement("style:page-layout"); +- +- OpenTagGraphicsElement tmpStyleStyleOpenElement("style:style"); +- tmpStyleStyleOpenElement.addAttribute("style:name", "dp1"); +- tmpStyleStyleOpenElement.addAttribute("style:family", "drawing-page"); +- tmpStyleStyleOpenElement.write(mpHandler); +- +- OpenTagGraphicsElement tmpStyleDrawingPagePropertiesOpenElement("style:drawing-page-properties"); +- // tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:background-size", "border"); +- tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:fill", "none"); +- tmpStyleDrawingPagePropertiesOpenElement.write(mpHandler); +- +- mpHandler->endElement("style:drawing-page-properties"); +- +- mpHandler->endElement("style:style"); +- +- mpHandler->endElement("office:automatic-styles"); +- +- OpenTagGraphicsElement("office:master-styles").write(mpHandler); +- +- OpenTagGraphicsElement tmpStyleMasterPageOpenElement("style:master-page"); +- tmpStyleMasterPageOpenElement.addAttribute("style:name", "Default"); +- tmpStyleMasterPageOpenElement.addAttribute("style:page-layout-name", "PM0"); +- tmpStyleMasterPageOpenElement.addAttribute("draw:style-name", "dp1"); +- tmpStyleMasterPageOpenElement.write(mpHandler); +- +- mpHandler->endElement("style:master-page"); +- +- mpHandler->endElement("office:master-styles"); +- +- OpenTagGraphicsElement("office:body").write(mpHandler); +- +- OpenTagGraphicsElement("office:drawing").write(mpHandler); +- +- OpenTagGraphicsElement tmpDrawPageOpenElement("draw:page"); +- tmpDrawPageOpenElement.addAttribute("draw:name", "page1"); +- tmpDrawPageOpenElement.addAttribute("draw:style-name", "dp1"); +- tmpDrawPageOpenElement.addAttribute("draw:master-page-name", "Default"); +- tmpDrawPageOpenElement.write(mpHandler); +- +- for (std::vector<GraphicsElement *>::const_iterator bodyIter = mBodyElements.begin(); +- bodyIter != mBodyElements.end(); bodyIter++) +- { +- (*bodyIter)->write(mpHandler); +- } +- +- mpHandler->endElement("draw:page"); +- mpHandler->endElement("office:drawing"); +- mpHandler->endElement("office:body"); +- mpHandler->endElement("office:document"); +- +- mpHandler->endDocument(); +-} +- +-void OdgExporter::setPen(const libwpg::WPGPen& pen) +-{ +- m_pen = pen; +-} +- +-void OdgExporter::setBrush(const libwpg::WPGBrush& brush) +-{ +- m_brush = brush; +-} +- +-void OdgExporter::setFillRule(FillRule rule) +-{ +- m_fillRule = rule; +-} +- +-void OdgExporter::startLayer(unsigned int) +-{ +-} +- +-void OdgExporter::endLayer(unsigned int) +-{ +-} +- +-void OdgExporter::drawRectangle(const libwpg::WPGRect& rect, double rx, double ) +-{ +- writeStyle(); +- OpenTagGraphicsElement *pDrawRectElement = new OpenTagGraphicsElement("draw:rect"); +- m_value.str(""); +- m_value << "gr" << m_styleIndex-1; +- pDrawRectElement->addAttribute("draw:style-name", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(rect.x1) << "in"; +- pDrawRectElement->addAttribute("svg:x", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(rect.y1) << "in"; +- pDrawRectElement->addAttribute("svg:y", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(rect.x2-rect.x1) << "in"; +- pDrawRectElement->addAttribute("svg:width", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(rect.y2-rect.y1) << "in"; +- pDrawRectElement->addAttribute("svg:height", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(rx) << "in"; +- // FIXME: what to do when rx != ry ? +- pDrawRectElement->addAttribute("draw:corner-radius", m_value.str()); +- m_value.str(""); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawRectElement)); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:rect"))); +-} +- +-void OdgExporter::drawEllipse(const libwpg::WPGPoint& center, double rx, double ry) +-{ +- writeStyle(); +- OpenTagGraphicsElement *pDrawEllipseElement = new OpenTagGraphicsElement("draw:ellipse"); +- m_value.str(""); +- m_value << "gr" << m_styleIndex-1; +- pDrawEllipseElement->addAttribute("draw:style-name", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(center.x - rx) << "in"; +- pDrawEllipseElement->addAttribute("svg:x", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(center.y - ry) << "in"; +- pDrawEllipseElement->addAttribute("svg:y", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(2 * rx) << "in"; +- pDrawEllipseElement->addAttribute("svg:width", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(2 * ry) << "in"; +- pDrawEllipseElement->addAttribute("svg:height", m_value.str()); +- m_value.str(""); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawEllipseElement)); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:ellipse"))); +-} +- +-void OdgExporter::drawPolygon(const libwpg::WPGPointArray& vertices) +-{ +- if(vertices.count() < 2) +- return; +- +- if(vertices.count() == 2) +- { +- const libwpg::WPGPoint& p1 = vertices[0]; +- const libwpg::WPGPoint& p2 = vertices[1]; +- +- writeStyle(); +- OpenTagGraphicsElement *pDrawLineElement = new OpenTagGraphicsElement("draw:line"); +- m_value.str(""); +- m_value << "gr" << m_styleIndex-1; +- pDrawLineElement->addAttribute("draw:style-name", m_value.str()); +- m_value.str(""); +- pDrawLineElement->addAttribute("draw:text-style-name", "P1"); +- pDrawLineElement->addAttribute("draw:layer", "layout"); +- m_value << doubleToString(p1.x) << "in"; +- pDrawLineElement->addAttribute("svg:x1", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(p1.y) << "in"; +- pDrawLineElement->addAttribute("svg:y1", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(p2.x) << "in"; +- pDrawLineElement->addAttribute("svg:x2", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(p2.y) << "in"; +- pDrawLineElement->addAttribute("svg:y2", m_value.str()); +- m_value.str(""); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawLineElement)); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:line"))); +- } +- else +- { +- // draw as path +- libwpg::WPGPath path; +- path.moveTo(vertices[0]); +- for(unsigned long ii = 1; ii < vertices.count(); ii++) +- path.lineTo(vertices[ii]); +- path.closed = true; +- drawPath(path); +- } +-} +- +-void OdgExporter::drawPath(const libwpg::WPGPath& path) +-{ +- if(path.count() == 0) +- return; +- +- // try to find the bounding box +- // this is simple convex hull technique, the bounding box might not be +- // accurate but that should be enough for this purpose +- libwpg::WPGPoint p = path.element(0).point; +- libwpg::WPGPoint q = path.element(0).point; +- for(unsigned k = 0; k < path.count(); k++) +- { +- libwpg::WPGPathElement element = path.element(k); +- p.x = (p.x > element.point.x) ? element.point.x : p.x; +- p.y = (p.y > element.point.y) ? element.point.y : p.y; +- q.x = (q.x < element.point.x) ? element.point.x : q.x; +- q.y = (q.y < element.point.y) ? element.point.y : q.y; +- if(element.type == libwpg::WPGPathElement::CurveToElement) +- { +- p.x = (p.x > element.extra1.x) ? element.extra1.x : p.x; +- p.y = (p.y > element.extra1.y) ? element.extra1.y : p.y; +- q.x = (q.x < element.extra1.x) ? element.extra1.x : q.x; +- q.y = (q.y < element.extra1.y) ? element.extra1.y : q.y; +- p.x = (p.x > element.extra2.x) ? element.extra2.x : p.x; +- p.y = (p.y > element.extra2.y) ? element.extra2.y : p.y; +- q.x = (q.x < element.extra2.x) ? element.extra2.x : q.x; +- q.y = (q.y < element.extra2.y) ? element.extra2.y : q.y; +- } +- } +- double vw = q.x - p.x; +- double vh = q.y - p.y; +- +- writeStyle(); +- +- OpenTagGraphicsElement *pDrawPathElement = new OpenTagGraphicsElement("draw:path"); +- m_value.str(""); +- m_value << "gr" << m_styleIndex-1; +- pDrawPathElement->addAttribute("draw:style-name", m_value.str()); +- m_value.str(""); +- pDrawPathElement->addAttribute("draw:text-style-name", "P1"); +- pDrawPathElement->addAttribute("draw:layer", "layout"); +- m_value << doubleToString(p.x) << "in"; +- pDrawPathElement->addAttribute("svg:x", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(p.y) << "in"; +- pDrawPathElement->addAttribute("svg:y", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(vw) << "in"; +- pDrawPathElement->addAttribute("svg:width", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(vh) << "in"; +- pDrawPathElement->addAttribute("svg:height", m_value.str()); +- m_value.str(""); +- m_value << "0 0 " << (int)(vw*2540) << " " << (int)(vh*2540); +- pDrawPathElement->addAttribute("svg:viewBox", m_value.str()); +- m_value.str(""); +- +- for(unsigned i = 0; i < path.count(); i++) +- { +- libwpg::WPGPathElement element = path.element(i); +- libwpg::WPGPoint point = element.point; +- switch(element.type) +- { +- // 2540 is 2.54*1000, 2.54 in = 1 in +- case libwpg::WPGPathElement::MoveToElement: +- m_value << "M" << (int)((point.x-p.x)*2540) << " "; +- m_value << (int)((point.y-p.y)*2540); +- break; +- +- case libwpg::WPGPathElement::LineToElement: +- m_value << "L" << (int)((point.x-p.x)*2540) << " "; +- m_value << (int)((point.y-p.y)*2540); +- break; +- +- case libwpg::WPGPathElement::CurveToElement: +- m_value << "C" << (int)((element.extra1.x-p.x)*2540) << " "; +- m_value << (int)((element.extra1.y-p.y)*2540) << " "; +- m_value << (int)((element.extra2.x-p.x)*2540) << " "; +- m_value << (int)((element.extra2.y-p.y)*2540) << " "; +- m_value << (int)((point.x-p.x)*2540) << " "; +- m_value << (int)((point.y-p.y)*2540); +- break; +- +- default: +- break; +- } +- } +- if(path.closed) +- m_value << " Z"; +- pDrawPathElement->addAttribute("svg:d", m_value.str()); +- m_value.str(""); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawPathElement)); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:path"))); +-} +- +- +-void OdgExporter::drawBitmap(const libwpg::WPGBitmap& bitmap) +-{ +- OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame"); +- m_value.str(""); +- m_value << doubleToString(bitmap.rect.x1) << "in"; +- pDrawFrameElement->addAttribute("svg:x", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(bitmap.rect.y1) << "in"; +- pDrawFrameElement->addAttribute("svg:y", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(bitmap.rect.height()) << "in"; +- pDrawFrameElement->addAttribute("svg:height", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(bitmap.rect.width()) << "in"; +- pDrawFrameElement->addAttribute("svg:width", m_value.str()); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement)); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data"))); +- +- libwpg::WPGString base64Binary; +- bitmap.generateBase64DIB(base64Binary); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr()))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame"))); +-} +- +-void OdgExporter::drawImageObject(const libwpg::WPGBinaryData& binaryData) +-{ +- if (binaryData.mimeType.length() <= 0) +- return; +- OpenTagGraphicsElement *pDrawFrameElement = new OpenTagGraphicsElement("draw:frame"); +- m_value.str(""); +- m_value << doubleToString(binaryData.rect.x1) << "in"; +- pDrawFrameElement->addAttribute("svg:x", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(binaryData.rect.y1) << "in"; +- pDrawFrameElement->addAttribute("svg:y", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(binaryData.rect.height()) << "in"; +- pDrawFrameElement->addAttribute("svg:height", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(binaryData.rect.width()) << "in"; +- pDrawFrameElement->addAttribute("svg:width", m_value.str()); +- mBodyElements.push_back(static_cast<GraphicsElement *>(pDrawFrameElement)); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("draw:image"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new OpenTagGraphicsElement("office:binary-data"))); +- +- libwpg::WPGString base64Binary = binaryData.getBase64Data(); +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CharDataGraphicsElement(base64Binary.cstr()))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("office:binary-data"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:image"))); +- +- mBodyElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:frame"))); +-} +- +- +-static std::string colorToHex(const libwpg::WPGColor& color) +-{ +- char hexdigits[] = "0123456789abcdef"; +- char buffer[] = "123456"; +- buffer[0] = hexdigits[(color.red >> 4) & 15]; +- buffer[1] = hexdigits[color.red & 15]; +- buffer[2] = hexdigits[(color.green >> 4) & 15]; +- buffer[3] = hexdigits[color.green & 15]; +- buffer[4] = hexdigits[(color.blue >> 4) & 15]; +- buffer[5] = hexdigits[color.blue & 15]; +- return std::string(buffer); +-} +- +-void OdgExporter::writeStyle() +-{ +- m_value.str(""); +- m_name.str(""); +- +- if(!m_pen.solid && (m_pen.dashArray.count() >=2 ) ) +- { +- // ODG only supports dashes with the same length of spaces inbetween +- // here we take the first space and assume everything else the same +- // note that dash length is written in percentage +- double distance = m_pen.dashArray.at(1); +- OpenTagGraphicsElement *tmpDrawStrokeDashElement = new OpenTagGraphicsElement("draw:stroke-dash"); +- tmpDrawStrokeDashElement->addAttribute("draw:style", "rect"); +- m_value << "Dash_" << m_dashIndex++; +- tmpDrawStrokeDashElement->addAttribute("draw:name", m_value.str()); +- m_value.str(""); +- m_value << doubleToString(distance*100) << "%"; +- tmpDrawStrokeDashElement->addAttribute("draw:distance", m_value.str()); +- m_value.str(""); +- for(unsigned i = 0; i < m_pen.dashArray.count()/2; i++) +- { +- m_name << "draw:dots" << i+1; +- tmpDrawStrokeDashElement->addAttribute(m_name.str(), "1"); +- m_name.str(""); +- m_name << "draw:dots" << i+1 << "-length"; +- m_value << doubleToString(100*m_pen.dashArray.at(i*2)) << "%"; +- tmpDrawStrokeDashElement->addAttribute(m_name.str(), m_value.str()); +- m_name.str(""); +- m_value.str(""); +- } +- mStrokeDashElements.push_back(static_cast<GraphicsElement *>(tmpDrawStrokeDashElement)); +- mStrokeDashElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:stroke-dash"))); +- } +- +- if(m_brush.style == libwpg::WPGBrush::Gradient) +- { +- OpenTagGraphicsElement *tmpDrawGradientElement = new OpenTagGraphicsElement("draw:gradient"); +- tmpDrawGradientElement->addAttribute("draw:style", "linear"); +- m_value << "Gradient_" << m_gradientIndex++; +- tmpDrawGradientElement->addAttribute("draw:name", m_value.str()); +- m_value.str(""); +- +- // ODG angle unit is 0.1 degree +- double angle = -m_brush.gradient.angle(); +- while(angle < 0) +- angle += 360; +- while(angle > 360) +- angle -= 360; +- +- m_value << (unsigned)(angle*10); +- tmpDrawGradientElement->addAttribute("draw:angle", m_value.str()); +- m_value.str(""); +- +- libwpg::WPGColor startColor = m_brush.gradient.stopColor(0); +- libwpg::WPGColor stopColor = m_brush.gradient.stopColor(1); +- m_value << "#" << colorToHex(startColor); +- tmpDrawGradientElement->addAttribute("draw:start-color", m_value.str()); +- m_value.str(""); +- m_value << "#" << colorToHex(stopColor); +- tmpDrawGradientElement->addAttribute("draw:end-color", m_value.str()); +- m_value.str(""); +- tmpDrawGradientElement->addAttribute("draw:start-intensity", "100%"); +- tmpDrawGradientElement->addAttribute("draw:end-intensity", "100%"); +- tmpDrawGradientElement->addAttribute("draw:border", "0%"); +- mGradientElements.push_back(static_cast<GraphicsElement *>(tmpDrawGradientElement)); +- mGradientElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("draw:gradient"))); +- } +- +- OpenTagGraphicsElement *tmpStyleStyleElement = new OpenTagGraphicsElement("style:style"); +- m_value << "gr" << m_styleIndex; +- tmpStyleStyleElement->addAttribute("style:name", m_value.str()); +- m_value.str(""); +- tmpStyleStyleElement->addAttribute("style:family", "graphic"); +- tmpStyleStyleElement->addAttribute("style:parent-style-name", "standard"); +- mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleStyleElement)); +- +- OpenTagGraphicsElement *tmpStyleGraphicPropertiesElement = new OpenTagGraphicsElement("style:graphic-properties"); +- +- if(m_pen.width > 0.0) +- { +- m_value << doubleToString(m_pen.width) << "in"; +- tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-width", m_value.str()); +- m_value.str(""); +- m_value << "#" << colorToHex(m_pen.foreColor); +- tmpStyleGraphicPropertiesElement->addAttribute("svg:stroke-color", m_value.str()); +- m_value.str(""); +- +- if(!m_pen.solid) +- { +- tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "dash"); +- m_value << "Dash_" << m_dashIndex-1; +- tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke-dash", m_value.str()); +- m_value.str(""); +- } +- } +- else +- tmpStyleGraphicPropertiesElement->addAttribute("draw:stroke", "none"); +- +- if(m_brush.style == libwpg::WPGBrush::NoBrush) +- tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "none"); +- +- if(m_brush.style == libwpg::WPGBrush::Solid) +- { +- tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "solid"); +- m_value << "#" << colorToHex(m_brush.foreColor); +- tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-color", m_value.str()); +- m_value.str(""); +- } +- +- if(m_brush.style == libwpg::WPGBrush::Gradient) +- { +- tmpStyleGraphicPropertiesElement->addAttribute("draw:fill", "gradient"); +- m_value << "Gradient_" << m_gradientIndex-1; +- tmpStyleGraphicPropertiesElement->addAttribute("draw:fill-gradient-name", m_value.str()); +- m_value.str(""); +- } +- +- mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(tmpStyleGraphicPropertiesElement)); +- mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:graphic-properties"))); +- +- mAutomaticStylesElements.push_back(static_cast<GraphicsElement *>(new CloseTagGraphicsElement("style:style"))); +- m_styleIndex++; +-} +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.hxx koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.hxx +--- koffice-2.3.1/filters/karbon/wpg/import/OdgExporter.hxx 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/OdgExporter.hxx 1970-01-01 01:00:00.000000000 +0100 +@@ -1,116 +0,0 @@ +-/* libwpg +- * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the +- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +- * Boston, MA 02111-1301 USA +- * +- * For further information visit http://libwpg.sourceforge.net +- */ +- +-/* "This product is not manufactured, approved, or supported by +- * Corel Corporation or Corel Corporation Limited." +- */ +- +-#ifndef __ODGEXPORTER_H__ +-#define __ODGEXPORTER_H__ +- +-#include <iostream> +-#include <sstream> +-#include <string> +- +-#include <libwpg/libwpg.h> +-#include "GraphicsElement.hxx" +- +-class OdgExporter : public libwpg::WPGPaintInterface { +-public: +- explicit OdgExporter(GraphicsHandler *pHandler, +- const bool isFlatXML = false); +- ~OdgExporter(); +- +-#if LIBWPG_VERSION_MINOR<2 +- void startGraphics(double imageWidth, double imageHeight); +- void endGraphics(); +- void startLayer(unsigned int id); +- void endLayer(unsigned int id); +- +- void setPen(const libwpg::WPGPen& pen); +- void setBrush(const libwpg::WPGBrush& brush); +- void setFillRule(FillRule rule); +- +- void drawRectangle(const libwpg::WPGRect& rect, double rx, double ry); +- void drawEllipse(const libwpg::WPGPoint& center, double rx, double ry); +- void drawPolygon(const libwpg::WPGPointArray& vertices); +- void drawPath(const libwpg::WPGPath& path); +- void drawBitmap(const libwpg::WPGBitmap& bitmap); +- void drawImageObject(const libwpg::WPGBinaryData& binaryData); +- +-private: +- std::vector <GraphicsElement *> mBodyElements; +- std::vector <GraphicsElement *> mAutomaticStylesElements; +- std::vector <GraphicsElement *> mStrokeDashElements; +- std::vector <GraphicsElement *> mGradientElements; +- GraphicsHandler *mpHandler; +- +- libwpg::WPGPen m_pen; +- libwpg::WPGBrush m_brush; +- FillRule m_fillRule; +- int m_gradientIndex; +- int m_dashIndex; +- int m_styleIndex; +- void writeStyle(); +- std::ostringstream m_value, m_name; +- double m_width, m_height; +- const bool m_isFlatXML; +-#else +- virtual void startGraphics(const ::WPXPropertyList &propList); +- virtual void endGraphics(); +- virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient); +- virtual void startLayer(const ::WPXPropertyList &propList); +- virtual void endLayer(); +- virtual void drawRectangle(const ::WPXPropertyList& propList); +- virtual void drawEllipse(const ::WPXPropertyList& propList); +- virtual void drawPolygon(const ::WPXPropertyListVector &vertices); +- virtual void drawPath(const ::WPXPropertyListVector &path); +- virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData); +- virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList); +- virtual void endEmbeddedGraphics(); +- virtual void drawPolyline(const ::WPXPropertyListVector &vertices); +- virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path); +- virtual void endTextObject(); +- virtual void startTextLine(const ::WPXPropertyList &propList); +- virtual void endTextLine(); +- virtual void startTextSpan(const ::WPXPropertyList &propList); +- virtual void endTextSpan(); +- virtual void insertText(const ::WPXString &str); +- +- +-private: +- std::vector <GraphicsElement *> mBodyElements; +- std::vector <GraphicsElement *> mAutomaticStylesElements; +- std::vector <GraphicsElement *> mStrokeDashElements; +- std::vector <GraphicsElement *> mGradientElements; +- GraphicsHandler *mpHandler; +- +- int m_gradientIndex; +- int m_dashIndex; +- int m_styleIndex; +- void writeStyle(); +- std::ostringstream m_value, m_name; +- double m_width, m_height; +- const bool m_isFlatXML; +-#endif +-}; +- +-#endif // __ODGEXPORTER_H__ +diff -Nur koffice-2.3.1/filters/karbon/wpg/import/WPGImport.cpp koffice-2.3.1-libwpg02/filters/karbon/wpg/import/WPGImport.cpp +--- koffice-2.3.1/filters/karbon/wpg/import/WPGImport.cpp 2011-01-15 21:05:35.000000000 +0100 ++++ koffice-2.3.1-libwpg02/filters/karbon/wpg/import/WPGImport.cpp 2011-01-02 17:46:15.000000000 +0100 +@@ -20,28 +20,26 @@ + #include <WPGImport.h> + #include <WPGImport.moc> + +-#include <QBuffer> +-#include <QByteArray> +-#include <QString> +- +-#include <kdebug.h> + #include <KoFilterChain.h> + #include <KoGlobal.h> + #include <KoUnit.h> ++#include <KoXmlWriter.h> ++ + #include <kpluginfactory.h> ++#include <KDebug> + +-#include <KoXmlWriter.h> ++ ++#include <QtCore/QString> ++#include <QtCore/QFile> + + #include <libwpg/libwpg.h> + #if LIBWPG_VERSION_MINOR<2 + #include <libwpg/WPGStreamImplementation.h> + #else + #include <libwpd-stream/libwpd-stream.h> ++#include <libwpd/libwpd.h> + #endif + +-#include "FileOutputHandler.hxx" +-#include "OdgExporter.hxx" +- + #include <iostream> + + K_PLUGIN_FACTORY(WPGImportFactory, registerPlugin<WPGImport>();) +@@ -56,35 +54,13 @@ + { + } + +-static QByteArray createManifest() +-{ +- KoXmlWriter* manifestWriter; +- QByteArray manifestData; +- QBuffer manifestBuffer(&manifestData); +- +- manifestBuffer.open(QIODevice::WriteOnly); +- manifestWriter = new KoXmlWriter(&manifestBuffer); +- +- manifestWriter->startDocument("manifest:manifest"); +- manifestWriter->startElement("manifest:manifest"); +- manifestWriter->addAttribute("xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0"); +- manifestWriter->addManifestEntry("/", "application/vnd.oasis.opendocument.graphics"); +- //manifestWriter->addManifestEntry( "styles.xml", "text/xml" ); +- manifestWriter->addManifestEntry("content.xml", "text/xml"); +- manifestWriter->endElement(); +- manifestWriter->endDocument(); +- delete manifestWriter; +- +- return manifestData; +-} +- + + KoFilter::ConversionStatus WPGImport::convert(const QByteArray& from, const QByteArray& to) + { + if (from != "application/x-wpg") + return KoFilter::NotImplemented; + +- if (to != "application/vnd.oasis.opendocument.graphics") ++ if (to != "image/svg+xml") + return KoFilter::NotImplemented; + + #if LIBWPG_VERSION_MINOR<2 +@@ -96,6 +72,7 @@ + input = olestream; + } + } ++ libwpg::WPGString output; + #else + WPXInputStream* input = new WPXFileStream(m_chain->inputFile().toLocal8Bit()); + if (input->isOLEStream()) { +@@ -105,59 +82,31 @@ + input = olestream; + } + } ++ ::WPXString output; + #endif + + if (!libwpg::WPGraphics::isSupported(input)) { +- std::cerr << "ERROR: Unsupported file format (unsupported version) or file is encrypted!" << std::endl; ++ kWarning() << "ERROR: Unsupported file format (unsupported version) or file is encrypted!"; + delete input; + return KoFilter::NotImplemented; + } + +- // do the conversion +- std::ostringstream tmpStringStream; +- FileOutputHandler tmpHandler(tmpStringStream); +- OdgExporter exporter(&tmpHandler); +- libwpg::WPGraphics::parse(input, &exporter); +- delete input; +- +- +- // create output store +- KoStore* storeout; +- storeout = KoStore::createStore(m_chain->outputFile(), KoStore::Write, +- "application/vnd.oasis.opendocument.graphics", KoStore::Zip); +- +- if (!storeout) { +- kWarning() << "Couldn't open the requested file."; +- return KoFilter::FileNotFound; +- } +- +-#if 0 +- if (!storeout->open("styles.xml")) { +- kWarning() << "Couldn't open the file 'styles.xml'."; +- return KoFilter::CreationError; ++ if (!libwpg::WPGraphics::generateSVG(input, output)) { ++ kWarning() << "ERROR: SVG Generation failed!"; ++ delete input; ++ return KoFilter::ParsingError; + } +- //storeout->write( createStyles() ); +- storeout->close(); +-#endif + +- if (!storeout->open("content.xml")) { +- kWarning() << "Couldn't open the file 'content.xml'."; +- return KoFilter::CreationError; +- } +- storeout->write(tmpStringStream.str().c_str()); +- storeout->close(); ++ delete input; + +- // store document manifest +- storeout->enterDirectory("META-INF"); +- if (!storeout->open("manifest.xml")) { +- kWarning() << "Couldn't open the file 'META-INF/manifest.xml'."; +- return KoFilter::CreationError; ++ QFile outputFile(m_chain->outputFile()); ++ if(!outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) { ++ kWarning() << "ERROR: Could not open output file" << m_chain->outputFile(); ++ return KoFilter::InternalError; + } +- storeout->write(createManifest()); +- storeout->close(); + +- // we are done! +- delete storeout; ++ outputFile.write(output.cstr()); ++ outputFile.close(); + + return KoFilter::OK; + } + diff --git a/staging/koffice/koffice.install b/staging/koffice/koffice.install new file mode 100644 index 000000000..e70c054ec --- /dev/null +++ b/staging/koffice/koffice.install @@ -0,0 +1,11 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/staging/koffice/krita.install b/staging/koffice/krita.install new file mode 100644 index 000000000..ce5c32e1b --- /dev/null +++ b/staging/koffice/krita.install @@ -0,0 +1,12 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-mime-database usr/share/mime &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +}
\ No newline at end of file diff --git a/testing/bind/127.0.0.zone b/testing/bind/127.0.0.zone new file mode 100644 index 000000000..509c311f6 --- /dev/null +++ b/testing/bind/127.0.0.zone @@ -0,0 +1,11 @@ +$ORIGIN 0.0.127.in-addr.arpa. + +@ 1D IN SOA localhost. root.localhost. ( + 42 ; serial (yyyymmdd##) + 3H ; refresh + 15M ; retry + 1W ; expiry + 1D ) ; minimum ttl + + 1D IN NS localhost. +1 1D IN PTR localhost. diff --git a/testing/bind/PKGBUILD b/testing/bind/PKGBUILD new file mode 100644 index 000000000..8df2eb03d --- /dev/null +++ b/testing/bind/PKGBUILD @@ -0,0 +1,86 @@ +# $Id: PKGBUILD 125623 2011-05-27 08:34:32Z bisson $ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: judd <jvinet@zeroflux.org> +# Contributor: Mario Vazquez <mario_vazq@hotmail.com> + +pkgname=bind + +# Use a period and not a hyphen before the patch level for proper versioning. +pkgver=9.8.0.P2 +_pkgver=9.8.0-P2 +pkgrel=1 + +pkgdesc='Berkeley Internet Name Daemon (BIND) is the reference implementation of the Domain Name System (DNS) protocols' +arch=('i686' 'x86_64') +url='http://www.isc.org/software/bind/' +license=('custom:ISC') +provides=('dns-server') +backup=('etc/logrotate.d/named' + 'etc/conf.d/named' + 'etc/named.conf') +depends=('openssl' 'krb5' 'libxml2') +options=('!makeflags' '!libtool') +source=("http://ftp.isc.org/isc/bind9/${_pkgver}/${pkgname}-${_pkgver}.tar.gz" + 'root.hint::ftp://ftp.rs.internic.net/domain/db.cache' + 'so_bsdcompat.patch' + 'notools.patch' + 'named' + 'named.conf' + 'named.conf.d' + 'named.logrotate' + 'localhost.zone' + '127.0.0.zone') +sha1sums=('b3492ad11cfbf2939d9b0fb62c52c204de58679b' + 'ee52947062c1582858187716b776afa3613608fb' + 'b433ba99f23e3db305f8ce293fe4ce6d1b8d4cfb' + '17444f9d759a4bde7688bdaa304dac57a138e4c1' + '46232e9db243c6c05e170a1781d7a7f413be5d03' + '5ca7a5f2a132548a090a045a2df3acea6b35d9eb' + '7848edbfb9a848843f57c11c02b0289eefd42d00' + '9ffb5c3f72390a517aeae557e32349d5d278cb63' + '76a0d4cd1b913db177a5a375bebc47e5956866ec' + '53be0f1437ebe595240d8dbdd819939582b97fb9') + +install=install + +build() { + cd "${srcdir}/${pkgname}-${_pkgver}" + + patch -p1 -i ../so_bsdcompat.patch + patch -p1 -i ../notools.patch + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-linux-caps \ + --with-openssl \ + --with-gssapi \ + --with-libxml2 \ + --with-libtool \ + --with-dlz-dlopen \ + + make +} + +package() { + cd "${srcdir}/${pkgname}-${_pkgver}" + + make DESTDIR="${pkgdir}" install + + rmdir "${pkgdir}/var/run" + install -d "${pkgdir}"/usr/share/doc/bind + install doc/arm/*.html "${pkgdir}"/usr/share/doc/bind/ + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + install -D -m755 ../named "${pkgdir}"/etc/rc.d/named + install -D -m644 ../named.conf.d "${pkgdir}"/etc/conf.d/named + install -D -m600 ../named.logrotate "${pkgdir}"/etc/logrotate.d/named + install -D -m640 -o 0 -g 40 ../named.conf "${pkgdir}"/etc/named.conf + + install -d -m750 -o 0 -g 40 "${pkgdir}"/var/named + install -m640 -o 0 -g 40 ../root.hint "${pkgdir}"/var/named/ + install -m640 -o 0 -g 40 ../127.0.0.zone "${pkgdir}"/var/named/ + install -m640 -o 0 -g 40 ../localhost.zone "${pkgdir}"/var/named/ +} diff --git a/testing/bind/install b/testing/bind/install new file mode 100644 index 000000000..e3a1397cb --- /dev/null +++ b/testing/bind/install @@ -0,0 +1,21 @@ +post_install() { + getent group named >/dev/null || groupadd -g 40 named + getent passwd named >/dev/null || useradd -u 40 -c "BIND DNS Server" -g named -d /var/named -s /bin/false named + passwd -l named &>/dev/null + + touch var/log/named.log + chown named:named var/log/named.log + + # create an rndc.key if it doesn't already exist + if [ ! -s etc/rndc.key ]; then + usr/sbin/rndc-confgen -r /dev/urandom -b 256 | head -n 5 >>etc/rndc.key + chown root:named etc/rndc.key + chmod 640 etc/rndc.key + fi +} + +pre_remove() { + getent passwd named &>/dev/null && userdel named >/dev/null + getent group named &>/dev/null && groupdel named >/dev/null + return 0 +} diff --git a/testing/bind/localhost.zone b/testing/bind/localhost.zone new file mode 100644 index 000000000..e3ff9641c --- /dev/null +++ b/testing/bind/localhost.zone @@ -0,0 +1,10 @@ +$ORIGIN localhost. +@ 1D IN SOA @ root ( + 42 ; serial (yyyymmdd##) + 3H ; refresh + 15M ; retry + 1W ; expiry + 1D ) ; minimum ttl + + 1D IN NS @ + 1D IN A 127.0.0.1 diff --git a/testing/bind/named b/testing/bind/named new file mode 100755 index 000000000..7907f9983 --- /dev/null +++ b/testing/bind/named @@ -0,0 +1,52 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/named + +[[ -d /var/run/named ]] || mkdir -p /var/run/named +chown named:named /var/run/named + +PIDFILE=/var/run/named/named.pid +PID=$(cat $PIDFILE 2>/dev/null) +readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/named' || { PID=; rm $PIDFILE 2>/dev/null; } + +case "$1" in + start) + stat_busy "Starting BIND" + [ -z "$PID" ] && /usr/sbin/named ${NAMED_ARGS} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon named + stat_done + fi + ;; + stop) + stat_busy "Stopping BIND" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon named + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + reload) + stat_busy "Reloading BIND" + [ ! -z "$PID" ] && rndc reload &>/dev/null || kill -HUP $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + ;; + *) + echo "usage: $0 {start|stop|reload|restart}" +esac +exit 0 diff --git a/testing/bind/named.conf b/testing/bind/named.conf new file mode 100644 index 000000000..38fb12cbe --- /dev/null +++ b/testing/bind/named.conf @@ -0,0 +1,64 @@ +// +// /etc/named.conf +// + +options { + directory "/var/named"; + pid-file "/var/run/named/named.pid"; + auth-nxdomain yes; + datasize default; +// Uncomment these to enable IPv6 connections support +// IPv4 will still work: +// listen-on-v6 { any; }; +// Add this for no IPv4: +// listen-on { none; }; + + // Default security settings. + allow-recursion { 127.0.0.1; }; + allow-transfer { none; }; + allow-update { none; }; + version none; + hostname none; + server-id none; +}; + +zone "localhost" IN { + type master; + file "localhost.zone"; + allow-transfer { any; }; +}; + +zone "0.0.127.in-addr.arpa" IN { + type master; + file "127.0.0.zone"; + allow-transfer { any; }; +}; + +zone "." IN { + type hint; + file "root.hint"; +}; + +//zone "example.org" IN { +// type slave; +// file "example.zone"; +// masters { +// 192.168.1.100; +// }; +// allow-query { any; }; +// allow-transfer { any; }; +//}; + +logging { + channel xfer-log { + file "/var/log/named.log"; + print-category yes; + print-severity yes; + print-time yes; + severity info; + }; + category xfer-in { xfer-log; }; + category xfer-out { xfer-log; }; + category notify { xfer-log; }; +}; + diff --git a/testing/bind/named.conf.d b/testing/bind/named.conf.d new file mode 100644 index 000000000..aecbd2307 --- /dev/null +++ b/testing/bind/named.conf.d @@ -0,0 +1,4 @@ +# +# Parameters to be passed to BIND +# +NAMED_ARGS="-u named" diff --git a/testing/bind/named.logrotate b/testing/bind/named.logrotate new file mode 100644 index 000000000..ef1a2d032 --- /dev/null +++ b/testing/bind/named.logrotate @@ -0,0 +1,6 @@ +/var/log/named.log { + missingok + postrotate + /bin/kill -HUP `cat /var/run/named/named.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/testing/bind/notools.patch b/testing/bind/notools.patch new file mode 100644 index 000000000..0ad083a01 --- /dev/null +++ b/testing/bind/notools.patch @@ -0,0 +1,12 @@ +diff -aur old/bin/Makefile.in new/bin/Makefile.in +--- old/bin/Makefile.in 2011-05-27 10:12:59.392416094 +0200 ++++ new/bin/Makefile.in 2011-05-27 10:13:12.372521984 +0200 +@@ -19,7 +19,7 @@ + VPATH = @srcdir@ + top_srcdir = @top_srcdir@ + +-SUBDIRS = named rndc dig dnssec tests tools nsupdate \ ++SUBDIRS = named rndc dnssec tests tools \ + check confgen @PKCS11_TOOLS@ + TARGETS = + diff --git a/testing/bind/so_bsdcompat.patch b/testing/bind/so_bsdcompat.patch new file mode 100644 index 000000000..4d7031fcc --- /dev/null +++ b/testing/bind/so_bsdcompat.patch @@ -0,0 +1,12 @@ +diff -aur old/lib/isc/unix/socket.c new/lib/isc/unix/socket.c +--- old/lib/isc/unix/socket.c 2011-02-18 05:01:16.000000000 +0100 ++++ new/lib/isc/unix/socket.c 2011-05-27 10:12:01.685269374 +0200 +@@ -712,6 +712,8 @@ + } + #endif + ++#undef SO_BSDCOMPAT ++ + static void + socket_log(isc__socket_t *sock, isc_sockaddr_t *address, + isc_logcategory_t *category, isc_logmodule_t *module, int level, diff --git a/testing/dnsutils/PKGBUILD b/testing/dnsutils/PKGBUILD new file mode 100644 index 000000000..12829b5d1 --- /dev/null +++ b/testing/dnsutils/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 125626 2011-05-27 10:41:33Z bisson $ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: kevin <kevin@archlinux.org> +# Contributor: mario <mario_vazq@hotmail.com> + +pkgname=dnsutils + +# Use a period and not a hyphen before the patch level for proper versioning. +pkgver=9.8.0.P2 +_pkgver=9.8.0-P2 +pkgrel=1 + +pkgdesc='Various DNS utilities - dig host nslookup nsupdate' +arch=('i686' 'x86_64') +url='https://www.isc.org/software/bind' +license=('custom:ISC') +depends=('openssl' 'idnkit') +replaces=('bind-tools' 'host') +options=('!makeflags') +source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz" + 'tools-only.patch') +sha1sums=('b3492ad11cfbf2939d9b0fb62c52c204de58679b' + 'ac88c89e25c26d73095a3dd85e1ca1070d184ded') + +build() { + cd "${srcdir}/bind-${_pkgver}" + + patch -p1 -i ../tools-only.patch + export STD_CDEFINES='-DDIG_SIGCHASE' + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-openssl=yes \ + --with-idn=yes \ + --disable-linux-caps \ + + make +} + +package() { + cd "${srcdir}/bind-${_pkgver}/bin" + + make DESTDIR="${pkgdir}" install + + install -Dm644 ../COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/testing/dnsutils/tools-only.patch b/testing/dnsutils/tools-only.patch new file mode 100644 index 000000000..b46b71f60 --- /dev/null +++ b/testing/dnsutils/tools-only.patch @@ -0,0 +1,25 @@ +diff -Naur bind-9.7.1-P2.orig/bin/Makefile.in bind-9.7.1-P2/bin/Makefile.in +--- bind-9.7.1-P2.orig/bin/Makefile.in 2009-10-05 08:07:08.000000000 -0400 ++++ bind-9.7.1-P2/bin/Makefile.in 2010-07-22 15:55:00.000000000 -0400 +@@ -19,8 +19,7 @@ + VPATH = @srcdir@ + top_srcdir = @top_srcdir@ + +-SUBDIRS = named rndc dig dnssec tests tools nsupdate \ +- check confgen @PKCS11_TOOLS@ ++SUBDIRS = dig nsupdate + TARGETS = + + @BIND9_MAKE_RULES@ +diff -Naur bind-9.7.1-P2.orig/lib/Makefile.in bind-9.7.1-P2/lib/Makefile.in +--- bind-9.7.1-P2.orig/lib/Makefile.in 2007-06-19 19:47:13.000000000 -0400 ++++ bind-9.7.1-P2/lib/Makefile.in 2010-07-22 15:56:29.000000000 -0400 +@@ -23,7 +23,7 @@ + # Attempt to disable parallel processing. + .NOTPARALLEL: + .NO_PARALLEL: +-SUBDIRS = isc isccc dns isccfg bind9 lwres tests ++SUBDIRS = isc dns isccfg bind9 lwres + TARGETS = + + @BIND9_MAKE_RULES@ diff --git a/testing/network-manager-applet/PKGBUILD b/testing/network-manager-applet/PKGBUILD new file mode 100644 index 000000000..60394a46b --- /dev/null +++ b/testing/network-manager-applet/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 125653 2011-05-27 18:09:01Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Contributor: Arjan Timmerman <arjan@archlinux.org> +# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org> +# Contributor: Tor Krill <tor@krill.nu> +# Contributor: Will Rea <sillywilly@gmail.com> + +pkgname=network-manager-applet +pkgver=0.8.9997 +pkgrel=1 +pkgdesc="GNOME frontends to NetWorkmanager" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org/projects/NetworkManager/" +depends=('networkmanager' 'libgnome-keyring' 'polkit-gnome' 'gtk3' + 'notification-daemon' 'libnotify' 'gnome-icon-theme' + 'mobile-broadband-provider-info' 'gconf') +makedepends=('intltool' 'gnome-bluetooth' 'gtk-doc') +optdepends=('gnome-bluetooth: for PAN/DUN support') +options=('!libtool') +install=network-manager-applet.install +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2) +sha256sums=('1620e52bfdba18f3640e57a3d450e913ad73a6e529dd0bad895d4c07700018ab') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/networkmanager \ + --disable-static \ + --disable-maintainer-mode + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain nm-applet ${pkgdir}/etc/gconf/schemas/*.schemas + rm -f ${pkgdir}/etc/gconf/schemas/*.schemas +} diff --git a/testing/network-manager-applet/network-manager-applet.install b/testing/network-manager-applet/network-manager-applet.install new file mode 100644 index 000000000..9922d12b2 --- /dev/null +++ b/testing/network-manager-applet/network-manager-applet.install @@ -0,0 +1,18 @@ +pkgname=network-manager-applet + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} + gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} + +post_remove() { + gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor +} diff --git a/testing/networkmanager/NetworkManager.conf b/testing/networkmanager/NetworkManager.conf new file mode 100644 index 000000000..c37b59680 --- /dev/null +++ b/testing/networkmanager/NetworkManager.conf @@ -0,0 +1,2 @@ +[main] +plugins=keyfile diff --git a/testing/networkmanager/PKGBUILD b/testing/networkmanager/PKGBUILD new file mode 100644 index 000000000..ecfc88f0a --- /dev/null +++ b/testing/networkmanager/PKGBUILD @@ -0,0 +1,60 @@ +# $Id: PKGBUILD 125645 2011-05-27 17:39:58Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinxu.org> +# Contri-butor: Wael Nasreddine <gandalf@siemens-mobiles.org> +# Contributor: Tor Krill <tor@krill.nu> +# Contributor: Will Rea <sillywilly@gmail.com> +# Contributor: Valentine Sinitsyn <e_val@inbox.ru> + +pkgname=networkmanager +pkgver=0.8.9997 +pkgrel=1 +pkgdesc="Network Management daemon" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org/projects/NetworkManager/" +depends=('dbus-glib' 'iproute2' 'libnl' 'nss' 'polkit' 'udev' 'wireless_tools' 'wpa_supplicant' 'ppp' 'dhcpcd') +makedepends=('intltool' 'dhclient' 'iptables' 'gobject-introspection' 'gtk-doc') +optdepends=('modemmanager: for modem management service' + 'dhclient: alternative DHCP/DHCPv6 client' + 'iptables: Connection sharing' + 'dnsmasq: Connection sharing' + 'bluez: Bluetooth support') +options=('!libtool') +backup=('etc/NetworkManager/NetworkManager.conf') +install=networkmanager.install +source=(http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.8/NetworkManager-${pkgver}.tar.bz2 + NetworkManager.conf disable_set_hostname.patch) +sha256sums=('af2e08546cfcd51731be8f4d944b77876ba2eca93cf4f15509caf5572cac6596' + '44b048804c7c0b8b3b0c29b8632b6ad613c397d0a1635ec918e10c0fbcdadf21' + '1e4586991bc96ef004dc520c794047a336c54433e0bd4edc3879fb6e7ab0e553') + +build() { + cd "${srcdir}/NetworkManager-${pkgver}" + + patch -Np1 -i "${srcdir}/disable_set_hostname.patch" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/networkmanager \ + --with-crypto=nss \ + --with-distro=arch \ + --with-dhclient=/usr/sbin/dhclient \ + --with-dhcpcd=/sbin/dhcpcd \ + --with-iptables=/usr/sbin/iptables \ + --disable-static \ + --enable-more-warnings=no \ + --disable-wimax + + make +} + +package() { + cd "${srcdir}/NetworkManager-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -m644 "${srcdir}/NetworkManager.conf" "${pkgdir}/etc/NetworkManager/" + + rm -rf "${pkgdir}/var/run/" +} diff --git a/testing/networkmanager/disable_set_hostname.patch b/testing/networkmanager/disable_set_hostname.patch new file mode 100644 index 000000000..6c9e2f6c6 --- /dev/null +++ b/testing/networkmanager/disable_set_hostname.patch @@ -0,0 +1,19 @@ +diff -Nur NetworkManager-0.8.2.orig/src/nm-policy.c NetworkManager-0.8.2/src/nm-policy.c +--- NetworkManager-0.8.2.orig/src/nm-policy.c 2010-11-03 12:58:42.000000000 -0700 ++++ NetworkManager-0.8.2/src/nm-policy.c 2010-11-23 06:22:32.436707081 -0800 +@@ -342,6 +342,7 @@ + return; + } + ++#if 0 + /* Try automatically determined hostname from the best device's IP config */ + if (!best4) + best4 = get_best_ip4_device (policy->manager, &best_req4); +@@ -396,6 +397,7 @@ + } + } + ++#endif + /* If no automatically-configured hostname, try using the hostname from + * when NM started up. + */ diff --git a/testing/networkmanager/networkmanager.install b/testing/networkmanager/networkmanager.install new file mode 100644 index 000000000..de40c17ed --- /dev/null +++ b/testing/networkmanager/networkmanager.install @@ -0,0 +1,9 @@ +post_upgrade() { + (( $(vercmp 0.8.3 $2) > 0 )) && cat <<MSG +ATTENTION: + /etc/NetworkManager/nm-system-settings.conf has been replaced + by /etc/NetworkManager/NetworkManager.conf. Make sure you move + any custom settings to the new config file. +MSG + true +} diff --git a/testing/udev/PKGBUILD b/testing/udev/PKGBUILD index acb78e0bf..0db5f45cf 100644 --- a/testing/udev/PKGBUILD +++ b/testing/udev/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 124345 2011-05-20 06:14:46Z tomegun $ +# $Id: PKGBUILD 125635 2011-05-27 11:47:52Z tomegun $ # Maintainer: Aaron Griffin <aaron@archlinux.org> # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Bächler <thomas@archlinux.org> @@ -6,7 +6,7 @@ pkgbase="udev" pkgname=('udev' 'udev-compat') -pkgver=170 +pkgver=171 pkgrel=1 arch=(i686 x86_64) url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" @@ -18,10 +18,13 @@ makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2 80-drivers.rules 81-arch.rules - load-modules.sh) + load-modules.sh + static-audio-nodes-permissions.patch) build() { cd $srcdir/$pkgbase-$pkgver + # fix https://bugs.archlinux.org/task/24362 (will be in udev-172) + patch -Np1 -i ../static-audio-nodes-permissions.patch ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\ --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\ --disable-rule-generator @@ -96,7 +99,8 @@ package_udev-compat() { install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules } -md5sums=('6e132d1a3b4dae24dafd2726c5cdd982' +md5sums=('bdf4617284be2ecac11767437417e209' '4427855146513a4703ab5c7eb8a0156e' 'd8725e64fd0ce6e784ae795fae424c0a' - 'f91fddc67609b45b244a624977c4247b') + 'f91fddc67609b45b244a624977c4247b' + '4f625aea95a5597afd8cdf189421f193') diff --git a/testing/udev/static-audio-nodes-permissions.patch b/testing/udev/static-audio-nodes-permissions.patch new file mode 100644 index 000000000..b1fc4f935 --- /dev/null +++ b/testing/udev/static-audio-nodes-permissions.patch @@ -0,0 +1,27 @@ +From 3e227830ad6494700e18ae03297e8fb833ff26bf Mon Sep 17 00:00:00 2001 +From: Kay Sievers <kay.sievers@vrfy.org> +Date: Fri, 27 May 2011 02:50:29 +0200 +Subject: [PATCH] rules: apply 'audio' group of the static snd/{seq,timer} + nodes + +--- + rules/rules.d/50-udev-default.rules | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules +index cd745ef..cacb533 100644 +--- a/rules/rules.d/50-udev-default.rules ++++ b/rules/rules.d/50-udev-default.rules +@@ -38,7 +38,8 @@ SUBSYSTEM=="graphics", GROUP="video" + SUBSYSTEM=="drm", GROUP="video" + + # sound +-SUBSYSTEM=="sound", GROUP="audio" ++SUBSYSTEM=="sound", GROUP="audio", \ ++ OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" + + # DVB (video) + SUBSYSTEM=="dvb", GROUP="video" +-- +1.7.5.3 + |