diff options
Diffstat (limited to 'extra')
104 files changed, 5246 insertions, 396 deletions
diff --git a/extra/amarok/PKGBUILD b/extra/amarok/PKGBUILD index fe6d67a7f..987b412c3 100644 --- a/extra/amarok/PKGBUILD +++ b/extra/amarok/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 122696 2011-05-06 06:26:05Z andrea $ +# $Id: PKGBUILD 129446 2011-06-27 20:27:37Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: damir <damir@archlinux.org> pkgname=amarok replaces=('amarok-base' 'amarok-engine-xine' 'amarok-base-mysqlfree') pkgver=2.4.1 -pkgrel=1 +pkgrel=3 pkgdesc="The powerful music player for KDE" arch=("i686" "x86_64" 'mips64el') url="http://amarok.kde.org" diff --git a/extra/botan/PKGBUILD b/extra/botan/PKGBUILD index 410f455fc..1623c55c4 100644 --- a/extra/botan/PKGBUILD +++ b/extra/botan/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 98518 2010-11-10 20:05:00Z angvp $ +# $Id: PKGBUILD 128341 2011-06-23 05:31:14Z angvp $ # Maintainer: Angel Velasquez <angvp@archlinux.org> # Contributor: Douglas Soares de Andrade <douglas@archlinux.org> # Contributor: d'Ronin <daronin@2600.com> pkgname=botan -pkgver=1.8.11 +pkgver=1.10.0 pkgrel=1 pkgdesc="BSD-licensed crypto library written in C++" license=('BSD') @@ -12,14 +12,17 @@ url="http://botan.randombit.net/" depends=('gcc-libs' 'sh') makedepends=('python2') source=(http://files.randombit.net/botan/Botan-${pkgver}.tgz) -options=('force') -md5sums=('ccb2c3cb8a324214a89b45a03422870b') +md5sums=('1f03a6a84f402a12e50665868dddae99') build() { cd ${srcdir}/Botan-${pkgver} sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' configure.py ./configure.py --prefix=/usr make +} + +package() { + cd ${srcdir}/Botan-${pkgver} make DESTDIR=${pkgdir}/usr install } diff --git a/extra/cairo-perl/PKGBUILD b/extra/cairo-perl/PKGBUILD index dfad5c81d..8f260c3a8 100644 --- a/extra/cairo-perl/PKGBUILD +++ b/extra/cairo-perl/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 104389 2011-01-02 04:22:32Z kevin $ +# $Id: PKGBUILD 124873 2011-05-24 21:13:32Z remy $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=cairo-perl _realname=Cairo pkgver=1.061 -pkgrel=3 +pkgrel=4 pkgdesc="Perl wrappers for cairo" arch=(i686 x86_64 'mips64el') license=('LGPL') url="http://gtk2-perl.sourceforge.net/" options=('!emptydirs') -depends=('cairo>=1.8.10' 'perl>=5.12.1') +depends=('cairo>=1.8.10' 'perl>=5.14') makedepends=('perl-extutils-depends' 'perl-extutils-pkgconfig') source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz) md5sums=('08cd5e847f61858651fc4de769066e88') @@ -21,6 +21,11 @@ build() { make } +check() { + cd "${srcdir}/${_realname}-${pkgver}" + make test || true +} + package() { cd "${srcdir}/${_realname}-${pkgver}" make DESTDIR="${pkgdir}" install diff --git a/extra/claws-mail-extra-plugins/PKGBUILD b/extra/claws-mail-extra-plugins/PKGBUILD index b1cd6cbc9..7d8ed522b 100644 --- a/extra/claws-mail-extra-plugins/PKGBUILD +++ b/extra/claws-mail-extra-plugins/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 121174 2011-04-29 06:49:28Z andyrtr $ +# $Id: PKGBUILD 125144 2011-05-25 19:01:27Z foutrelis $ # Maintainer: Andreas Radke <andyrtr@archlinux.org> # Contributor: Mildred <mildred593 at online dot fr> pkgname=claws-mail-extra-plugins pkgver=3.7.9 -pkgrel=3 +pkgrel=4 pkgdesc="Extra plugins for claws-mail" url="http://www.claws-mail.org/plugins.php?branch=EXT" license=('GPL3') diff --git a/extra/cpufrequtils/PKGBUILD b/extra/cpufrequtils/PKGBUILD index 3a6d4abb8..21ffbe1cd 100644 --- a/extra/cpufrequtils/PKGBUILD +++ b/extra/cpufrequtils/PKGBUILD @@ -14,19 +14,23 @@ depends=('sysfsutils') backup=('etc/conf.d/cpufreq') source=(http://www.kernel.org/pub/linux/utils/kernel/cpufreq/${pkgname}-${pkgver}.tar.bz2 cpufreq.rcd - cpufreq.confd) -options=(!libtool) + cpufreq.confd + cpufrequtils-mips.patch) +options=(!libtool !distcc) md5sums=('c59b71c044d463896f3247e8dd83dd7e' '7f2b5085df44d2df3e7c2d0b9f6dab08' - 'baae1f2abffc6bef2bd32a8dd8263c09') + 'baae1f2abffc6bef2bd32a8dd8263c09' + 'edbe311e6813f3b395a08b7f174065c1') build() { cd "${srcdir}/${pkgname}-${pkgver}" - make -j1 || return 1 - make INSTALL="/bin/install -c" mandir=/usr/share/man DESTDIR="${pkgdir}" install || return 1 + [ "$CARCH" = "mips64el" ] && patch -Np0 -i ${srcdir}/cpufrequtils-mips.patch - install -D -m755 ${srcdir}/cpufreq.rcd "${pkgdir}/etc/rc.d/cpufreq" || return 1 - install -D -m644 ${srcdir}/cpufreq.confd "${pkgdir}/etc/conf.d/cpufreq" || return 1 + make -j1 + make INSTALL="/bin/install -c" mandir=/usr/share/man DESTDIR="${pkgdir}" install + + install -D -m755 ${srcdir}/cpufreq.rcd "${pkgdir}/etc/rc.d/cpufreq" + install -D -m644 ${srcdir}/cpufreq.confd "${pkgdir}/etc/conf.d/cpufreq" } diff --git a/extra/cpufrequtils/cpufrequtils-mips.patch b/extra/cpufrequtils/cpufrequtils-mips.patch new file mode 100644 index 000000000..cba8ab48b --- /dev/null +++ b/extra/cpufrequtils/cpufrequtils-mips.patch @@ -0,0 +1,18 @@ +--- utils/aperf.c.orig 2010-07-18 01:38:02.000000000 +0800 ++++ utils/aperf.c 2010-07-18 01:38:39.000000000 +0800 +@@ -68,11 +68,15 @@ + + static int cpu_has_effective_freq() + { ++#if defined(__i386__) || defined(__x86_64__) + /* largest base level */ + if (cpuid_eax(0) < 6) + return 0; + + return cpuid_ecx(6) & 0x1; ++#else ++ return 0; ++#endif + } + + /* diff --git a/extra/cups/PKGBUILD b/extra/cups/PKGBUILD index 686a8ae63..f8b644fa8 100644 --- a/extra/cups/PKGBUILD +++ b/extra/cups/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 127716 2011-06-17 19:45:36Z andyrtr $ +# $Id: PKGBUILD 129509 2011-06-28 15:26:54Z andyrtr $ # Maintainer: Andreas Radke <andyrtr@archlinux.org> pkgbase="cups" pkgname=('libcups' 'cups') -pkgver=1.4.6 -pkgrel=4 -arch=('i686' 'x86_64' 'mips64el') +pkgver=1.4.7 +pkgrel=1 +arch=('i686' 'x86_64') license=('GPL') url="http://www.cups.org/" makedepends=('libtiff>=3.9.2-2' 'libpng>=1.4.0' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'poppler>=0.12.3' @@ -14,7 +14,7 @@ source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 cups-avahi.patch cups cups.logrotate cups.pam) #options=('!emptydirs') -md5sums=('de8fb5a29c36554925c0c6a6e2c0dae1' +md5sums=('1590033ab4c739b859aeb672fe849089' '8ebd390197501ffd709f0ee546937fd5' '9657daa21760bb0b5fa3d8b51d5e01a1' 'f861b18f4446c43918c8643dcbbd7f6d' diff --git a/extra/curl/PKGBUILD b/extra/curl/PKGBUILD index 1ee81f0e3..556c4076e 100644 --- a/extra/curl/PKGBUILD +++ b/extra/curl/PKGBUILD @@ -20,8 +20,6 @@ source=(http://curl.haxx.se/download/${pkgname}-${pkgver}.tar.bz2 [[ $CARCH == "x86_64" ]] && _curlbuild=curlbuild-64.h [[ $CARCH == "i686" ]] && _curlbuild=curlbuild-32.h [[ $CARCH == "mips64el" ]] && _curlbuild=curlbuild-32.h -md5sums=('5f6d50c4d4ee38c57fe37e3cff75adbd' - '751bd433ede935c8fae727377625a8ae') build() { cd ${srcdir}/${pkgname}-${pkgver} diff --git a/extra/dvdrip/PKGBUILD b/extra/dvdrip/PKGBUILD index 41f6a3ab2..dae30451d 100644 --- a/extra/dvdrip/PKGBUILD +++ b/extra/dvdrip/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 110171 2011-02-17 08:54:21Z giovanni $ +# $Id: PKGBUILD 126069 2011-06-01 10:23:05Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Fredrik Hammar <Horney_C86@Hotmail.com> pkgname=dvdrip pkgver=0.98.11 -pkgrel=6 +pkgrel=8 pkgdesc="A Gtk frontend for transcode writen in Perl" arch=('i686' 'x86_64' 'mips64el') license=('custom') @@ -16,26 +16,25 @@ optdepends=('ogmtools: for ogm/odd video creation' 'lsdvd: fast reading of DVD table') source=(http://www.exit1.org/dvdrip/dist/${pkgname}-${pkgver}.tar.gz \ ${pkgname}.desktop) -options=(!emptydirs) +options=('!emptydirs' '!makeflags') md5sums=('6dfa4199d451757a37eea233a07da4c0' 'e91cf411928fd0500d07a0022b4ef546') build() { - export MAKEFLAGS="-j1" cd "${srcdir}/${pkgname}-${pkgver}" # install module in vendor directories. - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor } package() { cd "${srcdir}/${pkgname}-${pkgver}" - make install DESTDIR="${pkgdir}" + make install DESTDIR="${pkgdir}" # remove perllocal.pod and .packlist find ${pkgdir} -name perllocal.pod -delete find ${pkgdir} -name .packlist -delete - install -Dm644 ${srcdir}/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" - install -Dm 644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 ${srcdir}/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm 644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/extra/dvdrip/dvdrip.install b/extra/dvdrip/dvdrip.install index 4cd6160c4..e111ef946 100644 --- a/extra/dvdrip/dvdrip.install +++ b/extra/dvdrip/dvdrip.install @@ -1,19 +1,11 @@ -# this is the scrollkeeper handling sample file - post_install() { - echo "update desktop mime database..." update-desktop-database -q } post_upgrade() { - post_install $1 -} - -pre_remove() { - /bin/true + post_install } post_remove() { - echo "update desktop mime database..." - update-desktop-database -q + post_install } diff --git a/extra/evince/PKGBUILD b/extra/evince/PKGBUILD index 1532bce40..eb5846789 100644 --- a/extra/evince/PKGBUILD +++ b/extra/evince/PKGBUILD @@ -23,6 +23,9 @@ sha256sums=('03abb74620caaa255f2d1369b684bbf8f62e15a4bf2d9f2a45f58e1789295a97' build() { cd "${srcdir}/${pkgname}-${pkgver}" +# Build with -march=mips3 + [ "$CARCH" = "mips64el" ] && CFLAGS="${CFLAGS/loongson2f/mips3}" + patch -Np1 -i "${srcdir}/introspection-fix.patch" autoreconf -fi diff --git a/extra/evolution-data-server/PKGBUILD b/extra/evolution-data-server/PKGBUILD index 040385490..f4b528fbf 100644 --- a/extra/evolution-data-server/PKGBUILD +++ b/extra/evolution-data-server/PKGBUILD @@ -5,7 +5,7 @@ pkgname=evolution-data-server pkgver=3.0.2.1 pkgrel=1 pkgdesc="Central location for addressbook and calendar storage in the GNOME Desktop" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') depends=('libsoup' 'nss' 'libgnome-keyring' 'krb5' 'libgweather' 'libical' 'db' 'libgdata') makedepends=('intltool' 'gperf' 'gobject-introspection') options=('!libtool') diff --git a/extra/ffcall/PKGBUILD b/extra/ffcall/PKGBUILD index b235f7173..f51867990 100644 --- a/extra/ffcall/PKGBUILD +++ b/extra/ffcall/PKGBUILD @@ -20,6 +20,9 @@ build() { [ "$CARCH" = "x86_64" ] && CONFIGFLAG="--with-pic" patch -Np0 -i "$srcdir/mipsn32.patch" ./configure --prefix=/usr --mandir=/usr/share/man $CONFIGFLAG + + patch -Np0 -i $srcdir/mipsn32.patch + make } diff --git a/extra/ffmpeg/PKGBUILD b/extra/ffmpeg/PKGBUILD index 6509ac519..12b7e0d74 100644 --- a/extra/ffmpeg/PKGBUILD +++ b/extra/ffmpeg/PKGBUILD @@ -14,11 +14,12 @@ depends=('bzip2' 'lame' 'sdl' 'libvorbis' 'xvidcore' 'zlib' 'x264' 'libtheora' ' makedepends=('yasm' 'git') #git clone git://git.videolan.org/ffmpeg.git source=(ftp://ftp.archlinux.org/other/ffmpeg/${pkgname}-${pkgver}.tar.xz) -md5sums=('ff3636c6601f68cdcc777fadaf0eba46') build() { cd "$srcdir/$pkgname" + [ "$CARCH" = "mips64el" ] && patch -Np1 -i $srcdir/ffmpeg-loongson.patch + ./configure \ --prefix=/usr \ --enable-libmp3lame \ @@ -49,4 +50,3 @@ build() { } # vim:set ts=2 sw=2 et: -md5sums=('6003afa1f87857db729d697e3ec1be36') diff --git a/extra/ffmpeg/ffmpeg-loongson.patch b/extra/ffmpeg/ffmpeg-loongson.patch new file mode 100644 index 000000000..501eafd15 --- /dev/null +++ b/extra/ffmpeg/ffmpeg-loongson.patch @@ -0,0 +1,1794 @@ +diff --git a/configure b/configure +index 25e8cef..1d6c652 100755 +--- a/configure ++++ b/configure +@@ -230,6 +230,7 @@ Advanced options (experts only): + --disable-armvfp disable ARM VFP optimizations + --disable-iwmmxt disable iwmmxt optimizations + --disable-mmi disable MMI optimizations ++ --disable-loongson2mmi disable LOONGSON2 Multi-Media Instructions usage" + --disable-neon disable neon optimizations + --disable-vis disable VIS optimizations + --disable-yasm disable use of yasm assembler +@@ -995,6 +996,7 @@ ARCH_EXT_LIST=' + armvfp + iwmmxt + mmi ++ loongson2mmi + mmx + mmx2 + neon +@@ -2862,6 +2864,7 @@ if enabled arm; then + fi + if enabled mips; then + echo "MMI enabled ${mmi-no}" ++ echo "LOONGSON2MMI enabled ${loongson2mmi-no}" + fi + if enabled ppc; then + echo "AltiVec enabled ${altivec-no}" +diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h +index add4b10..8244e51 100644 +--- a/libavcodec/avcodec.h ++++ b/libavcodec/avcodec.h +@@ -1586,6 +1586,8 @@ typedef struct AVCodecContext { + #define FF_IDCT_SIMPLENEON 22 + #define FF_IDCT_SIMPLEALPHA 23 + #define FF_IDCT_BINK 24 ++#define FF_IDCT_LIBMPEG2LOONGSON2 25 ++#define FF_IDCT_XVIDLOONGSON2 26 + + /** + * slice count +diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c +index bbfdb6a..dfc3452 100644 +--- a/libavcodec/dsputil.c ++++ b/libavcodec/dsputil.c +@@ -4525,6 +4525,7 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) + if (HAVE_MMI) dsputil_init_mmi (c, avctx); + if (ARCH_SH4) dsputil_init_sh4 (c, avctx); + if (ARCH_BFIN) dsputil_init_bfin (c, avctx); ++ if (HAVE_LOONGSON2MMI) dsputil_init_loongson2(c, avctx); + + for(i=0; i<64; i++){ + if(!c->put_2tap_qpel_pixels_tab[0][i]) +diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h +index d1816e6..1a72ae9 100644 +--- a/libavcodec/dsputil.h ++++ b/libavcodec/dsputil.h +@@ -636,6 +636,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx); + void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); + void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); + void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); ++void dsputil_init_loongson2(DSPContext* c, AVCodecContext *avctx); + + void ff_dsputil_init_dwt(DSPContext *c); + void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx); +diff --git a/libavcodec/loongson2/dsputil_loongson2.c b/libavcodec/loongson2/dsputil_loongson2.c +new file mode 100644 +index 0000000..01bd3ac +--- /dev/null ++++ b/libavcodec/loongson2/dsputil_loongson2.c +@@ -0,0 +1,221 @@ ++/* ++ * Copyright(C) 2006-2010 comcat <jiankemeng@gmail.com> ++ * ++ * Optimized for Loongson2 CPUs by comcat <jiankemeng@gmail.com> ++ * ++ */ ++ ++#include "dsputil_loongson2.h" ++#include "../simple_idct.h" ++#include "../mpegvideo.h" ++ ++//extern void ff_idct_xvid_loongson2(short *block); ++ ++extern void ff_loongson2_idct(DCTELEM *block); ++extern void ff_idct_xvid_loongson2(short *block); ++ ++static void add_pixels_clamped_loongson2(const DCTELEM *block, uint8_t *restrict pixels, int line_size) ++{ ++ const DCTELEM *p; ++ uint8_t *pix; ++ int i,j; ++ p = block; ++ pix = pixels; ++ i = 4; ++ j = line_size << 1; ++ __asm __volatile("xor $f14, $f14, $f14\n\t"); ++ do { ++ __asm __volatile( ++// ".set mips3 \n\t" ++ "ldc1 $f0, 0(%2) \n\t" ++ "ldc1 $f2, 8(%2) \n\t" ++ "ldc1 $f4, 16(%2) \n\t" ++ "ldc1 $f6, 24(%2) \n\t" ++ "ldc1 $f8, %0 \n\t" ++ "ldc1 $f12, %1 \n\t" ++ "mov.d $f10, $f8 \n\t" ++ ++ "punpcklbh $f8, $f8, $f14 \n\t" ++ "punpckhbh $f10, $f10, $f14\n\t" ++ ++ "paddsh $f0, $f0, $f8 \n\t" ++ "paddsh $f2, $f2, $f10 \n\t" ++ ++ "mov.d $f10, $f12 \n\t" ++ ++ "punpcklbh $f12, $f12, $f14\n\t" ++ "punpckhbh $f10, $f10, $f14\n\t" ++ ++ "paddsh $f4, $f4, $f12 \n\t" ++ "paddsh $f6, $f6, $f10 \n\t" ++ ++ "packushb $f0, $f0, $f2 \n\t" ++ "packushb $f4, $f4, $f6 \n\t" ++ ++ "sdc1 $f0, %0 \n\t" ++ "sdc1 $f4, %1 \n\t" ++// ".set mips2 \n\t" ++ :"+m"(*pix), "+m"(*(pix+line_size)) ++ :"r"(p) ++ :"$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","memory"); ++ pix += j; ++ p += 16; ++ } while (--i); ++ ++} ++ ++static void put_pixels_clamped_loongson2(const DCTELEM *block, uint8_t *restrict pixels, int line_size) ++{ ++ const DCTELEM *p; ++ uint8_t *pix; ++ int tmp = line_size * 3; ++ p = block; ++ pix = pixels; ++ __asm __volatile ++ ( ++// ".set mips3 \n\t" ++ //"dadd $12, $0, $0\n\t" ++ //"dadd $13, $0, $0\n\t" ++ //"dadd $14, $0, $0\n\t" ++ ++ "ldc1 $f0, 0(%3)\n\t" ++ "ldc1 $f2, 8(%3)\n\t" ++ "ldc1 $f4, 16(%3)\n\t" ++ "ldc1 $f6, 24(%3)\n\t" ++ "ldc1 $f8, 32(%3)\n\t" ++ "ldc1 $f10, 40(%3)\n\t" ++ "ldc1 $f16, 48(%3)\n\t" ++ "ldc1 $f18, 56(%3)\n\t" ++ ++ "packushb $f0, $f0, $f2\n\t" ++ "packushb $f4, $f4, $f6\n\t" ++ "packushb $f8, $f8, $f10\n\t" ++ "packushb $f16, $f16, $f18\n\t" ++ ++ "add $12, %0, %1\n\t" ++ "add $13, $12, %1\n\t" ++ "add $14, %0, %2\n\t" ++ ++ "sdc1 $f0, 0(%0)\n\t" ++ "sdc1 $f4, 0($12)\n\t" ++ "sdc1 $f8, 0($13)\n\t" ++ "sdc1 $f16, 0($14)\n\t" ++// ".set mips2\n\t" ++ : ++ :"r" (pix), "r" (line_size), "r" (tmp), "r"(p) ++ :"$12","$13","$14","$f0","$f2","$f4","$f6","$f8","$f10","$16","$18" ++ ); ++ ++ pix += line_size*4; ++ p += 32; ++ ++ __asm __volatile ++ ( ++// ".set mips3 \n\t" ++ ++ "dadd $12, $0, $0\n\t" ++ "dadd $13, $0, $0\n\t" ++ "dadd $14, $0, $0\n\t" ++ "lw $12, %3\n\t" ++ ++ "ldc1 $f0, 0($12)\n\t" ++ "ldc1 $f2, 8($12)\n\t" ++ "ldc1 $f4, 16($12)\n\t" ++ "ldc1 $f6, 24($12)\n\t" ++ "ldc1 $f8, 32($12)\n\t" ++ "ldc1 $f10, 40($12)\n\t" ++ "ldc1 $f16, 48($12)\n\t" ++ "ldc1 $f18, 56($12)\n\t" ++ ++ "packushb $f0, $f0, $f2\n\t" ++ "packushb $f4, $f4, $f6\n\t" ++ "packushb $f8, $f8, $f10\n\t" ++ "packushb $f16, $f16, $f18\n\t" ++ ++ "add $12, %1, %0\n\t" ++ "add $13, $12, %1\n\t" ++ "add $15, %2, %0\n\t" ++ ++ "sdc1 $f0, 0(%0)\n\t" ++ "sdc1 $f4, 0($12)\n\t" ++ ++ "sdc1 $f8, 0($13)\n\t" ++ "sdc1 $f16, 0($15)\n\t" ++// ".set mips2\n\t" ++ : ++ :"r" (pix), "r" (line_size), "r" (tmp), "m"(p) ++ :"$12","$13","$15","$f0","$f2","$f4","$f6","$f8","$f10","$16","$18","memory" ++ ); ++ ++} ++ ++/* ++void put_signed_pixels_clamped_loongson2(const DCTELEM *block, uint8_t *pixels, int line_size) ++{ ++ ++} ++ ++ ++void ff_loongson2_idct_put(uint8_t *dest, int line_size, DCTELEM *block) ++{ ++ ff_loongson2_idct(block); ++ put_pixels_clamped_loongson2(block, dest, line_size); ++} ++ ++void ff_loongson2_idct_add(uint8_t *dest, int line_size, DCTELEM *block) ++{ ++ ff_loongson2_idct(block); ++ add_pixels_clamped_loongson2(block, dest, line_size); ++}*/ ++ ++static void ff_idct_xvid_loongson2_put(uint8_t *dest, int line_size, DCTELEM *block) ++{ ++ ff_idct_xvid_loongson2(block); ++ put_pixels_clamped_loongson2(block, dest, line_size); ++} ++ ++static void ff_idct_xvid_loongson2_add(uint8_t *dest, int line_size, DCTELEM *block) ++{ ++ ff_idct_xvid_loongson2(block); ++ add_pixels_clamped_loongson2(block, dest, line_size); ++} ++ ++void dsputil_init_loongson2(DSPContext *c, AVCodecContext *avctx) ++{ ++ ++ const int idct_algo = avctx->idct_algo; ++ ++/* ++#ifdef CONFIG_ENCODERS ++ const int dct_algo = avctx->dct_algo; ++ if(dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_LOONGSON2) ++ c->fdct = ff_fdct_loongson2; ++#endif ++*/ ++ ++#if 0 ++ if(avctx->lowres==0) ++ { ++ if(idct_algo == FF_IDCT_LIBMPEG2LOONGSON2) ++ { ++ c->idct_add = ff_loongson2_idct_add; ++ c->idct_put = ff_loongson2_idct_put; ++ c->idct = ff_loongson2_idct; ++ } ++ else if(idct_algo == FF_IDCT_XVIDLOONGSON2) ++ { ++#endif ++ c->idct_add = ff_idct_xvid_loongson2_add; ++ c->idct_put = ff_idct_xvid_loongson2_put; ++ c->idct = ff_idct_xvid_loongson2; ++ //} ++ //} ++ ++ c->put_pixels_clamped = put_pixels_clamped_loongson2; ++ c->add_pixels_clamped = add_pixels_clamped_loongson2; ++ ++#ifdef CONFIG_ENCODERS ++ dsputil_init_pix_loongson2(c, avctx); ++#endif ++ ++} +diff --git a/libavcodec/loongson2/dsputil_loongson2.d b/libavcodec/loongson2/dsputil_loongson2.d +new file mode 100644 +index 0000000..808f0a3 +--- /dev/null ++++ b/libavcodec/loongson2/dsputil_loongson2.d +@@ -0,0 +1,18 @@ ++libavcodec/loongson2/dsputil_loongson2.o: \ ++ libavcodec/loongson2/dsputil_loongson2.c \ ++ libavcodec/loongson2/dsputil_loongson2.h libavcodec/dsputil.h \ ++ libavutil/intreadwrite.h config.h libavutil/bswap.h \ ++ libavutil/attributes.h libavutil/common.h libavutil/intmath.h \ ++ libavutil/mem.h libavutil/internal.h libavutil/timer.h libavutil/libm.h \ ++ libavutil/mips/intreadwrite.h libavcodec/avcodec.h libavutil/avutil.h \ ++ libavutil/error.h libavutil/avutil.h libavutil/mathematics.h \ ++ libavutil/rational.h libavutil/intfloat_readwrite.h libavutil/log.h \ ++ libavutil/pixfmt.h libavutil/avconfig.h \ ++ libavcodec/loongson2/../simple_idct.h libavcodec/loongson2/../dsputil.h \ ++ libavcodec/loongson2/../mpegvideo.h libavcodec/loongson2/../get_bits.h \ ++ libavutil/bswap.h libavutil/common.h libavutil/log.h \ ++ libavcodec/loongson2/../mathops.h libavcodec/loongson2/../mips/mathops.h \ ++ libavcodec/loongson2/../put_bits.h libavcodec/loongson2/../ratecontrol.h \ ++ libavcodec/loongson2/../eval.h libavcodec/loongson2/../parser.h \ ++ libavcodec/loongson2/../avcodec.h libavcodec/loongson2/../mpeg12data.h \ ++ libavutil/rational.h libavcodec/loongson2/../rl.h +diff --git a/libavcodec/loongson2/dsputil_loongson2.h b/libavcodec/loongson2/dsputil_loongson2.h +new file mode 100644 +index 0000000..87c7bd9 +--- /dev/null ++++ b/libavcodec/loongson2/dsputil_loongson2.h +@@ -0,0 +1,3 @@ ++#include "libavcodec/dsputil.h" ++ ++void dsputil_init_pix_loongson2(DSPContext* c, AVCodecContext *avctx); +diff --git a/libavcodec/loongson2/dsputil_loongson2.o b/libavcodec/loongson2/dsputil_loongson2.o +new file mode 100644 +index 0000000..fca0b55 +Binary files /dev/null and b/libavcodec/loongson2/dsputil_loongson2.o differ +diff --git a/libavcodec/loongson2/idct_loongson2.c b/libavcodec/loongson2/idct_loongson2.c +new file mode 100644 +index 0000000..539cab5 +--- /dev/null ++++ b/libavcodec/loongson2/idct_loongson2.c +@@ -0,0 +1,336 @@ ++/* ++ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> ++ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> ++ * ++ * Copyright (c) 2007-2010 comcat <jiankemeng@gmail.com>. ++ * ++ * Optimized for Loongson2 CPUs by comcat <jiankemeng@gmail.com> ++ * ++ * Based on i386 ++ */ ++ ++#include "libavutil/common.h" ++#include "dsputil_loongson2.h" ++ ++ ++#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align))) ++ ++ ++#define ROW_SHIFT 11 ++#define COL_SHIFT 6 ++ ++#define round(bias) ((int)(((bias)+0.5) * (1<<ROW_SHIFT))) ++#define rounder(bias) {round (bias), round (bias)} ++ ++ ++ ++#define loongson2_table(c1,c2,c3,c4,c5,c6,c7) { c4,c2,-c4,-c2, \ ++ c4,c6,c4,c6, \ ++ c1,c3,-c1,-c5,\ ++ c5,c7,c3,-c7, \ ++ c4,-c6,c4,-c6, \ ++ -c4,c2,c4,-c2, \ ++ c5,-c1,c3,-c1, \ ++ c7,c3,c7,-c5 } ++ ++ ++static inline void loongson2_row_head(int16_t * const row, const int offset, ++ const int16_t * const table) ++{ ++ __asm__ volatile( ++// ".set\tmips3\n" ++ ".set noreorder\n" ++ "ldc1 $f6,%0\n" ++ "ldc1 $f14,%1\n" ++ "ldc1 $f2,%2\n" ++ "ldc1 $f8,%3\n" ++ "dli $12,%4\n" ++ "dmtc1 $12,$f16\n" ++ "mov.d $f4,$f6\n" ++ "mov.d $f10,$f14\n" ++ "pmaddhw $f2,$f2,$f4\n" ++ "pshufh $f6,$f6,$f16\n" ++ ".set reorder\n" ++// ".set\tmips0\n" ++ : ++ :"m"(*(row+offset)),"m"(*(row+offset+4)),"m"(*table),"m"(*(table+4)),"i"(0x4e) ++ :"$f2","$f4","$f6","$f8","$f10","$f14","$f16","$12" ++ ); ++} ++ ++ ++static inline void loongson2_row(const int16_t * const table, ++ const int32_t * const rounder) ++{ ++ __asm__ volatile ( ++// ".set\tmips3\n" ++ ".set\tnoreorder\n" ++ "ldc1 $f0,%0\n" ++ "pmaddhw $f8,$f8,$f6\n" ++ "ldc1 $f16,%1\n" ++ "dli $13,%8\n" ++ "ldc1 $f20,%2\n" ++ "pmaddhw $f0,$f0,$f14\n" ++ "ldc1 $f22,%3\n" ++ "pmaddhw $f4,$f4,$f16\n" ++ "paddw $f2,$f2,$f22\n" ++ "ldc1 $f22,%4\n" ++ "dmtc1 $13,$f16\n" ++ "paddw $f2,$f2,$f8\n" ++ "pmaddhw $f14,$f14,$f22\n" ++ "mov.d $f8,$f2\n" ++ "pshufh $f10,$f10,$f16\n" ++ "ldc1 $f22,%3\n" ++ "pmaddhw $f20,$f20,$f10\n" ++ "ldc1 $f16,%5\n" ++ "paddw $f4,$f4,$f22\n" ++ "paddw $f0,$f0,$f20\n" ++ "dli $12,%6\n" ++ "pmaddhw $f6,$f6,$f16\n" ++ "psubw $f2,$f2,$f0\n" ++ "ldc1 $f16,%7\n" ++ "paddw $f0,$f0,$f8\n" ++ "paddw $f4,$f4,$f6\n" ++ "pmaddhw $f10,$f10,$f16\n" ++ "mov.d $f8,$f4\n" ++ "dmtc1 $12,$f16\n" ++ "paddw $f14,$f14,$f10\n" ++ "psraw $f2,$f2,$f16\n" ++ "psraw $f0,$f0,$f16\n" ++ "paddw $f4,$f4,$f14\n" ++ "psubw $f8,$f8,$f14\n" ++ ".set\treorder\n" ++// ".set\tmips0\n" ++ : ++ :"m"(*(table+8)),"m"(*(table+16)),"m"(*(table+12)),"m"(*rounder),"m"(*(table+24)),"m"(*(table+20)),"i"(ROW_SHIFT),"m"(*(table+16)),"i"(0x4e) ++ :"$f0","$f2","$f4","$f6","$f8","$f10","$f14","$f16","$f20","$f22","$12","$13","memory" ++ ); ++} ++ ++static inline void loongson2_row_tail(int16_t * const row, const int store) ++{ ++ __asm__ volatile ( ++// ".set\tmips3\n" ++ ".set\tnoreorder\n" ++ "dli $12,%2\n" ++ "dmtc1 $12,$f16\n" ++ "psraw $f4,$f4,$f16\n" ++ "psraw $f8,$f8,$f16\n" ++ "packsswh $f0,$f0,$f4\n" ++ "packsswh $f8,$f8,$f2\n" ++ "sdc1 $f0,%0\n" ++ "dli $13,%3\n" ++ "dmtc1 $13,$f22\n" ++ "pshufh $f8,$f8,$f22\n" ++ "sdc1 $f8,%1\n" ++ ".set\treorder\n" ++// ".set\tmips0\n" ++ :"=m"(*(row+store)),"=m"(*(row+store+4)) ++ :"i"(ROW_SHIFT),"i"(0xb1) ++ :"$f0","$f2","$f4","$f6","$f8","$f16","$f22","$12","$13","memory" ++ ); ++} ++ ++static inline void loongson2_row_mid(int16_t * const row, const int store, ++ const int offset, ++ const int16_t * const table) ++{ ++ __asm__ volatile ( ++// ".set\tmips3\n" ++ ".set\tnoreorder\n" ++ "ldc1 $f6,%2\n" ++ "dli $12,%3\n" ++ "dmtc1 $12,$f16\n" ++ "psraw $f4,$f4,$f16\n" ++ "ldc1 $f14,%4\n" ++ "psraw $f8,$f8,$f16\n" ++ "packsswh $f0,$f0,$f4\n" ++ "mov.d $f10,$f14\n" ++ "packsswh $f8,$f8,$f2\n" ++ "mov.d $f4,$f6\n" ++ "sdc1 $f0,%0\n" ++ "dli $13,%5\n" ++ "dmtc1 $13,$f22\n" ++ "pshufh $f8,$f8,$f22\n" ++ "ldc1 $f2,%6\n" ++ "sdc1 $f8,%1\n" ++ "pmaddhw $f2,$f2,$f4\n" ++ "ldc1 $f8,%7\n" ++ "dli $12,%8\n" ++ "dmtc1 $12,$f16\n" ++ "pshufh $f6,$f6,$f16\n" ++ ".set\treorder\n" ++// ".set\tmips0\n" ++ :"=m"(*(row+store)),"=m"(*(row+store+4)) ++ : "m"(*(row+offset)),"i"(ROW_SHIFT),"m"(*(row+offset+4)),"i"(0xb1),"m"(*table),"m"(*(table+4)),"i"(0x4e) ++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$f22","$12","$13","memory" ++ ); ++} ++ ++static inline void idct_col(int16_t * const col, const int offset) ++{ ++#define T1 13036 ++#define T2 27146 ++#define T3 43790 ++#define C4 23170 ++ static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1}; ++ static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2}; ++ static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3}; ++ static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4}; ++ ++ __asm__ volatile ( ++// ".set\tmips3\n" ++ ".set\tnoreorder\n" ++ "ldc1 $f4,%8\n" ++ "ldc1 $f0,%9\n" ++ "mov.d $f6,$f4\n" ++ "ldc1 $f8,%10\n" ++ "pmulhh $f4,$f4,$f0\n" ++ "ldc1 $f14,%11\n" ++ "pmulhh $f6,$f6,$f8\n" ++ "ldc1 $f10,%12\n" ++ "mov.d $f20,$f14\n" ++ "ldc1 $f2,%13\n" ++ "psubsh $f4,$f4,$f8\n" ++ "ldc1 $f8,%14\n" ++ "pmulhh $f14,$f14,$f2\n" ++ "paddsh $f0,$f0,$f6\n" ++ "pmulhh $f20,$f20,$f10\n" ++ "mov.d $f6,$f8\n" ++ "paddsh $f14,$f14,$f2\n" ++ "ldc1 $f16,%15\n" ++ "pmulhh $f8,$f8,$f16\n" ++ "paddsh $f20,$f20,$f10\n" ++ "psubsh $f14,$f14,$f10\n" ++ "paddsh $f20,$f20,$f2\n" ++ "ldc1 $f2,%16\n" ++ "mov.d $f10,$f4\n" ++ "pmulhh $f6,$f6,$f2\n" ++ "psubsh $f4,$f4,$f14\n" ++ "psubsh $f8,$f8,$f2\n" ++ "paddsh $f14,$f14,$f10\n" ++ "sdc1 $f4,%0\n" ++ "mov.d $f10,$f0\n" ++ "ldc1 $f22,%15\n" ++ "paddsh $f6,$f6,$f22\n" ++ "paddsh $f10,$f10,$f20\n" ++ "psubsh $f0,$f0,$f20\n" ++ "mov.d $f20,$f0\n" ++ "ldc1 $f2,%17\n" ++ "paddsh $f0,$f0,$f14\n" ++ "ldc1 $f4,%18\n" ++ "psubsh $f20,$f20,$f14\n" ++ "sdc1 $f10,%1\n" ++ "pmulhh $f0,$f0,$f4\n" ++ "mov.d $f10,$f8\n" ++ "pmulhh $f20,$f20,$f4\n" ++ "ldc1 $f14,%19\n" ++ "mov.d $f4,$f2\n" ++ "psubsh $f2,$f2,$f14\n" ++ "paddsh $f4,$f4,$f14\n" ++ "paddsh $f8,$f8,$f2\n" ++ "mov.d $f14,$f4\n" ++ "psubsh $f2,$f2,$f10\n" ++ "paddsh $f14,$f14,$f6\n" ++ "paddsh $f0,$f0,$f0\n" ++ "psubsh $f4,$f4,$f6\n" ++ "paddsh $f20,$f20,$f20\n" ++ "mov.d $f6,$f2\n" ++ "mov.d $f10,$f8\n" ++ "paddsh $f2,$f2,$f20\n" ++ "dli $12,%20\n" ++ "dmtc1 $12,$f16\n" ++ "psrah $f2,$f2,$f16\n" ++ "paddsh $f8,$f8,$f0\n" ++ "psrah $f8,$f8,$f16\n" ++ "psubsh $f10,$f10,$f0\n" ++ "ldc1 $f0,%12\n" ++ "psubsh $f6,$f6,$f20\n" ++ "psrah $f10,$f10,$f16\n" ++ "mov.d $f20,$f14\n" ++ "sdc1 $f8,%2\n" ++ "psrah $f6,$f6,$f16\n" ++ "sdc1 $f2,%3\n" ++ "paddsh $f14,$f14,$f0\n" ++ "ldc1 $f8,%13\n" ++ "psubsh $f20,$f20,$f0\n" ++ "psrah $f14,$f14,$f16\n" ++ "mov.d $f2,$f4\n" ++ "sdc1 $f6,%1\n" ++ "psubsh $f2,$f2,$f8\n" ++ "psrah $f20,$f20,$f16\n" ++ "paddsh $f8,$f8,$f4\n" ++ "sdc1 $f14,%4\n" ++ "psrah $f2,$f2,$f16\n" ++ "sdc1 $f10,%5\n" ++ "psrah $f8,$f8,$f16\n" ++ "sdc1 $f20,%6\n" ++ "sdc1 $f2,%7\n" ++ "sdc1 $f8,%0\n" ++ ".set\treorder\n" ++// ".set\tmips0\n" ++ :"=m"(*(col+offset+3*8)),"=m"(*(col+offset+5*8)),"=m"(*(col+offset+1*8)),"=m"(*(col+offset+2*8)),"=m"(*(col+offset+0*8)),"=m"(*(col+offset+6*8)),"=m"(*(col+offset+7*8)),"=m"(*(col+offset+4*8)) ++ :"m"(*_T1),"m"(*(col+offset+1*8)),"m"(*(col+offset+7*8)),"m"(*_T3),"m"(*(col+offset+5*8)),"m"(*(col+offset+3*8)),"m"(*_T2),"m"(*(col+offset+2*8)),"m"(*(col+offset+6*8)),"m"(*(col+offset+0*8)),"m"(*_C4),"m"(*(col+offset+4*8)),"i"(COL_SHIFT) ++ :"$f0","$f2","$f4","$f6","$f8","$f10","$14","$f16","$20","$f22","$12","memory" ++ ); ++} ++ ++static const int32_t rounder0[] ATTR_ALIGN(8) = ++ rounder ((1 << (COL_SHIFT - 1)) - 0.5); ++static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0); ++static const int32_t rounder1[] ATTR_ALIGN(8) = ++ rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */ ++static const int32_t rounder7[] ATTR_ALIGN(8) = ++ rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */ ++static const int32_t rounder2[] ATTR_ALIGN(8) = ++ rounder (0.60355339059); /* C2 * (C6+C2)/2 */ ++static const int32_t rounder6[] ATTR_ALIGN(8) = ++ rounder (-0.25); /* C2 * (C6-C2)/2 */ ++static const int32_t rounder3[] ATTR_ALIGN(8) = ++ rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */ ++static const int32_t rounder5[] ATTR_ALIGN(8) = ++ rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */ ++ ++ ++#undef COL_SHIFT ++#undef ROW_SHIFT ++ ++ ++#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \ ++inline void idct (int16_t * const block) \ ++{ \ ++ static const int16_t table04[] ATTR_ALIGN(16) = \ ++ table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \ ++ static const int16_t table17[] ATTR_ALIGN(16) = \ ++ table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \ ++ static const int16_t table26[] ATTR_ALIGN(16) = \ ++ table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \ ++ static const int16_t table35[] ATTR_ALIGN(16) = \ ++ table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \ ++ \ ++ idct_row_head (block, 0*8, table04); \ ++ idct_row (table04, rounder0); \ ++ idct_row_mid (block, 0*8, 4*8, table04); \ ++ idct_row (table04, rounder4); \ ++ idct_row_mid (block, 4*8, 1*8, table17); \ ++ idct_row (table17, rounder1); \ ++ idct_row_mid (block, 1*8, 7*8, table17); \ ++ idct_row (table17, rounder7); \ ++ idct_row_mid (block, 7*8, 2*8, table26); \ ++ idct_row (table26, rounder2); \ ++ idct_row_mid (block, 2*8, 6*8, table26); \ ++ idct_row (table26, rounder6); \ ++ idct_row_mid (block, 6*8, 3*8, table35); \ ++ idct_row (table35, rounder3); \ ++ idct_row_mid (block, 3*8, 5*8, table35); \ ++ idct_row (table35, rounder5); \ ++ idct_row_tail (block, 5*8); \ ++ \ ++ idct_col (block, 0); \ ++ idct_col (block, 4); \ ++} ++ ++void ff_loongson2_idct(DCTELEM *block); ++ ++declare_idct (ff_loongson2_idct, loongson2_table, ++ loongson2_row_head, loongson2_row, loongson2_row_tail, loongson2_row_mid) +diff --git a/libavcodec/loongson2/idct_loongson2_xvid.c b/libavcodec/loongson2/idct_loongson2_xvid.c +new file mode 100644 +index 0000000..4a1ee1e +--- /dev/null ++++ b/libavcodec/loongson2/idct_loongson2_xvid.c +@@ -0,0 +1,301 @@ ++/* ++ * XVID MPEG-4 VIDEO CODEC ++ * ++ * Copyright(C) 2006-2010 comcat <jiankemeng@gmail.com> ++ * ++ * Optimized for Loongson2 CPUs by comcat <jiankemeng@gmail.com> ++ * ++ * Based on i386 ++ * ++ */ ++ ++ ++#include <inttypes.h> ++#include "../avcodec.h" ++ ++void ff_idct_xvid_loongson2(short *block); ++ ++//============================================================================= ++// Macros and other preprocessor constants ++//============================================================================= ++ ++#define BITS_INV_ACC 5 // 4 or 5 for IEEE ++#define SHIFT_INV_ROW (16 - BITS_INV_ACC) //11 ++#define SHIFT_INV_COL (1 + BITS_INV_ACC) //6 ++#define RND_INV_ROW (1024 * (6 - BITS_INV_ACC)) ++#define RND_INV_COL (16 * (BITS_INV_ACC - 3)) ++#define RND_INV_CORR (RND_INV_COL - 1) ++ ++#define BITS_FRW_ACC 3 // 2 or 3 for accuracy ++#define SHIFT_FRW_COL BITS_FRW_ACC ++#define SHIFT_FRW_ROW (BITS_FRW_ACC + 17) ++#define RND_FRW_ROW (262144*(BITS_FRW_ACC - 1)) ++ ++ ++//----------------------------------------------------------------------------- ++// Various memory constants (trigonometric values or rounding values) ++//----------------------------------------------------------------------------- ++ ++static const int16_t tg_1_16[4*4] attribute_used __attribute__ ((aligned(8))) = { ++ 13036,13036,13036,13036, // tg * (2<<16) + 0.5 ++ 27146,27146,27146,27146, // tg * (2<<16) + 0.5 ++ -21746,-21746,-21746,-21746, // tg * (2<<16) + 0.5 ++ 23170,23170,23170,23170}; // cos * (2<<15) + 0.5 ++ ++static const int32_t rounder_0[2*8] attribute_used __attribute__ ((aligned(8))) = { ++ 65536,65536, ++ 3597,3597, ++ 2260,2260, ++ 1203,1203, ++ 0,0, ++ 120,120, ++ 512,512, ++ 512,512}; ++ ++ ++// Table for rows 0,4 - constants are multiplied by cos_4_16 ++static const int16_t tab_i_04_mmx[32*4] attribute_used __attribute__ ((aligned(8))) = { ++ 16384,16384,16384,-16384, // movq-> w06 w04 w02 w00 ++ 21407,8867,8867,-21407, // w07 w05 w03 w01 ++ 16384,-16384,16384,16384, // w14 w12 w10 w08 ++ -8867,21407,-21407,-8867, // w15 w13 w11 w09 ++ 22725,12873,19266,-22725, // w22 w20 w18 w16 ++ 19266,4520,-4520,-12873, // w23 w21 w19 w17 ++ 12873,4520,4520,19266, // w30 w28 w26 w24 ++ -22725,19266,-12873,-22725, // w31 w29 w27 w25 ++// Table for rows 1,7 - constants are multiplied by cos_1_16 ++ 22725,22725,22725,-22725, // movq-> w06 w04 w02 w00 ++ 29692,12299,12299,-29692, // w07 w05 w03 w01 ++ 22725,-22725,22725,22725, // w14 w12 w10 w08 ++ -12299,29692,-29692,-12299, // w15 w13 w11 w09 ++ 31521,17855,26722,-31521, // w22 w20 w18 w16 ++ 26722,6270,-6270,-17855, // w23 w21 w19 w17 ++ 17855,6270,6270,26722, // w30 w28 w26 w24 ++ -31521,26722,-17855,-31521, // w31 w29 w27 w25 ++// Table for rows 2,6 - constants are multiplied by cos_2_16 ++ 21407,21407,21407,-21407, // movq-> w06 w04 w02 w00 ++ 27969,11585,11585,-27969, // w07 w05 w03 w01 ++ 21407,-21407,21407,21407, // w14 w12 w10 w08 ++ -11585,27969,-27969,-11585, // w15 w13 w11 w09 ++ 29692,16819,25172,-29692, // w22 w20 w18 w16 ++ 25172,5906,-5906,-16819, // w23 w21 w19 w17 ++ 16819,5906,5906,25172, // w30 w28 w26 w24 ++ -29692,25172,-16819,-29692, // w31 w29 w27 w25 ++// Table for rows 3,5 - constants are multiplied by cos_3_16 ++ 19266,19266,19266,-19266, // movq-> w06 w04 w02 w00 ++ 25172,10426,10426,-25172, // w07 w05 w03 w01 ++ 19266,-19266,19266,19266, // w14 w12 w10 w08 ++ -10426,25172,-25172,-10426, // w15 w13 w11 w09 ++ 26722,15137,22654,-26722, // w22 w20 w18 w16 ++ 22654,5315,-5315,-15137, // w23 w21 w19 w17 ++ 15137,5315,5315,22654, // w30 w28 w26 w24 ++ -26722,22654,-15137,-26722, // w31 w29 w27 w25 ++}; ++ ++ ++// %3 for rows 0,4 - constants are multiplied by cos_4_16 ++static const int16_t tab_i_04_xmm[32*4] attribute_used __attribute__ ((aligned(8))) = { ++ 16384,21407,16384,8867, // movq-> w05 w04 w01 w00 ++ 16384,8867,-16384,-21407, // w07 w06 w03 w02 ++ 16384,-8867,16384,-21407, // w13 w12 w09 w08 ++ -16384,21407,16384,-8867, // w15 w14 w11 w10 ++ 22725,19266,19266,-4520, // w21 w20 w17 w16 ++ 12873,4520,-22725,-12873, // w23 w22 w19 w18 ++ 12873,-22725,4520,-12873, // w29 w28 w25 w24 ++ 4520,19266,19266,-22725, // w31 w30 w27 w26 ++// %3 for rows 1,7 - constants are multiplied by cos_1_16 ++ 22725,29692,22725,12299, // movq-> w05 w04 w01 w00 ++ 22725,12299,-22725,-29692, // w07 w06 w03 w02 ++ 22725,-12299,22725,-29692, // w13 w12 w09 w08 ++ -22725,29692,22725,-12299, // w15 w14 w11 w10 ++ 31521,26722,26722,-6270, // w21 w20 w17 w16 ++ 17855,6270,-31521,-17855, // w23 w22 w19 w18 ++ 17855,-31521,6270,-17855, // w29 w28 w25 w24 ++ 6270,26722,26722,-31521, // w31 w30 w27 w26 ++// %3 for rows 2,6 - constants are multiplied by cos_2_16 ++ 21407,27969,21407,11585, // movq-> w05 w04 w01 w00 ++ 21407,11585,-21407,-27969, // w07 w06 w03 w02 ++ 21407,-11585,21407,-27969, // w13 w12 w09 w08 ++ -21407,27969,21407,-11585, // w15 w14 w11 w10 ++ 29692,25172,25172,-5906, // w21 w20 w17 w16 ++ 16819,5906,-29692,-16819, // w23 w22 w19 w18 ++ 16819,-29692,5906,-16819, // w29 w28 w25 w24 ++ 5906,25172,25172,-29692, // w31 w30 w27 w26 ++// %3 for rows 3,5 - constants are multiplied by cos_3_16 ++ 19266,25172,19266,10426, // movq-> w05 w04 w01 w00 ++ 19266,10426,-19266,-25172, // w07 w06 w03 w02 ++ 19266,-10426,19266,-25172, // w13 w12 w09 w08 ++ -19266,25172,19266,-10426, // w15 w14 w11 w10 ++ 26722,22654,22654,-5315, // w21 w20 w17 w16 ++ 15137,5315,-26722,-15137, // w23 w22 w19 w18 ++ 15137,-26722,5315,-15137, // w29 w28 w25 w24 ++ 5315,22654,22654,-26722, // w31 w30 w27 w26 ++}; ++ ++ ++ ++#define DCT_8_INV_ROW_LOONGSON2(A1,A2,A3,A4)\ ++ "ldc1 $f0, " #A1 " \n\t"/* 0 ; x3 x2 x1 x0*/\ ++ "ldc1 $f2, 8+" #A1 " \n\t"/* 1 ; x7 x6 x5 x4*/\ ++ "mov.d $f4, $f0 \n\t"/* 2 ; x3 x2 x1 x0*/\ ++ "ldc1 $f6, " #A3 " \n\t"/* 3 ; w05 w04 w01 w00*/\ ++ "li $12, 0x88 \n\t"\ ++ "dmtc1 $12, $f16 \n\t"\ ++ "pshufh $f0, $f0, $f16 \n\t"/* x2 x0 x2 x0*/\ ++ "ldc1 $f8, 8+" #A3 " \n\t"/* 4 ; w07 w06 w03 w02*/\ ++ "mov.d $f10, $f2 \n\t"/* 5 ; x7 x6 x5 x4*/\ ++ "pmaddhw $f6, $f6, $f0 \n\t"/* x2*w05+x0*w04 x2*w01+x0*w00*/\ ++ "ldc1 $f12, 32+" #A3 " \n\t"/* 6 ; w21 w20 w17 w16*/\ ++ "pshufh $f2, $f2, $f16 \n\t"/* x6 x4 x6 x4*/\ ++ "pmaddhw $f8, $f8, $f2 \n\t"/* x6*w07+x4*w06 x6*w03+x4*w02*/\ ++ "li $12, 0xdd \n\t"\ ++ "dmtc1 $12, $f16 \n\t"\ ++ "ldc1 $f14, 40+" #A3 " \n\t"/* 7 ; w23 w22 w19 w18*/\ ++ "pshufh $f4, $f4, $f16 \n\t"/* x3 x1 x3 x1*/\ ++ "pmaddhw $f12, $f12, $f4 \n\t"/* x3*w21+x1*w20 x3*w17+x1*w16*/\ ++ "ldc1 $f18, " #A4 " \n\t" \ ++ "ldc1 $f20, 16+" #A3 " \n\t" \ ++ "ldc1 $f22, 24+" #A3 " \n\t" \ ++ "ldc1 $f24, 48+" #A3 " \n\t" \ ++ "ldc1 $f26, 56+" #A3 " \n\t" \ ++ "pshufh $f10, $f10, $f16 \n\t"/* x7 x5 x7 x5*/\ ++ "pmaddhw $f14, $f14, $f10 \n\t"/* x7*w23+x5*w22 x7*w19+x5*w18*/\ ++ "paddw $f6, $f6, $f18 \n\t"/* +%4*/\ ++ "pmaddhw $f0, $f0, $f20 \n\t"/* x2*w13+x0*w12 x2*w09+x0*w08*/\ ++ "paddw $f6, $f6, $f8 \n\t"/* 4 ; a1=sum(even1) a0=sum(even0)*/\ ++ "pmaddhw $f2, $f2, $f22 \n\t"/* x6*w15+x4*w14 x6*w11+x4*w10*/\ ++ "mov.d $f8, $f6 \n\t"/* 4 ; a1 a0*/\ ++ "li $12, 11 \n\t"\ ++ "dmtc1 $12, $f16 \n\t"\ ++ "pmaddhw $f4, $f4, $f24 \n\t"/* x3*w29+x1*w28 x3*w25+x1*w24*/\ ++ "paddw $f12, $f12, $f14 \n\t"/* 7 ; b1=sum(odd1) b0=sum(odd0)*/\ ++ "pmaddhw $f10, $f10, $f26 \n\t"/* x7*w31+x5*w30 x7*w27+x5*w26*/\ ++ "paddw $f6, $f6, $f12 \n\t"/* a1+b1 a0+b0*/\ ++ "paddw $f0, $f0, $f18 \n\t"/* +%4*/\ ++ "psraw $f6, $f6, $f16 \n\t"/* y1=a1+b1 y0=a0+b0*/\ ++ "paddw $f0, $f0, $f2 \n\t"/* 1 ; a3=sum(even3) a2=sum(even2)*/\ ++ "psubw $f8, $f8, $f12 \n\t"/* 6 ; a1-b1 a0-b0*/\ ++ "mov.d $f14, $f0 \n\t"/* 7 ; a3 a2*/\ ++ "paddw $f4, $f4, $f10 \n\t"/* 5 ; b3=sum(odd3) b2=sum(odd2)*/\ ++ "paddw $f0, $f0, $f4 \n\t"/* a3+b3 a2+b2*/\ ++ "psraw $f8, $f8, $f16 \n\t"/* y6=a1-b1 y7=a0-b0*/\ ++ "psubw $f14, $f14, $f4 \n\t"/* 2 ; a3-b3 a2-b2*/\ ++ "psraw $f0, $f0, $f16 \n\t"/* y3=a3+b3 y2=a2+b2*/\ ++ "psraw $f14, $f14, $f16 \n\t"/* y4=a3-b3 y5=a2-b2*/\ ++ "li $12, 0xb1 \n\t"\ ++ "dmtc1 $12, $f20 \n\t"\ ++ "packsswh $f6, $f6, $f0 \n\t"/* 0 ; y3 y2 y1 y0*/\ ++ "packsswh $f14, $f14, $f8 \n\t"/* 4 ; y6 y7 y4 y5*/\ ++ "sdc1 $f6, " #A2 " \n\t"/* 3 ; save y3 y2 y1 y0*/\ ++ "pshufh $f14, $f14, $f20 \n\t"/* y7 y6 y5 y4*/\ ++ "sdc1 $f14, 8 +" #A2 " \n\t"/* 7 ; save y7 y6 y5 y4*/\ ++ ++ ++#define DCT_8_INV_COL(A1,A2)\ ++ "ldc1 $f0, 2*8(%3) \n\t"/* */\ ++ "ldc1 $f6, 16*3+" #A1 " \n\t"/* x3 */\ ++ "mov.d $f2, $f0 \n\t"/* tg_3_16*/\ ++ "ldc1 $f10, 16*5+" #A1 " \n\t"/* x5 */\ ++ "pmulhh $f0, $f0, $f6 \n\t"/* x3*(tg_3_16-1)*/\ ++ "ldc1 $f8, (%3) \n\t"\ ++ "pmulhh $f2, $f2, $f10 \n\t"/* x5*(tg_3_16-1)*/\ ++ "ldc1 $f14, 16*7+" #A1 " \n\t"/* x7 */\ ++ "mov.d $f4, $f8 \n\t"/* tg_1_16*/\ ++ "ldc1 $f12, 16*1+" #A1 " \n\t"/* x1 */\ ++ "pmulhh $f8, $f8, $f14 \n\t"/* x7*tg_1_16*/\ ++ "paddsh $f0, $f0, $f6 \n\t"/* x3*tg_3_16*/\ ++ "pmulhh $f4, $f4, $f12 \n\t"/* x1*tg_1_16*/\ ++ "paddsh $f2, $f2, $f6 \n\t"/* x3+x5*(tg_3_16-1)*/\ ++ "psubsh $f0, $f0, $f10 \n\t"/* x3*tg_3_16-x5 = tm35*/\ ++ "ldc1 $f6, 3*8(%3) \n\t"\ ++ "paddsh $f2, $f2, $f10 \n\t"/* x3+x5*tg_3_16 = tp35*/\ ++ "paddsh $f8, $f8, $f12 \n\t"/* x1+tg_1_16*x7 = tp17*/\ ++ "psubsh $f4, $f4, $f14 \n\t"/* x1*tg_1_16-x7 = tm17*/\ ++ "mov.d $f10, $f8 \n\t"/* tp17*/\ ++ "mov.d $f12, $f4 \n\t"/* tm17*/\ ++ "paddsh $f10, $f10, $f2 \n\t"/* tp17+tp35 = b0*/\ ++ "psubsh $f12, $f12, $f0 \n\t"/* tm17-tm35 = b3*/\ ++ "psubsh $f8, $f8, $f2 \n\t"/* tp17-tp35 = t1*/\ ++ "paddsh $f4, $f4, $f0 \n\t"/* tm17+tm35 = t2*/\ ++ "ldc1 $f14, 1*8(%3) \n\t"\ ++ "mov.d $f2, $f8 \n\t"/* t1*/\ ++ "sdc1 $f10, 3*16+" #A2 " \n\t"/* save b0*/\ ++ "paddsh $f2, $f2, $f4 \n\t"/* t1+t2*/\ ++ "sdc1 $f12, 5*16+" #A2 " \n\t"/* save b3*/\ ++ "psubsh $f8, $f8, $f4 \n\t"/* t1-t2*/\ ++ "ldc1 $f10, 2*16+" #A1 " \n\t"\ ++ "mov.d $f0, $f14 \n\t"/* tg_2_16*/\ ++ "ldc1 $f12, 6*16+" #A1 " \n\t"\ ++ "pmulhh $f0, $f0, $f10 \n\t"/* x2*tg_2_16*/\ ++ "pmulhh $f14, $f14, $f12 \n\t"/* x6*tg_2_16*/\ ++ "pmulhh $f2, $f2, $f6 \n\t"/* ocos_4_16*(t1+t2) = b1/2*/\ ++ "ldc1 $f4, 0*16+" #A1 " \n\t"\ ++ "pmulhh $f8, $f8, $f6 \n\t"/* ocos_4_16*(t1-t2) = b2/2*/\ ++ "psubsh $f0, $f0, $f12 \n\t"/* t2*tg_2_16-x6 = tm26*/\ ++ "mov.d $f6, $f4 \n\t"/* x0*/\ ++ "ldc1 $f12, 4*16+" #A1 " \n\t"\ ++ "paddsh $f14, $f14, $f10 \n\t"/* x2+x6*tg_2_16 = tp26*/\ ++ "paddsh $f4, $f4, $f12 \n\t"/* x0+x4 = tp04*/\ ++ "psubsh $f6, $f6, $f12 \n\t"/* x0-x4 = tm04*/\ ++ "mov.d $f10, $f4 \n\t"/* tp04*/\ ++ "mov.d $f12, $f6 \n\t"/* tm04*/\ ++ "psubsh $f4, $f4, $f14 \n\t"/* tp04-tp26 = a3*/\ ++ "paddsh $f6, $f6, $f0 \n\t"/* tm04+tm26 = a1*/\ ++ "paddsh $f2, $f2, $f2 \n\t"/* b1*/\ ++ "paddsh $f8, $f8, $f8 \n\t"/* b2*/\ ++ "paddsh $f10, $f10, $f14 \n\t"/* tp04+tp26 = a0*/\ ++ "psubsh $f12, $f12, $f0 \n\t"/* tm04-tm26 = a2*/\ ++ "li $12, 6 \n\t"\ ++ "dmtc1 $12, $f18 \n\t"\ ++ "mov.d $f14, $f6 \n\t"/* a1*/\ ++ "mov.d $f0, $f12 \n\t"/* a2*/\ ++ "paddsh $f6, $f6, $f2 \n\t"/* a1+b1*/\ ++ "paddsh $f12, $f12, $f8 \n\t"/* a2+b2*/\ ++ "psrah $f6, $f6, $f18 \n\t"/* dst1*/\ ++ "psubsh $f14, $f14, $f2 \n\t"/* a1-b1*/\ ++ "psrah $f12, $f12, $f18 \n\t"/* dst2*/\ ++ "psubsh $f0, $f0, $f8 \n\t"/* a2-b2*/\ ++ "ldc1 $f2, 3*16+" #A2 " \n\t"/* load b0*/\ ++ "psrah $f14, $f14, $f18 \n\t"/* dst6*/\ ++ "mov.d $f8, $f10 \n\t"/* a0*/\ ++ "psrah $f0, $f0, $f18 \n\t"/* dst5*/\ ++ "sdc1 $f6, 1*16+" #A2 " \n\t"\ ++ "paddsh $f10, $f10, $f2 \n\t"/* a0+b0*/\ ++ "sdc1 $f12, 2*16+" #A2 " \n\t"\ ++ "psubsh $f8, $f8, $f2 \n\t"/* a0-b0*/\ ++ "ldc1 $f6, 5*16+" #A2 " \n\t"/* load b3*/\ ++ "psrah $f10, $f10, $f18 \n\t"/* dst0*/\ ++ "mov.d $f12, $f4 \n\t"/* a3*/\ ++ "psrah $f8, $f8, $f18 \n\t"/* dst7*/\ ++ "sdc1 $f0, 5*16+" #A2 " \n\t"\ ++ "paddsh $f4, $f4, $f6 \n\t"/* a3+b3*/\ ++ "sdc1 $f14, 6*16+" #A2 " \n\t"\ ++ "psubsh $f12, $f12, $f6 \n\t"/* a3-b3*/\ ++ "sdc1 $f10, 0*16+" #A2 " \n\t"\ ++ "psrah $f4, $f4, $f18 \n\t"/* dst3*/\ ++ "sdc1 $f8, 7*16+" #A2 " \n\t"\ ++ "psrah $f12, $f12, $f18 \n\t"/* dst4*/\ ++ "sdc1 $f4, 3*16+" #A2 " \n\t"\ ++ "sdc1 $f12, 4*16+" #A2 " \n\t" ++ ++ ++ ++void ff_idct_xvid_loongson2(short *block){ ++ __asm__ volatile( ++ //# Process each row ++ DCT_8_INV_ROW_LOONGSON2(0*16(%0), 0*16(%0), 64*0(%2), 8*0(%1)) ++ DCT_8_INV_ROW_LOONGSON2(1*16(%0), 1*16(%0), 64*1(%2), 8*1(%1)) ++ DCT_8_INV_ROW_LOONGSON2(2*16(%0), 2*16(%0), 64*2(%2), 8*2(%1)) ++ DCT_8_INV_ROW_LOONGSON2(3*16(%0), 3*16(%0), 64*3(%2), 8*3(%1)) ++ DCT_8_INV_ROW_LOONGSON2(4*16(%0), 4*16(%0), 64*0(%2), 8*4(%1)) ++ DCT_8_INV_ROW_LOONGSON2(5*16(%0), 5*16(%0), 64*3(%2), 8*5(%1)) ++ DCT_8_INV_ROW_LOONGSON2(6*16(%0), 6*16(%0), 64*2(%2), 8*6(%1)) ++ DCT_8_INV_ROW_LOONGSON2(7*16(%0), 7*16(%0), 64*1(%2), 8*7(%1)) ++ ++ //# Process the columns (4 at a time) ++ DCT_8_INV_COL(0(%0), 0(%0)) ++ DCT_8_INV_COL(8(%0), 8(%0)) ++ : ++ : "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16) ++ :"$f0","$f2","$f4","$f6","$f8","$f10","$f12","$f14","$f18","$f16","$20","$22","$24","$26"); ++} ++ +diff --git a/libavcodec/loongson2/motion_est_loongson2.c b/libavcodec/loongson2/motion_est_loongson2.c +new file mode 100644 +index 0000000..bb67290 +--- /dev/null ++++ b/libavcodec/loongson2/motion_est_loongson2.c +@@ -0,0 +1,365 @@ ++/* ++ * Loongson2E MMI optimized motion estimation ++ * Copyright (c) 2007 comcat <jiankemeng@gmail.com>. ++ * ++ * based on Michael Niedermayer <michaelni@gmx.at> ++ * ++ */ ++ ++#include "dsputil_loongson2.h" ++#include "../avcodec.h" ++ ++static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={ ++ 0x0000000000000000ULL, ++ 0x0001000100010001ULL, ++ 0x0002000200020002ULL, ++}; ++ ++static attribute_used __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL; ++ ++static inline void sad8_1_loongson2(uint8_t *blk1, uint8_t *blk2, int stride, int h) ++{ ++ long len= -(stride*h); ++ __asm__ volatile( ++ ++// ".set mips3 \n\t" ++ ".align 4 \n\t" ++ ++ "move $8, %0 \n\t" ++ "move $21, %1 \n\t" ++ "move $22, %2 \n\t" ++ "move $23, %3 \n\t" ++ ++ "1: \n\t" ++ ++ "add $9, $8, $21 \n\t" ++ "add $10, $8, $22 \n\t" ++ ++ "uld $11, ($9) \n\t" ++ "dmtc1 $11, $f0 \n\t" ++ ++ "uld $12, ($9) \n\t" ++ "dmtc1 $12, $f4 \n\t" ++ ++ "pasubub $f10, $f0, $f4 \n\t" ++ "biadd $f0, $f10 \n\t" ++ ++ "add $8, $8, $23 \n\t" ++ ++ "add $9, $8, $21 \n\t" ++ "add $10, $8, $22 \n\t" ++ ++ "uld $11, ($9) \n\t" ++ "dmtc1 $11, $f2 \n\t" ++ ++ "uld $12, ($10) \n\t" ++ "dmtc1 $12, $f6 \n\t" ++ ++ "pasubub $f16, $f2, $f6 \n\t" ++ "biadd $f6, $f16 \n\t" ++ ++ "paddh $f0, $f0, $f6 \n\t" ++ ++ "paddh $f12, $f12, $f0 \n\t" ++ ++ "bltz $8, 1b \n\t" ++ "add $8, $8, $23 \n\t" ++ ++ : "+r" (len) ++ : "r" (blk1 - len), "r" (blk2 - len), "r" ((long)stride) ++ : "$8", "$9", "$10", "$21", "$22", "$23", "$f0", "$f2", "$f4", "$f6", "$f10", "$f16" ++ ); ++} ++ ++static inline void sad8_2_loongson2(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int stride, int h) ++{ ++ long len= -(stride*h); ++ __asm__ volatile( ++ ++// ".set mips3 \n\t" ++ ".align 4 \n\t" ++ ++ "move $8, %0 \n\t" ++ ++ "1: \n\t" ++ "add $9, $8, %1 \n\t" ++ "add $10, $8, %2 \n\t" ++ "add $11, $8, %3 \n\t" ++ ++ "uld $12, ($9) \n\t" ++ "dmtc1 $12, $f0 \n\t" ++ "uld $13, ($10) \n\t" ++ "dmtc1 $13, $f4 \n\t" ++ ++ "pavgb $f0, $f0, $f4 \n\t" ++ ++ "uld $12, ($11) \n\t" ++ "dmtc1 $12, $f4 \n\t" ++ ++ "pasubub $f10, $f0, $f4 \n\t" ++ "biadd $f0, $f10 \n\t" ++ ++ "add $8, $8, %4 \n\t" ++ ++ "add $9, $8, %1 \n\t" ++ "add $10, $8, %2 \n\t" ++ "add $11, $8, %3 \n\t" ++ ++ "uld $12, ($9) \n\t" ++ "dmtc1 $12, $f2 \n\t" ++ "uld $13, ($10) \n\t" ++ "dmtc1 $13, $f6 \n\t" ++ ++ "pavgb $f6, $f6, $f2 \n\t" ++ ++ "uld $12, ($11) \n\t" ++ "dmtc1 $12, $f2 \n\t" ++ ++ "pasubub $f16, $f6, $f2 \n\t" ++ "biadd $f6, $f16 \n\t" ++ ++ "paddh $f0, $f0, $f6 \n\t" ++ "paddh $f12, $f12, $f0 \n\t" ++ ++ "bltz $8, 1b \n\t" ++ "add $8, $8, %4 \n\t" ++ : "+r" (len) ++ : "r" (blk1a - len), "r" (blk1b -len), "r" (blk2 - len), "r" ((long)stride) ++ : "$8", "$9", "$10", "$11", "$12", "$13", "$f0", "$f2", "$f4", "$f6", "$f10", "$f16" ++ ); ++} ++ ++static inline void sad8_4_loongson2(uint8_t *blk1, uint8_t *blk2, int stride, int h) ++{ ++ long len= -(stride*h); ++ __asm__ volatile( ++ ++ ++// ".set mips3 \n\t" ++ ".align 4 \n\t" ++ ++ "ldc1 $f10, "MANGLE(bone)" \n\t" ++ ++ "move $8, %0 \n\t" ++ ++ "1: \n\t" ++ "add $9, $8, %1 \n\t" ++ "add $10, $8, %2 \n\t" ++ "add $11, $8, %3 \n\t" ++ ++ "uld $12, ($9) \n\t" ++ "dmtc1 $12, $f0 \n\t" ++ ++ "uld $13, ($10) \n\t" ++ "dmtc1 $13, $f4 \n\t" ++ ++ "uld $12, 1($9) \n\t" ++ "dmtc1 $12, $f2 \n\t" ++ ++ "uld $13, 1($10) \n\t" ++ "dmtc1 $13, $f6 \n\t" ++ ++ "pavgb $f0, $f0, $f4 \n\t" ++ "pavgb $f6, $f6, $f2 \n\t" ++ ++ "psubusb $f6, $f6, $f10 \n\t" ++ "pavgb $f0, $f0, $f6 \n\t" ++ ++ "uld $13, 1($11) \n\t" ++ "dmtc1 $13, $f4 \n\t" ++ ++ "pasubub $f16, $f0, $f4 \n\t" ++ "biadd $f0, $f16 \n\t" ++ ++ "add $8, $8, %4 \n\t" ++ ++ "add $9, $8, %1 \n\t" ++ "add $10, $8, %2 \n\t" ++ "add $11, $8, %3 \n\t" ++ ++ "uld $12, ($9) \n\t" ++ "dmtc1 $12, $f2 \n\t" ++ "uld $13, ($10) \n\t" ++ "dmtc1 $12, $f6 \n\t" ++ "uld $12, 1($9) \n\t" ++ "dmtc1 $12, $f4 \n\t" ++ "uld $13, 1($10) \n\t" ++ "dmtc1 $12, $f8 \n\t" ++ ++ "pavgb $f2, $f2, $f6 \n\t" ++ "pavgb $f4, $f4, $f8 \n\t" ++ ++ "psubusb $f4, $f4, $f10 \n\t" ++ "pavgb $f4, $f4, $f2 \n\t" ++ ++ "uld $13, ($11) \n\t" ++ "dmtc1 $13, $f2 \n\t" ++ ++ "pasubub $f18, $f4, $f2 \n\t" ++ "biadd $f4, $f18 \n\t" ++ ++ "paddh $f0, $f0, $f4 \n\t" ++ "paddh $f12, $f12, $f0 \n\t" ++ ++ "bltz $8, 1b \n\t" ++ "add $8, $8, %4 \n\t" ++ : "+r" (len) ++ : "r" (blk1 - len), "r" (blk1 - len + stride), "r" (blk2 - len), "r" ((long)stride) ++ : "$8", "$9", "$10", "$11", "$12", "$13", "$f0", "$f2", "$f4", "$f6", "$f8", "$f10", "$f16", "$f18" ++ ); ++} ++ ++static inline int sum_loongson2(void) ++{ ++ int ret; ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "dmfc1 %0, $f12 \n\t" ++ : "=r" (ret) ++ ); ++ return ret; ++} ++ ++ ++static int sad8_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ assert(h==8); ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ : ++ ); ++ ++ sad8_1_loongson2(blk1, blk2, stride, 8); ++ ++ return sum_loongson2(); ++} ++ ++static int sad8_x2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ assert(h==8); ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[1]) ++ ); ++ ++ sad8_2_loongson2(blk1, blk1+1, blk2, stride, 8); ++ ++ return sum_loongson2(); ++} ++ ++static int sad8_y2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ assert(h==8); ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[1]) ++ ); ++ ++ sad8_2_loongson2(blk1, blk1+stride, blk2, stride, 8); ++ ++ return sum_loongson2(); ++} ++ ++static int sad8_xy2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ assert(h==8); ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[2]) ++ ); ++ ++ sad8_4_loongson2(blk1, blk2, stride, 8); ++ ++ return sum_loongson2(); ++} ++ ++static int sad16_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t":); ++ ++ sad8_1_loongson2(blk1 , blk2 , stride, h); ++ sad8_1_loongson2(blk1+8, blk2+8, stride, h); ++ ++ return sum_loongson2(); ++} ++ ++static int sad16_x2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[1]) ++ ); ++ ++ sad8_2_loongson2(blk1 , blk1+1, blk2 , stride, h); ++ sad8_2_loongson2(blk1+8, blk1+9, blk2+8, stride, h); ++ ++ return sum_loongson2(); ++} ++ ++static int sad16_y2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[1]) ++ ); ++ ++ sad8_2_loongson2(blk1 , blk1+stride, blk2 , stride, h); ++ sad8_2_loongson2(blk1+8, blk1+stride+8,blk2+8, stride, h); ++ ++ return sum_loongson2(); ++} ++ ++static int sad16_xy2_loongson2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ++{ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "xor $f14, $f14, $f14 \n\t" ++ "xor $f12, $f12, $f12 \n\t" ++ "ldc1 $f10, %0 \n\t" ++ :: "m"(round_tab[2]) ++ ); ++ ++ sad8_4_loongson2(blk1 , blk2 , stride, h); ++ sad8_4_loongson2(blk1+8, blk2+8, stride, h); ++ ++ return sum_loongson2(); ++} ++ ++ ++void dsputil_init_pix_loongson2(DSPContext* c, AVCodecContext *avctx) ++{ ++ c->pix_abs[0][0] = sad16_loongson2; ++ c->pix_abs[0][1] = sad16_x2_loongson2; ++ c->pix_abs[0][2] = sad16_y2_loongson2; ++ c->pix_abs[0][3] = sad16_xy2_loongson2; ++ c->pix_abs[1][0] = sad8_loongson2; ++ c->pix_abs[1][1] = sad8_x2_loongson2; ++ c->pix_abs[1][2] = sad8_y2_loongson2; ++ c->pix_abs[1][3] = sad8_xy2_loongson2; ++ ++ c->sad[0]= sad16_loongson2; ++ c->sad[1]= sad8_loongson2; ++} +diff --git a/libavcodec/loongson2/mpegvideo_loongson2.c b/libavcodec/loongson2/mpegvideo_loongson2.c +new file mode 100644 +index 0000000..18d070a +--- /dev/null ++++ b/libavcodec/loongson2/mpegvideo_loongson2.c +@@ -0,0 +1,385 @@ ++/* ++ * The simplest mpeg encoder (well, it was the simplest!) ++ * Copyright (c) 2007-2010 comcat <jiankemeng@gmail.com>. ++ * ++ * Optimized for Loongson2 CPUs by comcat <jiankemeng@gmail.com> ++ * ++ * Based on i386 ++ */ ++ ++#include "dsputil_loongson2.h" ++#include "../mpegvideo.h" ++#include "../avcodec.h" ++ ++extern uint8_t zigzag_direct_noperm[64]; ++extern uint16_t inv_zigzag_direct16[64]; ++ ++static const unsigned long long int mm_wabs __attribute__ ((aligned(8))) = 0xffffffffffffffffULL; ++static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; ++ ++ ++static void dct_unquantize_h263_intra_loongson2(MpegEncContext *s, ++ DCTELEM *block, int n, int qscale) ++{ ++ long level, qmul, qadd, nCoeffs; ++ ++ qmul = qscale << 1; ++ ++ assert(s->block_last_index[n]>=0 || s->h263_aic); ++ if (!s->h263_aic) { ++ if (n < 4) ++ level = block[0] * s->y_dc_scale; ++ else ++ level = block[0] * s->c_dc_scale; ++ qadd = (qscale - 1) | 1; ++ }else{ ++ qadd = 0; ++ level= block[0]; ++ } ++ if(s->ac_pred) ++ nCoeffs=63; ++ else ++ nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ]; ++ ++ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "xor $f12, $f12, $f12 \n\t" ++ "lwc1 $f12, %1 \n\t" ++ ++ "xor $f10, $f10, $f10 \n\t" ++ ++ "packsswh $f12, $f12, $f12 \n\t" ++ ++ "lwc1 $f10, %2 \n\t" ++ ++ "packsswh $f10, $f10, $f10 \n\t" ++ ++ "packsswh $f12, $f12, $f12 \n\t" ++ ++ "xor $f14, $f14, $f14 \n\t" ++ ++ "packsswh $f10, $f10, $f10 \n\t" ++ ++ "xor $f8, $f8, $f8 \n\t" ++ ++ "psubh $f14, $f14, $f10 \n\t" ++ ++ ++ "1: \n\t" ++ "add $12, %0, %3 \n\t" ++ ++ "ldc1 $f0, ($12) \n\t" ++ ++ "ldc1 $f2, 8($12) \n\t" ++ ++ "mov.d $f4, $f0 \n\t" ++ "mov.d $f6, $f2 \n\t" ++ ++ "pmullh $f0, $f0, $f12 \n\t" ++ "pmullh $f2, $f2, $f12 \n\t" ++ ++ "pcmpgth $f4, $f4, $f8 \n\t" ++ "pcmpgth $f6, $f6, $f8 \n\t" ++ ++ "xor $f0, $f0, $f4 \n\t" ++ "xor $f2, $f2, $f6 \n\t" ++ ++ ++ "paddh $f0, $f0, $f14 \n\t" ++ ++ "paddh $f2, $f2, $f14 \n\t" ++ ++ ++ "xor $f4, $f4, $f0 \n\t" ++ ++ "xor $f6, $f6, $f2 \n\t" ++ ++ ++ "pcmpeqh $f0, $f0, $f14 \n\t" ++ ++ "pcmpeqh $f2, $f2, $f14 \n\t" ++ ++ ++ "pandn $f0, $f0, $f4 \n\t" ++ ++ "pandn $f2, $f2, $f6 \n\t" ++ ++ ++ "sdc1 $f0, ($12) \n\t" ++ ++ "sdc1 $f2, 8($12) \n\t" ++ ++ ++ "addiu %3, %3, 16 \n\t" ++ ++ "blez %3, 1b \n\t" ++ "nop \n\t" ++ ::"r" (block+nCoeffs), "m"(qmul), "m" (qadd), "r" (2*(-nCoeffs)) ++ : "memory" ++ ); ++ block[0]= level; ++} ++ ++ ++static void dct_unquantize_h263_inter_loongson2(MpegEncContext *s, ++ DCTELEM *block, int n, int qscale) ++{ ++ long qmul, qadd, nCoeffs; ++ ++ qmul = qscale << 1; ++ qadd = (qscale - 1) | 1; ++ ++ assert(s->block_last_index[n]>=0 || s->h263_aic); ++ ++ nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ]; ++ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "xor $f12, $f12, $f12 \n\t" ++ "lwc1 $f12, %1 \n\t" ++ ++ "xor $f10, $f10, $f10 \n\t" ++ ++ "packsswh $f12, $f12, $f12 \n\t" ++ ++ "lwc1 $f10, %2 \n\t" ++ ++ "packsswh $f10, $f10, $f10 \n\t" ++ ++ "xor $f14, $f14, $f14 \n\t" ++ ++ "packsswh $f12, $f12, $f12 \n\t" ++ ++ "packsswh $f10, $f10, $f10 \n\t" ++ ++ "xor $f8, $f8, $f8 \n\t" ++ ++ "psubh $f14, $f14, $f10 \n\t" ++ ++ ++ "1: \n\t" ++ "add $12, %0, %3 \n\t" ++ ++ "ldc1 $f0, ($12) \n\t" ++ ++ "ldc1 $f2, 8($12) \n\t" ++ ++ "mov.d $f4, $f0 \n\t" ++ "mov.d $f6, $f2 \n\t" ++ ++ "pmullh $f0, $f0, $f12 \n\t" ++ ++ "pmullh $f2, $f2, $f12 \n\t" ++ ++ "pcmpgth $f4, $f4, $f8 \n\t" ++ ++ "pcmpgth $f6, $f6, $f8 \n\t" ++ ++ "xor $f0, $f0, $f4 \n\t" ++ ++ "xor $f2, $f2, $f6 \n\t" ++ ++ "paddh $f0, $f0, $f14 \n\t" ++ ++ "paddh $f2, $f2, $f14 \n\t" ++ ++ "xor $f4, $f4, $f0 \n\t" ++ ++ "xor $f6, $f6, $f2 \n\t" ++ ++ "pcmpeqh $f0, $f0, $f14 \n\t" ++ ++ "pcmpeqh $f2, $f2, $f14 \n\t" ++ ++ "pandn $f0, $f0, $f4 \n\t" ++ ++ "pandn $f2, $f2, $f6 \n\t" ++ ++ "sdc1 $f0, ($12) \n\t" ++ ++ "sdc1 $f2, 8($12) \n\t" ++ ++ ++ "addiu %3, %3, 16 \n\t" ++ ++ "blez %3, 1b \n\t" ++ "nop \n\t" ++ ::"r" (block+nCoeffs), "m"(qmul), "m" (qadd), "r" (2*(-nCoeffs)) ++ : "memory" ++ ); ++} ++ ++ ++/* draw the edges of width 'w' of an image of size width, height ++ this mmx version can only handle w==8 || w==16 */ ++ ++static void draw_edges_loongson2(uint8_t *buf, int wrap, int width, int height, int w) ++{ ++ uint8_t *ptr, *last_line; ++ int i; ++ ++ last_line = buf + (height - 1) * wrap; ++ ++ ptr = buf; ++ if(w==8) ++ { ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "move $9, %0 \n\t" ++ ++ "1: \n\t" ++ ++ "xor $f0, $f0, $f0 \n\t" ++ "lwc1 $f0, ($9) \n\t" ++ ++ "punpcklbh $f0, $f0, $f0 \n\t" ++ ++ "add $12, $9, %2 \n\t" ++ ++ "punpcklhw $f0, $f0, $f0 \n\t" ++ ++ "punpcklwd $f0, $f0, $f0 \n\t" ++ ++ "ldc1 $f2, -8($12) \n\t" ++ ++ "sdc1 $f0, -8($9) \n\t" ++ ++ "punpckhbh $f2, $f2, $f2 \n\t" ++ ++ "add $9, $9, %1 \n\t" ++ ++ "punpckhhw $f2, $f2, $f2 \n\t" ++ ++ "sub $13, $9, %3 \n\t" ++ ++ "punpckhwd $f2, $f2, $f2 \n\t" ++ ++ "bltz $13, 1b \n\t" ++ ++ "sdc1 $f2, ($12) \n\t" ++ ++ : "+r" (ptr) ++ : "r" ((long)wrap), "r" ((long)width), "r" (ptr + wrap*height) ++ : "$9", "$13", "$12", "$f2", "$f0" ++ ); ++ } ++ else ++ { ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "move $8, %0 \n\t" ++ ++ "1: \n\t" ++ ++ "xor $f0, $f0, $f0 \n\t" ++ "lwc1 $f0, ($8) \n\t" ++ ++ "punpcklbh $f0, $f0, $f0 \n\t" ++ "punpcklhw $f0, $f0, $f0 \n\t" ++ "punpcklwd $f0, $f0, $f0 \n\t" ++ ++ "sdc1 $f0, -8($8) \n\t" ++ "sdc1 $f0, -16($8) \n\t" ++ ++ "add $15, $8, %2 \n\t" ++ "ldc1 $f2, -8($15) \n\t" ++ ++ "punpckhbh $f2, $f2, $f2 \n\t" ++ "punpckhhw $f2, $f2, $f2 \n\t" ++ "punpckhwd $f2, $f2, $f2 \n\t" ++ ++ "sdc1 $f2, ($15) \n\t" ++ "sdc1 $f2, 8($15) \n\t" ++ ++ "add $8, $8, %1 \n\t" ++ ++ "sub $16, $8, %3 \n\t" ++ "bltz $16, 1b \n\t" ++ "nop \n\t" ++ : "+r" (ptr) ++ : "r" ((long)wrap), "r" ((long)width), "r" (ptr + wrap*height) ++ : "$8", "$15", "$16", "$f0", "$f2" ++ ); ++ } ++ ++ for(i=0;i<w;i+=4) { ++ ++ ptr= buf - (i + 1) * wrap - w; ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ "move $8, %0 \n\t" ++ ++ "1: \n\t" ++ ++ "add $9, $8, %1 \n\t" ++ "ldc1 $f0, ($9) \n\t" ++ ++ "add $10, $8, %2 \n\t" ++ "add $11, $10, %2 \n\t" ++ "add $12, $8, %3 \n\t" ++ ++ "sdc1 $f0, ($8) \n\t" ++ "sdc1 $f0, ($10) \n\t" ++ "sdc1 $f0, ($11) \n\t" ++ "sdc1 $f0, ($12) \n\t" ++ ++ "addiu $8, $8, 8 \n\t" ++ ++ "sub $13, $8, %4 \n\t" ++ ++ "bltz $13, 1b \n\t" ++ "nop \n\t" ++ ++ : "+r" (ptr) ++ : "r" (((long)buf - (long)ptr - w)), "r" ((long)-wrap), "r" ((long)-wrap*3), "r" (*(ptr+width+2*w)) ++ : "$8", "$9", "$10", "$11", "$12", "$13", "$f0" ++ ); ++ ++ ptr= last_line + (i + 1) * wrap - w; ++ ++ __asm__ volatile( ++// ".set mips3 \n\t" ++ ++ "move $9, %0 \n\t" ++ ++ "1: \n\t" ++ ++ "add $10, $9, %1 \n\t" ++ "ldc1 $f0, ($10) \n\t" ++ ++ "add $11, $9, %2 \n\t" ++ "add $12, $11, %2 \n\t" ++ "add $13, $9, %3 \n\t" ++ ++ "sdc1 $f0, ($9) \n\t" ++ "sdc1 $f0, ($11) \n\t" ++ "sdc1 $f0, ($12) \n\t" ++ "sdc1 $f0, ($13) \n\t" ++ ++ "addiu $9, $9, 8 \n\t" ++ ++ "sub $14, $9, %4 \n\t" ++ ++ "bltz $14, 1b \n\t" ++ "nop \n\t" ++ : "+r" (ptr) ++ : "r" ((long)last_line - (long)ptr - w), "r" ((long)wrap), "r" ((long)wrap*3), "r" (ptr+width+2*w) ++ : "$9", "$10", "$11", "$12", "$13", "$14", "$f0" ++ ++ ); ++ } ++} ++ ++void MPV_common_init_loongson2(MpegEncContext *s) ++{ ++ s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_loongson2; ++ s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_loongson2; ++ ++// draw_edges = draw_edges_loongson2; ++ ++} +diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile +index 3f4da68..73e4d56 100644 +--- a/libavcodec/mips/Makefile ++++ b/libavcodec/mips/Makefile +@@ -1,3 +1,9 @@ + OBJS-$(HAVE_MMI) += ps2/dsputil_mmi.o \ + ps2/idct_mmi.o \ + ps2/mpegvideo_mmi.o \ ++ ++OBJS-$(HAVE_LOONGSON2MMI) += loongson2/idct_loongson2.o \ ++ loongson2/dsputil_loongson2.o \ ++ loongson2/idct_loongson2_xvid.o \ ++ loongson2/mpegvideo_loongson2.o \ ++ loongson2/motion_est_loongson2.o +diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c +index b47ff9a..af92552 100644 +--- a/libavcodec/mpegvideo.c ++++ b/libavcodec/mpegvideo.c +@@ -176,6 +176,9 @@ av_cold int ff_dct_common_init(MpegEncContext *s) + #elif ARCH_BFIN + MPV_common_init_bfin(s); + #endif ++#ifdef HAVE_LOONGSON2MMI ++ MPV_common_init_loongson2(s); ++#endif + + /* load & permutate scantables + note: only wmv uses different ones +diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h +index 5302be9..8d09906 100644 +--- a/libavcodec/mpegvideo.h ++++ b/libavcodec/mpegvideo.h +@@ -689,6 +689,7 @@ int MPV_encode_picture(AVCodecContext *avctx, unsigned char *buf, int buf_size, + void MPV_common_init_mmx(MpegEncContext *s); + void MPV_common_init_axp(MpegEncContext *s); + void MPV_common_init_mlib(MpegEncContext *s); ++void MPV_common_init_loongson2(MpegEncContext *s); + void MPV_common_init_mmi(MpegEncContext *s); + void MPV_common_init_arm(MpegEncContext *s); + void MPV_common_init_altivec(MpegEncContext *s); +diff --git a/libavcodec/options.c b/libavcodec/options.c +index 7ca1062..c05b3f4 100644 +--- a/libavcodec/options.c.orig 2011-06-22 12:52:11.584428161 -0300 ++++ b/libavcodec/options.c 2011-06-22 12:52:25.003143367 -0300 +@@ -219,6 +219,8 @@ static const AVOption options[]={ + {"simple", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"}, + {"simplemmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, + {"libmpeg2mmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, ++{"libmpeg2loongson2", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_LIBMPEG2LOONGSON2, INT_MIN, INT_MAX, V|E|D, "idct"}, ++{"xvidloongson2", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_XVIDLOONGSON2, INT_MIN, INT_MAX, V|E|D, "idct"}, + {"ps2", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, V|E|D, "idct"}, + {"mlib", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_MLIB }, INT_MIN, INT_MAX, V|E|D, "idct"}, + {"arm", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, diff --git a/extra/frozen-bubble/PKGBUILD b/extra/frozen-bubble/PKGBUILD index 602fef826..c3ce7383a 100644 --- a/extra/frozen-bubble/PKGBUILD +++ b/extra/frozen-bubble/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 112696 2011-03-06 00:54:34Z heftig $ +# $Id: PKGBUILD 127529 2011-06-15 21:23:24Z remy $ # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Allan McRae <allan@archlinux.org> # Contributor: Brandon Niemczyk <maccorin@cfl.rr.com> @@ -6,7 +6,7 @@ pkgname=frozen-bubble _pkgver=2.2.1-beta1 pkgver=${_pkgver/-/} -pkgrel=1 +pkgrel=3 pkgdesc="A game in which you throw colorful bubbles and build groups to destroy the bubbles" arch=(i686 x86_64 'mips64el') url="http://www.frozen-bubble.org" @@ -19,13 +19,22 @@ source=(http://www.frozen-bubble.org/data/$pkgname-$_pkgver.tar.bz2 \ md5sums=('825cc23ed806838b9d86de9982a5687a' '01b10b77ba6ad856f5c199121c582272') -package() { +build() { cd "$srcdir/$pkgname-$_pkgver" + unset CFLAGS # install module in vendor directories - perl Build.PL installdirs=vendor destdir="$pkgdir" - + perl Build.PL installdirs=vendor perl Build - perl Build install +} + +check() { + cd "$srcdir/$pkgname-$_pkgver" + perl Build test +} + +package() { + cd "$srcdir/$pkgname-$_pkgver" + perl Build install destdir="$pkgdir" install -D -m644 share/icons/frozen-bubble-icon-64x64.png "$pkgdir/usr/share/pixmaps/frozen-bubble.png" install -D -m644 "$srcdir/frozen-bubble.desktop" "$pkgdir/usr/share/applications/frozen-bubble.desktop" diff --git a/extra/gconf-perl/PKGBUILD b/extra/gconf-perl/PKGBUILD index 45e3503e3..0091031e6 100644 --- a/extra/gconf-perl/PKGBUILD +++ b/extra/gconf-perl/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 104906 2011-01-05 14:35:54Z jgc $ +# $Id: PKGBUILD 124841 2011-05-24 18:04:05Z remy $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gconf-perl _realname=Gnome2-GConf pkgver=1.044 -pkgrel=4 +pkgrel=5 pkgdesc="Gnome2-GConf perl bindings for gconf" arch=('i686' 'x86_64' 'mips64el') license=('LGPL') url="http://gtk2-perl.sourceforge.net/" makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends') -depends=('glib-perl' 'gconf' 'perl') +depends=('glib-perl' 'gconf' 'perl>=5.14') options=(!emptydirs) source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz) md5sums=('ea386003b18f067524833b0eeb271330') @@ -19,5 +19,14 @@ build() { cd "${srcdir}/${_realname}-${pkgver}" perl Makefile.PL INSTALLDIRS=vendor make +} + +check() { + cd "${srcdir}/${_realname}-${pkgver}" + dbus-launch --exit-with-session make test +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" make DESTDIR="${pkgdir}" install } diff --git a/extra/gdk-pixbuf2/PKGBUILD b/extra/gdk-pixbuf2/PKGBUILD index bc6814ba9..24ec6ef79 100644 --- a/extra/gdk-pixbuf2/PKGBUILD +++ b/extra/gdk-pixbuf2/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 127501 2011-06-15 15:14:38Z ibiru $ +# $Id: PKGBUILD 129483 2011-06-28 07:59:13Z ibiru $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgname=gdk-pixbuf2 -pkgver=2.23.4 +pkgver=2.23.5 pkgrel=1 pkgdesc="An image loading library for gtk2" arch=('i686' 'x86_64' 'mips64el') @@ -12,7 +12,7 @@ makedepends=('gtk-doc' 'gobject-introspection') options=('!libtool') install=gdk-pixbuf2.install source=(http://download.gnome.org/sources/gdk-pixbuf/2.23/gdk-pixbuf-${pkgver}.tar.xz) -sha256sums=('66140dda9fb51b3f3d3612db837e82dcdd830cd83809f1feb92154a146b486d7') +sha256sums=('7a6c3550426f38f6b0eeeb49295654d9e706ce8f1786a4d0932f9d2c0d0bc500') build() { cd "${srcdir}/gdk-pixbuf-${pkgver}" diff --git a/extra/git/PKGBUILD b/extra/git/PKGBUILD index e67522047..adbbfaf7f 100644 --- a/extra/git/PKGBUILD +++ b/extra/git/PKGBUILD @@ -1,14 +1,14 @@ -# $Id: PKGBUILD 124414 2011-05-20 16:19:11Z dan $ +# $Id: PKGBUILD 129435 2011-06-27 17:14:23Z dan $ # Maintainer: Dan McGee <dan@archlinux.org> pkgname=git -pkgver=1.7.5.2 +pkgver=1.7.6 pkgrel=1 pkgdesc="the fast distributed version control system" arch=(i686 x86_64 'mips64el') url="http://git-scm.com/" license=('GPL2') -depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.12.2') +depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.14.0') makedepends=('python2' 'emacs') optdepends=('tk: gitk and git gui' 'perl-libwww: git svn' @@ -47,7 +47,7 @@ package() { INSTALLDIRS=vendor DESTDIR="$pkgdir" install # bash completion - mkdir -p $pkgdir/etc/bash_completion.d/ + mkdir -p "$pkgdir"/etc/bash_completion.d/ install -m644 ./contrib/completion/git-completion.bash "$pkgdir"/etc/bash_completion.d/git # more contrib stuff cp -a ./contrib $pkgdir/usr/share/git/ @@ -75,11 +75,11 @@ package() { install -D -m644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/conf.d/git-daemon.conf } -md5sums=('f79ab8fe79b35346b499f131cbf381a4' - '43fc5538f137231f5c96e7da5eb6c934' +md5sums=('9e0a438eb71e89eedb61f89470ed32a0' + 'a017935cf9e90d9f056b6547c318fd15' '8e2648910fd5dd4f1c41d3c7fa9e9156' '2e42bf97779a1c6411d89043334c9e78') -sha256sums=('65dbb9789a1ff8aa7e4f7e156b9ce36ef101810608ed55a297156348d70f9349' - '8521210a77809d189a3fe72e2bd13df50ecf8ec58e7098ec1655dfdb4086b6ca' +sha256sums=('778795cece63cd758192378f3a999870cea290181b3a4c9de573c77192561082' + 'a0ffd7e16997262ef741db5e2dd8eabf44b6767cf1a213753c7d8a268b4553ad' '2e0a50bdaf8f387a499895e1c204bff78244eaa72b78187c8a84ef40c0b82598' 'e8bfe29d8393d2b87517c4dd56ea834b213aa00bf3d7fcde4ead3457cadbbc68') diff --git a/extra/glade-perl/PKGBUILD b/extra/glade-perl/PKGBUILD index f92684ba7..4388acfec 100644 --- a/extra/glade-perl/PKGBUILD +++ b/extra/glade-perl/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 104918 2011-01-05 15:15:03Z jgc $ +# $Id: PKGBUILD 125153 2011-05-25 19:04:01Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=glade-perl _realname=Gtk2-GladeXML pkgver=1.007 -pkgrel=3 +pkgrel=4 pkgdesc="Gtk2-GladeXML perl bindings for glade 2.x" arch=(i686 x86_64 'mips64el') license=('LGPL') diff --git a/extra/glib-perl/PKGBUILD b/extra/glib-perl/PKGBUILD index c16a137f2..afc112a00 100644 --- a/extra/glib-perl/PKGBUILD +++ b/extra/glib-perl/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 104386 2011-01-02 04:08:45Z kevin $ +# $Id: PKGBUILD 124651 2011-05-23 19:33:30Z remy $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Sarah Hay <sarah@archlinux.org> pkgname=glib-perl _realname=Glib pkgver=1.223 -pkgrel=2 +pkgrel=3 pkgdesc="Perl wrappers for glib 2.x, including GObject" arch=(i686 x86_64 'mips64el') license=('LGPL') url="http://gtk2-perl.sourceforge.net/" options=('!emptydirs') -depends=('glib2>=2.24.1' 'perl>=5.12.1') +depends=('glib2>=2.24.1' 'perl>=5.14') makedepends=('perl-extutils-depends>=0.302' 'perl-extutils-pkgconfig>=1.12') source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz) md5sums=('cfdeaa8c95448f86c30b505e4701abf1') @@ -20,6 +20,10 @@ build() { cd "${srcdir}/${_realname}-${pkgver}" perl Makefile.PL INSTALLDIRS=vendor make +} + +check() { + cd "${srcdir}/${_realname}-${pkgver}" make test } diff --git a/extra/gmime/PKGBUILD b/extra/gmime/PKGBUILD index 31e6c58c5..4a88a260b 100644 --- a/extra/gmime/PKGBUILD +++ b/extra/gmime/PKGBUILD @@ -11,6 +11,8 @@ license=('GPL') url="http://spruce.sourceforge.net/gmime/" depends=('glib2' 'zlib') makedepends=('gtk-sharp-2' 'pkgconfig') +[ "$CARCH" = "mips64el" ] && \ +makedepends=('pkgconfig') options=('!libtool') source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) sha256sums=('c1044330652e7098b58e4b9c32202c5c99534da34aa260fc3b7cf8506cd56413') diff --git a/extra/gnome-perl/PKGBUILD b/extra/gnome-perl/PKGBUILD index bda7eb159..cf5d1a776 100644 --- a/extra/gnome-perl/PKGBUILD +++ b/extra/gnome-perl/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 104940 2011-01-05 16:02:27Z jgc $ +# $Id: PKGBUILD 125159 2011-05-25 19:04:51Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gnome-perl _realname=Gnome2 pkgver=1.042 -pkgrel=5 +pkgrel=6 pkgdesc="Perl bindings for libgnome" arch=('i686' 'x86_64' 'mips64el') license=('LGPL') diff --git a/extra/gnome-vfs-perl/PKGBUILD b/extra/gnome-vfs-perl/PKGBUILD index d40dd62f4..885b50ad2 100644 --- a/extra/gnome-vfs-perl/PKGBUILD +++ b/extra/gnome-vfs-perl/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 104927 2011-01-05 15:25:06Z jgc $ +# $Id: PKGBUILD 125162 2011-05-25 19:05:23Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gnome-vfs-perl _realname=Gnome2-VFS pkgver=1.081 -pkgrel=3 +pkgrel=4 pkgdesc="Gnome2-VFS perl bindings for gnome-vfs" arch=(i686 x86_64 'mips64el') license=('LGPL') diff --git a/extra/gnomecanvas-perl/PKGBUILD b/extra/gnomecanvas-perl/PKGBUILD index 626b18394..88516d278 100644 --- a/extra/gnomecanvas-perl/PKGBUILD +++ b/extra/gnomecanvas-perl/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 104924 2011-01-05 15:20:58Z jgc $ +# $Id: PKGBUILD 125156 2011-05-25 19:04:24Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gnomecanvas-perl _realname=Gnome2-Canvas pkgver=1.002 -pkgrel=7 +pkgrel=8 pkgdesc="Gnome2-Canvas perl bindings for libgnomecanvas" arch=('i686' 'x86_64' 'mips64el') license=('LGPL') diff --git a/extra/gnumeric/PKGBUILD b/extra/gnumeric/PKGBUILD index ab785b02e..0986173ff 100644 --- a/extra/gnumeric/PKGBUILD +++ b/extra/gnumeric/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 124498 2011-05-22 15:36:35Z ibiru $ +# $Id: PKGBUILD 125165 2011-05-25 19:05:49Z foutrelis $ # Maintainer: Eric Belanger <eric@archlinux.org> # Contributor: Kritoke <typeolinux@yahoo.com> pkgname=gnumeric pkgver=1.10.15 -pkgrel=1 +pkgrel=2 pkgdesc="A GNOME Spreadsheet Program" arch=('i686' 'x86_64' 'mips64el') url="http://www.gnome.org/projects/gnumeric/" diff --git a/extra/gptfdisk/PKGBUILD b/extra/gptfdisk/PKGBUILD index c3e5215e6..e376be4fc 100644 --- a/extra/gptfdisk/PKGBUILD +++ b/extra/gptfdisk/PKGBUILD @@ -1,21 +1,21 @@ -# $Id: PKGBUILD 126131 2011-06-01 17:33:51Z foutrelis $ +# $Id: PKGBUILD 129374 2011-06-27 05:53:20Z foutrelis $ # Maintainer: Evangelos Foutras <foutrelis@gmail.com> # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Hokum <hokum_at_mail_dot_ru> pkgname=gptfdisk -pkgver=0.7.1 -pkgrel=3 +pkgver=0.7.2 +pkgrel=1 pkgdesc="A text-mode partitioning tool that works on Globally Unique Identifier (GUID) Partition Table (GPT) disks" arch=('i686' 'x86_64') url="http://www.rodsbooks.com/gdisk/" license=('GPL2') depends=('gcc-libs' 'util-linux' 'popt' 'icu') -provides=('gdisk') +provides=("gdisk=$pkgver") conflicts=('gdisk') replaces=('gdisk') -source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tgz) -md5sums=('7c8d810df61e81c821bef399b832e89e') +source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz) +md5sums=('31deeb7acb5104d56ba2ddeafd907513') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/extra/graphviz/PKGBUILD b/extra/graphviz/PKGBUILD index 35d7df78e..2af2c4c62 100644 --- a/extra/graphviz/PKGBUILD +++ b/extra/graphviz/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 129240 2011-06-26 08:51:17Z bisson $ +# $Id: PKGBUILD 129245 2011-06-26 09:32:03Z bisson $ # Maintainer: Gaetan Bisson <bisson@archlinux.org> # Contributor: kevin <kevin@archlinux.org> # Contributor: John Proctor <jproctor@prium.net> pkgname=graphviz pkgver=2.28.0 -pkgrel=3 +pkgrel=4 pkgdesc='Graph visualization software' url='http://www.graphviz.org/' license=('custom:EPL') diff --git a/extra/gstreamer0.10-good/PKGBUILD b/extra/gstreamer0.10-good/PKGBUILD index 9b5ddb8ac..f8b0dfbf3 100644 --- a/extra/gstreamer0.10-good/PKGBUILD +++ b/extra/gstreamer0.10-good/PKGBUILD @@ -21,8 +21,8 @@ build() { --disable-static --enable-experimental \ --disable-schemas-install \ --disable-hal \ - --with-package-name="GStreamer Good Plugins (Archlinux)" \ - --with-package-origin="http://www.archlinux.org/" + --with-package-name="GStreamer Good Plugins (Parabola)" \ + --with-package-origin="https://parabolagnulinux.org/" make sed -e 's/gst sys ext/gst/' -i Makefile diff --git a/extra/gtk2-perl/PKGBUILD b/extra/gtk2-perl/PKGBUILD index 96c5bf83a..ba731572e 100644 --- a/extra/gtk2-perl/PKGBUILD +++ b/extra/gtk2-perl/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 104912 2011-01-05 15:05:46Z jgc $ +# $Id: PKGBUILD 124902 2011-05-25 01:27:30Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Sarah Hay <sarah@archlinux.org> pkgname=gtk2-perl _realname=Gtk2 pkgver=1.222 -pkgrel=2 +pkgrel=3 pkgdesc="Gtk2-Perl allows Perl developers to write GTK+ 2.x applications." arch=(i686 x86_64 'mips64el') license=('LGPL') diff --git a/extra/imagemagick/PKGBUILD b/extra/imagemagick/PKGBUILD index b5468a0c5..035cf0232 100644 --- a/extra/imagemagick/PKGBUILD +++ b/extra/imagemagick/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 122661 2011-05-05 21:34:04Z eric $ +# $Id: PKGBUILD 127963 2011-06-20 08:24:42Z eric $ # Maintainer: Eric Bélanger <eric@archlinux.org> pkgbase=imagemagick pkgname=('imagemagick' 'imagemagick-doc') -pkgver=6.6.9.8 +pkgver=6.7.0.8 pkgrel=1 arch=('i686' 'x86_64' 'mips64el') url="http://www.imagemagick.org/" @@ -13,9 +13,9 @@ depends=('libtool' 'lcms' 'libxt' 'gcc-libs' 'bzip2' 'xz' 'freetype2' 'fontconfi makedepends=('ghostscript' 'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper' 'libpng') source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \ perlmagick.rpath.patch) -md5sums=('8cd5fe2bc5a29b38c24a6f9576518319' +md5sums=('67d8631c20fc9a2409343c02b159407d' 'ff9974decbfe9846f8e347239d87e4eb') -sha1sums=('f5fb5844934e23bffbd0ab2a36ea4914eab0dcd0' +sha1sums=('03b8534d16aee3efc5496817f804d21964be79ad' '23405f80904b1de94ebd7bd6fe2a332471b8c283') build() { @@ -25,7 +25,7 @@ build() { autoreconf patch -Np0 -i ../perlmagick.rpath.patch - ./configure --prefix=/usr --sysconfdir=/etc --with-modules --disable-static \ + LIBS="$LIBS -L/usr/lib/perl5/core_perl/CORE -lperl" ./configure --prefix=/usr --sysconfdir=/etc --with-modules --disable-static \ --enable-openmp --with-wmf --with-openexr --with-xml \ --with-gslib --with-gs-font-dir=/usr/share/fonts/Type1 \ --with-perl --with-perl-options="INSTALLDIRS=vendor" \ diff --git a/extra/irssi/PKGBUILD b/extra/irssi/PKGBUILD index 2d6fad73e..74702e9ad 100644 --- a/extra/irssi/PKGBUILD +++ b/extra/irssi/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 102836 2010-12-12 08:15:33Z angvp $ +# $Id: PKGBUILD 125226 2011-05-25 19:11:10Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Dan McGee <dan@archlinux.org> pkgname=irssi pkgver=0.8.15 -pkgrel=4 +pkgrel=5 pkgdesc="Modular text mode IRC client with Perl scripting" arch=('i686' 'x86_64' 'mips64el') url="http://irssi.org/" diff --git a/extra/jack/PKGBUILD b/extra/jack/PKGBUILD index b01ab7191..ea3fa63b9 100644 --- a/extra/jack/PKGBUILD +++ b/extra/jack/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 125794 2011-05-29 20:29:19Z schiv $ +# $Id: PKGBUILD 129477 2011-06-28 06:24:10Z schiv $ # Maintainer: Ray Rashif <schiv@archlinux.org> # Contributor: tobias <tobias@archlinux.net> # Contributor: Robert Emil Berge <robert@rebi.no> pkgname=jack _longname=jack-audio-connection-kit -pkgver=0.120.2 +pkgver=0.121.1 pkgrel=1 pkgdesc="A low-latency audio server" arch=('i686' 'x86_64' 'mips64el') @@ -13,13 +13,17 @@ license=('GPL' 'LGPL') depends=('libsamplerate' 'readline') makedepends=('doxygen' 'libffado') optdepends=('libffado: FireWire support') +[ "$CARCH" = "mips64el" ] && { +makedepends=('doxygen') +unset optdepends +} url="http://jackaudio.org/" options=('!libtool') provides=("$_longname=$pkgver") replaces=("$_longname") changelog=$pkgname.changelog source=("http://jackaudio.org/downloads/$_longname-$pkgver.tar.gz") -md5sums=('21f453676bfb9cb63a3df7e19546f0ed') +md5sums=('a51005bfd6e993af8517e19e823cf3c6') build() { cd "$srcdir/$_longname-$pkgver" @@ -32,7 +36,7 @@ build() { package() { cd "$srcdir/$_longname-$pkgver" - make DESTDIR="$pkgdir/" install + make DESTDIR="$pkgdir" install } # vim:set ts=2 sw=2 et: diff --git a/extra/jack/jack.changelog b/extra/jack/jack.changelog index 4c3533694..47909c872 100644 --- a/extra/jack/jack.changelog +++ b/extra/jack/jack.changelog @@ -12,4 +12,4 @@ * jack.changelog : Added this changelog. - Only important things will be logged. + Only important changes will be logged. diff --git a/extra/kdegraphics/PKGBUILD b/extra/kdegraphics/PKGBUILD index e0f3951f8..9cbff59d8 100644 --- a/extra/kdegraphics/PKGBUILD +++ b/extra/kdegraphics/PKGBUILD @@ -21,6 +21,9 @@ groups=('kde' 'kdegraphics') makedepends=('pkgconfig' 'cmake' 'automoc4' 'qimageblitz' 'sane' 'lcms' 'libxxf86vm' 'poppler-qt' 'libspectre' 'chmlib' 'djvulibre' 'ebook-tools' 'kdebase-runtime') +[ "$CARCH" = "mips64el" ] && makedepends=('pkgconfig' 'cmake' 'automoc4' 'qimageblitz' 'lcms' + 'libxxf86vm' 'poppler-qt' 'libspectre' 'djvulibre' + 'ebook-tools' 'kdebase-runtime') source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2") sha1sums=('c16dc9c55e7459418fa9887aa532ea0a269e7179') @@ -136,6 +139,9 @@ package_kdegraphics-okular() { pkgdesc='Document Viewer' depends=('kdebase-runtime' 'qimageblitz' 'poppler-qt' 'chmlib' 'djvulibre' 'ebook-tools' 'libspectre') +[ "$CARCH" = "mips64el" ] && \ + depends=('kdebase-runtime' 'qimageblitz' 'poppler-qt' 'djvulibre' + 'ebook-tools' 'libspectre') url="http://kde.org/applications/graphics/okular/" install='kdegraphics.install' cd $srcdir/build/okular diff --git a/extra/koffice/PKGBUILD b/extra/koffice/PKGBUILD index 1884dd92c..c13780881 100644 --- a/extra/koffice/PKGBUILD +++ b/extra/koffice/PKGBUILD @@ -38,18 +38,23 @@ pkgname=( ) pkgver=2.3.3 pkgrel=4 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') 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') +[ "$CARCH" = "mips64el" ] && \ +makedepends=('pkg-config' 'cmake' 'automoc4' 'boost' 'eigen' 'gsl' 'lcms' + 'glew' 'qimageblitz' 'kdepimlibs' 'pstoedit' 'poppler-qt' 'libwpd' + 'libwpg' 'kdegraphics-libs' 'libgsf') groups=('koffice') source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2" 'kde4-koffice-libwpg02.patch' 'gcc46.patch') sha256sums=('31ba0d98c0d29c7b8ab97efdeb6c618b82177b2b0ec85da088178254da43c099' '69106deb4081d71b5bd8f2e4f5af67ca689e4ce9f2bb49c11dbce5fb3409d612' 'e095c0b2bbedf41da6535a68b2275464dafd3f194566028d0135322f596e4739') +options=(!distcc) build() { cd "${srcdir}/${pkgbase}-${pkgver}" @@ -60,6 +65,7 @@ build() { cd "${srcdir}" mkdir build cd build + CXX="g++" \ cmake ../${pkgbase}-${pkgver} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ @@ -216,6 +222,10 @@ package_koffice-krita(){ depends=('hicolor-icon-theme' 'glew' 'qimageblitz' 'koffice-libs' \ 'koffice-templates' 'koffice-plugins' 'poppler-qt' 'shared-mime-info' \ 'openexr' 'opengtl') +[ "$CARCH" = "mips64el" ] && \ + depends=('hicolor-icon-theme' 'glew' 'qimageblitz' 'koffice-libs' \ + 'koffice-templates' 'koffice-plugins' 'poppler-qt' 'shared-mime-info' \ + 'openexr') optdepends=('koffice-filters: import/export filters') install=krita.install cd "${srcdir}/build/krita" diff --git a/extra/krusader/PKGBUILD b/extra/krusader/PKGBUILD index 863f4b7df..ebf3c861f 100644 --- a/extra/krusader/PKGBUILD +++ b/extra/krusader/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 129354 2011-06-26 23:28:57Z eric $ +# $Id: PKGBUILD 129545 2011-06-28 19:04:18Z andrea $ # Maintainer: # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Alexander Baldeck <alexander@archlinux.org> @@ -7,16 +7,17 @@ pkgname=krusader pkgver=2.4.0beta1 _pkgver=2.4.0-beta1 -pkgrel=1 +pkgrel=3 pkgdesc="An alternative file manager for KDE resembling Midnight Commander" arch=('i686' 'x86_64' 'mips64el') url="http://krusader.sourceforge.net/" license=('GPL') -depends=('kdebase-runtime') -makedepends=('cmake' 'automoc4' 'docbook-xsl') -optdepends=("kdebase-keditbookmarks: to edit bookmarks") +depends=('kdebase-runtime' 'kdebase-lib') +makedepends=('cmake' 'automoc4' 'docbook-xsl' 'kdeutils-ark') +optdepends=("kdebase-keditbookmarks: to edit bookmarks" + "kdeutils-ark: extract archive with right-click") install=krusader.install -source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.bz2) +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.bz2") md5sums=('d2340718d05d69e7f2a7f0846471ee12') build() { diff --git a/extra/lftp/PKGBUILD b/extra/lftp/PKGBUILD index 312f139c6..eb01995ca 100644 --- a/extra/lftp/PKGBUILD +++ b/extra/lftp/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 127768 2011-06-18 10:02:24Z andyrtr $ +# $Id: PKGBUILD 129514 2011-06-28 15:35:00Z andyrtr $ # Maintainer: Andreas Radke <andyrtr@archlinux.org> # Contributor: Aaron Griffin <aaron@archlinux.org> pkgname=lftp -pkgver=4.3.0 +pkgver=4.3.1 pkgrel=1 pkgdesc="Sophisticated command line based FTP client" arch=('i686' 'x86_64' 'mips64el') @@ -14,7 +14,7 @@ makedepends=('autoconf') url="http://lftp.yar.ru/" backup=('etc/lftp.conf') source=(http://ftp.yars.free.net/pub/source/lftp/${pkgname}-${pkgver}.tar.bz2) -md5sums=('3c6ff88f8c6e93ff90d8e3b054f3b086') +md5sums=('ea45acfb47b5590d4675c50dc0c6e13c') build() { cd ${srcdir}/${pkgname}-${pkgver} diff --git a/extra/libdbusmenu-qt/PKGBUILD b/extra/libdbusmenu-qt/PKGBUILD index 674648c88..e0aed1a88 100644 --- a/extra/libdbusmenu-qt/PKGBUILD +++ b/extra/libdbusmenu-qt/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 122259 2011-05-03 14:55:26Z andrea $ +# $Id: PKGBUILD 129478 2011-06-28 07:38:29Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> pkgname=libdbusmenu-qt -pkgver=0.8.2 +pkgver=0.8.3 pkgrel=1 pkgdesc="A library that provides a Qt implementation of the DBusMenu spec" arch=('i686' 'x86_64' 'mips64el') @@ -11,7 +11,7 @@ license=('GPL') depends=('qt') makedepends=('cmake') source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2") -md5sums=('88be2548e00acf988c66ed3a35844f64') +md5sums=('8def56db4f58ca0a40d60807786f5912') build() { cd "${srcdir}" diff --git a/extra/libmtp/PKGBUILD b/extra/libmtp/PKGBUILD index 3b2fb76ce..78018661f 100644 --- a/extra/libmtp/PKGBUILD +++ b/extra/libmtp/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 123216 2011-05-09 10:21:51Z jgc $ +# $Id: PKGBUILD 127351 2011-06-13 11:09:19Z stephane $ # Contributor: damir <damir@archlinux.org> # Contributor: Kevin Edmonds <edmondskevin@hotmail.com> pkgname=libmtp -pkgver=1.0.6 +pkgver=1.1.0 pkgrel=1 pkgdesc="library implementation of the Media Transfer Protocol" arch=("i686" "x86_64" 'mips64el') @@ -13,17 +13,15 @@ depends=('libusb-compat') makedepends=('doxygen') options=('!libtool') source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz) -md5sums=('7d3c624d768adba8537f8bc9c0a82cbf') +md5sums=('fd7b293436528f4c780a9da6e5cc5398') build() { cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr + ./configure --prefix=/usr --with-udev-rules=52-libmtp.rules make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install - - install -D -m0644 libmtp.rules "${pkgdir}/lib/udev/rules.d/52-libmtp.rules" } diff --git a/extra/libpeas/PKGBUILD b/extra/libpeas/PKGBUILD index 3cacf3bba..8e190cea6 100644 --- a/extra/libpeas/PKGBUILD +++ b/extra/libpeas/PKGBUILD @@ -4,7 +4,7 @@ pkgname=libpeas pkgver=1.0.0 pkgrel=1 pkgdesc="A GObject-based plugins engine" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://www.gtk.org/" license=('GPL2') depends=('gtk3' 'hicolor-icon-theme' 'pygobject' 'gobject-introspection') diff --git a/extra/libproxy/PKGBUILD b/extra/libproxy/PKGBUILD index 31118293d..6f1016fc8 100644 --- a/extra/libproxy/PKGBUILD +++ b/extra/libproxy/PKGBUILD @@ -3,7 +3,7 @@ pkgname=libproxy pkgver=0.4.6 -pkgrel=6 +pkgrel=7 pkgdesc="A library that provides automatic proxy configuration management" arch=(i686 x86_64 'mips64el') license=('LGPL') diff --git a/extra/libreoffice/0001-fix-configure-without-the-optional-translations-modu.patch b/extra/libreoffice/0001-fix-configure-without-the-optional-translations-modu.patch new file mode 100644 index 000000000..31ad95d36 --- /dev/null +++ b/extra/libreoffice/0001-fix-configure-without-the-optional-translations-modu.patch @@ -0,0 +1,31 @@ +From 900baff9ff400a6eba034089ed69362c2c2d61e4 Mon Sep 17 00:00:00 2001 +From: Petr Mladek <pmladek@suse.cz> +Date: Wed, 22 Jun 2011 12:05:19 +0200 +Subject: [PATCH] fix configure without the optional translations module + +--- + set_soenv.in | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/set_soenv.in b/set_soenv.in +index f015bab..8e39314 100755 +--- a/set_soenv.in ++++ b/set_soenv.in +@@ -1068,9 +1068,11 @@ $XCLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$wps.'.'; + $L10N_MODULE = PathFormat($SRC_ROOT."/translations"); + + # Check for poor help localizations, i.e. no help translation at all... +-opendir(DIR,$L10N_MODULE . "/source"); +-@languages = readdir(DIR); +-closedir(DIR); ++@languages=(); ++if (opendir(DIR,$L10N_MODULE . "/source")) ++{ @languages = readdir(DIR); ++ closedir(DIR); ++} + $WITH_POOR_HELP_LOCALIZATIONS = ""; + + foreach $language (@languages) +-- +1.7.3.4 + diff --git a/extra/libreoffice/PKGBUILD b/extra/libreoffice/PKGBUILD index a57b823ec..4ec3d5b00 100644 --- a/extra/libreoffice/PKGBUILD +++ b/extra/libreoffice/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 126270 2011-06-03 14:47:40Z stephane $ +# $Id: PKGBUILD 129540 2011-06-28 18:38:58Z andyrtr $ # Maintainer: AndyRTR <andyrtr@archlinux.org> pkgbase="libreoffice" @@ -24,10 +24,10 @@ pkgname=('libreoffice' 'libreoffice-sdk' 'libreoffice-extension-validator' 'libreoffice-extension-watch-window' 'libreoffice-extension-wiki-publisher') -_LOver=3.4.0.2 -pkgver=3.4.0 -pkgrel=2 -arch=('i686' 'x86_64' 'mips64el') +_LOver=3.4.1.3 +pkgver=3.4.1 +pkgrel=1 +arch=('i686' 'x86_64') #_LO_tree="3.4" _OFFICEUPD="340" license=('LGPL3') @@ -90,11 +90,10 @@ source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions http://ooo.itc.hu/oxygenoffice/download/libreoffice/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt http://ooo.itc.hu/oxygenoffice/download/libreoffice/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt http://ooo.itc.hu/oxygenoffice/download/libreoffice/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt - buildfix_i116795.diff buildfix_boost.diff buildfix_ct2n.diff vbahelper.visibility.patch - buildfix_bison25.diff) + 0001-fix-configure-without-the-optional-translations-modu.patch) noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2 7a0dcb3fe1e8c7229ab4fb868b7325e6-mdds_0.5.2.tar.bz2 @@ -133,25 +132,25 @@ noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt 90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2 f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2) -md5sums=('7427ddd5ae63b6ee7aa868201dfbccaa' - 'a78a8e08731213da02c65060cedc5589' - '596da255e2728faccc8f2361171270ec' - '8ed9803a34d13da1764e7523d550d6b0' - '9be46d7c4bf3a60ee8dd0a5ef3638f82' - 'b60db802866ab71c485de42e6382d1bb' - '09e374cf3bd8f07a043883393012d69b' - 'af9f25aa04dc4ef7b797f7bcc743877c' - 'ad29de786d76d67759f9d2dd574b29be' - 'ff13a8ac0ea324122b75773fd80a9245' - '6eb8f53e01da7a945ee4cd42b7297732' - '90df27d4cbf490668ce4f03ff7dba521' - 'c0ea197183564c49306a1c79ca571e51' - '91e69ed3c0be542fa7f69ca3da2d7808' - 'a81c787b2e5469c2acc9f335b2c9e52f' - 'ee1c78af6553657614b1a43adf4750ac' - 'c970d6212618fc9b34526907eb030ce6' - '6d25488c81af09d87015bf487243042f' - '9a39234a49516b7035309e28dd4f0784' +md5sums=('10b3212002688e7ce49a276c68352b50' + 'c6547ec8f971284ea1e58bb39375c500' + '26328364a0804dedab94818c15e76871' + 'd26c6ab53c9404e82e04ea366d4db261' + '132aa87f2f3e7fff62d7211a86b769f3' + '801c254c28402df0c5fb5e2615817a6d' + 'b94208fdae537f0b026ee26cede9a946' + '096e3071949d1eedf73faa13a2cf7b7e' + 'e27e715b08cc6a35988aaa6efab6cc7f' + 'e94d7adb79f38d3fd8119b712b04cc6e' + '1d2e7ca24b9fffafeaf236817fc8cbe9' + '69a9af6536607340a57b54b5562077f7' + '3b4e819497ba695f5c64a0107c2aac8d' + '5a7370a79e563f649f6bf506bc71928c' + 'c480ed571703e68d851fbbcd4aa520be' + '222cec135152c108068baa4e370a3f68' + '93524298efb472503b12ae47c95de399' + '5420c40473f8bf8e5b400dd8a1e54f02' + '1516196f023bb1ae55fd1773a8db9d16' '1f24ab1d39f4a51faf22244c94a6203f' '35c94d2df8893241173de1d16b6034c0' '798b2ffdc8bcfe7bca2cf92b62caf685' @@ -191,11 +190,10 @@ md5sums=('7427ddd5ae63b6ee7aa868201dfbccaa' '9d60b6cfa3ef1926848710bbcd11115b' 'dbaafd21de055e582d92d7d32fe9da13' 'b7b2d0e04e142f26dd96119c80757d1f' - '0520d63c946e272ed3bdfc863fbdc42e' 'bc228237108cab7745897a9f466b6d39' 'eee273f501ff45dc5f1365e78c6d57c0' '43b145db28e6c0d73578ae6fd35e510d' - '4fa96e04b41a6e86774e74a972024b3e') + 'f8a8fdcc58f50560fbc266e28efdbbfe') build() { @@ -219,11 +217,10 @@ build() { cd ${srcdir}/build # buildfixes & bugfixes - patch -Np1 -i ${srcdir}/buildfix_i116795.diff patch -Np1 -i ${srcdir}/buildfix_boost.diff patch -Np1 -i ${srcdir}/buildfix_ct2n.diff patch -Np0 -i ${srcdir}/vbahelper.visibility.patch - patch -Np0 -i ${srcdir}/buildfix_bison25.diff + patch -Np1 -i ${srcdir}/0001-fix-configure-without-the-optional-translations-modu.patch # unset C(XX)FLAGS # http://www.openoffice.org/issues/show_bug.cgi?id=103205 @@ -461,14 +458,27 @@ package_libreoffice() { package_libreoffice-sdk() { pkgdesc="Software development kit for LibreOffice" - depends=('libreoffice' 'gcc-libs' 'sh') + depends=('libreoffice' 'gcc-libs' 'sh' 'make' 'zip' 'gcc' 'java-environment') cd ${srcdir}/sdk-install cp -r * ${pkgdir} cd ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk - mv setsdkenv_unix setsdkenv_unix.sh && chmod 755 setsdkenv_unix.sh - rm -f ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk/setsdkenv_unix.{csh,sh}.in + cp setsdkenv_unix setsdkenv_unix.sh && chmod 755 setsdkenv_unix{,.sh} + + # fix ArchLinux LIbreOffice installation paths + sed -i -e "s,@OO_SDK_NAME@,libreoffice-sdk," \ + -e "s,@OO_SDK_HOME@,/usr/lib/libreoffice/basis3.4/sdk," \ + -e "s,@OFFICE_HOME@,/usr/lib/libreoffice," \ + -e "s,@OFFICE_BASE_HOME@,/usr/lib/libreoffice/basis3.4," \ + -e "s,@OO_SDK_URE_HOME@,/usr/lib/libreoffice/ure," \ + -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \ + -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \ + -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \ + -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \ + -e "s,@OO_SDK_JAVA_HOME@,\$J2SDKDIR," \ + -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \ + -e "s,@SDK_AUTO_DEPLOYMENT@,NO," setsdkenv_unix.{csh,sh}.in #fix permissions find examples -type f -exec chmod -x {} \; } diff --git a/extra/libvorbis/PKGBUILD b/extra/libvorbis/PKGBUILD index ee072dd30..2c7b35a34 100644 --- a/extra/libvorbis/PKGBUILD +++ b/extra/libvorbis/PKGBUILD @@ -5,7 +5,7 @@ pkgname=libvorbis pkgver=1.3.2 -pkgrel=1 +pkgrel=2 pkgdesc="Vorbis codec library" arch=('i686' 'x86_64' 'mips64el') license=('custom') @@ -18,7 +18,11 @@ md5sums=('c870b9bd5858a0ecb5275c14486d9554') build() { cd ${srcdir}/${pkgname}-${pkgver} #-march=i686 optimizes too much, strip it out - CFLAGS=${CFLAGS/-march=$CARCH} ./configure --prefix=/usr --disable-static + if [ "$CARCH" = "mips64el" ]; then + CFLAGS=${CFLAGS/loongson2f/mips3} ./configure --prefix=/usr --disable-static + else + CFLAGS=${CFLAGS/-march=$CARCH} ./configure --prefix=/usr --disable-static + fi make } diff --git a/extra/mediastreamer/PKGBUILD b/extra/mediastreamer/PKGBUILD new file mode 100644 index 000000000..1a97bc8aa --- /dev/null +++ b/extra/mediastreamer/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 129367 2011-06-27 05:48:53Z andrea $ +# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Adrià Arrufat <swiftscythe@gmail.com> + +pkgname=mediastreamer +pkgver=2.7.3 +pkgrel=3 +pkgdesc="A library written in C that allows you to create and run audio and video streams" +arch=('i686' 'x86_64') +url="http://www.linphone.org" +license=('GPL') +depends=('ortp' 'speex' 'v4l-utils' 'ffmpeg') +makedepends=('cmake' 'automoc4') +source=("http://download-mirror.savannah.gnu.org/releases/linphone/${pkgname}/${pkgname}-${pkgver}.tar.gz" + "disable-v4l1.patch") +md5sums=('5213307f557d86aa648f1a53a885138c' + '7ee15689eed1adbdcf0ddab8fadca34a') +options=('!libtool') + +build() { + cd "${srcdir}"/$pkgname-$pkgver/ + patch -p2 -i "${srcdir}"/disable-v4l1.patch + + ./configure --prefix=/usr \ + --libexecdir=/usr/lib/mediastreamer/ + make +} + +package() { + cd "${srcdir}"/$pkgname-$pkgver + make DESTDIR="${pkgdir}" install +} diff --git a/extra/mediastreamer/disable-v4l1.patch b/extra/mediastreamer/disable-v4l1.patch new file mode 100644 index 000000000..9f6cb84d4 --- /dev/null +++ b/extra/mediastreamer/disable-v4l1.patch @@ -0,0 +1,50 @@ +diff -wbBur linphone-3.4.3/mediastreamer2/src/Makefile.am linphone-3.4.3.my/mediastreamer2/src/Makefile.am +--- linphone-3.4.3/mediastreamer2/src/Makefile.am 2011-02-09 08:43:11.000000000 +0000 ++++ linphone-3.4.3.my/mediastreamer2/src/Makefile.am 2011-04-01 14:54:04.000000000 +0000 +@@ -117,7 +117,7 @@ + endif + + if BUILD_V4L +-libmediastreamer_la_SOURCES+=msv4l.c msv4l2.c ++libmediastreamer_la_SOURCES+=msv4l2.c + endif + + if BUILD_WIN32 +diff -wbBur linphone-3.4.3/mediastreamer2/src/Makefile.in linphone-3.4.3.my/mediastreamer2/src/Makefile.in +--- linphone-3.4.3/mediastreamer2/src/Makefile.in 2011-03-28 18:34:07.000000000 +0000 ++++ linphone-3.4.3.my/mediastreamer2/src/Makefile.in 2011-04-01 14:55:00.000000000 +0000 +@@ -54,7 +54,7 @@ + @BUILD_MACAQSND_TRUE@am__append_12 = aqsnd.c + @BUILD_PULSEAUDIO_TRUE@am__append_13 = pulseaudio.c + @BUILD_MACOSX_TRUE@@BUILD_VIDEO_TRUE@am__append_14 = msv4m.m +-@BUILD_V4L_TRUE@@BUILD_VIDEO_TRUE@am__append_15 = msv4l.c msv4l2.c ++@BUILD_V4L_TRUE@@BUILD_VIDEO_TRUE@am__append_15 = msv4l2.c + @BUILD_VIDEO_TRUE@@BUILD_WIN32_TRUE@am__append_16 = msdscap-mingw.cc drawdib-display.c + @BUILD_THEORA_TRUE@@BUILD_VIDEO_TRUE@am__append_17 = theora.c + @BUILD_FFMPEG_TRUE@@BUILD_VIDEO_TRUE@am__append_18 = videoenc.c \ +@@ -135,7 +135,7 @@ + audiostream.c msspeex.c speexec.c gsm.c winsnd3.c \ + msfileplayer_win.c msfilerec_win.c msfileplayer.c msfilerec.c \ + msresample.c alsa.c oss.c arts.c pasnd.c macsnd.c msiounit.c \ +- aqsnd.c pulseaudio.c msv4m.m msv4l.c msv4l2.c msdscap-mingw.cc \ ++ aqsnd.c pulseaudio.c msv4m.m msv4l2.c msdscap-mingw.cc \ + drawdib-display.c theora.c videoenc.c videodec.c pixconv.c \ + sizeconv.c nowebcam.c nowebcam.h swscale.h ffmpeg-priv.h \ + h264dec.c jpegwriter.c videoout.c x11video.c rfc2429.h \ +@@ -156,7 +156,7 @@ + @BUILD_MACAQSND_TRUE@am__objects_12 = aqsnd.lo + @BUILD_PULSEAUDIO_TRUE@am__objects_13 = pulseaudio.lo + @BUILD_MACOSX_TRUE@@BUILD_VIDEO_TRUE@am__objects_14 = msv4m.lo +-@BUILD_V4L_TRUE@@BUILD_VIDEO_TRUE@am__objects_15 = msv4l.lo msv4l2.lo ++@BUILD_V4L_TRUE@@BUILD_VIDEO_TRUE@am__objects_15 = msv4l2.lo + @BUILD_VIDEO_TRUE@@BUILD_WIN32_TRUE@am__objects_16 = msdscap-mingw.lo \ + @BUILD_VIDEO_TRUE@@BUILD_WIN32_TRUE@ drawdib-display.lo + @BUILD_THEORA_TRUE@@BUILD_VIDEO_TRUE@am__objects_17 = theora.lo +@@ -600,7 +600,6 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mssndcard.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msspeex.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msticker.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msv4l.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msv4l2.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msv4m.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvideo.Plo@am__quote@ diff --git a/extra/mod_perl/PKGBUILD b/extra/mod_perl/PKGBUILD index 126d47d41..cb74e10f6 100644 --- a/extra/mod_perl/PKGBUILD +++ b/extra/mod_perl/PKGBUILD @@ -1,13 +1,13 @@ -# $Id: PKGBUILD 119582 2011-04-12 15:02:19Z angvp $ +# $Id: PKGBUILD 129570 2011-06-28 22:45:51Z angvp $ # Maintainer: Firmicus <francois.archlinux.org> # Contributor: Tom K <tomk@runbox.com> pkgname=mod_perl pkgver=2.0.5 -pkgrel=1 +pkgrel=6 pkgdesc="Apache module that embeds the Perl interpreter within the server" -url="http://search.cpan.org/dist/${_realname}/" -depends=('perl=5.12.3' 'apache' 'db' 'apr-util') +url="http://search.cpan.org/dist/${pkgname}/" +depends=('perl' 'apache' 'db' 'apr-util' 'perl-linux-pid') license=('APACHE') arch=('i686' 'x86_64' 'mips64el') options=(!emptydirs) diff --git a/extra/neon/PKGBUILD b/extra/neon/PKGBUILD index bcfd1aa15..bd8df5b44 100644 --- a/extra/neon/PKGBUILD +++ b/extra/neon/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 124952 2011-05-25 12:20:04Z andrea $ +# $Id: PKGBUILD 129362 2011-06-27 05:41:06Z andrea $ # Maintainer: # Contributor: Tom Newsom <Jeepster@gmx.co.uk> # Contributor: Juergen Hoetzel <juergen@archlinux.org> pkgname=neon pkgver=0.29.6 -pkgrel=1 +pkgrel=2 pkgdesc="HTTP and WebDAV client library with a C interface" arch=('i686' 'x86_64' 'mips64el') license=('GPL' 'LGPL') @@ -24,6 +24,9 @@ build() { --with-ssl=openssl \ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt make + + # fix invalid .so links in man pages (FS#24902) + sed -i '/^\.so/s|\.so \([^.]\+\)\.\([[:digit:]]\)|.so man\2/\1.\2|' doc/man/* } package() { diff --git a/extra/net-snmp/PKGBUILD b/extra/net-snmp/PKGBUILD index ff3994394..a765a3d05 100644 --- a/extra/net-snmp/PKGBUILD +++ b/extra/net-snmp/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 112465 2011-03-05 03:33:40Z eric $ +# $Id: PKGBUILD 125239 2011-05-25 19:13:43Z foutrelis $ # Maintainer: Eric Belanger <eric@archlinux.org> # Contributor: Dale Blount <dale@archlinux.org> pkgname=net-snmp pkgver=5.6.1 -pkgrel=1 +pkgrel=2 pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6" arch=('i686' 'x86_64' 'mips64el') url="http://www.net-snmp.org/" @@ -18,7 +18,8 @@ provides=('ucd-snmp') options=('!libtool' '!makeflags' '!emptydirs') source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" 'snmpd.rc') -md5sums=('b4e30ead5783b0bb1d280172c6095ea4' '9f0d13676ba1fae1eb7eb178edd85b43') +md5sums=('b4e30ead5783b0bb1d280172c6095ea4' + '9f0d13676ba1fae1eb7eb178edd85b43') sha1sums=('45bbf1295253d5379a5d1efd918593160387fd00' '2c679b564a2c319d9ce2714a9776aa0e6d89c60a') build() { diff --git a/extra/pango-perl/PKGBUILD b/extra/pango-perl/PKGBUILD index f3703c36d..66abfb0c8 100644 --- a/extra/pango-perl/PKGBUILD +++ b/extra/pango-perl/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 104909 2011-01-05 14:41:37Z jgc $ +# $Id: PKGBUILD 124899 2011-05-25 01:24:25Z foutrelis $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=pango-perl _realname=Pango pkgver=1.221 -pkgrel=3 +pkgrel=4 pkgdesc="Perl bindings for Pango" arch=(i686 x86_64 'mips64el') license=('LGPL') diff --git a/extra/perl-alien-sdl/PKGBUILD b/extra/perl-alien-sdl/PKGBUILD index ae6d4e5de..196c93a9c 100644 --- a/extra/perl-alien-sdl/PKGBUILD +++ b/extra/perl-alien-sdl/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 112695 2011-03-06 00:40:04Z heftig $ +# $Id: PKGBUILD 124820 2011-05-24 15:44:07Z heftig $ # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Allan McRae <allan@archlinux.org> # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> @@ -8,7 +8,7 @@ pkgname=perl-alien-sdl _realname=Alien-SDL -pkgver=1.425 +pkgver=1.426 pkgrel=1 pkgdesc="Building, finding and using SDL binaries" arch=(i686 x86_64 'mips64el') @@ -18,7 +18,7 @@ depends=(sdl=1.2.14 perl-file-sharedir perl-capture-tiny) makedepends=(perl-file-which perl-text-patch) options=(!emptydirs) source=(http://search.cpan.org/CPAN/authors/id/F/FR/FROGGS/$_realname-$pkgver.tar.gz) -md5sums=('c6adaa35ea0779740950de36c8a8ffe2') +md5sums=('ab5e1167934418f4a7b3285a9d05c89b') package() { cd "$srcdir/$_realname-$pkgver" diff --git a/extra/perl-bit-vector/PKGBUILD b/extra/perl-bit-vector/PKGBUILD index 7a6f8c0e8..39a4cf8fa 100644 --- a/extra/perl-bit-vector/PKGBUILD +++ b/extra/perl-bit-vector/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100723 2010-11-25 17:21:16Z kevin $ +# $Id: PKGBUILD 125243 2011-05-25 19:15:01Z foutrelis $ # Maintainer: Kevin Piche <kevin@archlinux.org> # Contributor: K. Piche <kpiche@rogers.com> pkgname=perl-bit-vector _cpanname=Bit-Vector pkgver=7.1 -pkgrel=2 +pkgrel=3 pkgdesc='Efficient bit vector, set of integers and "big int" math library' arch=(i686 x86_64 'mips64el') license=('GPL' 'LGPL' 'PerlArtistic') diff --git a/extra/perl-compress-bzip2/PKGBUILD b/extra/perl-compress-bzip2/PKGBUILD index d73758aa2..04eb676bf 100644 --- a/extra/perl-compress-bzip2/PKGBUILD +++ b/extra/perl-compress-bzip2/PKGBUILD @@ -1,14 +1,14 @@ -# $Id: PKGBUILD 112695 2011-03-06 00:40:04Z heftig $ +# $Id: PKGBUILD 127799 2011-06-18 15:54:27Z ibiru $ # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> pkgname=perl-compress-bzip2 _realname=Compress-Bzip2 pkgver=2.09 -pkgrel=1 +pkgrel=3 pkgdesc="Interface to Bzip2 compression library" arch=(i686 x86_64 'mips64el') license=(GPL2) depends=(perl bzip2) -url='http://search.cpan.org/dist/$_realname' +url="http://search.cpan.org/dist/$_realname" options=('!emptydirs') source=("http://search.cpan.org/CPAN/authors/id/A/AR/ARJAY/$_realname-$pkgver.tar.gz") md5sums=('1699fde3e86f2a036f135ae606d456bf') diff --git a/extra/perl-crypt-ssleay/PKGBUILD b/extra/perl-crypt-ssleay/PKGBUILD index 8b707dbdb..9b055e50c 100644 --- a/extra/perl-crypt-ssleay/PKGBUILD +++ b/extra/perl-crypt-ssleay/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 103974 2010-12-24 20:16:07Z kevin $ +# $Id: PKGBUILD 125246 2011-05-25 19:15:29Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: François Charette <firmicus ατ gmx δοτ net> pkgname=perl-crypt-ssleay pkgver=0.58 -pkgrel=2 +pkgrel=3 pkgdesc="OpenSSL glue that provides LWP https support" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/dist/Crypt-SSLeay" diff --git a/extra/perl-dbd-mysql/PKGBUILD b/extra/perl-dbd-mysql/PKGBUILD index b046d16ee..8c7987ea3 100644 --- a/extra/perl-dbd-mysql/PKGBUILD +++ b/extra/perl-dbd-mysql/PKGBUILD @@ -1,29 +1,44 @@ -# $Id: PKGBUILD 115053 2011-03-16 15:26:25Z andrea $ +# $Id: PKGBUILD 125309 2011-05-25 19:54:00Z remy $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Eric Johnson <eric@coding-zone.com> pkgname=perl-dbd-mysql _realname=DBD-mysql -pkgver=4.018 -pkgrel=2 +pkgver=4.019 +pkgrel=1 pkgdesc="Perl/CPAN DBD::mysql module for interacting with MySQL via DBD" arch=(i686 x86_64 'mips64el') license=('GPL' 'PerlArtistic') url="http://search.cpan.org/dist/${_realname}/" -depends=('libmysqlclient' 'perl-dbi' 'perl>=5.10.0') +depends=('libmysqlclient' 'perl-dbi' 'perl>=5.14.0') makedepends=('mysql') options=(!emptydirs) source=(http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/${_realname}-${pkgver}.tar.gz) -md5sums=('d1d4ee2f20910d6491d1b6216471b2f1') +md5sums=('566d98ab8ffac9626a31f6f6d455558e') build() { cd ${srcdir}/${_realname}-${pkgver} # install module in vendor directories. - perl Makefile.PL INSTALLDIRS=vendor + perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql make } +check() { + cd ${srcdir}/${_realname}-${pkgver} + mkdir -p /tmp/mysql_test + mysql_install_db \ + --basedir=/usr \ + --datadir=/tmp/mysql_test + mysqld -P 17999 \ + --socket=/tmp/socket.mysql \ + --datadir=/tmp/mysql_test & + sleep 10 + DAEMON_PORT=$! + make test || true + kill -9 $DAEMON_PORT +} + package() { cd ${srcdir}/${_realname}-${pkgver} make install DESTDIR=${pkgdir} diff --git a/extra/perl-dbd-sqlite/PKGBUILD b/extra/perl-dbd-sqlite/PKGBUILD index 6adfb29bf..b09ab358f 100644 --- a/extra/perl-dbd-sqlite/PKGBUILD +++ b/extra/perl-dbd-sqlite/PKGBUILD @@ -1,17 +1,16 @@ -# $Id: PKGBUILD 100851 2010-11-26 00:50:08Z kevin $ +# $Id: PKGBUILD 125249 2011-05-25 19:15:53Z foutrelis $ # Contributor: Tom Killian <tomk@runbox.com> # Contributor: francois at archlinux dot org pkgname=perl-dbd-sqlite _cpanname=DBD-SQLite pkgver=1.31 -pkgrel=1 +pkgrel=2 pkgdesc="Self-contained RDBMS in a DBI driver" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/dist/${_cpanname}" license=('GPL' 'PerlArtistic') depends=('perl-dbi>=1.61' 'sqlite3') -makedepends=('perl-pathtools>=0.82') options=('!emptydirs') source=(http://www.cpan.org/authors/id/A/AD/ADAMK/${_cpanname}-${pkgver}.tar.gz) md5sums=('67b3575104efd606c8093bc416e3338d') diff --git a/extra/perl-dbi/PKGBUILD b/extra/perl-dbi/PKGBUILD index bee143850..71111f93a 100644 --- a/extra/perl-dbi/PKGBUILD +++ b/extra/perl-dbi/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 105336 2011-01-07 21:29:30Z angvp $ +# $Id: PKGBUILD 124915 2011-05-25 07:47:08Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Matt Thompson <mattt@defunct.ca> pkgname=perl-dbi _realname=DBI pkgver=1.616 -pkgrel=1 +pkgrel=2 pkgdesc="Database independent interface for Perl" arch=(i686 x86_64 'mips64el') license=('GPL' 'PerlArtistic') diff --git a/extra/perl-digest-nilsimsa/PKGBUILD b/extra/perl-digest-nilsimsa/PKGBUILD index 3190d08be..93d9a56da 100644 --- a/extra/perl-digest-nilsimsa/PKGBUILD +++ b/extra/perl-digest-nilsimsa/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100551 2010-11-24 02:25:52Z kevin $ +# $Id: PKGBUILD 125252 2011-05-25 19:16:38Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Manolis Tzanidakis pkgname=perl-digest-nilsimsa _realname=Digest-Nilsimsa pkgver=0.06 -pkgrel=6 +pkgrel=7 pkgdesc="Perl version of Nilsimsa code." arch=('i686' 'x86_64' 'mips64el') license=('LGPL') diff --git a/extra/perl-digest-sha1/PKGBUILD b/extra/perl-digest-sha1/PKGBUILD index 2804647eb..f6218022a 100644 --- a/extra/perl-digest-sha1/PKGBUILD +++ b/extra/perl-digest-sha1/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100547 2010-11-24 02:18:32Z kevin $ +# $Id: PKGBUILD 125255 2011-05-25 19:17:02Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Manolis Tzanidakis pkgname=perl-digest-sha1 _realname=Digest-SHA1 pkgver=2.13 -pkgrel=1 +pkgrel=2 pkgdesc="Perl interface to the SHA-1 Algorithm" arch=(i686 x86_64 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-event/PKGBUILD b/extra/perl-event/PKGBUILD index 0913209d1..056a22ba8 100644 --- a/extra/perl-event/PKGBUILD +++ b/extra/perl-event/PKGBUILD @@ -1,20 +1,20 @@ -# $Id: PKGBUILD 100545 2010-11-24 01:37:38Z kevin $ +# $Id: PKGBUILD 125258 2011-05-25 19:17:24Z foutrelis $ # Maintainer: tobias <tobias@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> # Contributor: François Charette <francois.archlinux.org> pkgname=perl-event _srcname=Event -pkgver=1.13 -pkgrel=3 +pkgver=1.17 +pkgrel=1 pkgdesc="Framework for GUI events" arch=('i686' 'x86_64' 'mips64el') license=('PerlArtistic' 'GPL') url="http://search.cpan.org/dist/${_srcname}/" -depends=('perl>=5.10.0') +depends=('perl') options=(!emptydirs) source=(http://search.cpan.org/CPAN/authors/id/J/JP/JPRIT/${_srcname}-${pkgver}.tar.gz) -md5sums=('88cf5bb6b4b06e016072a5ff2ff8fa1a') +md5sums=('c58cdf7c56cd5f10a58b234d2c81295f') build() { cd "${srcdir}/${_srcname}-${pkgver}" diff --git a/extra/perl-fcgi/PKGBUILD b/extra/perl-fcgi/PKGBUILD index eaa521149..61784de7e 100644 --- a/extra/perl-fcgi/PKGBUILD +++ b/extra/perl-fcgi/PKGBUILD @@ -1,31 +1,31 @@ -# $Id: PKGBUILD 101395 2010-11-29 01:59:43Z kevin $ +# $Id: PKGBUILD 125303 2011-05-25 19:27:52Z remy $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: François Charette <firmicus ατ gmx δοτ net> pkgname=perl-fcgi -pkgver=0.71 -pkgrel=3 +pkgver=0.72 +pkgrel=1 pkgdesc="Fast CGI" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/dist/FCGI" license=('GPL' 'PerlArtistic') -depends=('perl') +depends=('perl>=5.14') options=('!emptydirs') source=(http://www.cpan.org/CPAN/authors/id/F/FL/FLORA/FCGI-${pkgver}.tar.gz) -md5sums=('26bc4ea53ccc9c9c16695e88e46a1cfb') +md5sums=('7b793e177caa93d972c6fb7ebe7c7ae1') build() { cd "${srcdir}/FCGI-${pkgver}" - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor make +} + +check() { + cd "${srcdir}/FCGI-${pkgver}" make test } package() { cd "${srcdir}/FCGI-${pkgver}" make install DESTDIR="${pkgdir}" - - find ${pkgdir} -name '.packlist' -delete - find ${pkgdir} -name '*.pod' -delete } diff --git a/extra/perl-html-parser/PKGBUILD b/extra/perl-html-parser/PKGBUILD index b2dd0537e..6d43f820d 100644 --- a/extra/perl-html-parser/PKGBUILD +++ b/extra/perl-html-parser/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 100913 2010-11-26 16:20:58Z kevin $ +# $Id: PKGBUILD 125261 2011-05-25 19:17:47Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Manolis Tzanidakis # Contributor: Firmicus <francois.archlinux.org> @@ -6,7 +6,7 @@ pkgname=perl-html-parser _realname=HTML-Parser pkgver=3.68 -pkgrel=1 +pkgrel=2 pkgdesc="Perl HTML parser class" arch=('i686' 'x86_64' 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-libintl-perl/PKGBUILD b/extra/perl-libintl-perl/PKGBUILD index ab08900f8..e7061cdba 100644 --- a/extra/perl-libintl-perl/PKGBUILD +++ b/extra/perl-libintl-perl/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100859 2010-11-26 01:58:35Z kevin $ +# $Id: PKGBUILD 125264 2011-05-25 19:18:10Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> pkgname=perl-libintl-perl _realname=libintl-perl pkgver=1.20 -pkgrel=2 +pkgrel=3 pkgdesc="Perl Module: Localization support" arch=('i686' 'x86_64' 'mips64el') license=('LGPL') diff --git a/extra/perl-locale-gettext/PKGBUILD b/extra/perl-locale-gettext/PKGBUILD index 936edf055..7f320215a 100644 --- a/extra/perl-locale-gettext/PKGBUILD +++ b/extra/perl-locale-gettext/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 103982 2010-12-24 20:55:26Z kevin $ +# $Id: PKGBUILD 125267 2011-05-25 19:18:48Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Mark Rosenstand <mark@borkware.net> # Contributor: Paul Mattal <paul@archlinux.org> @@ -6,7 +6,7 @@ pkgname=perl-locale-gettext _realname=gettext pkgver=1.05 -pkgrel=6 +pkgrel=7 pkgdesc="Permits access from Perl to the gettext() family of functions" arch=('i686' 'x86_64' 'mips64el') license=('GPL' 'PerlArtistic') diff --git a/extra/perl-net-dns/PKGBUILD b/extra/perl-net-dns/PKGBUILD index 686198068..b676b2524 100644 --- a/extra/perl-net-dns/PKGBUILD +++ b/extra/perl-net-dns/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100863 2010-11-26 02:27:59Z kevin $ +# $Id: PKGBUILD 125273 2011-05-25 19:19:34Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Manolis Tzanidakis pkgname=perl-net-dns _realname=Net-DNS pkgver=0.66 -pkgrel=3 +pkgrel=4 pkgdesc="Perl Module: Interface to the DNS resolver." arch=(i686 x86_64 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-net-ssleay/PKGBUILD b/extra/perl-net-ssleay/PKGBUILD index 0a78499f8..39325115f 100644 --- a/extra/perl-net-ssleay/PKGBUILD +++ b/extra/perl-net-ssleay/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 102842 2010-12-12 08:25:28Z angvp $ +# $Id: PKGBUILD 125276 2011-05-25 19:20:00Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Manolis Tzanidakis pkgname=perl-net-ssleay _cpanname=Net-SSLeay pkgver=1.36 -pkgrel=4 +pkgrel=5 pkgdesc="Perl extension for using OpenSSL" arch=('i686' 'x86_64' 'mips64el') license=('custom:BSD') diff --git a/extra/perl-net-upnp/PKGBUILD b/extra/perl-net-upnp/PKGBUILD index db2fb5ad0..e6187ebf1 100644 --- a/extra/perl-net-upnp/PKGBUILD +++ b/extra/perl-net-upnp/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 102845 2010-12-12 08:32:04Z angvp $ +# $Id: PKGBUILD 125279 2011-05-25 19:20:27Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Drew Gilbert <gilbert dot drew at gmail dot com> pkgname=perl-net-upnp pkgver=1.4.2 -pkgrel=2 +pkgrel=3 pkgdesc="Perl Module UPnP" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/~skonno/Net-UPnP-1.4.2/" diff --git a/extra/perl-netaddr-ip/PKGBUILD b/extra/perl-netaddr-ip/PKGBUILD index ea543e2c2..33fb57a58 100644 --- a/extra/perl-netaddr-ip/PKGBUILD +++ b/extra/perl-netaddr-ip/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 100919 2010-11-26 17:02:08Z kevin $ +# $Id: PKGBUILD 125270 2011-05-25 19:19:11Z foutrelis $ # Maintainer: Dale Blount <dale@archlinux.org> # Contributor: Dale Blount <dale@archlinux.org> # Contributor: Francois Charette <francois.archlinux.org> @@ -6,7 +6,7 @@ pkgname=perl-netaddr-ip _realname=NetAddr-IP pkgver=4.037 -pkgrel=1 +pkgrel=2 pkgdesc="Perl module to manage IP addresses and subnets" arch=(i686 x86_64 'mips64el') license=('PerlArtistic' 'GPL') diff --git a/extra/perl-sdl/PKGBUILD b/extra/perl-sdl/PKGBUILD index eb1f7ed45..ba580e6ee 100644 --- a/extra/perl-sdl/PKGBUILD +++ b/extra/perl-sdl/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 112695 2011-03-06 00:40:04Z heftig $ +# $Id: PKGBUILD 127524 2011-06-15 21:01:17Z remy $ # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Allan McRae <allan@archlinux.org> # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> pkgname=perl-sdl pkgver=2.531 -pkgrel=1 +pkgrel=3 pkgdesc="Simple DirectMedia Layer for Perl" arch=(i686 x86_64 'mips64el') license=(LGPL) @@ -20,12 +20,21 @@ provides=("sdl_perl=$pkgver") source=(http://search.cpan.org/CPAN/authors/id/G/GA/GARU/SDL-$pkgver.tar.gz) md5sums=('ed39c87ae685d3a933705a2ea82a9e18') -package() { +build() { cd "$srcdir/SDL-$pkgver" - + # Perl selects the proper CFLAGS set for binary modules + unset CFLAGS # install module in vendor directories - perl Build.PL installdirs=vendor destdir="$pkgdir" - + perl Build.PL installdirs=vendor perl Build - perl Build install +} + +check() { + cd "$srcdir/SDL-$pkgver" + perl Build test || true +} + +package() { + cd "$srcdir/SDL-$pkgver" + perl Build install destdir="$pkgdir" } diff --git a/extra/perl-template-toolkit/PKGBUILD b/extra/perl-template-toolkit/PKGBUILD index d10158746..7e1d939cf 100644 --- a/extra/perl-template-toolkit/PKGBUILD +++ b/extra/perl-template-toolkit/PKGBUILD @@ -5,7 +5,7 @@ pkgname=perl-template-toolkit _realname=Template-Toolkit pkgver=2.22 -pkgrel=3 +pkgrel=4 pkgdesc="Perl template processing system" arch=(i686 x86_64 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-term-readkey/PKGBUILD b/extra/perl-term-readkey/PKGBUILD index 862c10d82..8b05c1357 100644 --- a/extra/perl-term-readkey/PKGBUILD +++ b/extra/perl-term-readkey/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 100930 2010-11-26 17:19:14Z kevin $ +# $Id: PKGBUILD 125285 2011-05-25 19:22:27Z foutrelis $ # Maintainer: kevin <kevin@archlinux.org> # Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org> # Contributor: Francois Charette <francois.archlinux.org> @@ -6,7 +6,7 @@ pkgname=perl-term-readkey _realname=TermReadKey pkgver=2.30.01 -pkgrel=3 +pkgrel=4 pkgdesc="Provides simple control over terminal driver modes" arch=('i686' 'x86_64' 'mips64el') license=('custom') diff --git a/extra/perl-text-iconv/PKGBUILD b/extra/perl-text-iconv/PKGBUILD index 5ceddd605..f53a5babb 100644 --- a/extra/perl-text-iconv/PKGBUILD +++ b/extra/perl-text-iconv/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 100932 2010-11-26 17:44:01Z kevin $ +# $Id: PKGBUILD 125288 2011-05-25 19:22:57Z foutrelis $ # Maintainer: # Contributor: Francois Charette <firmicus@gmx.net> pkgname=perl-text-iconv _realname=Text-Iconv pkgver=1.7 -pkgrel=5 +pkgrel=6 pkgdesc="Interface to iconv codeset conversion" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/dist/${_realname}/" diff --git a/extra/perl-time-hires/PKGBUILD b/extra/perl-time-hires/PKGBUILD index d3c6eedf5..196430b4c 100644 --- a/extra/perl-time-hires/PKGBUILD +++ b/extra/perl-time-hires/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 102848 2010-12-12 08:36:02Z angvp $ +# $Id: PKGBUILD 125291 2011-05-25 19:23:52Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: mezcal <fila at pruda dot com> pkgname=perl-time-hires pkgver=1.9721 -pkgrel=3 +pkgrel=4 pkgdesc="Perl module: high resolution time, sleep, and alarm" arch=('i686' 'x86_64' 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-tk/PKGBUILD b/extra/perl-tk/PKGBUILD index b3ba41cd3..4fbeb965a 100644 --- a/extra/perl-tk/PKGBUILD +++ b/extra/perl-tk/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 102852 2010-12-12 10:35:16Z remy $ +# $Id: PKGBUILD 124660 2011-05-23 20:07:22Z remy $ # Maintainer: François Charette <francois ατ archlinux δοτ org> # Contributor: Jason Chu <jchu@xentac.net> # Contributor: Juergen Hoetzel <juergen@archlinux.org> @@ -6,7 +6,7 @@ pkgname=perl-tk _cpanname=Tk pkgver=804.029 -pkgrel=2 +pkgrel=3 pkgdesc="A graphical user interface toolkit for Perl" arch=('i686' 'x86_64' 'mips64el') url="http://search.cpan.org/dist/${_cpanname}" @@ -27,11 +27,14 @@ build() { make } +#check() { +# cd $srcdir/${_cpanname}-$pkgver +# make test +#} + package() { cd $srcdir/${_cpanname}-$pkgver make install DESTDIR=$pkgdir - find $pkgdir -name '.packlist' -delete - find $pkgdir -name '*.pod' -delete # license install -D -m644 pTk/license.terms \ diff --git a/extra/perl-unicode-string/PKGBUILD b/extra/perl-unicode-string/PKGBUILD index 9c88efc40..d7589af10 100644 --- a/extra/perl-unicode-string/PKGBUILD +++ b/extra/perl-unicode-string/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 101387 2010-11-29 01:27:16Z kevin $ +# $Id: PKGBUILD 125294 2011-05-25 19:24:14Z foutrelis $ # Maintainer: James Rayner <iphitus@gmail.com> # Contributor: Andrew Simmons <andrew.simmons@gmail.com> pkgname=perl-unicode-string _realname=Unicode-String pkgver=2.09 -pkgrel=5 +pkgrel=6 pkgdesc="String of Unicode characters for perl (UCS2/UTF16)" arch=('i686' 'x86_64' 'mips64el') license=('PerlArtistic') diff --git a/extra/perl-xml-parser/PKGBUILD b/extra/perl-xml-parser/PKGBUILD index 0ecf23cb5..b059f5723 100644 --- a/extra/perl-xml-parser/PKGBUILD +++ b/extra/perl-xml-parser/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 101389 2010-11-29 01:30:43Z kevin $ +# $Id: PKGBUILD 129383 2011-06-27 06:10:42Z andrea $ # Maintainer: # Contributor: firmicus <francois@archlinux.org> # Contributor: dorphell <dorphell@archlinux.org> @@ -6,8 +6,8 @@ pkgname=perl-xml-parser _realname=XML-Parser -pkgver=2.40 -pkgrel=2 +pkgver=2.41 +pkgrel=1 pkgdesc="Expat-based XML parser module for perl" arch=('i686' 'x86_64' 'mips64el') license=('GPL' 'PerlArtistic') @@ -16,8 +16,8 @@ depends=('perl' 'expat') replaces=('perlxml') provides=("perlxml=${pkgver}") options=('!emptydirs') -source=("http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/${_realname}-${pkgver}.tar.gz") -md5sums=('c66e9adba003d0667cc40115ccd837a5') +source=("http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/${_realname}-${pkgver}.tar.gz") +md5sums=('c320d2ffa459e6cdc6f9f59c1185855e') build() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/extra/perl-yaml-syck/PKGBUILD b/extra/perl-yaml-syck/PKGBUILD index ac6c8fc57..e772c2bbb 100644 --- a/extra/perl-yaml-syck/PKGBUILD +++ b/extra/perl-yaml-syck/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 101391 2010-11-29 01:38:44Z kevin $ +# $Id: PKGBUILD 125297 2011-05-25 19:24:39Z foutrelis $ # This PKGBUILD was generated by cpan4pacman via CPANPLUS::Dist::Pacman # Maintainer: kevin <kevin@archlinux.org> pkgname=perl-yaml-syck _realname=YAML-Syck pkgver=1.17 -pkgrel=1 +pkgrel=2 pkgdesc="Fast, lightweight YAML loader and dumper" arch=('i686' 'x86_64' 'mips64el') license=('custom') diff --git a/extra/pidgin/PKGBUILD b/extra/pidgin/PKGBUILD index 0d939ffd2..91e94bb66 100644 --- a/extra/pidgin/PKGBUILD +++ b/extra/pidgin/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 128509 2011-06-24 07:30:26Z foutrelis $ +# $Id: PKGBUILD 128517 2011-06-24 07:46:40Z foutrelis $ # Maintainer: Evangelos Foutras <foutrelis@gmail.com> # Contributor: Ionut Biru <ibiru@archlinux.org> # Contributor: Andrea Scarpino <andrea@archlinux.org> @@ -7,7 +7,7 @@ pkgname=('pidgin' 'libpurple' 'finch') pkgver=2.9.0 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url="http://pidgin.im/" license=('GPL') diff --git a/extra/pixman/PKGBUILD b/extra/pixman/PKGBUILD index bf392b456..3c842ff4b 100644 --- a/extra/pixman/PKGBUILD +++ b/extra/pixman/PKGBUILD @@ -4,18 +4,22 @@ pkgname=pixman pkgver=0.22.0 -pkgrel=1 +pkgrel=2 pkgdesc="Pixman library" arch=(i686 x86_64 'mips64el') url="http://xorg.freedesktop.org" license=('custom') depends=('glibc') options=('!libtool') -source=(http://xorg.freedesktop.org/releases/individual/lib/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('d24ea233755d7dce9f0d93136ad99fba8d4e4fa0') +source=(http://xorg.freedesktop.org/releases/individual/lib/${pkgname}-${pkgver}.tar.bz2 + pixman-loongson2f.patch) +sha1sums=('d24ea233755d7dce9f0d93136ad99fba8d4e4fa0' + 'ce4d69ea341f21fdc30f6d401ee479cd3571dab3') build() { cd "${srcdir}/${pkgname}-${pkgver}" + [ "$CARCH" = "mips64el" ] && patch -Np1 -i $srcdir/pixman-loongson2f.patch + autoreconf -i ./configure --prefix=/usr --disable-static make } diff --git a/extra/pixman/pixman-loongson2f.patch b/extra/pixman/pixman-loongson2f.patch new file mode 100644 index 000000000..15e01cb6b --- /dev/null +++ b/extra/pixman/pixman-loongson2f.patch @@ -0,0 +1,2745 @@ +diff -urN pixman//configure.ac Pixman.Loongson//configure.ac +--- pixman//configure.ac 2010-12-25 18:46:00.018699000 +0800 ++++ Pixman.Loongson//configure.ac 2010-12-25 18:39:15.298778000 +0800 +@@ -264,6 +264,43 @@ + ]) + + dnl =========================================================================== ++dnl Check for Loongson SIMD ++ ++have_loongson_intrinsics=no ++AC_MSG_CHECKING(whether to use Loongson SIMD intrinsics) ++ ++AC_COMPILE_IFELSE([ ++#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) ++error "Need GCC >= 4.4 for Loongson SIMD compilation" ++#endif ++int main () { ++ /* Test with a loongson SIMD instruction. */ ++ asm volatile ( ".set arch = loongson2f \n\t" "and \$f0, \$f0, \$f0 \n\t" : : : "cc", "memory" ); ++ return 0; ++}], have_loongson_intrinsics=yes) ++ ++ ++AC_ARG_ENABLE(loongson, ++ [AC_HELP_STRING([--disable-loongson], ++ [disable Loongson fast paths])], ++ [enable_loongson=$enableval], [enable_loongson=auto]) ++ ++if test $enable_loongson = no ; then ++ have_loongson_intrinsics=disabled ++fi ++ ++if test $have_loongson_intrinsics = yes ; then ++ AC_DEFINE(USE_LS, 1, [use Loongson compiler intrinsics]) ++fi ++ ++AC_MSG_RESULT($have_loongson_intrinsics) ++if test $enable_loongson = yes && test $have_loongson_intrinsics = no ; then ++ AC_MSG_ERROR([Loongson intrinsics not detected]) ++fi ++ ++AM_CONDITIONAL(USE_LS, test $have_loongson_intrinsics = yes) ++ ++dnl =========================================================================== + dnl Check for MMX + + if test "x$MMX_CFLAGS" = "x" ; then +diff -urN pixman//pixman/Makefile.am Pixman.Loongson//pixman/Makefile.am +--- pixman//pixman/Makefile.am 2010-12-25 18:46:00.025027000 +0800 ++++ Pixman.Loongson//pixman/Makefile.am 2010-12-25 18:39:15.303599000 +0800 +@@ -55,6 +55,19 @@ + pixman-combine.h.template solaris-hwcap.mapfile pixman-x64-mmx-emulation.h + CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h + ++# loongson code ++if USE_LS ++noinst_LTLIBRARIES += libpixman-ls.la ++libpixman_ls_la_SOURCES = \ ++ pixman-ls.c ++libpixman_ls_la_CFLAGS = $(DEP_CFLAGS) $(LS_CFLAGS) ++libpixman_ls_la_LIBADD = $(DEP_LIBS) ++libpixman_1_la_LDFLAGS += $(LS_LDFLAGS) ++libpixman_1_la_LIBADD += libpixman-ls.la ++ ++ASM_CFLAGS_ls=$(LS_CFLAGS) ++endif ++ + # mmx code + if USE_MMX + noinst_LTLIBRARIES += libpixman-mmx.la +diff -urN pixman//pixman/pixman-combine-ls.c Pixman.Loongson//pixman/pixman-combine-ls.c +--- pixman//pixman/pixman-combine-ls.c 1970-01-01 08:00:00.000000000 +0800 ++++ Pixman.Loongson//pixman/pixman-combine-ls.c 2010-12-25 18:39:15.344171000 +0800 +@@ -0,0 +1,911 @@ ++static force_inline uint32_t ++combine (const uint32_t *src, const uint32_t *mask) ++{ ++ uint32_t ssrc = *src; ++ ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f22) ++ load8888r(%0,$f20) ++ expand_alpha($f22,$f22)
++ pix_multiply($f20,$f22)
++ store8888r($f8,%0) ++ :"+r"(ssrc):"r"(*mask):clobber ++ ); ++ } ++ return ssrc; ++} ++ ++static void ++ls_combine_saturate_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ uint32_t s = combine (src, mask); ++ uint32_t d = *dest; ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f22) ++ load8888r(%0,$f20) ++ :"+r"(d):"r"(s):clobber ++ ); ++ ++ uint32_t sa = s >> 24; ++ uint32_t da = ~d >> 24; ++ ++ if (sa > da) ++ { ++ uint32_t dds = DIV_UN8 (da, sa) << 24; ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ pix_multiply($f22,$f24) ++ save_to($f22) ++ ::"r"(dds):clobber ++ ); ++ } ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ pix_add($f20,$f22) ++ store8888r($f8,%0) ++ :"=r"(*dest)::clobber ++ ); ++ ++ ++src; ++ ++dest; ++ if (mask) ++ mask++; ++ } ++} ++static void ++ls_combine_out_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ negate($f24,$f24) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++ mask++; ++ }else { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ negate($f24,$f24) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++static void ++ls_combine_out_reverse_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f20) ++ negate($f20,$f20) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++ mask++; ++ }else{ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f20) ++ negate($f20,$f20) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ } ++ ++dest; ++ ++src; ++ ++ } ++} ++ ++static void ++ls_combine_out_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f26) ++ negate($f26,$f26) ++ pix_multiply($f20,$f22) ++ save_to($f20) ++ pix_multiply($f20,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++static void ++ls_combine_out_reverse_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f28) ++ pix_multiply($f22,$f28) ++ save_to($f22) ++ negate($f22,$f22) ++ pix_multiply($f24,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++ ++static void ++ls_combine_atop_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f26,$f26) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++ mask++; ++ }else { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f26,$f26) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ } ++ ++dest; ++ ++src; ++ ++ } ++} ++ ++static void ++ls_combine_atop_reverse_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end; ++ ++ end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask){ ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f28,$f28) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ }else{ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f28,$f28) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++ ++static void ++ls_combine_atop_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f26) ++ expand_alpha($f20,$f28) ++ pix_multiply($f20,$f22) ++ save_to($f20) ++ pix_multiply($f22,$f28) ++ save_to($f22) ++ negate($f22,$f22) ++ pix_add_mul($f24,$f22,$f20,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++static void ++ls_combine_atop_reverse_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f26) ++ expand_alpha($f20,$f28) ++ pix_multiply($f20,$f22) ++ save_to($f20) ++ pix_multiply($f22,$f28) ++ save_to($f22) ++ negate($f26,$f26) ++ pix_add_mul($f24,$f22,$f20,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++static void ++ls_combine_xor_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f26,$f26) ++ negate($f28,$f28) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ }else{ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ expand_alpha($f24,$f28) ++ negate($f26,$f26) ++ negate($f28,$f28) ++ pix_add_mul($f20,$f28,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ } ++ ++dest; ++ ++src; ++ ++ } ++} ++ ++static void ++ls_combine_xor_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f26) ++ expand_alpha($f20,$f28) ++ pix_multiply($f20,$f22) ++ save_to($f20) ++ pix_multiply($f22,$f28) ++ save_to($f22) ++ negate($f26,$f26) ++ negate($f22,$f22) ++ pix_add_mul($f24,$f22,$f20,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++ ++static void ++ls_combine_in_reverse_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ pix_multiply($f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ } else { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f26) ++ pix_multiply($f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++static void ++ls_combine_in_reverse_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f20,$f20) ++ pix_multiply($f22,$f20) ++ save_to($f26) ++ pix_multiply($f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} ++ ++static void ++ls_combine_in_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ } else { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ pix_multiply($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++static void ++ls_combine_in_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ expand_alpha($f24,$f24) ++ pix_multiply($f20,$f22) ++ save_to($f26) ++ pix_multiply($f26,$f24) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++ } ++static void ++ls_combine_src_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ pix_multiply($f20,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++mask; ++ ++dest; ++ } ++ ++} ++ ++ ++static void ++ls_combine_over_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ ++ uint32_t ssrc = combine (src, mask); ++ uint32_t a = ssrc >> 24; ++ ++ if (a == 0xff) ++ { ++ *dest = ssrc; ++ } ++ else if (ssrc) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ expand_alpha($f20,$f24) ++ load8888r(%0,$f26) ++ over($f20,$f24,$f26) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(ssrc):clobber ++ ); ++ } ++ ++ ++dest; ++ ++src; ++ if (mask) ++ ++mask; ++ } ++} ++ ++static void ++ls_combine_over_reverse_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f26) ++ expand_alpha($f26,$f28) ++ over($f26,$f28,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ }else{ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f26) ++ expand_alpha($f26,$f28) ++ over($f26,$f28,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++ ++static void ++ls_combine_over_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load8888r(%1,$f22) ++ load8888r(%2,$f24) ++ expand_alpha($f22,$f26) ++ in_over($f22,$f26,$f24,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++ ++} ++ ++static void ++ls_combine_over_reverse_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load8888r(%1,$f22) ++ load8888r(%2,$f24) ++ in($f22,$f24) ++ save_to($f22) ++ expand_alpha($f20,$f28) ++ over($f20,$f28,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++ ++} ++ ++static void ++ls_combine_add_u (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = dest + width; ++ ++ while (dest < end) ++ { ++ ++ if (mask) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f22) ++ load8888r(%1,$f20) ++ expand_alpha($f22,$f22) ++ pix_multiply($f20,$f22) ++ save_to ($f20) ++ ++ load8888r(%0,$f22) ++ pix_add($f20,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ mask++; ++ }else{ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ ++ load8888r(%0,$f22) ++ pix_add($f20,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src):clobber ++ ); ++ ++ } ++ ++dest; ++ ++src; ++ } ++} ++ ++static void ++ls_combine_add_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ uint32_t * dest, ++ const uint32_t * src, ++ const uint32_t * mask, ++ int width) ++{ ++ const uint32_t *end = src + width; ++ ++ while (src < end) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load8888r(%1,$f22) ++ load8888r(%2,$f24) ++ pix_multiply($f22,$f24) ++ save_to($f22) ++ pix_add($f22,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dest):"r"(*src),"r"(*mask):clobber ++ ); ++ ++src; ++ ++dest; ++ ++mask; ++ } ++} +diff -urN pixman//pixman/pixman-composite-ls.c Pixman.Loongson//pixman/pixman-composite-ls.c +--- pixman//pixman/pixman-composite-ls.c 1970-01-01 08:00:00.000000000 +0800 ++++ Pixman.Loongson//pixman/pixman-composite-ls.c 2010-12-25 18:39:15.356667000 +0800 +@@ -0,0 +1,967 @@ ++static void ++ls_composite_over_x888_8_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ ++ uint32_t *src, *src_line; ++ uint32_t *dst, *dst_line; ++ uint8_t *mask, *mask_line; ++ int src_stride, mask_stride, dst_stride; ++ uint32_t m; ++ uint32_t s, d; ++ int32_t w; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ ++ while (height--) ++ { ++ src = src_line; ++ src_line += src_stride; ++ dst = dst_line; ++ dst_line += dst_stride; ++ mask = mask_line; ++ mask_line += mask_stride; ++ ++ w = width; ++ while (w--) ++ { ++ m = *mask++; ++ if (m) ++ { ++ s = *src | 0xff000000; ++ ++ if (m == 0xff) ++ { ++ *dst = s; ++ } ++ else ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load8888r(%1,$f22) ++ load8888r(%2,$f24) ++ expand_alpha($f22,$f26) ++ expand_alpha_rev($f24,$f28) ++ in_over($f22,$f26,$f28,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(s),"r"(m):clobber ++ ); ++ ++// __m64 sa = expand_alpha (s); ++// __m64 vm = expand_alpha_rev (to_m64 (m)); ++// __m64 vdest = in_over (s, sa, vm, load8888 (*dst)); ++// *dst = store8888 (vdest); ++ ++ } ++ } ++ src++; ++ dst++; ++ } ++ } ++} ++ ++ ++ ++ ++ ++static void ++ls_composite_over_8888_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t *dst_line, *dst; ++ uint32_t *src_line, *src; ++ uint32_t s; ++ int dst_stride, src_stride; ++ uint8_t a; ++ int32_t w; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w--) ++ { ++ s = *src; ++ a = s >> 24; ++ ++ if (a == 0xff) ++ { ++ *dst = s; ++ } ++ else if (s) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f24) ++ load8888r(%0,$f20) ++ expand_alpha($f24,$f26) ++ over($f24,$f26,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(*src):clobber ++ ); ++ } ++ dst++; ++ src++; ++ ++ } ++ } ++} ++ ++ ++static void ++ls_composite_over_8888_n_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t *dst_line, *dst; ++ uint32_t *src_line, *src; ++ uint32_t mask; ++ __m64 vmask; ++ int dst_stride, src_stride; ++ int32_t w; ++ __m64 srca; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ ++ mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); ++ mask = mask | mask >> 8 | mask >> 16 | mask >> 24; ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888(%1,$f24) ++ store64a($f24,%0) ++ :"=m"(vmask):"m"(mask):clobber ++ ); ++ ++ srca = ls_4x00ff; ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ load8888r(%0,$f22) ++ expand_alpha($f20,$f28) ++ in_over($f20,$f28,$f24,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(*src):clobber ++ ); ++ ++ w--; ++ dst++; ++ src++; ++ } ++ } ++} ++ ++static void ++ls_composite_over_n_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src; ++ uint32_t *dst_line, *dst; ++ int32_t w; ++ int dst_stride; ++ __m64 vsrc, vsrca; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ if (src == 0) ++ return; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64($f24,%0) ++ expand_alpha($f24,$f26) ++ store64($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ w = width; ++ ++ while (w) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f28) ++ over($f24,$f26,$f28) ++ store8888r($f8,%0) ++ :"+r"(*dst)::clobber ++ ); ++ ++ w--; ++ dst++; ++ } ++ } ++} ++ ++static void ++ls_composite_over_n_8888_8888_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src, srca; ++ uint32_t *dst_line; ++ uint32_t *mask_line; ++ int dst_stride, mask_stride; ++ __m64 vsrc, vsrca; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ srca = src >> 24; ++ if (src == 0) ++ return; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64($f24,%0) ++ expand_alpha($f24,$f26) ++ store64($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ int twidth = width; ++ uint32_t *p = (uint32_t *)mask_line; ++ uint32_t *q = (uint32_t *)dst_line; ++ ++ while (twidth) ++ { ++ ++ if (*p) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f28) ++ load8888r(%1,$f20) ++ in_over($f24,$f26,$f20,$f28) ++ store8888r($f8,%0) ++ :"+r"(*q):"r"(*p):clobber ++ ); ++ } ++ twidth--; ++ p++; ++ q++; ++ } ++ ++ dst_line += dst_stride; ++ mask_line += mask_stride; ++ } ++} ++ ++ ++static void ++ls_composite_over_n_8_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src, srca; ++ uint32_t *dst_line, *dst; ++ uint8_t *mask_line, *mask; ++ int dst_stride, mask_stride; ++ int32_t w; ++ __m64 vsrc, vsrca; ++ uint64_t srcsrc; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ srca = src >> 24; ++ if (src == 0) ++ return; ++ ++ srcsrc = (uint64_t)src << 32 | src; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64a($f24,%0) ++ expand_alpha($f24,$f26) ++ store64a($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ mask = mask_line; ++ mask_line += mask_stride; ++ w = width; ++ ++ while (w) ++ { ++ uint32_t m = *mask; ++ ++ if (m) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load32r(%1,$f22) ++ expand_alpha_rev($f22,$f28) ++ in_over($f24,$f26,$f28,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(m):clobber ++ ); ++ } ++ ++ w--; ++ mask++; ++ dst++; ++ } ++ } ++ ++} ++ ++static void ++ls_composite_over_x888_n_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t *dst_line, *dst; ++ uint32_t *src_line, *src; ++ uint32_t mask; ++ __m64 vmask; ++ int dst_stride, src_stride; ++ int32_t w; ++ __m64 srca; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); ++ ++ mask &= 0xff000000; ++ mask = mask | mask >> 8 | mask >> 16 | mask >> 24; ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f24) ++ store64a($f24,%0) ++ :"=m"(vmask):"r"(mask):clobber ++ ); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load64a(%1,$f26) ++ store64a($f26,%0) ++ :"=m"(srca):"m"(ls_4x00ff):clobber ++ ); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w) ++ { ++ uint32_t src_tmp = *src | 0xff000000; ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ load8888r(%0,$f22) ++ in_over($f20,$f26,$f24,$f22) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(src_tmp):clobber ++ ); ++ ++ w--; ++ dst++; ++ src++; ++ } ++ } ++} ++ ++ ++static void ++ls_composite_over_8888_0565 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint16_t *dst_line, *dst; ++ uint32_t d; ++ uint32_t *src_line, *src, s; ++ uint8_t a; ++ int dst_stride, src_stride; ++ int32_t w; ++ ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w--) ++ { ++ s = *src++; ++ a = s >> 24; ++ if (s) ++ { ++ if (a == 0xff) ++ { ++ d = s; ++ } ++ else ++ { ++ d = *dst; ++ d = CONVERT_0565_TO_0888 (d); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f24) ++ load8888r(%0,$f20) ++ expand_alpha($f24,$f26) ++ over($f24,$f26,$f20) ++ store8888r($f8,%0) ++ :"+r"(d):"r"(s):clobber ++ ); ++ ++ ++ } ++ *dst = CONVERT_8888_TO_0565 (d); ++ } ++ dst++; ++ } ++ } ++} ++ ++static void ++ls_composite_over_n_0565 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src; ++ uint32_t d; ++ uint16_t *dst_line, *dst; ++ int32_t w; ++ int dst_stride; ++ __m64 vsrc, vsrca; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ if (src == 0) ++ return; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64a($f24,%0) ++ expand_alpha($f24,$f26) ++ store64a($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ w = width; ++ ++ while (w) ++ { ++ ++ d = *dst; ++ d = CONVERT_0565_TO_0888 (d); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ ++ over($f24,$f26,$f20) ++ store8888r($f8,%0) ++ :"+r"(d)::clobber ++ ); ++ ++ *dst = CONVERT_8888_TO_0565 (d); ++ ++ w--; ++ dst++; ++ } ++ } ++} ++ ++static void ++ls_composite_over_n_8_0565 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src, srca, m, d; ++ uint16_t *dst_line, *dst; ++ uint8_t *mask_line, *mask; ++ int dst_stride, mask_stride; ++ int32_t w; ++ __m64 vsrc, vsrca; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ srca = src >> 24; ++ if (src == 0) ++ return; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64a($f24,%0) ++ expand_alpha($f24,$f26) ++ store64a($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ mask = mask_line; ++ mask_line += mask_stride; ++ w = width; ++ ++ while (w) ++ { ++ m = *mask; ++ d = *dst; ++ ++ if (m) ++ { ++ ++ d = CONVERT_0565_TO_0888 (d); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load32r(%1,$f22) ++ expand_alpha_rev($f22,$f28) ++ in_over($f24,$f26,$f28,$f20) ++ store8888r($f8,%0) ++ :"+r"(d):"r"(m):clobber ++ ); ++ ++ *dst = CONVERT_8888_TO_0565 (d); ++ ++ } ++ ++ w--; ++ mask++; ++ dst++; ++ } ++ } ++} ++ ++static void ++ls_composite_over_n_8888_0565_ca (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src, srca, m, d; ++ uint16_t *dst_line; ++ uint32_t *mask_line; ++ int dst_stride, mask_stride; ++ __m64 vsrc, vsrca; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ srca = src >> 24; ++ if (src == 0) ++ return; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64a($f24,%0) ++ expand_alpha($f24,$f26) ++ store64a($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ ++ while (height--) ++ { ++ int twidth = width; ++ uint32_t *p = (uint32_t *)mask_line; ++ uint16_t *q = (uint16_t *)dst_line; ++ ++ while (twidth) ++ { ++ ++ m = *(uint32_t *)p; ++ d = *q; ++ ++ if (m) ++ { ++ ++ d = CONVERT_0565_TO_0888 (d); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%0,$f20) ++ load8888r(%1,$f22) ++ in_over($f24,$f26,$f22,$f20) ++ store8888r($f8,%0) ++ :"+r"(d):"r"(m):clobber ++ ); ++ ++ *q = CONVERT_8888_TO_0565 (d); ++ ++ } ++ ++ twidth--; ++ p++; ++ q++; ++ } ++ ++ mask_line += mask_stride; ++ dst_line += dst_stride; ++ } ++} ++static void ++ls_composite_over_pixbuf_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t *dst_line, *dst; ++ uint32_t *src_line, *src; ++ int dst_stride, src_stride; ++ int32_t w; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ ++#if 0 ++ /* FIXME */ ++ assert (src_image->drawable == mask_image->drawable); ++#endif ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f22) ++ load8888r(%0,$f20) ++ over_rev_non_pre($f22,$f20) ++ store8888r($f8,%0) ++ :"+r"(*dst):"r"(*src):clobber ++ ); ++ ++ w--; ++ dst++; ++ src++; ++ } ++ } ++} ++static void ++ls_composite_over_pixbuf_0565 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint16_t *dst_line, *dst; ++ uint32_t *src_line, *src, d; ++ int dst_stride, src_stride; ++ int32_t w; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); ++ ++#if 0 ++ /* FIXME */ ++ assert (src_image->drawable == mask_image->drawable); ++#endif ++ ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ src = src_line; ++ src_line += src_stride; ++ w = width; ++ ++ while (w) ++ { ++ ++ d = *dst; ++ d = CONVERT_0565_TO_0888 (d); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%1,$f20) ++ load8888r(%0,$f24) ++ over_rev_non_pre($f20,$f24) ++ store8888r($f8,%0) ++ :"+r"(d):"r"(*src):clobber ++ ); ++ ++ *dst = CONVERT_8888_TO_0565 (d); ++ ++ w--; ++ dst++; ++ src++; ++ } ++ } ++} ++ ++static void ++ls_composite_src_n_8_8888 (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ uint32_t src, srca; ++ uint32_t *dst_line, *dst, m; ++ uint8_t *mask_line, *mask; ++ int dst_stride, mask_stride; ++ int32_t w; ++ __m64 vsrc, vsrca; ++ uint64_t srcsrc; ++ ++ src = _pixman_image_get_solid (src_image, dst_image->bits.format); ++ ++ srca = src >> 24; ++ if (src == 0) ++ { ++ pixman_fill_ls (dst_image->bits.bits, dst_image->bits.rowstride, ++ PIXMAN_FORMAT_BPP (dst_image->bits.format), ++ dest_x, dest_y, width, height, 0); ++ return; ++ } ++ ++ srcsrc = (uint64_t)src << 32 | src; ++ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load8888r(%2,$f24) ++ store64a($f24,%0) ++ expand_alpha($f24,$f26) ++ store64a($f26,%1) ++ :"=m"(vsrc), "=m"(vsrca):"r"(src):clobber ++ ); ++ while (height--) ++ { ++ dst = dst_line; ++ dst_line += dst_stride; ++ mask = mask_line; ++ mask_line += mask_stride; ++ w = width; ++ ++ while (w) ++ { ++ m = *mask; ++ ++ if (m) ++ { ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ load32r(%1,$f20) ++ expand_alpha_rev($f20,$f28) ++ in($f24,$f28) ++ store8888r($f8,%0) ++ :"=r"(*dst):"r"(m):clobber ++ ); ++ ++ } ++ else ++ { ++ *dst = 0; ++ } ++ ++ w--; ++ mask++; ++ dst++; ++ } ++ } ++} +diff -urN pixman//pixman/pixman-cpu.c Pixman.Loongson//pixman/pixman-cpu.c +--- pixman//pixman/pixman-cpu.c 2010-12-25 18:46:00.073234000 +0800 ++++ Pixman.Loongson//pixman/pixman-cpu.c 2010-12-25 18:39:15.360337000 +0800 +@@ -579,7 +579,9 @@ + if (pixman_have_mmx ()) + return _pixman_implementation_create_mmx (); + #endif +- ++#ifdef USE_LS ++ return _pixman_implementation_create_ls (); ++#endif + #ifdef USE_ARM_NEON + if (pixman_have_arm_neon ()) + return _pixman_implementation_create_arm_neon (); +diff -urN pixman//pixman/pixman-ls.c Pixman.Loongson//pixman/pixman-ls.c +--- pixman//pixman/pixman-ls.c 1970-01-01 08:00:00.000000000 +0800 ++++ Pixman.Loongson//pixman/pixman-ls.c 2010-12-25 18:39:15.386759000 +0800 +@@ -0,0 +1,538 @@ ++/* ++* Based on pixman-mmx.c ++* Implemented for loongson 2F only. ++* Free software based on GPL licence. ++* Copyright 2010 WG Ge. ++*/ ++ ++#ifdef HAVE_CONFIG_H ++#include <config.h> ++#endif ++#include <stdlib.h> ++#include <string.h> ++#include <math.h> ++#include <limits.h> ++#include <stdio.h> ++#include "pixman-private.h" ++#include "pixman-combine32.h" ++#include "primitive.h" ++ ++#define __m64 __attribute__ ((aligned (8))) uint64_t ++#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v ++#define DECLARE_ALIGNED_8(t, v, ...) DECLARE_ALIGNED(8, t, v) ++ ++DECLARE_ALIGNED_8 (const uint64_t, ls_4x00ff ) = 0x00ff00ff00ff00ffULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_4x0080 ) = 0x0080008000800080ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_565_rgb ) = 0x000001f0003f001fULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_565_unpack_multiplier ) = 0x0000008404100840ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_565_r ) = 0x000000f800000000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_565_g ) = 0x0000000000fc0000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_565_b ) = 0x00000000000000f8ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_mask_0 ) = 0xffffffffffff0000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_mask_1 ) = 0xffffffff0000ffffULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_mask_2 ) = 0xffff0000ffffffffULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_mask_3 ) = 0x0000ffffffffffffULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_full_alpha ) = 0x00ff000000000000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_ffff0000ffff0000 ) = 0xffff0000ffff0000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_0000ffff00000000 ) = 0x0000ffff00000000ULL; ++DECLARE_ALIGNED_8 (const uint64_t, ls_000000000000ffff ) = 0x000000000000ffffULL; ++ ++ ++pixman_bool_t ++pixman_fill_ls (uint32_t *bits, ++ int stride, ++ int bpp, ++ int x, ++ int y, ++ int width, ++ int height, ++ uint32_t xor) ++{ ++ uint64_t fill; ++ uint32_t byte_width; ++ uint8_t *byte_line; ++ ++ ++ ++ if (bpp != 16 && bpp != 32 && bpp != 8) ++ return FALSE; ++ ++ if (bpp == 8) ++ { ++ stride = stride * (int) sizeof (uint32_t) / 1; ++ byte_line = (uint8_t *)(((uint8_t *)bits) + stride * y + x); ++ byte_width = width; ++ stride *= 1; ++ xor = (xor & 0xff) * 0x01010101; ++ } ++ else if (bpp == 16) ++ { ++ stride = stride * (int) sizeof (uint32_t) / 2; ++ byte_line = (uint8_t *)(((uint16_t *)bits) + stride * y + x); ++ byte_width = 2 * width; ++ stride *= 2; ++ xor = (xor & 0xffff) * 0x00010001; ++ } ++ else ++ { ++ stride = stride * (int) sizeof (uint32_t) / 4; ++ byte_line = (uint8_t *)(((uint32_t *)bits) + stride * y + x); ++ byte_width = 4 * width; ++ stride *= 4; ++ } ++ ++ fill = ((uint64_t)xor << 32) | xor; ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ "ldc1 $f24, %0 \n\t" ++ ::"m"(fill):"$f24" ++ ); ++ while (height--) ++ { ++ int w; ++ uint8_t *d = byte_line; ++ ++ byte_line += stride; ++ w = byte_width; ++ ++ while (w >= 1 && ((unsigned long)d & 1)) ++ { ++ *(uint8_t *)d = (xor & 0xff); ++ w--; ++ d++; ++ } ++ ++ while (w >= 2 && ((unsigned long)d & 3)) ++ { ++ *(uint16_t *)d = xor; ++ w -= 2; ++ d += 2; ++ } ++ ++ while (w >= 4 && ((unsigned long)d & 7)) ++ { ++ *(uint32_t *)d = xor; ++ ++ w -= 4; ++ d += 4; ++ } ++ ++ while (w >= 64) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ "dmfc1 $8, $f24 \n\t" ++ "sd $8 , (%0) \n\t" ++ "sd $8 , 8(%0) \n\t" ++ "sd $8 , 16(%0) \n\t" ++ "sd $8 , 24(%0) \n\t" ++ "sd $8 , 32(%0) \n\t" ++ "sd $8 , 40(%0) \n\t" ++ "sd $8 , 48(%0) \n\t" ++ "sd $8 , 56(%0) \n\t" ++ ::"r"(d):"$8","memory","$f24" ++ ); ++ w -= 64; ++ d += 64; ++ } ++ ++ while (w >= 4) ++ { ++ *(uint32_t *)d = xor; ++ ++ w -= 4; ++ d += 4; ++ } ++ while (w >= 2) ++ { ++ *(uint16_t *)d = xor; ++ w -= 2; ++ d += 2; ++ } ++ while (w >= 1) ++ { ++ *(uint8_t *)d = (xor & 0xff); ++ w--; ++ d++; ++ } ++ ++ } ++ return TRUE; ++} ++ ++static pixman_bool_t ++pixman_blt_ls (uint32_t *src_bits, ++ uint32_t *dst_bits, ++ int src_stride, ++ int dst_stride, ++ int src_bpp, ++ int dst_bpp, ++ int src_x, ++ int src_y, ++ int dst_x, ++ int dst_y, ++ int width, ++ int height) ++{ ++ uint8_t * src_bytes; ++ uint8_t * dst_bytes; ++ int byte_width; ++ ++ if (src_bpp != dst_bpp) ++ return FALSE; ++ ++ if (src_bpp == 16) ++ { ++ src_stride = src_stride * (int) sizeof (uint32_t) / 2; ++ dst_stride = dst_stride * (int) sizeof (uint32_t) / 2; ++ src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x)); ++ dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); ++ byte_width = 2 * width; ++ src_stride *= 2; ++ dst_stride *= 2; ++ } ++ else if (src_bpp == 32) ++ { ++ src_stride = src_stride * (int) sizeof (uint32_t) / 4; ++ dst_stride = dst_stride * (int) sizeof (uint32_t) / 4; ++ src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x)); ++ dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); ++ byte_width = 4 * width; ++ src_stride *= 4; ++ dst_stride *= 4; ++ } ++ else ++ { ++ return FALSE; ++ } ++ ++ while (height--) ++ { ++ int w; ++ uint8_t *s = src_bytes; ++ uint8_t *d = dst_bytes; ++ src_bytes += src_stride; ++ dst_bytes += dst_stride; ++ w = byte_width; ++ ++ while (w >= 2 && ((unsigned long)d & 3)) ++ { ++ *(uint16_t *)d = *(uint16_t *)s; ++ w -= 2; ++ s += 2; ++ d += 2; ++ } ++ ++ while (w >= 4 && ((unsigned long)d & 7)) ++ { ++ *(uint32_t *)d = *(uint32_t *)s; ++ ++ w -= 4; ++ s += 4; ++ d += 4; ++ } ++ if ((unsigned long)s & 7) ++{ ++ while (w >= 64) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ "uld $8 , (%1) \n\t" ++ "uld $9 , 8(%1) \n\t" ++ "uld $10, 16(%1) \n\t" ++ "uld $11, 24(%1) \n\t" ++ "sd $8 , (%0) \n\t" ++ "sd $9 , 8(%0) \n\t" ++ "sd $10, 16(%0) \n\t" ++ "sd $11, 24(%0) \n\t" ++ ++ "uld $8 , 32(%1) \n\t" ++ "uld $9 , 40(%1) \n\t" ++ "uld $10, 48(%1) \n\t" ++ "uld $11, 56(%1) \n\t" ++ "sd $8 , 32(%0) \n\t" ++ "sd $9 , 40(%0) \n\t" ++ "sd $10, 48(%0) \n\t" ++ "sd $11, 56(%0) \n\t" ++ ::"r"(d),"r"(s):"$8","$9","$10","$11","memory" ++ ); ++ w -= 64; ++ s += 64; ++ d += 64; ++ } ++} ++else ++{ ++ while (w >= 64) ++ { ++ ++ __asm__ volatile ( ++ ".set arch=loongson2f \n\t" ++ "ld $8 , (%1) \n\t" ++ "ld $9 , 8(%1) \n\t" ++ "ld $10, 16(%1) \n\t" ++ "ld $11, 24(%1) \n\t" ++ "sd $8 , (%0) \n\t" ++ "sd $9 , 8(%0) \n\t" ++ "sd $10, 16(%0) \n\t" ++ "sd $11, 24(%0) \n\t" ++ ++ "ld $8 , 32(%1) \n\t" ++ "ld $9 , 40(%1) \n\t" ++ "ld $10, 48(%1) \n\t" ++ "ld $11, 56(%1) \n\t" ++ "sd $8 , 32(%0) \n\t" ++ "sd $9 , 40(%0) \n\t" ++ "sd $10, 48(%0) \n\t" ++ "sd $11, 56(%0) \n\t" ++ ::"r"(d),"r"(s):"$8","$9","$10","$11","memory" ++ ); ++ w -= 64; ++ s += 64; ++ d += 64; ++ } ++} ++ ++ while (w >= 4) ++ { ++ *(uint32_t *)d = *(uint32_t *)s; ++ ++ w -= 4; ++ s += 4; ++ d += 4; ++ } ++ if (w >= 2) ++ { ++ *(uint16_t *)d = *(uint16_t *)s; ++ w -= 2; ++ s += 2; ++ d += 2; ++ } ++ } ++ return TRUE; ++} ++ ++ ++#include "pixman-composite-ls.c" ++#include "pixman-combine-ls.c" ++ ++static pixman_bool_t ++ls_blt (pixman_implementation_t *imp, ++ uint32_t * src_bits, ++ uint32_t * dst_bits, ++ int src_stride, ++ int dst_stride, ++ int src_bpp, ++ int dst_bpp, ++ int src_x, ++ int src_y, ++ int dst_x, ++ int dst_y, ++ int width, ++ int height) ++{ ++ if (!pixman_blt_ls ( ++ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp, ++ src_x, src_y, dst_x, dst_y, width, height)) ++ { ++ return _pixman_implementation_blt ( ++ imp->delegate, ++ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp, ++ src_x, src_y, dst_x, dst_y, width, height); ++ } ++ ++ return TRUE; ++} ++ ++static pixman_bool_t ++ls_fill (pixman_implementation_t *imp, ++ uint32_t * bits, ++ int stride, ++ int bpp, ++ int x, ++ int y, ++ int width, ++ int height, ++ uint32_t xor) ++{ ++ if (!pixman_fill_ls (bits, stride, bpp, x, y, width, height, xor)) ++ { ++ return _pixman_implementation_fill ( ++ imp->delegate, bits, stride, bpp, x, y, width, height, xor); ++ } ++ ++ return TRUE; ++} ++
++static void ++ls_composite_copy_area (pixman_implementation_t *imp, ++ pixman_op_t op, ++ pixman_image_t * src_image, ++ pixman_image_t * mask_image, ++ pixman_image_t * dst_image, ++ int32_t src_x, ++ int32_t src_y, ++ int32_t mask_x, ++ int32_t mask_y, ++ int32_t dest_x, ++ int32_t dest_y, ++ int32_t width, ++ int32_t height) ++{ ++ pixman_blt_ls (src_image->bits.bits, ++ dst_image->bits.bits, ++ src_image->bits.rowstride, ++ dst_image->bits.rowstride, ++ PIXMAN_FORMAT_BPP (src_image->bits.format), ++ PIXMAN_FORMAT_BPP (dst_image->bits.format), ++ src_x, src_y, dest_x, dest_y, width, height); ++} ++ ++ ++static const pixman_fast_path_t ls_fast_paths[] = ++{ ++ ++//these are implemented so far ++#if 1 ++ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, x8r8g8b8, ls_composite_over_x888_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, a8r8g8b8, ls_composite_over_x888_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, x8b8g8r8, ls_composite_over_x888_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, a8b8g8r8, ls_composite_over_x888_8_8888 ), ++#endif ++ ++#if 1 ++//over_8888_0565 significant perf improvement, slight better L1, L2, 30% better RT ++ PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, r5g6b5, ls_composite_over_8888_0565 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, b5g6r5, ls_composite_over_8888_0565 ), ++ PIXMAN_STD_FAST_PATH (OVER, pixbuf, pixbuf, r5g6b5, ls_composite_over_pixbuf_0565 ), ++ PIXMAN_STD_FAST_PATH (OVER, rpixbuf, rpixbuf, b5g6r5, ls_composite_over_pixbuf_0565 ), ++ ++//big improvement some closing 100% ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, b5g6r5, ls_composite_over_n_8888_0565_ca ), ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, r5g6b5, ls_composite_over_n_8888_0565_ca ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, r5g6b5, ls_composite_over_n_8_0565 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, b5g6r5, ls_composite_over_n_8_0565 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, null, r5g6b5, ls_composite_over_n_0565 ), ++ ++//ubalbe to bench with lowlevel bench, believe it is a gain in perf ++ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, solid, a8r8g8b8, ls_composite_over_x888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, solid, x8r8g8b8, ls_composite_over_x888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, solid, a8b8g8r8, ls_composite_over_x888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, solid, x8b8g8r8, ls_composite_over_x888_n_8888 ), ++ ++//performance regress 30% in L1,L2, but significant improvement in RT ++ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, ls_composite_over_8888_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, ls_composite_over_8888_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, ls_composite_over_8888_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, ls_composite_over_8888_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, pixbuf, pixbuf, a8r8g8b8, ls_composite_over_pixbuf_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, pixbuf, pixbuf, x8r8g8b8, ls_composite_over_pixbuf_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, rpixbuf, rpixbuf, a8b8g8r8, ls_composite_over_pixbuf_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, rpixbuf, rpixbuf, x8b8g8r8, ls_composite_over_pixbuf_8888 ), ++ ++//same performance in L1,L2, but significant improvement in RT 30-40% ++ PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, solid, a8r8g8b8, ls_composite_over_8888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, solid, x8r8g8b8, ls_composite_over_8888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, solid, a8b8g8r8, ls_composite_over_8888_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, solid, x8b8g8r8, ls_composite_over_8888_n_8888 ), ++ ++//significant perf improvement 20% ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8r8g8b8, ls_composite_over_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8r8g8b8, ls_composite_over_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8b8g8r8, ls_composite_over_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8b8g8r8, ls_composite_over_n_8_8888 ), ++ ++//3 times perf improvements ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, a8r8g8b8, ls_composite_over_n_8888_8888_ca ), ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, x8r8g8b8, ls_composite_over_n_8888_8888_ca ), ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, a8b8g8r8, ls_composite_over_n_8888_8888_ca ), ++ PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, x8b8g8r8, ls_composite_over_n_8888_8888_ca ), ++ ++//significant performance boost ++ PIXMAN_STD_FAST_PATH (OVER, solid, null, a8r8g8b8, ls_composite_over_n_8888 ), ++ PIXMAN_STD_FAST_PATH (OVER, solid, null, x8r8g8b8, ls_composite_over_n_8888 ), ++//simple add, expect better perf in generic code ++// PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, null, a8r8g8b8, ls_composite_add_8888_8888 ), ++// PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, null, a8b8g8r8, ls_composite_add_8888_8888 ), ++ ++// FIXME: Copy memory are not better than geneic code ++#if 0 ++ PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, x8r8g8b8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, b5g6r5, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, x8r8g8b8, ls_composite_copy_area ), ++ PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, null, x8b8g8r8, ls_composite_copy_area ), ++#endif ++ ++//significant improvement ++ PIXMAN_STD_FAST_PATH (SRC, solid, a8, a8r8g8b8, ls_composite_src_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (SRC, solid, a8, x8r8g8b8, ls_composite_src_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (SRC, solid, a8, a8b8g8r8, ls_composite_src_n_8_8888 ), ++ PIXMAN_STD_FAST_PATH (SRC, solid, a8, x8b8g8r8, ls_composite_src_n_8_8888 ), ++ ++#endif ++ ++//these are not yet implemented ++ ++#if 0 ++ ++ PIXMAN_STD_FAST_PATH (ADD, a8, null, a8, ls_composite_add_8000_8000 ), ++ PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, ls_composite_add_n_8_8 ), ++ PIXMAN_STD_FAST_PATH (IN, a8, null, a8, ls_composite_in_8_8 ), ++ PIXMAN_STD_FAST_PATH (IN, solid, a8, a8, ls_composite_in_n_8_8 ), ++#endif ++ ++ ++ { PIXMAN_OP_NONE }, ++}; ++ ++pixman_implementation_t * ++_pixman_implementation_create_ls (void) ++{ ++ pixman_implementation_t *general = _pixman_implementation_create_fast_path (); ++ pixman_implementation_t *imp = _pixman_implementation_create (general, ls_fast_paths); ++ ++//Turned on but unable to benchmark. ++#if 1 ++ imp->combine_32[PIXMAN_OP_OVER] = ls_combine_over_u; ++ imp->combine_32[PIXMAN_OP_OVER_REVERSE] = ls_combine_over_reverse_u; ++ imp->combine_32[PIXMAN_OP_IN] = ls_combine_in_u; ++ imp->combine_32[PIXMAN_OP_IN_REVERSE] = ls_combine_in_reverse_u; ++ imp->combine_32[PIXMAN_OP_OUT] = ls_combine_out_u; ++ imp->combine_32[PIXMAN_OP_OUT_REVERSE] = ls_combine_out_reverse_u; ++ imp->combine_32[PIXMAN_OP_ATOP] = ls_combine_atop_u; ++ imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = ls_combine_atop_reverse_u; ++ imp->combine_32[PIXMAN_OP_XOR] = ls_combine_xor_u; ++ imp->combine_32[PIXMAN_OP_ADD] = ls_combine_add_u; ++ imp->combine_32[PIXMAN_OP_SATURATE] = ls_combine_saturate_u; ++ ++ imp->combine_32_ca[PIXMAN_OP_SRC] = ls_combine_src_ca; ++ imp->combine_32_ca[PIXMAN_OP_OVER] = ls_combine_over_ca; ++ imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = ls_combine_over_reverse_ca; ++ imp->combine_32_ca[PIXMAN_OP_IN] = ls_combine_in_ca; ++ imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = ls_combine_in_reverse_ca; ++ imp->combine_32_ca[PIXMAN_OP_OUT] = ls_combine_out_ca; ++ imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = ls_combine_out_reverse_ca; ++ imp->combine_32_ca[PIXMAN_OP_ATOP] = ls_combine_atop_ca; ++ imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = ls_combine_atop_reverse_ca; ++ imp->combine_32_ca[PIXMAN_OP_XOR] = ls_combine_xor_ca; ++ imp->combine_32_ca[PIXMAN_OP_ADD] = ls_combine_add_ca; ++#endif ++ ++//FIXME blt and fill not shown better perf than geneic code ++#if 0 ++ imp->blt = ls_blt; ++ imp->fill = ls_fill; ++#endif ++ ++ return imp; ++} ++ +diff -urN pixman//pixman/pixman-private.h Pixman.Loongson//pixman/pixman-private.h +--- pixman//pixman/pixman-private.h 2010-12-25 18:46:00.102841000 +0800 ++++ Pixman.Loongson//pixman/pixman-private.h 2010-12-25 18:39:15.401808000 +0800 +@@ -493,6 +493,11 @@ + pixman_implementation_t * + _pixman_implementation_create_fast_path (void); + ++#ifdef USE_LS ++pixman_implementation_t * ++_pixman_implementation_create_ls (void); ++#endif ++ + #ifdef USE_MMX + pixman_implementation_t * + _pixman_implementation_create_mmx (void); +diff -urN pixman//pixman/primitive.h Pixman.Loongson//pixman/primitive.h +--- pixman//pixman/primitive.h 1970-01-01 08:00:00.000000000 +0800 ++++ Pixman.Loongson//pixman/primitive.h 2010-12-25 18:39:15.457084000 +0800 +@@ -0,0 +1,214 @@ ++/*
++* MMX register usage protocal
++* return result: f8
++* tmp immediate f12
++* tmp register in primtive f14 f16 f18
++* tmp register in pixman f0,f4,f6,f10,f20,f22,
++* globals in function f24, f26, f28,f30
++* Exceptions for load and store:
++* load will specify dest FPR register
++* store will specify src FPR register
++* expand_alpha(_rev) implemented with GPR, dest FPR as the 2nd parameter
++*
++* Special alert: don't use return result $f8 as input, it might be overwritten
++*/
++
++
++/*primitive macros */
++
++#define clobber "$8","$9","$f0","$f2","$f8",\
++ "$f12","$f14","$f16","$f18","$f20",\
++ "$f22","$f24","$f26","$f28","$f30"
++
++#define DMTC1_IMM(regc1,imm) \
++ "dli $8, "#imm" \n\t" \
++ "dmtc1 $8, "#regc1" \n\t"
++
++#define MTC1_IMM(regc1,imm) \
++ "li $8, "#imm" \n\t" \
++ "dmtc1 $8, "#regc1" \n\t"
++
++
++#define save_to(reg1) "mov.d "#reg1", $f8 \n\t"
++#define zero(reg1) "xor "#reg1","#reg1","#reg1" \n\t"
++
++#define load32(sp,reg1) \
++ "ulw $8, "#sp" \n\t" \
++ "dmtc1 $8, "#reg1" \n\t"
++
++#define load32a(sp,reg1) \
++ "lw $8, "#sp" \n\t" \
++ "dmtc1 $8, "#reg1" \n\t"
++
++#define load32r(sp,reg1) \
++ "dmtc1 "#sp", "#reg1" \n\t"
++
++#define load64(sp,reg1) \
++ "uld $8, "#sp" \n\t" \
++ "dmtc1 $8, "#reg1" \n\t"
++
++#define load64a(sp,reg1) \
++ "ld $8, "#sp" \n\t" \
++ "dmtc1 $8, "#reg1" \n\t"
++
++
++#define store32(reg1,sp) \
++ "dmfc1 $8, "#reg1" \n\t" \
++ "usw $8, "#sp" \n\t"
++
++#define store32r(reg1,sp) \
++ "dmfc1 "#sp", "#reg1" \n\t"
++
++#define store32a(reg1,sp) \
++ "swc1 "#reg1", "#sp" \n\t"
++
++#define store64(reg1,sp) \
++ "dmfc1 $8, "#reg1" \n\t" \
++ "usd $8, "#sp" \n\t"
++
++#define store64a(reg1,sp) \
++ "sdc1 "#reg1", "#sp" \n\t"
++
++#define load8888(sp,reg1) \
++ load64(sp,reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpcklbh "#reg1", "#reg1", $f12 \n\t"
++
++#define load8888r(sp,reg1) \
++ load32r(sp,reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpcklbh "#reg1", "#reg1", $f12 \n\t"
++
++#define load8888a(sp,reg1) \
++ load64a(sp,reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpcklbh "#reg1", "#reg1", $f12 \n\t"
++
++#define load8888ah(sp,reg1) \
++ load64a(sp,reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpckhbh "#reg1", "#reg1", $f12 \n\t"
++
++#define store8888(reg1,sp) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "packushb "#reg1", "#reg1", $f12 \n\t" \
++ store64(reg1,sp)
++
++#define store8888r(reg1,sp) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "packushb "#reg1", "#reg1", $f12 \n\t" \
++ store32r(reg1,sp)
++
++#define store8888a(reg1,sp) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "packushb "#reg1", "#reg1", $f12 \n\t" \
++ store64a(reg1,sp)
++
++#define pack8888(reg1,reg2) \
++ "packushb $f8, "#reg1","#reg2" \n\t"
++
++#define unpack8888(reg1,reg2) \
++ "punpcklbh $f8, "#reg1","#reg2" \n\t"
++
++
++#define negate(sreg,dreg) \
++ DMTC1_IMM($f12, 0x00ff00ff00ff00ff)\
++ "xor "#dreg", "#sreg", $f12 \n\t"
++
++#define pix_add(reg1,reg2) \
++ "paddusb $f8, "#reg1", "#reg2" \n\t"
++
++#define pix_multiply(reg1,reg2) \
++ "pmullh $f14, "#reg1", "#reg2" \n\t " \
++ DMTC1_IMM($f12, 0x0080008000800080) \
++ "paddush $f14, $f14, $f12 \n\t "\
++ MTC1_IMM($f12, 8) \
++ "psrlh $f16, $f14, $f12 \n\t" \
++ "paddush $f14, $f14, $f16 \n\t" \
++ "psrlh $f8, $f14, $f12 \n\t"
++
++#define pix_add_mul(reg1,reg2,reg3,reg4) \ ++ pix_multiply(reg1,reg2) \
++ "mov.d $f18, $f8 \n\t" \
++ pix_multiply(reg3,reg4) \
++ pix_add($f18,$f8)
++
++#define expand_alpha(sreg,dreg) \
++ "dmfc1 $8, "#sreg" \n\t" \
++ "dsrl32 $8, $8, 16 \n\t" \
++ "dsll $9, $8, 16 \n\t" \
++ "or $8, $8, $9 \n\t" \
++ "dsll32 $9, $8, 0 \n\t" \
++ "or $8, $8, $9 \n\t" \
++ "dmtc1 $8, "#dreg" \n\t"
++
++#define expand_alpha_rev(sreg,dreg)\
++ "dmfc1 $8, "#sreg" \n\t" \
++ "dsll32 $8, $8, 16 \n\t" \
++ "dsrl32 $8, $8, 16 \n\t" \
++ "dsll $9, $8, 16 \n\t" \
++ "or $8, $8, $9 \n\t" \
++ "dsll32 $9, $8, 0 \n\t" \
++ "or $8, $8, $9 \n\t" \
++ "dmtc1 $8, "#dreg" \n\t"
++
++#define expand8888(reg1,pos) expand8888_##pos(reg1)
++
++#define expand8888_0(reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpcklbh $f8, "#reg1", $f12 \n\t"
++
++#define expand8888_1(reg1) \
++ "xor $f12, $f12, $f12 \n\t" \
++ "punpckhbh $f8, "#reg1", $f12 \n\t"
++
++#define expandx888(reg1,pos) \
++ expand8888(reg1,pos) \
++ DMTC1_IMM($f12, 0x00ff000000000000) \
++ "or $f8, $f8, $f12 \n\t"
++
++#define invert_colors(reg1) \
++ DMTC1_IMM($f12, 0xffff0000ffff0000) \
++ "and $f14, "#reg1", $f12 \n\t" \
++ DMTC1_IMM($f12, 0x000000000000ffff) \
++ "and $f16, "#reg1", $f12 \n\t" \
++ DMTC1_IMM($f12, 0x0000ffff00000000) \
++ "and $f18, "#reg1", $f12 \n\t" \
++ MTC1_IMM($f12, 32) \
++ "dsll $f16, $f16, $f12 \n\t" \
++ "dsrl $f18, $f18, $f12 \n\t" \
++ "or $f14, $f14, $f16 \n\t" \
++ "or $f8, $f14, $f18 \n\t"
++
++#define over(reg1,reg2,reg3) \
++ negate(reg2,$f8) \
++ pix_multiply(reg3, $f8)\
++ pix_add(reg1, $f8)
++
++
++#define over_rev_non_pre(reg1,reg2) \
++ expand_alpha(reg1,$f0) \
++ DMTC1_IMM($f12,0x00ff000000000000) \
++ "or $f2, $f0, $f12 \n\t" \
++ invert_colors(reg1) \
++ pix_multiply($f8,$f2) \
++ save_to($f2) \
++ over($f2, $f0, reg2)
++
++#define in(reg1,reg2) pix_multiply(reg1,reg2)
++
++#define in_over_full_src_alpha(reg1,reg2,reg3) \
++ DMTC1_IMM($f12,0x00ff000000000000) \
++ "or $f0, "#reg1", $f12 \n\t" \
++ in($f0,reg2) \
++ save_to($f0) \
++ over($f0,reg2,reg3)
++
++#define in_over(reg1,reg2,reg3,reg4) \
++ in(reg1,reg3) \
++ "mov.d $f0, $f8 \n\t" \
++ pix_multiply(reg2,reg3) \
++ "mov.d $f2, $f8 \n\t" \
++ over($f0,$f2,reg4)
++
++
diff --git a/extra/postgresql/PKGBUILD b/extra/postgresql/PKGBUILD index e89eb4d9e..d5a887585 100644 --- a/extra/postgresql/PKGBUILD +++ b/extra/postgresql/PKGBUILD @@ -1,16 +1,17 @@ -# $Id: PKGBUILD 122182 2011-05-02 17:54:57Z dan $ +# $Id: PKGBUILD 125329 2011-05-25 22:33:15Z dan $ # Maintainer: Dan McGee <dan@archlinux.org> pkgbase=postgresql pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql') pkgver=9.0.4 -pkgrel=3 -arch=('i686' 'x86_64' 'mips64el') +pkgrel=4 +arch=('i686' 'x86_64') url="http://www.postgresql.org" license=('custom:PostgreSQL') makedepends=('libxml2' 'python2' 'perl') source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 \ - postgresql postgresql.confd build.patch postgresql.pam postgresql.logrotate) + postgresql postgresql.confd build.patch postgresql.pam postgresql.logrotate + perl-5.14-fix.patch) install=postgresql.install build() { @@ -18,6 +19,8 @@ build() { # patch to remove regress/test make target (won't build with it present) patch -Np1 -i ../build.patch + # fix for perl 5.14 + patch -Np1 -i ../perl-5.14-fix.patch # configure ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \ @@ -134,4 +137,5 @@ md5sums=('80390514d568a7af5ab61db1cda27e29' 'd63a05943cf0a2726aa2070f3033c569' '4d74f4227dc5e12bf95b3490758d86c9' '96f82c38f3f540b53f3e5144900acf17' - 'd28e443f9f65a5712c52018b84e27137') + 'd28e443f9f65a5712c52018b84e27137' + '6606e4279d91fc617b5c4dae0d76c603') diff --git a/extra/postgresql/perl-5.14-fix.patch b/extra/postgresql/perl-5.14-fix.patch new file mode 100644 index 000000000..82ef7d688 --- /dev/null +++ b/extra/postgresql/perl-5.14-fix.patch @@ -0,0 +1,25 @@ +--- a/src/pl/plperl/plperl.c ++++ b/src/pl/plperl/plperl.c +@@ -926,7 +926,7 @@ plperl_trusted_init(void) + if (!isGV_with_GP(sv) || !GvCV(sv)) + continue; + SvREFCNT_dec(GvCV(sv)); /* free the CV */ +- GvCV(sv) = NULL; /* prevent call via GV */ ++ GvCV_set(sv, NULL); /* prevent call via GV */ + } + hv_clear(stash); + +--- a/src/pl/plperl/plperl.h ++++ b/src/pl/plperl/plperl.h +@@ -49,6 +49,11 @@ + (U32)HeKUTF8(he)) + #endif + ++/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */ ++#ifndef GvCV_set ++#define GvCV_set(gv, cv) (GvCV(gv) = cv) ++#endif ++ + /* declare routines from plperl.c for access by .xs files */ + HV *plperl_spi_exec(char *, int); + void plperl_return_next(SV *); diff --git a/extra/pygobject/PKGBUILD b/extra/pygobject/PKGBUILD index 243834e80..8b5709cfb 100644 --- a/extra/pygobject/PKGBUILD +++ b/extra/pygobject/PKGBUILD @@ -9,13 +9,16 @@ arch=('i686' 'x86_64' 'mips64el') license=('LGPL') depends=('glib2' 'gobject-introspection') makedepends=(python python2 python-cairo python2-cairo) -source=(http://ftp.gnome.org/pub/gnome/sources/${pkgbase}/${pkgver%.*}/${pkgbase}-${pkgver}.tar.bz2) +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgbase}/${pkgver%.*}/${pkgbase}-${pkgver}.tar.bz2 + fix-pycairo-capi-declaration.patch) options=('!libtool') url="http://www.pygtk.org/" -sha256sums=('70e3a05dd5f688e68b5dafa2412cd4fdbc0af83792a5752ef6353c4accf2022c') +sha256sums=('70e3a05dd5f688e68b5dafa2412cd4fdbc0af83792a5752ef6353c4accf2022c' + '3757565e6b6306f956d5ad2b414e5238144f3c67a76a5eec9f3b5fef70f08096') build() { cd "${srcdir}" + patch -Nup0 < "${srcdir}/fix-pycairo-capi-declaration.patch" cp -a "${pkgbase}-${pkgver}" python2-build mkdir devel diff --git a/extra/pygobject/fix-pycairo-capi-declaration.patch b/extra/pygobject/fix-pycairo-capi-declaration.patch new file mode 100644 index 000000000..1f0364c7a --- /dev/null +++ b/extra/pygobject/fix-pycairo-capi-declaration.patch @@ -0,0 +1,17 @@ +--- pygobject-2.28.4.orig/gi/pygi-foreign-cairo.c 2011-04-18 17:36:47.000000000 +0200 ++++ pygobject-2.28.4/gi/pygi-foreign-cairo.c 2011-06-21 20:05:11.015628222 +0200 +@@ -26,12 +26,12 @@ + + #if PY_VERSION_HEX < 0x03000000 + #include <pycairo.h> ++static Pycairo_CAPI_t *Pycairo_CAPI; + #else + #include <pycairo/py3cairo.h> ++#define Pycairo_IMPORT import_cairo() + #endif + +-Pycairo_CAPI_t *Pycairo_CAPI; +- + #include "pygi-foreign.h" + + #include <pyglib-python-compat.h> diff --git a/extra/razor/PKGBUILD b/extra/razor/PKGBUILD index ae6a8c112..87905b577 100644 --- a/extra/razor/PKGBUILD +++ b/extra/razor/PKGBUILD @@ -1,21 +1,22 @@ -# $Id: PKGBUILD 101393 2010-11-29 01:47:33Z kevin $ -# Maintainer: Dale Blount <dale@archlinux.org> +# $Id: PKGBUILD 124559 2011-05-22 23:44:08Z andrea $ +# Maintainer: +# Contributor: Dale Blount <dale@archlinux.org> # Contributor: Manolis Tzanidakis pkgname=razor pkgver=2.84 -pkgrel=4 -pkgdesc="A distributed, collaborative, spam detection and filtering network." -arch=(i686 x86_64 'mips64el') +pkgrel=5 +pkgdesc="A distributed, collaborative, spam detection and filtering network" +arch=('i686' 'x86_64') url="http://razor.sourceforge.net" license=('PerlArtistic') -depends=('glibc' 'perl-net-dns' 'perl-digest-sha1' 'perl-uri' 'perl-digest-nilsimsa' 'perl>=5.10.0') -source=(http://downloads.sourceforge.net/sourceforge/razor/${pkgname}-agents-${pkgver}.tar.bz2) +depends=('perl-net-dns' 'perl-digest-sha1' 'perl-uri' 'perl-digest-nilsimsa' 'perl>=5.14.0') +source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-agents-${pkgver}.tar.bz2) md5sums=('8b9a11a6ce020383c32c45d1530d77c2') options=(!emptydirs) build() { - cd ${srcdir}/${pkgname}-agents-${pkgver} + cd "${srcdir}"/${pkgname}-agents-${pkgver} # skip install_razor_agents (we'll do the linking later) # /bin/sed -i "s|install :: all pure_install doc_install install_razor_agents|install :: all pure_install doc_install|g" Makefile diff --git a/extra/rdesktop/PKGBUILD b/extra/rdesktop/PKGBUILD index 785fb5e04..9356ec06c 100644 --- a/extra/rdesktop/PKGBUILD +++ b/extra/rdesktop/PKGBUILD @@ -1,19 +1,20 @@ -# $Id: PKGBUILD 120030 2011-04-18 14:48:32Z andrea $ +# $Id: PKGBUILD 129462 2011-06-28 03:34:32Z heftig $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: Dan McGee <dan@archlinux.org> pkgname=rdesktop pkgver=1.7.0 -pkgrel=1 +pkgrel=2 depends=('libx11' 'openssl' 'libao' 'libsamplerate') pkgdesc="An open source client for Windows Remote Desktop Services" url="http://www.rdesktop.org/" license=('GPL') arch=('i686' 'x86_64' 'mips64el') source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" - 'rdesktop-send_physical_buttons.diff') + 'rdesktop-send_physical_buttons.diff' 'rdesktop-libao.patch') md5sums=('77fa93b21aa38837a85e81c00e757228' - '880d3aeac67b901e6bf44d1323374768') + '880d3aeac67b901e6bf44d1323374768' + 'bd2c9bc68bddcc2652c668753d787df7') build() { cd ${srcdir}/${pkgname}-${pkgver} @@ -21,6 +22,9 @@ build() { # FS#15113 patch -i ${srcdir}/rdesktop-send_physical_buttons.diff + # Fix libao segfault, from Fedora + patch -i ${srcdir}/rdesktop-libao.patch + ./configure --prefix=/usr make } diff --git a/extra/rdesktop/rdesktop-libao.patch b/extra/rdesktop/rdesktop-libao.patch new file mode 100644 index 000000000..1f3dea9ed --- /dev/null +++ b/extra/rdesktop/rdesktop-libao.patch @@ -0,0 +1,20 @@ +diff -up rdesktop-1.6.0/rdpsnd_libao.c.ao rdesktop-1.6.0/rdpsnd_libao.c +--- rdesktop-1.6.0/rdpsnd_libao.c.ao 2007-10-30 14:57:30.000000000 +0100 ++++ rdesktop-1.6.0/rdpsnd_libao.c 2010-12-02 21:22:39.000000000 +0100 +@@ -76,7 +76,7 @@ libao_open(void) + format.channels = 2; + format.rate = 44100; + format.byte_format = AO_FMT_NATIVE; +- ++ format.matrix = NULL; + + o_device = ao_open_live(default_driver, &format, NULL); + if (o_device == NULL) +@@ -115,6 +115,7 @@ libao_set_format(RD_WAVEFORMATEX * pwfx) + format.channels = pwfx->nChannels; + format.rate = 44100; + format.byte_format = AO_FMT_NATIVE; ++ format.matrix = NULL; + + if (o_device != NULL) + ao_close(o_device); diff --git a/extra/rhythmbox/PKGBUILD b/extra/rhythmbox/PKGBUILD index 14d252075..6fe4b4ed5 100644 --- a/extra/rhythmbox/PKGBUILD +++ b/extra/rhythmbox/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 127104 2011-06-10 17:27:06Z ibiru $ +# $Id: PKGBUILD 127360 2011-06-13 15:53:46Z ibiru $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Giovanni Scafora <giovanni@archlinux.org> pkgname=rhythmbox pkgver=2.90.1.git20110610 -pkgrel=1 +pkgrel=2 pkgdesc="An iTunes-like music player/libary" arch=('i686' 'x86_64' 'mips64el') license=('GPL') diff --git a/extra/rxvt-unicode/ChangeLog b/extra/rxvt-unicode/ChangeLog index 6b3a80c20..d4275a700 100644 --- a/extra/rxvt-unicode/ChangeLog +++ b/extra/rxvt-unicode/ChangeLog @@ -1,2 +1,5 @@ +2011-05-22 Angel Velasquez <angvp@archlinux.org> + * Rebuilt against perl 5.14.0 + 2011-05-17 Angel Velasquez <angvp@archlinux.org> * Removed not accepted upstream patch (closes FS#23324) diff --git a/extra/rxvt-unicode/PKGBUILD b/extra/rxvt-unicode/PKGBUILD index 86da1fd45..a3a121e0b 100644 --- a/extra/rxvt-unicode/PKGBUILD +++ b/extra/rxvt-unicode/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 124251 2011-05-18 04:52:29Z angvp $ +# $Id: PKGBUILD 124538 2011-05-22 21:23:30Z angvp $ # Maintainer: Angel Velasquez <angvp@archlinux.org> # Contributor: tobias <tobias@archlinux.org> # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org pkgname=rxvt-unicode pkgver=9.11 -pkgrel=2 +pkgrel=4 pkgdesc="An unicode enabled rxvt-clone terminal emulator (urxvt)" arch=('i686' 'x86_64' 'mips64el') url="http://software.schmorp.de/pkg/rxvt-unicode.html" diff --git a/extra/spamassassin/PKGBUILD b/extra/spamassassin/PKGBUILD index 7d57f3f46..ee4d4c060 100644 --- a/extra/spamassassin/PKGBUILD +++ b/extra/spamassassin/PKGBUILD @@ -1,22 +1,23 @@ -# $Id: PKGBUILD 106385 2011-01-16 17:09:43Z angvp $ +# $Id: PKGBUILD 129532 2011-06-28 18:19:06Z angvp $ # Maintainer: Dale Blount <dale@archlinux.org> # Contributor: Manolis Tzanidakis - pkgname=spamassassin -pkgver=3.3.1 -pkgrel=4 +pkgver=3.3.2 +pkgrel=2 pkgdesc="A mail filter to identify spam." arch=(i686 x86_64 'mips64el') license=(APACHE) url="http://spamassassin.apache.org" -depends=('perl>=5.12.2' 'perl-net-dns' 'perl-uri' 'perl-html-parser' \ +depends=('perl>=5.14' 'perl-net-dns' 'perl-uri' 'perl-html-parser' \ 'perl-digest-sha1' 'perl-io-socket-ssl' 'openssl' \ - 'perl-libwww' 'perl-io-zlib' 'perl-mail-spf' \ - 'perl-archive-tar' 'zlib' 're2c') + 'perl-libwww' 'perl-mail-spf' \ + 'zlib' 're2c') + # perl-archive-tar perl-io-zlib) makedepends=('razor' 'perl-dbi') optdepends=('razor: to identify collaborately-flagged spam' - 'gnupg: gpg support, without this use --nogpg flag for sa-update' - 're2c: regexp compiler, for compiling rules with sa-compile') + 'gnupg: gpg support, without this use --nogpg flag for sa-update' + 're2c: regexp compiler, for compiling rules with sa-compile' + 'perl-mail-dkim: DomainKeys Identified Mail (DKIM) checking') backup=(etc/conf.d/spamd etc/mail/spamassassin/local.cf \ etc/mail/spamassassin/init.pre \ etc/mail/spamassassin/v310.pre \ @@ -26,7 +27,7 @@ install=${pkgname}.install options=(!emptydirs) source=(http://mirrors.devlib.org/apache/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz \ spamd.conf.d spamd) -md5sums=('5a93f81fda315411560ff5da099382d2' +md5sums=('d1d62cc5c6eac57e88c4006d9633b81e' 'af501c6b0bb937a2775b747cc4b6d150' '0534d3071a526a27ddc2b297afa03b04') @@ -39,12 +40,14 @@ build() { /usr/bin/make } +check() { + cd ${srcdir}/Mail-SpamAssassin-${pkgver} + /usr/bin/make test || true +} + package() { cd ${srcdir}/Mail-SpamAssassin-${pkgver} /usr/bin/make DESTDIR=${pkgdir} install - # remove perllocal.pod and .packlist - find ${pkgdir} -name perllocal.pod -delete - find ${pkgdir} -name .packlist -delete /bin/install -D -m644 ${srcdir}/spamd.conf.d ${pkgdir}/etc/conf.d/spamd /bin/install -D -m755 ${srcdir}/spamd ${pkgdir}/etc/rc.d/spamd diff --git a/extra/subversion/PKGBUILD b/extra/subversion/PKGBUILD index 98b02299e..b1bedaf9e 100644 --- a/extra/subversion/PKGBUILD +++ b/extra/subversion/PKGBUILD @@ -1,14 +1,17 @@ -# $Id: PKGBUILD 126235 2011-06-02 19:57:23Z stephane $ +# $Id: PKGBUILD 127222 2011-06-11 09:32:25Z andrea $ # Maintainer: Paul Mattal <paul@archlinux.org> # Contributor: Jason Chu <jason@archlinux.org> pkgname=subversion pkgver=1.6.17 -pkgrel=2 +pkgrel=4 pkgdesc="Replacement for CVS, another versioning system (SVN)" arch=('i686' 'x86_64' 'mips64el') license=('apache' 'bsd') -depends=('neon' 'apr-util') +depends=('neon' 'apr-util' 'sqlite3') +makedepends=('krb5' 'apache' 'python2' 'perl' 'swig' 'ruby' 'java-runtime' + 'autoconf' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs') +[ "$CARCH" = "mips64el" ] && \ makedepends=('krb5' 'apache' 'python2' 'perl' 'swig' 'autoconf' 'sqlite3' 'db' 'e2fsprogs' 'libgnome-keyring') #'java-runtime' 'kdelibs' 'ruby' source=(http://subversion.tigris.org/downloads/$pkgname-$pkgver.tar.bz2 diff --git a/extra/swt/PKGBUILD b/extra/swt/PKGBUILD index c72418dfe..747013569 100644 --- a/extra/swt/PKGBUILD +++ b/extra/swt/PKGBUILD @@ -1,33 +1,35 @@ -# $Id: PKGBUILD 90058 2010-09-06 21:07:12Z guillaume $ +# $Id: PKGBUILD 129501 2011-06-28 14:09:34Z guillaume $ # Maintainer: Guillaume ALAUX <guillaume@archlinux.org> pkgname=swt -pkgver=3.6 -pkgrel=2 +pkgver=3.7 +pkgrel=1 pkgdesc="An open source widget toolkit for Java" -_date=201006080911 -arch=(i686 x86_64 'mips64el') +_date=201106131736 +arch=(i686 x86_64) url="http://www.eclipse.org/swt/" license=('EPL') depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst') -optdepends=('libgnomeui' 'xulrunner' 'mesa') -makedepends=('openjdk6' 'libxtst' 'mesa' 'libgnomeui' 'xulrunner>=1.9.1' 'unzip' 'pkgconfig' 'apache-ant') +#optdepends=('libgnomeui' 'xulrunner' 'mesa') +#makedepends=('openjdk6' 'libxtst' 'mesa' 'libgnomeui' 'xulrunner>=1.9.1' 'unzip' 'pkgconfig' 'apache-ant') +optdepends=('libgnomeui' 'mesa') +makedepends=('openjdk6' 'libxtst' 'mesa' 'libgnomeui' 'unzip' 'pkgconfig' 'apache-ant') source=(http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86.zip http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86_64.zip build-swt.xml) -md5sums=('514206a4b9e27ac66cb7876157c3e74f' - '244f63edc7e609c7ac7f4bd1d7e0298a' +md5sums=('21d084526f5df4e02900b2ce4ae8b5d1' + '60f11408bc8db299c5406a904a665a5e' 'f5e548bc26a0f1f3c18131be76face40') if [ "${CARCH}" = "i686" ]; then source=(http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86.zip build-swt.xml) noextract=(swt-${pkgver}-gtk-linux-x86.zip) - md5sums=('514206a4b9e27ac66cb7876157c3e74f' + md5sums=('21d084526f5df4e02900b2ce4ae8b5d1' 'f5e548bc26a0f1f3c18131be76face40') fi if [ "${CARCH}" = "x86_64" ]; then source=(http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86_64.zip build-swt.xml) - md5sums=('244f63edc7e609c7ac7f4bd1d7e0298a' + md5sums=('60f11408bc8db299c5406a904a665a5e' 'f5e548bc26a0f1f3c18131be76face40') noextract=(swt-${pkgver}-gtk-linux-x86_64.zip) fi @@ -41,32 +43,39 @@ build() { rm -rf about_files mkdir src mv org src/ - cp build-swt.xml build.xml || return 1 + cp build-swt.xml build.xml - [ "${CARCH}" = "x86_64" ] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64 + [ "${CARCH}" = "x86_64" ] && export SWT_PTR_CFLAGS=-DJNI64 - make -f make_linux.mak make_awt || return 1 - make -f make_linux.mak make_swt || return 1 - make -f make_linux.mak make_atk || return 1 - make -f make_linux.mak make_gnome || return 1 - export MOZILLA_INCLUDES="`pkg-config --cflags libxul`" - export MOZILLA_LIBS="-Wl,-R`pkg-config libxul --variable=libdir` `pkg-config libxul --libs`" - export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}" - export XULRUNNER_LIBS="${MOZILLA_LIBS}" - make -f make_linux.mak make_mozilla || return 1 - make -f make_linux.mak make_xulrunner || return 1 + make -f make_linux.mak make_awt + make -f make_linux.mak make_swt + make -f make_linux.mak make_atk + make -f make_linux.mak make_gnome +# "XULRunner >= 2.0 is not currently supported" +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=327696 +# +# export MOZILLA_INCLUDES="`pkg-config --cflags libxul`" +# export MOZILLA_LIBS="-Wl,-R`pkg-config libxul --variable=libdir` `pkg-config libxul --libs`" +# export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}" +# export XULRUNNER_LIBS="${MOZILLA_LIBS}" +# make -f make_linux.mak make_mozilla +# make -f make_linux.mak make_xulrunner - make -f make_linux.mak make_cairo || return 1 - make -f make_linux.mak make_glx || return 1 + make -f make_linux.mak make_cairo + make -f make_linux.mak make_glx - ant compile || return 1 + ant compile +} + +package() { + cd "${srcdir}" cp version.txt build/version.txt cp src/org/eclipse/swt/internal/SWTMessages.properties build/org/eclipse/swt/internal/ - ant jar || return 1 + ant jar install -m755 -d "${pkgdir}/usr/share/java" install -m755 -d "${pkgdir}/usr/lib" - install -m644 swt.jar "${pkgdir}/usr/share/java/" || return 1 - install -m755 *.so "${pkgdir}/usr/lib/" || return 1 + install -m644 swt.jar "${pkgdir}/usr/share/java/" + install -m755 *.so "${pkgdir}/usr/lib/" } diff --git a/extra/totem/PKGBUILD b/extra/totem/PKGBUILD index 273588614..45297ffc3 100644 --- a/extra/totem/PKGBUILD +++ b/extra/totem/PKGBUILD @@ -11,6 +11,10 @@ license=('GPL2' 'custom') makedepends=('intltool' 'gnome-doc-utils' 'gstreamer0.10-base-plugins' 'gstreamer0.10-good-plugins' 'totem-plparser' 'libpeas' 'pygobject' 'pygobject-devel' 'nautilus' 'libxxf86vm' 'libxtst' 'desktop-file-utils' 'iso-codes' 'libgdata' 'xulrunner' 'lirc-utils' 'libepc' 'bluez' 'vala') +[ "$CARCH" = "mips64el" ] && \ +makedepends=('intltool' 'gnome-doc-utils' 'gstreamer0.10-base-plugins' 'gstreamer0.10-good-plugins' 'totem-plparser' + 'libpeas' 'pygobject' 'pygobject-devel' 'nautilus' 'libxxf86vm' 'libxtst' 'desktop-file-utils' 'iso-codes' 'libgdata' + 'xulrunner' 'libepc' 'bluez' 'vala') options=('!libtool' '!emptydirs') source=(http://ftp.gnome.org/pub/gnome/sources/${pkgbase}/${pkgver%.*}/${pkgbase}-${pkgver}.tar.bz2 fix_crash.patch) diff --git a/extra/valgrind/PKGBUILD b/extra/valgrind/PKGBUILD deleted file mode 100644 index a181f374c..000000000 --- a/extra/valgrind/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# $Id: PKGBUILD 126782 2011-06-07 10:02:00Z allan $ -# Maintainer: Dan McGee <dan@archlinux.org> -# Maintainer: Allan McRae <allan@archlinux.org> - -pkgname=valgrind -pkgver=3.6.1 -pkgrel=2 -pkgdesc="A tool to help find memory-management problems in programs" -arch=('i686' 'x86_64') -license=('GPL') -url="http://valgrind.org/" -depends=('glibc>=2.14' 'glibc<2.15' 'perl') -makedepends=('gdb') -options=('!emptydirs') -source=(http://valgrind.org/downloads/${pkgname}-${pkgver}.tar.bz2 - valgrind-3.6.1-glibc-2.14.patch - glibc-patch-version.patch) -md5sums=('2c3aa122498baecc9d69194057ca88f5' - '560032ce5d27ef0c7c1af32c3fd45833' - 'b657f0ebdde3d9aefc9fd16f9e653702') - -build() { - cd ${srcdir}/${pkgname}-${pkgver} - - # make sure our CFLAGS are respected - sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in - - # glibc-2.14 compatibility - patch -Np1 -i ${srcdir}/valgrind-3.6.1-glibc-2.14.patch - - # prevent need to rebuild with glibc patch level version bumps - patch -Np1 -i ${srcdir}/glibc-patch-version.patch - - if [ "${CARCH}" = "x86_64" ]; then - ./configure --prefix=/usr --mandir=/usr/share/man --enable-only64bit - else - ./configure --prefix=/usr --mandir=/usr/share/man - fi - make -} - -package() { - cd ${srcdir}/${pkgname}-${pkgver} - make DESTDIR=${pkgdir} install -} diff --git a/extra/vim/PKGBUILD b/extra/vim/PKGBUILD index 7d4f5d5fc..013def142 100644 --- a/extra/vim/PKGBUILD +++ b/extra/vim/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 123129 2011-05-08 21:00:10Z heftig $ +# $Id: PKGBUILD 125313 2011-05-25 20:09:55Z heftig $ # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> # Maintainer: tobias [ tobias at archlinux org ] # Maintainer: Daniel J Griffiths <ghost1227@archlinux.us> @@ -6,9 +6,9 @@ pkgbase=vim pkgname=(vim gvim vim-runtime) _topver=7.3 -_patchlevel=177 +_patchlevel=206 pkgver=${_topver}.${_patchlevel} -__hgrev=60890b26cb17 +__hgrev=e9538cfd0d9c pkgrel=1 arch=('i686' 'x86_64' 'mips64el') license=('custom:vim') diff --git a/extra/vlc/PKGBUILD b/extra/vlc/PKGBUILD index 95361e280..c861b3ac6 100644 --- a/extra/vlc/PKGBUILD +++ b/extra/vlc/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 127816 2011-06-18 16:12:17Z ibiru $ +# $Id: PKGBUILD 129407 2011-06-27 11:36:20Z stephane $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> # Contributor: Martin Sandsmark <martin.sandsmark@kde.org> pkgname=vlc pkgver=1.1.10 -pkgrel=4 +pkgrel=5 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" arch=('i686' 'x86_64') url="http://www.videolan.org/vlc/" @@ -34,13 +34,19 @@ conflicts=('vlc-plugin') replaces=('vlc-plugin') options=('!libtool') install=vlc.install -source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2") -md5sums=('066cb94b1e3aa848d828121354d6be4d') +source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2" + vlc-1.1.10-libavformat.patch) +md5sums=('066cb94b1e3aa848d828121354d6be4d' + '9b82571a594e08e67fbae9c96c3f3ed7') build() { cd "${srcdir}/${pkgname}-${pkgver}" sed -i -e 's:truetype/freefont:TTF:g' modules/misc/freetype.c + + # FS#24872 + patch -Np1 -i ../vlc-1.1.10-libavformat.patch + ./configure --prefix=/usr \ --disable-rpath \ --enable-faad \ diff --git a/extra/vlc/vlc-1.1.10-libavformat.patch b/extra/vlc/vlc-1.1.10-libavformat.patch new file mode 100644 index 000000000..4bec72334 --- /dev/null +++ b/extra/vlc/vlc-1.1.10-libavformat.patch @@ -0,0 +1,29 @@ +From 21260bbb732d9de5540f809e1a54bde740f12a95 Mon Sep 17 00:00:00 2001 +From: Laurent Aimar <fenrir@videolan.org> +Date: Tue, 7 Jun 2011 00:43:56 +0200 +Subject: [PATCH] Fix ByteIOContext init on recent libavformat + +Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> +(cherry picked from commit 4fc3bd15a3844e41a75760fa8e100feecea969a5) + +Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> +--- + modules/demux/avformat/demux.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c +index fbb0b28..bd7c166 100644 +--- a/modules/demux/avformat/demux.c ++++ b/modules/demux/avformat/demux.c +@@ -210,6 +210,9 @@ int OpenDemux( vlc_object_t *p_this ) + */ + p_sys->url.is_streamed = 1; + p_sys->io.is_streamed = 1; ++#if defined(AVIO_SEEKABLE_NORMAL) ++ p_sys->io.seekable = 0; ++#endif + } + + +-- +1.7.2.5 diff --git a/extra/weechat/PKGBUILD b/extra/weechat/PKGBUILD index 066ecc416..09f86fbfd 100644 --- a/extra/weechat/PKGBUILD +++ b/extra/weechat/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 124014 2011-05-15 23:09:30Z giovanni $ +# $Id: PKGBUILD 125306 2011-05-25 19:29:12Z foutrelis $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: lucke <lucke at o2 dot pl> pkgname=weechat pkgver=0.3.5 -pkgrel=1 +pkgrel=2 pkgdesc="Fast, light and extensible IRC client (curses UI)" arch=('i686' 'x86_64' 'mips64el') url="http://www.weechat.org/" diff --git a/extra/x264/PKGBUILD b/extra/x264/PKGBUILD index 7e167e54e..29de1fd05 100644 --- a/extra/x264/PKGBUILD +++ b/extra/x264/PKGBUILD @@ -18,7 +18,9 @@ md5sums=('928717aa2f0c7ca91e589d6b60e688f1') build() { cd "$srcdir/$pkgname-snapshot-$pkgver-2245" - ./configure --enable-shared + [ "$CARCH" = "mips64el" ] && extra="--enable-pic" + + ./configure --enable-shared $extra make make DESTDIR="$pkgdir" \ diff --git a/extra/xorg-iceauth/PKGBUILD b/extra/xorg-iceauth/PKGBUILD index 9063e3a4d..8af9aa2b0 100644 --- a/extra/xorg-iceauth/PKGBUILD +++ b/extra/xorg-iceauth/PKGBUILD @@ -5,7 +5,7 @@ pkgname=xorg-iceauth pkgver=1.0.5 pkgrel=1 pkgdesc="ICE authority file utility" -arch=(i686 x86_64) +arch=(i686 x86_64 'mips64el') url="http://xorg.freedesktop.org/" license=('custom') depends=('libice') diff --git a/extra/xulrunner/PKGBUILD b/extra/xulrunner/PKGBUILD index ea0ea5c34..1f3cd5e44 100644 --- a/extra/xulrunner/PKGBUILD +++ b/extra/xulrunner/PKGBUILD @@ -22,24 +22,24 @@ options=('!emptydirs') replaces=('xulrunner-oss') build() { cd "${srcdir}/icecat-${_ffoxver}/" - cp "${srcdir}/mozconfig" .mozconfig + cp "${srcdir}/mozconfig" .mozconfig #fix libdir/sdkdir - fedora - patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch" + patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch" #Force installation to the same path for every version - patch -Np1 -i "${srcdir}/xulrunner-version.patch" + patch -Np1 -i "${srcdir}/xulrunner-version.patch" #https://bugzilla.mozilla.org/show_bug.cgi?id=620931 - patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch" + patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch" #https://bugzilla.mozilla.org/show_bug.cgi?id=494163 - patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch" + patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch" - [[ "$CARCH" == "mips64el" ]] && { - echo "ac_add_options --disable-ipc" >> .mozconfig - patch -Np0 -i "${srcdir}/mips.patch" - } + [[ "$CARCH" == "mips64el" ]] && { + echo "ac_add_options --disable-ipc" >> .mozconfig + patch -Np0 -i "${srcdir}/mips.patch" + } unset CFLAGS unset CXXFLAGS @@ -62,10 +62,3 @@ package() { install -d ${pkgdir}/etc/ld.so.conf.d echo "/usr/lib/xulrunner-2.0" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf } -md5sums=('1b4d44ee5badc28fd332cba564ecde0a' - '2358a2ddd35bcdd62ff42442dfe548d9' - '639ea80e823543dd415b90c0ee804186' - 'a0236f6c3e55f60b7888d8cf137ff209' - 'f8b64cf798636a9c1e4e10c08de0b859' - '42f83468b296452fb754a81a4317ca64' - '0e970ff5600246e953f527813883e744') diff --git a/extra/zziplib/PKGBUILD b/extra/zziplib/PKGBUILD index 4783fc5ee..73d728632 100644 --- a/extra/zziplib/PKGBUILD +++ b/extra/zziplib/PKGBUILD @@ -7,7 +7,7 @@ pkgname=zziplib pkgver=0.13.60 pkgrel=1 pkgdesc="A lightweight library that offers the ability to easily extract data from files archived in a single zip file" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://zziplib.sourceforge.net" license=('LGPL' 'MPL') depends=('zlib') |