diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-01-20 20:41:20 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-01-20 20:41:20 -0300 |
commit | 33fcf0e7b95e530b849e59e90fdea4001e01283d (patch) | |
tree | 5eab4f238207cce42c8351067ade9999df065a1f /community | |
parent | 3b0910bf6527c3b761d9579b2ed37a9a42595fa3 (diff) | |
parent | a1922d0ec660fdc1892f2783515f781c090df0a9 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/gnash/PKGBUILD
community/libopenraw/PKGBUILD
community/smalltalk/PKGBUILD
core/coreutils/PKGBUILD
core/libarchive/PKGBUILD
extra/dhcp/PKGBUILD
extra/gmime/PKGBUILD
extra/gvfs/PKGBUILD
extra/kdeutils/PKGBUILD
extra/libreoffice/PKGBUILD
extra/lirc/PKGBUILD
extra/php-suhosin/PKGBUILD
extra/qtwebkit/PKGBUILD
extra/sdl_image/PKGBUILD
extra/sdl_net/PKGBUILD
extra/sdl_ttf/PKGBUILD
extra/spamassassin/PKGBUILD
extra/tftp-hpa/PKGBUILD
extra/totem-plparser/PKGBUILD
extra/tumbler/PKGBUILD
extra/vim/PKGBUILD
extra/wipe/PKGBUILD
extra/xfce4-netload-plugin/PKGBUILD
kde-unstable/kdebase-workspace/PKGBUILD
kde-unstable/kdebase-workspace/kde-np.pam
kde-unstable/kdebase-workspace/kde.pam
multilib/binutils-multilib/PKGBUILD
multilib/chuck/PKGBUILD
multilib/dev86/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/jack2-multilib/PKGBUILD
multilib/lib32-gdk-pixbuf2/PKGBUILD
multilib/lib32-glib2/PKGBUILD
multilib/lib32-glibc/PKGBUILD
multilib/lib32-glibc/lib32-glibc.conf
multilib/lib32-gtk2/PKGBUILD
multilib/lib32-libpulse/PKGBUILD
multilib/lib32-pango/PKGBUILD
multilib/lib32-sdl_image/PKGBUILD
multilib/lib32-sdl_ttf/PKGBUILD
multilib/libtool-multilib/PKGBUILD
multilib/nspluginwrapper/PKGBUILD
multilib/q4wine/PKGBUILD
multilib/wine/PKGBUILD
staging/php/PKGBUILD
staging/php/php-fpm.conf.in.patch
staging/php/php.ini.patch
Diffstat (limited to 'community')
78 files changed, 5456 insertions, 498 deletions
diff --git a/community/augeas/PKGBUILD b/community/augeas/PKGBUILD index 0d53076e5..f670fd7dc 100644 --- a/community/augeas/PKGBUILD +++ b/community/augeas/PKGBUILD @@ -1,15 +1,15 @@ -# $Id: PKGBUILD 60191 2011-12-07 04:43:36Z ebelanger $ +# $Id: PKGBUILD 62121 2012-01-16 09:07:06Z spupykin $ # Contributor: Thomas S Hatch <thatch45@gmail.com> # Contributor: Jon Nordby <jononor@gmail.com> pkgname=augeas pkgver=0.10.0 -pkgrel=1 +pkgrel=2 pkgdesc="A configuration editing tool that parses config files and transforms them into a tree" arch=('i686' 'x86_64' 'mips64el') url="http://augeas.net" license=('LGPL') -depends=('libxml2') +depends=('libxml2' 'gcc-libs') options=('!libtool') source=(http://augeas.net/download/$pkgname-$pkgver.tar.gz{,.sig}) md5sums=('fe1834e90a066c3208ac0214622c7352' @@ -17,6 +17,7 @@ md5sums=('fe1834e90a066c3208ac0214622c7352' build() { cd "$srcdir/$pkgname-$pkgver" + sed -i 's|Requires:.*|Requires: libxml-2.0|' augeas.pc.in ./configure --prefix=/usr make } diff --git a/community/balsa/PKGBUILD b/community/balsa/PKGBUILD index da1d77a3f..9bc637420 100644 --- a/community/balsa/PKGBUILD +++ b/community/balsa/PKGBUILD @@ -1,44 +1,47 @@ -# $Id: PKGBUILD 51383 2011-07-08 03:41:33Z bfanella $ +# $Id: PKGBUILD 62139 2012-01-16 19:52:55Z dreisner $ # Maintainer : Ionut Biru <ibiru@archlinux.org> # Maintainer: Brad Fanella <bradfanella@archlinux.us> # Contributor: Roman Kyrylych <roman@archlinux.org> pkgname=balsa -pkgver=2.4.10 +pkgver=2.4.11 pkgrel=1 pkgdesc="An e-mail client for GNOME" arch=('i686' 'x86_64' 'mips64el') license=('GPL') url='http://pawsa.fedorapeople.org/balsa/' -depends=('gmime' 'libwebkit' 'libesmtp' 'libnotify' 'gpgme' 'gtksourceview2' 'gtkspell' 'gnome-icon-theme') -makedepends=('perlxml' 'gnome-doc-utils' 'intltool' 'namcap') +depends=('gmime' 'libwebkit' 'libesmtp' 'libnotify' 'gpgme' 'gtksourceview2' 'gtkspell' 'gnome-icon-theme' 'desktop-file-utils') +makedepends=('perlxml' 'gnome-doc-utils' 'intltool') install=balsa.install -source=(http://pawsa.fedorapeople.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2) -md5sums=('fa2b7cb9d248912ac2e3dcc08cd6aa5b') +source=(http://pawsa.fedorapeople.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + gmime26.patch) +md5sums=('915c622b6385aa4f83d5eee8f31ee8e8' + '108d33f533558a371189441edce7d7e6') build() { - cd ${srcdir}/${pkgname}-${pkgver} + cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-ssl \ - --with-gpgme=gpgme-config \ - --with-gss \ - --with-ldap \ - --with-gtksourceview \ - --with-gtkspell \ - --with-rubrica \ - --with-sqlite \ - --without-nm \ - --without-gnome \ - --with-html-widget=webkit - - make + patch -Np1 -i "${srcdir}/gmime26.patch" + autoreconf -fi + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-ssl \ + --with-gpgme=gpgme-config \ + --with-gss \ + --with-ldap \ + --with-gtksourceview \ + --with-gtkspell \ + --with-rubrica \ + --with-sqlite \ + --without-nm \ + --without-gnome \ + --with-html-widget=webkit + make } package() { - cd ${srcdir}/${pkgname}-${pkgver} - - make GTK_UPDATE_ICON_CACHE=/bin/true DESTDIR="${pkgdir}" install + cd "${srcdir}/${pkgname}-${pkgver}" + make GTK_UPDATE_ICON_CACHE=/bin/true DESTDIR="${pkgdir}" install } diff --git a/community/balsa/balsa.install b/community/balsa/balsa.install index cb9a7a5c3..1f167b5e9 100644 --- a/community/balsa/balsa.install +++ b/community/balsa/balsa.install @@ -1,11 +1,12 @@ post_install() { - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor + update-desktop-database -q } post_upgrade() { - post_install $1 + post_install $1 } post_remove() { - post_install $1 + post_install $1 } diff --git a/community/balsa/gmime26.patch b/community/balsa/gmime26.patch new file mode 100644 index 000000000..fe4e6a9fa --- /dev/null +++ b/community/balsa/gmime26.patch @@ -0,0 +1,1372 @@ +From 393d0077495cb750ee47bab6ec44a60906a95179 Mon Sep 17 00:00:00 2001 +From: Peter Bloomfield <PeterBloomfield@bellsouth.net> +Date: Mon, 28 Nov 2011 03:00:55 +0000 +Subject: Build with GMime 2.6.0 + + * configure.in: check for GMime >= 2.5.7 + * libbalsa/gmime-application-pkcs7.c + (g_mime_application_pkcs7_sign), (g_mime_application_pkcs7_verify), + (g_mime_application_pkcs7_encrypt), + (g_mime_application_pkcs7_decrypt): build with GMime >= 2.5.7. + * libbalsa/gmime-application-pkcs7.h: ditto. + * libbalsa/gmime-gpgme-context.c (g_mime_gpgme_context_get_type), + (g_mime_gpgme_context_class_init), (g_mime_gpgme_context_finalize), + (g_mime_gpgme_digest_id): ditto. + * libbalsa/gmime-gpgme-context.h: ditto. + * libbalsa/gmime-part-rfc2440.c (g_mime_part_rfc2440_sign_encrypt), + (g_mime_part_rfc2440_verify), (g_mime_part_rfc2440_decrypt): + ditto. + * libbalsa/gmime-part-rfc2440.h: ditto. + * libbalsa/rfc3156.c (password_request_func), + (libbalsa_sign_mime_object), (libbalsa_encrypt_mime_object), + (libbalsa_body_check_signature), (libbalsa_body_decrypt): ditto. +--- +diff --git a/ChangeLog b/ChangeLog +index bd95e68..d5c62f5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,25 @@ ++2011-11-27 Peter Bloomfield ++ ++ Build with GMime 2.6.0 ++ ++ * configure.in: check for GMime >= 2.5.7 ++ * libbalsa/gmime-application-pkcs7.c ++ (g_mime_application_pkcs7_sign), (g_mime_application_pkcs7_verify), ++ (g_mime_application_pkcs7_encrypt), ++ (g_mime_application_pkcs7_decrypt): build with GMime >= 2.5.7. ++ * libbalsa/gmime-application-pkcs7.h: ditto. ++ * libbalsa/gmime-gpgme-context.c (g_mime_gpgme_context_get_type), ++ (g_mime_gpgme_context_class_init), (g_mime_gpgme_context_finalize), ++ (g_mime_gpgme_digest_id): ditto. ++ * libbalsa/gmime-gpgme-context.h: ditto. ++ * libbalsa/gmime-part-rfc2440.c (g_mime_part_rfc2440_sign_encrypt), ++ (g_mime_part_rfc2440_verify), (g_mime_part_rfc2440_decrypt): ++ ditto. ++ * libbalsa/gmime-part-rfc2440.h: ditto. ++ * libbalsa/rfc3156.c (password_request_func), ++ (libbalsa_sign_mime_object), (libbalsa_encrypt_mime_object), ++ (libbalsa_body_check_signature), (libbalsa_body_decrypt): ditto. ++ + 2011-11-22 Pawel Salek + + * NEWS, configure.in: release balsa-2.4.11 +diff --git a/configure.in b/configure.in +index 4a8320e..64d99f3 100644 +--- a/configure.in ++++ b/configure.in +@@ -307,7 +307,12 @@ fi + case "$with_gmime" in + 2.4) ;; + 2.6) AC_DEFINE([HAVE_GMIME_2_6], [1], +- [Defined to build with GMime version 2.5 or 2.6]) ;; ++ [Defined to build with GMime version 2.5 or 2.6]) ++ if $PKG_CONFIG --atleast-version=2.5.7 gmime-2.6; then ++ AC_DEFINE([HAVE_GMIME_2_5_7], [1], ++ [Defined when GMime version is at least 2.5.7]) ++ fi ++ ;; + *) AC_MSG_ERROR([unknown GMime version $with_gmime]) ;; + esac + +diff --git a/libbalsa/gmime-application-pkcs7.c b/libbalsa/gmime-application-pkcs7.c +index 12f4f8f..63b8087 100644 +--- a/libbalsa/gmime-application-pkcs7.c ++++ b/libbalsa/gmime-application-pkcs7.c +@@ -96,8 +96,14 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + GMimeFilter *crlf_filter, *from_filter; + + g_return_val_if_fail (GMIME_IS_PART (pkcs7), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1); + g_return_val_if_fail (ctx->sign_protocol != NULL, -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail (GMIME_IS_CRYPTO_CONTEXT (ctx), -1); ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol(ctx) ++ != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail (GMIME_IS_OBJECT (content), -1); + + /* Prepare all the parts for signing... */ +@@ -127,7 +133,14 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + sig_data_stream = g_mime_stream_mem_new (); + + /* get the signed content */ +- if (g_mime_cipher_context_sign (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, sig_data_stream, err) == -1) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_sign (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, sig_data_stream, err) == -1) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_sign ++ (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, ++ sig_data_stream, err) == -1) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref (filtered_stream); + g_object_unref (sig_data_stream); + g_object_unref (stream); +@@ -168,9 +181,15 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + * decrypting it again. In this case, validity is undefined. + */ + GMimeObject * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_verify(GMimePart * pkcs7, + GMimeSignatureValidity ** validity, + GMimeCipherContext * ctx, GError ** err) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_application_pkcs7_verify(GMimePart * pkcs7, ++ GMimeSignatureList ** list, ++ GMimeCryptoContext * ctx, GError ** err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeObject *decrypted; + GMimeDataWrapper *wrapper; +@@ -181,8 +200,14 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + const char *smime_type; + + g_return_val_if_fail(GMIME_IS_PART(pkcs7), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_IS_CIPHER_CONTEXT(ctx), NULL); + g_return_val_if_fail(ctx->encrypt_protocol != NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(GMIME_IS_CRYPTO_CONTEXT(ctx), NULL); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some sanity checks */ + smime_type = +@@ -208,9 +233,16 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + g_object_unref(crlf_filter); + + /* get the cleartext */ ++#ifndef HAVE_GMIME_2_5_7 + *validity = g_mime_cipher_context_verify(ctx, GMIME_CIPHER_HASH_DEFAULT, + ciphertext, filtered_stream, err); +- if (!*validity) { ++ if (!*validity) ++#else /* HAVE_GMIME_2_5_7 */ ++ *list = g_mime_crypto_context_verify(ctx, GMIME_CIPHER_ALGO_DEFAULT, ++ ciphertext, filtered_stream, err); ++ if (!*list) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(filtered_stream); + g_object_unref(ciphertext); + g_object_unref(stream); +@@ -248,7 +280,12 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + */ + int + g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *ctx, GPtrArray *recipients, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *ctx, ++ GPtrArray *recipients, ++#endif /* HAVE_GMIME_2_5_7 */ + GError **err) + { + GMimeDataWrapper *wrapper; +@@ -257,8 +294,14 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + GMimeFilter *crlf_filter; + + g_return_val_if_fail (GMIME_IS_PART (pkcs7), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1); + g_return_val_if_fail (ctx->encrypt_protocol != NULL, -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail (GMIME_IS_CRYPTO_CONTEXT (ctx), -1); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail (GMIME_IS_OBJECT (content), -1); + + /* get the cleartext */ +@@ -279,7 +322,15 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + + /* encrypt the content stream */ + ciphertext = g_mime_stream_mem_new (); +- if (g_mime_cipher_context_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_encrypt ++ (ctx, FALSE, NULL, ++ GMIME_CIPHER_ALGO_DEFAULT, ++ recipients, stream, ciphertext, err) == -1) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref (ciphertext); + g_object_unref (stream); + return -1; +@@ -313,8 +364,14 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + * err with more information about the reason. + */ + GMimeObject * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + GError **err) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, ++ GMimeCryptoContext *ctx, ++ GError **err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeObject *decrypted; + GMimeDataWrapper *wrapper; +@@ -325,8 +382,14 @@ g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + const char *smime_type; + + g_return_val_if_fail(GMIME_IS_PART(pkcs7), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_IS_CIPHER_CONTEXT(ctx), NULL); + g_return_val_if_fail(ctx->encrypt_protocol != NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(GMIME_IS_CRYPTO_CONTEXT(ctx), NULL); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some sanity checks */ + smime_type = +@@ -353,7 +416,13 @@ g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + g_object_unref(crlf_filter); + + /* get the cleartext */ +- if (g_mime_cipher_context_decrypt(ctx, ciphertext, filtered_stream, err) == NULL) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_decrypt(ctx, ciphertext, filtered_stream, err) == NULL) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_decrypt ++ (ctx, ciphertext, filtered_stream, err) == NULL) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(filtered_stream); + g_object_unref(ciphertext); + g_object_unref(stream); +diff --git a/libbalsa/gmime-application-pkcs7.h b/libbalsa/gmime-application-pkcs7.h +index 03fa401..6678ff5 100644 +--- a/libbalsa/gmime-application-pkcs7.h ++++ b/libbalsa/gmime-application-pkcs7.h +@@ -28,7 +28,11 @@ extern "C" { + #endif /* __cplusplus */ + + #include <gmime/gmime-part.h> ++#ifndef HAVE_GMIME_2_5_7 + #include <gmime/gmime-cipher-context.h> ++#else /* HAVE_GMIME_2_5_7 */ ++#include <gmime/gmime-crypto-context.h> ++#endif /* HAVE_GMIME_2_5_7 */ + + #undef HAS_APPLICATION_PKCS7_MIME_SIGNED_SUPPORT + +@@ -39,21 +43,40 @@ extern "C" { + * Balsa always encodes S/MIME signed stuff as multipart/signed. */ + int g_mime_application_pkcs7_sign(GMimePart * pkcs7, + GMimeObject * content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ctx, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext * ctx, ++#endif /* HAVE_GMIME_2_5_7 */ + const char *userid, GError ** err); + #endif + ++#ifndef HAVE_GMIME_2_5_7 + GMimeObject *g_mime_application_pkcs7_verify(GMimePart * pkcs7, + GMimeSignatureValidity ** validity, + GMimeCipherContext * ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeObject *g_mime_application_pkcs7_verify(GMimePart * pkcs7, ++ GMimeSignatureList ** validity, ++ GMimeCryptoContext * ctx, GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + int g_mime_application_pkcs7_encrypt(GMimePart * pkcs7, + GMimeObject * content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ctx, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext * ctx, ++#endif /* HAVE_GMIME_2_5_7 */ + GPtrArray * recipients, GError ** err); + ++#ifndef HAVE_GMIME_2_5_7 + GMimeObject *g_mime_application_pkcs7_decrypt(GMimePart * pkcs7, + GMimeCipherContext * ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeObject *g_mime_application_pkcs7_decrypt(GMimePart * pkcs7, ++ GMimeCryptoContext * ctx, GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + #ifdef __cplusplus + } +diff --git a/libbalsa/gmime-gpgme-context.c b/libbalsa/gmime-gpgme-context.c +index 24b140b..0c56f94 100644 +--- a/libbalsa/gmime-gpgme-context.c ++++ b/libbalsa/gmime-gpgme-context.c +@@ -27,6 +27,9 @@ + #include <unistd.h> + #include <glib.h> + #include <gmime/gmime.h> ++#ifdef HAVE_GMIME_2_5_7 ++#include <gmime/gmime-certificate.h> ++#endif /* HAVE_GMIME_2_5_7 */ + #include <gpgme.h> + #include <time.h> + #include <glib/gi18n.h> +@@ -44,6 +47,7 @@ static gboolean g_mime_gpgme_context_check_protocol(GMimeGpgmeContextClass + protocol, + GError ** error); + ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherHash g_mime_gpgme_hash_id(GMimeCipherContext * ctx, + const char *hash); + +@@ -70,6 +74,46 @@ static GMimeSignatureValidity *g_mime_gpgme_decrypt(GMimeCipherContext * + GMimeStream * istream, + GMimeStream * ostream, + GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDigestAlgo g_mime_gpgme_digest_id(GMimeCryptoContext * ctx, ++ const char *hash); ++ ++static const char *g_mime_gpgme_digest_name(GMimeCryptoContext * ctx, ++ GMimeDigestAlgo hash); ++ ++static const char ++ *g_mime_gpgme_get_signature_protocol(GMimeCryptoContext * context); ++static const char ++ *g_mime_gpgme_get_encryption_protocol(GMimeCryptoContext * context); ++static const char ++ *g_mime_gpgme_get_key_exchange_protocol(GMimeCryptoContext * context); ++ ++static int g_mime_gpgme_sign(GMimeCryptoContext * ctx, ++ const char * userid, ++ GMimeDigestAlgo hash, ++ GMimeStream * istream, ++ GMimeStream * ostream, ++ GError ** err); ++ ++static GMimeSignatureList *g_mime_gpgme_verify(GMimeCryptoContext * ctx, ++ GMimeDigestAlgo hash, ++ GMimeStream * istream, ++ GMimeStream * sigstream, ++ GError ** err); ++ ++static int g_mime_gpgme_encrypt(GMimeCryptoContext * ctx, ++ gboolean sign, ++ const char *userid, ++ GMimeDigestAlgo digest, ++ GPtrArray * recipients, ++ GMimeStream * istream, ++ GMimeStream * ostream, GError ** err); ++ ++static GMimeDecryptResult *g_mime_gpgme_decrypt(GMimeCryptoContext * ctx, ++ GMimeStream * istream, ++ GMimeStream * ostream, ++ GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + + /* internal passphrase callback */ +@@ -102,7 +146,11 @@ static void g_set_error_from_gpgme(GError ** error, gpgme_error_t gpgme_err, + const gchar * message); + + ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherContextClass *parent_class = NULL; ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeCryptoContextClass *parent_class = NULL; ++#endif /* HAVE_GMIME_2_5_7 */ + + + GType +@@ -124,8 +172,13 @@ g_mime_gpgme_context_get_type(void) + }; + + type = ++#ifndef HAVE_GMIME_2_5_7 + g_type_register_static(GMIME_TYPE_CIPHER_CONTEXT, + "GMimeGpgmeContext", &info, 0); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_type_register_static(GMIME_TYPE_CRYPTO_CONTEXT, ++ "GMimeGpgmeContext", &info, 0); ++#endif /* HAVE_GMIME_2_5_7 */ + } + + return type; +@@ -136,19 +189,39 @@ static void + g_mime_gpgme_context_class_init(GMimeGpgmeContextClass * klass) + { + GObjectClass *object_class = G_OBJECT_CLASS(klass); ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContextClass *cipher_class = + GMIME_CIPHER_CONTEXT_CLASS(klass); ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContextClass *crypto_class = ++ GMIME_CRYPTO_CONTEXT_CLASS(klass); ++#endif /* HAVE_GMIME_2_5_7 */ + + parent_class = g_type_class_ref(G_TYPE_OBJECT); + + object_class->finalize = g_mime_gpgme_context_finalize; + ++#ifndef HAVE_GMIME_2_5_7 + cipher_class->hash_id = g_mime_gpgme_hash_id; + cipher_class->hash_name = g_mime_gpgme_hash_name; + cipher_class->sign = g_mime_gpgme_sign; + cipher_class->verify = g_mime_gpgme_verify; + cipher_class->encrypt = g_mime_gpgme_encrypt; + cipher_class->decrypt = g_mime_gpgme_decrypt; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto_class->digest_id = g_mime_gpgme_digest_id; ++ crypto_class->digest_name = g_mime_gpgme_digest_name; ++ crypto_class->get_signature_protocol = ++ g_mime_gpgme_get_signature_protocol; ++ crypto_class->get_encryption_protocol = ++ g_mime_gpgme_get_encryption_protocol; ++ crypto_class->get_key_exchange_protocol = ++ g_mime_gpgme_get_key_exchange_protocol; ++ crypto_class->sign = g_mime_gpgme_sign; ++ crypto_class->verify = g_mime_gpgme_verify; ++ crypto_class->encrypt = g_mime_gpgme_encrypt; ++ crypto_class->decrypt = g_mime_gpgme_decrypt; ++#endif /* HAVE_GMIME_2_5_7 */ + + if (gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP) == + GPG_ERR_NO_ERROR) +@@ -190,7 +263,11 @@ g_mime_gpgme_context_finalize(GObject * object) + } + + #if !defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + g_object_unref(GMIME_CIPHER_CONTEXT(ctx)->session); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(GMIME_CRYPTO_CONTEXT(ctx)->session); ++#endif /* HAVE_GMIME_2_5_7 */ + #endif /* HAVE_GMIME_2_6 */ + + G_OBJECT_CLASS(parent_class)->finalize(object); +@@ -200,15 +277,26 @@ g_mime_gpgme_context_finalize(GObject * object) + /* + * Convert a hash algorithm name to a number + */ ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherHash + g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDigestAlgo ++g_mime_gpgme_digest_id(GMimeCryptoContext * ctx, const char *hash) ++#endif /* HAVE_GMIME_2_5_7 */ + { ++#ifndef HAVE_GMIME_2_5_7 + if (hash == NULL) + return GMIME_CIPHER_HASH_DEFAULT; ++#else /* HAVE_GMIME_2_5_7 */ ++ if (hash == NULL) ++ return GMIME_DIGEST_ALGO_DEFAULT; ++#endif /* HAVE_GMIME_2_5_7 */ + + if (!g_ascii_strcasecmp(hash, "pgp-")) + hash += 4; + ++#ifndef HAVE_GMIME_2_5_7 + if (!g_ascii_strcasecmp(hash, "md2")) + return GMIME_CIPHER_HASH_MD2; + else if (!g_ascii_strcasecmp(hash, "md5")) +@@ -223,6 +311,22 @@ g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) + return GMIME_CIPHER_HASH_HAVAL5160; + + return GMIME_CIPHER_HASH_DEFAULT; ++#else /* HAVE_GMIME_2_5_7 */ ++ if (!g_ascii_strcasecmp(hash, "md2")) ++ return GMIME_DIGEST_ALGO_MD2; ++ else if (!g_ascii_strcasecmp(hash, "md5")) ++ return GMIME_DIGEST_ALGO_MD5; ++ else if (!g_ascii_strcasecmp(hash, "sha1")) ++ return GMIME_DIGEST_ALGO_SHA1; ++ else if (!g_ascii_strcasecmp(hash, "ripemd160")) ++ return GMIME_DIGEST_ALGO_RIPEMD160; ++ else if (!g_ascii_strcasecmp(hash, "tiger192")) ++ return GMIME_DIGEST_ALGO_TIGER192; ++ else if (!g_ascii_strcasecmp(hash, "haval-5-160")) ++ return GMIME_DIGEST_ALGO_HAVAL5160; ++ ++ return GMIME_DIGEST_ALGO_DEFAULT; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -230,7 +334,11 @@ g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) + * Convert a hash algorithm number to a string + */ + static const char * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_digest_name(GMimeCryptoContext * context, GMimeDigestAlgo hash) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); + char *p; +@@ -239,6 +347,7 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + g_return_val_if_fail(ctx->gpgme_ctx, NULL); + + /* note: this is only a subset of the hash algorithms gpg(me) supports */ ++#ifndef HAVE_GMIME_2_5_7 + switch (hash) { + case GMIME_CIPHER_HASH_MD2: + p = "pgp-md2"; +@@ -258,6 +367,27 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + case GMIME_CIPHER_HASH_HAVAL5160: + p = "pgp-haval-5-160"; + break; ++#else /* HAVE_GMIME_2_5_7 */ ++ switch (hash) { ++ case GMIME_DIGEST_ALGO_MD2: ++ p = "pgp-md2"; ++ break; ++ case GMIME_DIGEST_ALGO_MD5: ++ p = "pgp-md5"; ++ break; ++ case GMIME_DIGEST_ALGO_SHA1: ++ p = "pgp-sha1"; ++ break; ++ case GMIME_DIGEST_ALGO_RIPEMD160: ++ p = "pgp-ripemd160"; ++ break; ++ case GMIME_DIGEST_ALGO_TIGER192: ++ p = "pgp-tiger192"; ++ break; ++ case GMIME_DIGEST_ALGO_HAVAL5160: ++ p = "pgp-haval-5-160"; ++ break; ++#endif /* HAVE_GMIME_2_5_7 */ + default: + if (!(p = ctx->micalg)) + return p; +@@ -270,6 +400,29 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + return p; + } + ++#ifdef HAVE_GMIME_2_5_7 ++static const char * ++g_mime_gpgme_get_signature_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->sign_protocol; ++} ++ ++static const char * ++g_mime_gpgme_get_encryption_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->encrypt_protocol; ++} ++ ++static const char * ++g_mime_gpgme_get_key_exchange_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->key_protocol; ++} ++ ++#endif /* HAVE_GMIME_2_5_7 */ + + /* + * Wrapper to convert the passphrase returned from the gmime session to gpgme. +@@ -279,7 +432,11 @@ g_mime_session_passphrase(void *HOOK, const char *UID_HINT, + const char *PASSPHRASE_INFO, int PREV_WAS_BAD, + int FD) + { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *ctx = GMIME_CIPHER_CONTEXT(HOOK); ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *ctx = GMIME_CRYPTO_CONTEXT(HOOK); ++#endif /* HAVE_GMIME_2_5_7 */ + #if defined(HAVE_GMIME_2_6) + GMimeStream *stream; + gboolean rc; +@@ -366,9 +523,15 @@ cb_data_release(void *handle) + * arg, but set the value in the context. + */ + static int ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_sign(GMimeCipherContext * context, const char *userid, + GMimeCipherHash hash, GMimeStream * istream, + GMimeStream * ostream, GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_sign(GMimeCryptoContext * context, const char *userid, ++ GMimeDigestAlgo hash, GMimeStream * istream, ++ GMimeStream * ostream, GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_sig_mode_t sig_mode; +@@ -460,6 +623,7 @@ g_mime_gpgme_sign(GMimeCipherContext * context, const char *userid, + } + + ++#ifndef HAVE_GMIME_2_5_7 + /* + * In standard mode, verify that sigstream contains a detached signature for + * istream. In single-part mode (RFC 2440, RFC 2633 application/pkcs7-mime), +@@ -471,13 +635,33 @@ static GMimeSignatureValidity * + g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + GMimeStream * istream, GMimeStream * sigstream, + GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++/* ++ * In standard mode, verify that sigstream contains a detached signature for ++ * istream. In single-part mode (RFC 2440, RFC 2633 application/pkcs7-mime), ++ * istream contains clearsigned data, and sigstream will be filled with the ++ * verified plaintext. The routine returns a GMimeSignatureList object. ++ * More information is saved in the context's signature object. ++ * On error error is set accordingly. ++ */ ++static GMimeSignatureList * ++g_mime_gpgme_verify(GMimeCryptoContext * context, GMimeDigestAlgo hash, ++ GMimeStream * istream, GMimeStream * sigstream, ++ GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; + gpgme_protocol_t protocol; + gpgme_error_t err; + gpgme_data_t msg, sig; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *list; ++ GMimeSignature *signature; ++ ++#endif /* HAVE_GMIME_2_5_7 */ + struct gpgme_data_cbs cbs = { + (gpgme_data_read_cb_t) g_mime_gpgme_stream_rd, /* read method */ + (gpgme_data_write_cb_t) g_mime_gpgme_stream_wr, /* write method */ +@@ -521,6 +705,7 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + ctx->sig_state = + g_mime_gpgme_sigstat_new_from_gpgme_ctx(gpgme_ctx); + ++#ifndef HAVE_GMIME_2_5_7 + validity = g_mime_signature_validity_new(); + if (ctx->sig_state) { + switch (ctx->sig_state->status) +@@ -536,12 +721,44 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + } + } else + g_mime_signature_validity_set_status(validity, GMIME_SIGNATURE_STATUS_UNKNOWN); ++#else /* HAVE_GMIME_2_5_7 */ ++ list = g_mime_signature_list_new(); ++ signature = g_mime_signature_new(); ++ g_mime_signature_list_add(list, signature); ++ ++ if (ctx->sig_state) { ++ switch (ctx->sig_state->status) ++ { ++ case GPG_ERR_NO_ERROR: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_GOOD); ++ break; ++ case GPG_ERR_NOT_SIGNED: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, ++ GMIME_SIGNATURE_ERROR_NONE); ++ break; ++ default: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_BAD); ++ } ++ } else { ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, GMIME_SIGNATURE_ERROR_NONE); ++ } ++#endif /* HAVE_GMIME_2_5_7 */ + + /* release gmgme data buffers */ + gpgme_data_release(msg); + gpgme_data_release(sig); + ++#ifndef HAVE_GMIME_2_5_7 + return validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ return list; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -549,10 +766,19 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + * Encrypt istream to ostream for recipients. If sign is set, sign by userid. + */ + static int ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_encrypt(GMimeCipherContext * context, gboolean sign, + const char *userid, GPtrArray * recipients, + GMimeStream * istream, GMimeStream * ostream, + GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_encrypt(GMimeCryptoContext * context, gboolean sign, ++ const char *userid, ++ GMimeDigestAlgo digest, ++ GPtrArray * recipients, ++ GMimeStream * istream, GMimeStream * ostream, ++ GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; +@@ -653,9 +879,15 @@ g_mime_gpgme_encrypt(GMimeCipherContext * context, gboolean sign, + * Decrypt istream to ostream. In RFC 2440 mode, also try to check an included + * signature (if any). + */ ++#ifndef HAVE_GMIME_2_5_7 + static GMimeSignatureValidity * + g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + GMimeStream * ostream, GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDecryptResult * ++g_mime_gpgme_decrypt(GMimeCryptoContext * context, GMimeStream * istream, ++ GMimeStream * ostream, GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; +@@ -668,7 +900,13 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + NULL, /* seek method */ + cb_data_release /* release method */ + }; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeDecryptResult *result; ++ GMimeSignatureList *list; ++ GMimeSignature *signature; ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some paranoia checks */ + g_return_val_if_fail(ctx, NULL); +@@ -716,6 +954,7 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + /* try to get information about the signature (if any) */ + ctx->sig_state = g_mime_gpgme_sigstat_new_from_gpgme_ctx(gpgme_ctx); + ++#ifndef HAVE_GMIME_2_5_7 + validity = g_mime_signature_validity_new(); + if (ctx->sig_state) { + switch (ctx->sig_state->status) +@@ -733,14 +972,57 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + g_mime_signature_validity_set_status(validity, GMIME_SIGNATURE_STATUS_UNKNOWN); + + return validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ list = g_mime_signature_list_new(); ++ signature = g_mime_signature_new(); ++ g_mime_signature_list_add(list, signature); ++ result = g_mime_decrypt_result_new(); ++ g_mime_decrypt_result_set_signatures(result, list); ++ ++ if (ctx->sig_state) { ++ switch (ctx->sig_state->status) ++ { ++ case GPG_ERR_NO_ERROR: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_GOOD); ++ break; ++ case GPG_ERR_NOT_SIGNED: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, ++ GMIME_SIGNATURE_ERROR_NONE); ++ break; ++ default: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_BAD); ++ } ++ } else { ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, GMIME_SIGNATURE_ERROR_NONE); ++ } ++ ++ return result; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + ++#ifndef HAVE_GMIME_2_5_7 + /* + * Create a new gpgme cipher context with protocol. If anything fails, return + * NULL and set error. + */ ++#else /* HAVE_GMIME_2_5_7 */ ++/* ++ * Create a new gpgme crypto context with protocol. If anything fails, return ++ * NULL and set error. ++ */ ++#endif /* HAVE_GMIME_2_5_7 */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeCryptoContext * ++#endif /* HAVE_GMIME_2_5_7 */ + #if defined(HAVE_GMIME_2_6) + g_mime_gpgme_context_new(GMimePasswordRequestFunc request_passwd, + gpgme_protocol_t protocol, GError ** error) +@@ -749,7 +1031,11 @@ g_mime_gpgme_context_new(GMimeSession * session, + gpgme_protocol_t protocol, GError ** error) + #endif /* HAVE_GMIME_2_6 */ + { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *cipher; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *crypto; ++#endif /* HAVE_GMIME_2_5_7 */ + GMimeGpgmeContext *ctx; + gpgme_error_t err; + gpgme_ctx_t gpgme_ctx; +@@ -766,14 +1052,22 @@ g_mime_gpgme_context_new(GMimeSession * session, + return NULL; + } + ++#ifndef HAVE_GMIME_2_5_7 + /* create the cipher context */ ++#else /* HAVE_GMIME_2_5_7 */ ++ /* create the crypto context */ ++#endif /* HAVE_GMIME_2_5_7 */ + ctx = g_object_new(GMIME_TYPE_GPGME_CONTEXT, NULL, NULL); + if (!ctx) { + gpgme_release(gpgme_ctx); + return NULL; + } else + ctx->gpgme_ctx = gpgme_ctx; ++#ifndef HAVE_GMIME_2_5_7 + cipher = (GMimeCipherContext *) ctx; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto = (GMimeCryptoContext *) ctx; ++#endif /* HAVE_GMIME_2_5_7 */ + + /* check if the requested protocol is available */ + if (!g_mime_gpgme_context_check_protocol +@@ -785,23 +1079,47 @@ g_mime_gpgme_context_new(GMimeSession * session, + + /* setup according to requested protocol */ + #if defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + cipher->request_passwd = request_passwd; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto->request_passwd = request_passwd; ++#endif /* HAVE_GMIME_2_5_7 */ + #else /* HAVE_GMIME_2_6 */ ++#ifndef HAVE_GMIME_2_5_7 + cipher->session = session; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto->session = session; ++#endif /* HAVE_GMIME_2_5_7 */ + g_object_ref(session); + #endif /* HAVE_GMIME_2_6 */ + gpgme_set_protocol(gpgme_ctx, protocol); + if (protocol == GPGME_PROTOCOL_OpenPGP) { ++#ifndef HAVE_GMIME_2_5_7 + cipher->sign_protocol = "application/pgp-signature"; + cipher->encrypt_protocol = "application/pgp-encrypted"; + cipher->key_protocol = NULL; /* FIXME */ ++#else /* HAVE_GMIME_2_5_7 */ ++ ctx->sign_protocol = "application/pgp-signature"; ++ ctx->encrypt_protocol = "application/pgp-encrypted"; ++ ctx->key_protocol = NULL; /* FIXME */ ++#endif /* HAVE_GMIME_2_5_7 */ + } else { ++#ifndef HAVE_GMIME_2_5_7 + cipher->sign_protocol = "application/pkcs7-signature"; + cipher->encrypt_protocol = "application/pkcs7-mime"; + cipher->key_protocol = NULL; /* FIXME */ ++#else /* HAVE_GMIME_2_5_7 */ ++ ctx->sign_protocol = "application/pkcs7-signature"; ++ ctx->encrypt_protocol = "application/pkcs7-mime"; ++ ctx->key_protocol = NULL; /* FIXME */ ++#endif /* HAVE_GMIME_2_5_7 */ + } + ++#ifndef HAVE_GMIME_2_5_7 + return cipher; ++#else /* HAVE_GMIME_2_5_7 */ ++ return crypto; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +diff --git a/libbalsa/gmime-gpgme-context.h b/libbalsa/gmime-gpgme-context.h +index 585d927..19c5fae 100644 +--- a/libbalsa/gmime-gpgme-context.h ++++ b/libbalsa/gmime-gpgme-context.h +@@ -63,7 +63,11 @@ typedef gboolean(*GMimeGpgmeKeyTrustCB) (const gchar * name, + GMimeGpgmeContext * ctx); + + struct _GMimeGpgmeContext { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext parent_object; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext parent_object; ++#endif /* HAVE_GMIME_2_5_7 */ + + gpgme_ctx_t gpgme_ctx; /* gpgme context */ + gboolean singlepart_mode; /* set context to single-part mode (RFC 2440, 2633) */ +@@ -73,11 +77,21 @@ struct _GMimeGpgmeContext { + GMimeGpgmeKeySelectCB key_select_cb; /* key selection callback */ + GMimeGpgmeKeyTrustCB key_trust_cb; /* low trust key cb */ + gpgme_passphrase_cb_t passphrase_cb; /* passphrase callback */ ++#ifdef HAVE_GMIME_2_5_7 ++ ++ const gchar *sign_protocol; ++ const gchar *encrypt_protocol; ++ const gchar *key_protocol; ++#endif /* HAVE_GMIME_2_5_7 */ + }; + + + struct _GMimeGpgmeContextClass { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContextClass parent_class; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContextClass parent_class; ++#endif /* HAVE_GMIME_2_5_7 */ + + gboolean has_proto_openpgp; + gboolean has_proto_cms; +@@ -86,10 +100,17 @@ struct _GMimeGpgmeContextClass { + + GType g_mime_gpgme_context_get_type(void); + #if defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *g_mime_gpgme_context_new(GMimePasswordRequestFunc + request_passwd, + gpgme_protocol_t protocol, + GError ** error); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeCryptoContext *g_mime_gpgme_context_new(GMimePasswordRequestFunc ++ request_passwd, ++ gpgme_protocol_t protocol, ++ GError ** error); ++#endif /* HAVE_GMIME_2_5_7 */ + #else /* HAVE_GMIME_2_6 */ + GMimeCipherContext *g_mime_gpgme_context_new(GMimeSession * session, + gpgme_protocol_t protocol, +diff --git a/libbalsa/gmime-part-rfc2440.c b/libbalsa/gmime-part-rfc2440.c +index 795d2e1..e79c4cb 100644 +--- a/libbalsa/gmime-part-rfc2440.c ++++ b/libbalsa/gmime-part-rfc2440.c +@@ -112,8 +112,13 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + + g_return_val_if_fail(GMIME_IS_PART(part), -1); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->sign_protocol != NULL, + -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail(recipients != NULL || sign_userid != NULL, -1); + + /* get the raw content */ +@@ -131,14 +136,27 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + ctx->singlepart_mode = TRUE; + if (recipients == NULL) + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_sign(GMIME_CIPHER_CONTEXT(ctx), sign_userid, + GMIME_CIPHER_HASH_DEFAULT, stream, + cipherstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_sign(GMIME_CRYPTO_CONTEXT(ctx), sign_userid, ++ GMIME_CIPHER_ALGO_DEFAULT, stream, ++ cipherstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + else + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_encrypt(GMIME_CIPHER_CONTEXT(ctx), + sign_userid != NULL, sign_userid, + recipients, stream, cipherstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_encrypt(GMIME_CRYPTO_CONTEXT(ctx), ++ sign_userid != NULL, sign_userid, ++ GMIME_CIPHER_ALGO_DEFAULT, ++ recipients, stream, cipherstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + if (result == -1) { + g_object_unref(cipherstream); + return -1; +@@ -202,18 +220,31 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + * set on err to provide more information. Upon success, the content + * of part is replaced by the verified output of the crypto engine. + */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeSignatureList * ++#endif /* HAVE_GMIME_2_5_7 */ + g_mime_part_rfc2440_verify(GMimePart * part, + GMimeGpgmeContext * ctx, GError ** err) + { + GMimeStream *stream, *plainstream; + GMimeDataWrapper * wrapper; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *list; ++#endif /* HAVE_GMIME_2_5_7 */ + + g_return_val_if_fail(GMIME_IS_PART(part), NULL); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->sign_protocol != NULL, + NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* get the raw content */ + wrapper = g_mime_part_get_content_object(GMIME_PART(part)); +@@ -227,13 +258,25 @@ g_mime_part_rfc2440_verify(GMimePart * part, + + /* verify the signature */ + ctx->singlepart_mode = TRUE; ++#ifndef HAVE_GMIME_2_5_7 + valid = + g_mime_cipher_context_verify(GMIME_CIPHER_CONTEXT(ctx), + GMIME_CIPHER_HASH_DEFAULT, stream, + plainstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ list = ++ g_mime_crypto_context_verify(GMIME_CRYPTO_CONTEXT(ctx), ++ GMIME_CIPHER_ALGO_DEFAULT, stream, ++ plainstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* upon success, replace the signed content by the checked one */ +- if (valid) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (valid) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (list) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + GMimeDataWrapper *wrapper = g_mime_data_wrapper_new(); + + g_mime_data_wrapper_set_stream(wrapper, plainstream); +@@ -242,7 +285,11 @@ g_mime_part_rfc2440_verify(GMimePart * part, + } + g_object_unref(plainstream); + ++#ifndef HAVE_GMIME_2_5_7 + return valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ return list; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -255,19 +302,32 @@ g_mime_part_rfc2440_verify(GMimePart * part, + * verified and the result is placed in ctx by the underlying gpgme + * context. + */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeDecryptResult * ++#endif /* HAVE_GMIME_2_5_7 */ + g_mime_part_rfc2440_decrypt(GMimePart * part, + GMimeGpgmeContext * ctx, GError ** err) + { + GMimeStream *stream, *plainstream; + GMimeDataWrapper * wrapper; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *result; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeDecryptResult *result; ++#endif /* HAVE_GMIME_2_5_7 */ + gchar *headbuf = g_malloc0(1024); + + g_return_val_if_fail(GMIME_IS_PART(part), NULL); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->encrypt_protocol != + NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* get the raw content */ + wrapper = g_mime_part_get_content_object(part); +@@ -284,8 +344,13 @@ g_mime_part_rfc2440_decrypt(GMimePart * part, + + /* decrypt and (if possible) verify the input */ + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_decrypt(GMIME_CIPHER_CONTEXT(ctx), stream, + plainstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_decrypt(GMIME_CRYPTO_CONTEXT(ctx), stream, ++ plainstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + + if (result != NULL) { + GMimeStream *filter_stream; +diff --git a/libbalsa/gmime-part-rfc2440.h b/libbalsa/gmime-part-rfc2440.h +index 48be5a4..cc1901a 100644 +--- a/libbalsa/gmime-part-rfc2440.h ++++ b/libbalsa/gmime-part-rfc2440.h +@@ -53,12 +53,21 @@ int g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + GPtrArray * recipients, + const char *sign_userid, + GError ** err); ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *g_mime_part_rfc2440_verify(GMimePart * part, + GMimeGpgmeContext * ctx, + GError ** err); + GMimeSignatureValidity *g_mime_part_rfc2440_decrypt(GMimePart * part, + GMimeGpgmeContext * + ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeSignatureList *g_mime_part_rfc2440_verify(GMimePart * part, ++ GMimeGpgmeContext * ctx, ++ GError ** err); ++GMimeDecryptResult *g_mime_part_rfc2440_decrypt(GMimePart * part, ++ GMimeGpgmeContext * ctx, ++ GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + #ifdef __cplusplus + } +diff --git a/libbalsa/rfc3156.c b/libbalsa/rfc3156.c +index a56e12c..df4a2e1 100644 +--- a/libbalsa/rfc3156.c ++++ b/libbalsa/rfc3156.c +@@ -268,9 +268,15 @@ libbalsa_message_body_protection(LibBalsaMessageBody * body) + + #if defined(HAVE_GMIME_2_6) + static gboolean ++#ifndef HAVE_GMIME_2_5_7 + password_request_func(GMimeCipherContext * ctx, const char *user_id, + const char *prompt_ctx, gboolean reprompt, + GMimeStream * response, GError ** err) ++#else /* HAVE_GMIME_2_5_7 */ ++password_request_func(GMimeCryptoContext * ctx, const char *user_id, ++ const char *prompt_ctx, gboolean reprompt, ++ GMimeStream * response, GError ** err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + gint fd; + gchar *name_used; +@@ -366,9 +372,16 @@ libbalsa_sign_mime_object(GMimeObject ** content, const gchar * rfc822_for, + return FALSE; + } + ++#ifndef HAVE_GMIME_2_5_7 + if (g_mime_multipart_signed_sign + (mps, *content, GMIME_CIPHER_CONTEXT(ctx), rfc822_for, +- GMIME_CIPHER_HASH_DEFAULT, error) != 0) { ++ GMIME_CIPHER_HASH_DEFAULT, error) != 0) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_multipart_signed_sign ++ (mps, *content, GMIME_CRYPTO_CONTEXT(ctx), rfc822_for, ++ GMIME_DIGEST_ALGO_DEFAULT, error) != 0) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(mps); + g_object_unref(ctx); + #if !defined(HAVE_GMIME_2_6) +@@ -458,10 +471,18 @@ libbalsa_encrypt_mime_object(GMimeObject ** content, GList * rfc822_for, + + encrypted_obj = GMIME_OBJECT(mpe); + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_multipart_encrypted_encrypt(mpe, *content, + GMIME_CIPHER_CONTEXT(ctx), + FALSE, NULL, + recipients, error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_multipart_encrypted_encrypt(mpe, *content, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ FALSE, NULL, ++ GMIME_DIGEST_ALGO_DEFAULT, ++ recipients, error); ++#endif /* HAVE_GMIME_2_5_7 */ + } + #ifdef HAVE_SMIME + else { +@@ -471,9 +492,15 @@ libbalsa_encrypt_mime_object(GMimeObject ** content, GList * rfc822_for, + encrypted_obj = GMIME_OBJECT(pkcs7); + ctx->singlepart_mode = TRUE; + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_encrypt(pkcs7, *content, + GMIME_CIPHER_CONTEXT(ctx), + recipients, error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_application_pkcs7_encrypt(pkcs7, *content, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ recipients, error); ++#endif /* HAVE_GMIME_2_5_7 */ + } + #endif + +@@ -565,8 +592,14 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + #if !defined(HAVE_GMIME_2_6) + GMimeSession *session; + #endif /* HAVE_GMIME_2_6 */ +- GMimeCipherContext *ctx; ++#ifndef HAVE_GMIME_2_5_7 ++ GMimeCipherContext *g_mime_ctx; + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *g_mime_ctx; ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ ++ GMimeGpgmeContext *ctx; + GError *error = NULL; + + /* paranoia checks */ +@@ -592,12 +625,12 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + /* try to create GMimeGpgMEContext */ + #if !defined(HAVE_GMIME_2_6) + session = g_object_new(g_mime_session_get_type(), NULL, NULL); +- ctx = g_mime_gpgme_context_new(session, protocol, &error); ++ g_mime_ctx = g_mime_gpgme_context_new(session, protocol, &error); + #else /* HAVE_GMIME_2_6 */ +- ctx = ++ g_mime_ctx = + g_mime_gpgme_context_new(password_request_func, protocol, &error); + #endif /* HAVE_GMIME_2_6 */ +- if (ctx == NULL) { ++ if (g_mime_ctx == NULL) { + if (error) { + libbalsa_information(LIBBALSA_INFORMATION_ERROR, "%s: %s", + _("creating a gpgme context failed"), +@@ -613,6 +646,7 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + body->parts->next->sig_info->status = GPGME_SIG_STAT_ERROR; + return FALSE; + } ++ ctx = GMIME_GPGME_CONTEXT(g_mime_ctx); + + /* S/MIME uses the protocol application/pkcs7-signature, but some ancient + mailers, not yet knowing RFC 2633, use application/x-pkcs7-signature, +@@ -622,14 +656,19 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + g_mime_object_get_content_type_parameter(GMIME_OBJECT (body->mime_part), + "protocol"); + if (!g_ascii_strcasecmp(cms_protocol, "application/x-pkcs7-signature")) ++#ifndef HAVE_GMIME_2_5_7 ++ g_mime_ctx->sign_protocol = cms_protocol; ++#else /* HAVE_GMIME_2_5_7 */ + ctx->sign_protocol = cms_protocol; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + /* verify the signature */ + + libbalsa_mailbox_lock_store(body->message->mailbox); + valid = g_mime_multipart_signed_verify(GMIME_MULTIPART_SIGNED +- (body->mime_part), ctx, &error); ++ (body->mime_part), g_mime_ctx, ++ &error); + libbalsa_mailbox_unlock_store(body->message->mailbox); + + if (valid == NULL) { +@@ -642,12 +681,16 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + libbalsa_information(LIBBALSA_INFORMATION_ERROR, + _("signature verification failed")); + } +- if (GMIME_GPGME_CONTEXT(ctx)->sig_state) { +- body->parts->next->sig_info = GMIME_GPGME_CONTEXT(ctx)->sig_state; ++ if (ctx->sig_state) { ++ body->parts->next->sig_info = ctx->sig_state; + g_object_ref(G_OBJECT(body->parts->next->sig_info)); + } ++#ifndef HAVE_GMIME_2_5_7 + g_mime_signature_validity_free(valid); +- g_object_unref(ctx); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(valid); ++#endif /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(g_mime_ctx); + #if !defined(HAVE_GMIME_2_6) + g_object_unref(session); + #endif /* HAVE_GMIME_2_6 */ +@@ -747,14 +790,26 @@ libbalsa_body_decrypt(LibBalsaMessageBody * body, + libbalsa_mailbox_lock_store(body->message->mailbox); + if (protocol == GPGME_PROTOCOL_OpenPGP) + mime_obj = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_multipart_encrypted_decrypt(GMIME_MULTIPART_ENCRYPTED(body->mime_part), + GMIME_CIPHER_CONTEXT(ctx), + &error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_multipart_encrypted_decrypt(GMIME_MULTIPART_ENCRYPTED(body->mime_part), ++ GMIME_CRYPTO_CONTEXT(ctx), ++ NULL, ++ &error); ++#endif /* HAVE_GMIME_2_5_7 */ + #ifdef HAVE_SMIME + else if (smime_signed) { ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ + + ctx->singlepart_mode = TRUE; ++#ifndef HAVE_GMIME_2_5_7 + mime_obj = + g_mime_application_pkcs7_verify(GMIME_PART(body->mime_part), + &valid, +@@ -766,6 +821,19 @@ libbalsa_body_decrypt(LibBalsaMessageBody * body, + g_mime_application_pkcs7_decrypt(GMIME_PART(body->mime_part), + GMIME_CIPHER_CONTEXT(ctx), + &error); ++#else /* HAVE_GMIME_2_5_7 */ ++ mime_obj = ++ g_mime_application_pkcs7_verify(GMIME_PART(body->mime_part), ++ &valid, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ &error); ++ g_object_unref(valid); ++ } else ++ mime_obj = ++ g_mime_application_pkcs7_decrypt(GMIME_PART(body->mime_part), ++ GMIME_CRYPTO_CONTEXT(ctx), ++ &error); ++#endif /* HAVE_GMIME_2_5_7 */ + #endif + libbalsa_mailbox_unlock_store(body->message->mailbox); + +@@ -906,7 +974,11 @@ libbalsa_rfc2440_verify(GMimePart * part, GMimeGpgmeSigstat ** sig_info) + GMimeSession *session; + #endif /* HAVE_GMIME_2_6 */ + GMimeGpgmeContext *ctx; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ + GError *error = NULL; + gpgme_error_t retval; + +@@ -978,7 +1050,11 @@ libbalsa_rfc2440_verify(GMimePart * part, GMimeGpgmeSigstat ** sig_info) + } + + /* clean up */ ++#ifndef HAVE_GMIME_2_5_7 + g_mime_signature_validity_free(valid); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(valid); ++#endif /* HAVE_GMIME_2_5_7 */ + retval = ctx->sig_state->status; + g_object_unref(ctx); + #if !defined(HAVE_GMIME_2_6) +-- +cgit v0.9.0.2 diff --git a/community/c++-gtk-utils/PKGBUILD b/community/c++-gtk-utils/PKGBUILD new file mode 100644 index 000000000..ce57480cc --- /dev/null +++ b/community/c++-gtk-utils/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 61994 2012-01-13 20:36:39Z giovanni $ +# Maintainer: Giovanni Scafora <giovanni@archlinux.org> + +pkgname=c++-gtk-utils +pkgver=2.0.4 +pkgrel=1 +pkgdesc="Classes and functions for programming in GTK+" +arch=('i686' 'x86_64') +url="http://cxx-gtk-utils.sourceforge.net/" +license=('LGPL2.1') +depends=('gtk3') +options=('!libtool') +source=("http://downloads.sourceforge.net/project/cxx-gtk-utils/cxx-gtk-utils/${pkgver}/${pkgname}-${pkgver}.tar.gz") +md5sums=('349b14a45befcaad629820c3313c9e1d') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --disable-rpath \ + --disable-static + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} diff --git a/community/calibre/PKGBUILD b/community/calibre/PKGBUILD index d307ee6c4..42a52f376 100644 --- a/community/calibre/PKGBUILD +++ b/community/calibre/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 61671 2012-01-06 10:40:17Z giovanni $ +# $Id: PKGBUILD 61987 2012-01-13 12:17:48Z giovanni $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Petrov Roman <nwhisper@gmail.com> # Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com> pkgname=calibre -pkgver=0.8.34 +pkgver=0.8.35 pkgrel=1 pkgdesc="Ebook management application" arch=('i686' 'x86_64' 'mips64el') @@ -21,7 +21,7 @@ install=calibre.install source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz" 'desktop_integration.patch' 'calibre-mount-helper') -md5sums=('f0e5137c9cd4faaa6eee984b06ba6143' +md5sums=('0a1170534492c6ca5b9f849cbfaa7acc' '253ce4fe5d01f8ff76b63cd3825755ea' '675cd87d41342119827ef706055491e7') diff --git a/community/cdfs/PKGBUILD b/community/cdfs/PKGBUILD index e231f2f09..73f977cb2 100644 --- a/community/cdfs/PKGBUILD +++ b/community/cdfs/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 58212 2011-11-08 22:41:05Z ibiru $ +# $Id: PKGBUILD 62253 2012-01-18 19:54:16Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar> pkgname=cdfs pkgver=2.6.27 -pkgrel=17 +pkgrel=19 pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files." arch=(i686 x86_64 'mips64el') url="http://www.elis.UGent.be/~ronsse/cdfs/" @@ -12,9 +12,11 @@ license=('GPL') makedepends=('linux-headers') install=cdfs.install source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2" - "cdfs-3.0.0.patch") + "cdfs-3.0.patch" + "cdfs-3.2.patch") md5sums=('ac64c014a90e3c488394832ea29605b3' - 'aba7da94a9dcbb8a93ea423cb6958fef') + 'aba7da94a9dcbb8a93ea423cb6958fef' + 'e934407b3460257a301822ffc4ab3933') build() { _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` @@ -22,7 +24,9 @@ build() { _kernverfull=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` cd $srcdir/$pkgname-$pkgver - patch -p1 <$srcdir/cdfs-3.0.0.patch + patch -p1 <$srcdir/cdfs-3.0.patch + patch -p1 <$srcdir/cdfs-3.2.patch make KDIR=/lib/modules/${_kernverfull}/build install -Dm0644 cdfs.ko $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/cdfs.ko + sed -i "s|extramodules-.*-ARCH|extramodules-3.${_kernver}-ARCH|" $startdir/cdfs.install } diff --git a/community/cdfs/cdfs-3.0.patch b/community/cdfs/cdfs-3.0.patch new file mode 100644 index 000000000..20194b848 --- /dev/null +++ b/community/cdfs/cdfs-3.0.patch @@ -0,0 +1,274 @@ +diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c +--- cdfs-2.6.27/cddata.c 2009-12-21 17:04:03.000000000 +0300 ++++ cdfs-2.6.27.my/cddata.c 2011-07-24 21:18:44.000000000 +0400 +@@ -83,7 +83,7 @@ + #else + .mmap = generic_file_readonly_mmap, + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) +- .sendfile = generic_file_sendfile ++// .sendfile = generic_file_sendfile + #else + .splice_read = generic_file_splice_read + #endif +diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c +--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 ++++ cdfs-2.6.27.my/root.c 2011-07-25 13:16:59.000000000 +0400 +@@ -32,19 +30,14 @@ + * Added code to transform /proc/cdfs into a sequential synthetic file. * + *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ + +- + #include <linux/seq_file.h> +- +-#ifndef OLD_KERNEL + #include <linux/statfs.h> +-#endif ++#include <linux/sched.h> + + extern struct seq_operations cdfs_operations; + extern struct _track_info *dummy_track_p; + +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + struct inode *cdfs_iget(struct super_block *sp, unsigned long ino); +-#endif + /*============================================================================* + * cdfs_open() * + * Description: * +@@ -115,15 +108,8 @@ + + /********************************************************************/ + +-#ifdef OLD_KERNEL +-static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){ +- kdev_t dev = sb->s_dev; +- int i, j, t; +- struct cdrom_tochdr hdr; +-#else + static int cdfs_fill_super(struct super_block *sb, void *data, int silent){ + int i, t; +-#endif + struct cdrom_tocentry entry; + int no_audio=0, no_data=0; + cd * this_cd; +@@ -131,24 +117,13 @@ + + PRINT("cdfs_mount\n"); + +-#ifdef OLD_KERNEL +- MOD_INC_USE_COUNT; +- +- set_blocksize(dev, CD_FRAMESIZE); // voor bread met ide-cd +-#else + sb_set_blocksize(sb, CD_FRAMESIZE); // voor bread met ide-cd +-#endif + + sb->s_blocksize = CD_FRAMESIZE; + sb->s_blocksize_bits = 11; + + if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){ +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + return -ENOMEM; +-#endif + } + + this_cd->mode = MODE; +@@ -160,13 +135,8 @@ + + // Initialize cache for maximum sector size + if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) { +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + kfree(cdfs_info(sb)); + return -ENOMEM; +-#endif + } + + // Cache is still invalid +@@ -183,23 +153,13 @@ + if (this_cd->toc_scsi){ + if (cdfs_toc_read_full(sb)){ + printk("TOC read failed\n"); +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + goto invalid; +-#endif + } + } else { + //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){ + if (cdfs_toc_read(sb)){ + printk("cdfs_toc_read failed\n"); +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + goto invalid; +-#endif + } + } + +@@ -365,11 +325,7 @@ + sb->s_flags |= MS_RDONLY; + sb->s_op = &cdfs_ops; + /* always get inode status */ +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + retinode=cdfs_iget(sb, 0); +-#else +- retinode=iget(sb, 0); +-#endif + if ( IS_ERR(retinode) ) + return PTR_ERR(retinode); + +@@ -379,16 +335,12 @@ + + cdfs_proc_cd = this_cd; + +-#ifdef OLD_KERNEL +- return sb; +-#else + return 0; + + invalid: + kfree(this_cd->cache); + kfree(cdfs_info(sb)); + return -EINVAL; +-#endif + } + + /************************************************************************/ +@@ -410,27 +362,12 @@ + // Remove /proc entry + cdfs_proc_cd = NULL; + kfree(cdfs_info(sb)); +- +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +-#endif +- + } + + /************************************************************************/ + +-#ifdef OLD_KERNEL +-static int cdfs_statfs(struct super_block *sb, struct statfs *buf) { +- cd * this_cd = cdfs_info(sb); +-#else +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) + static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) { + cd * this_cd = cdfs_info(d->d_sb); +-#else +-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) { +- cd * this_cd = cdfs_info(sb); +-#endif +-#endif + PRINT("rmfs_statfs\n"); + + buf->f_type = CDFS_MAGIC; +@@ -460,11 +397,7 @@ + + /************************************************************************/ + +-#ifdef OLD_KERNEL +-static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){ +-#else + static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ +-#endif + struct inode * inode; + int i; + cd * this_cd = cdfs_info(dir->i_sb); +@@ -480,15 +413,9 @@ + /* Use goto and read inode with iget()/cdfs_iget() */ + /* Thanks to David Howells for patch and Master class in his mail */ + found: +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + inode = cdfs_iget(dir->i_sb, i); + if (IS_ERR(inode)) + return ERR_CAST(inode); +-#else +- inode = iget(dir->i_sb, i); +- if (!inode) +- return ERR_PTR(-ENOMEM); +-#endif + d_add(dentry, inode); + return NULL; + } +@@ -529,12 +456,8 @@ + i->i_fop = &cdfs_dir_operations; + } else { /* file */ + i->i_size = this_cd->track[i->i_ino].size; +-#ifdef OLD_KERNEL +- i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time; +-#else + i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time; + i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0; +-#endif + i->i_mode = this_cd->mode; + if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) { + i->i_fop = &cdfs_cddata_file_operations; +@@ -587,33 +510,21 @@ + /******************************************************************/ + + static struct super_operations cdfs_ops = { +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +- .read_inode = cdfs_read_inode, +-#endif + .put_super = cdfs_umount, + .statfs = cdfs_statfs + }; + +-#ifdef OLD_KERNEL +-static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount); +-#else +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +-static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { +- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); +-#else +-static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { +- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super); +-#endif +-} ++//static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { ++// return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); ++//} + + static struct file_system_type cdfs_fs_type = { + .owner = THIS_MODULE, + .name = "cdfs", +- .get_sb = cdfs_get_sb, ++// .get_sb = cdfs_get_sb, + .kill_sb = kill_block_super, + .fs_flags = FS_REQUIRES_DEV + }; +-#endif + + /******************************************************/ + +@@ -621,10 +532,6 @@ + MODULE_DESCRIPTION("CDfs: a CD filesystem"); + MODULE_LICENSE("GPL"); + +-#ifdef OLD_KERNEL +-EXPORT_NO_SYMBOLS; +-#endif +- + /******************************************************************/ + + static int __init cdfs_init(void) { +@@ -676,11 +583,7 @@ + + if (!options) return; + +-#ifdef OLD_KERNEL +- for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) { +-#else + while ((this_char = strsep(&options,",")) != NULL) { +-#endif + + if (!strcmp(this_char,"single")) + this_cd->single=TRUE; diff --git a/community/cdfs/cdfs-3.2.patch b/community/cdfs/cdfs-3.2.patch new file mode 100644 index 000000000..d3300bdbc --- /dev/null +++ b/community/cdfs/cdfs-3.2.patch @@ -0,0 +1,12 @@ +diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c +--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 ++++ cdfs-2.6.27.my/root.c 2012-01-18 11:23:03.000000000 +0400 +@@ -517,7 +517,7 @@ + + i->i_uid = this_cd->uid; + i->i_gid = this_cd->gid; +- i->i_nlink = 1; ++ i->__i_nlink = 1; + i->i_op = &cdfs_inode_operations; + i->i_fop = NULL; + i->i_data.a_ops = NULL; diff --git a/community/cdfs/cdfs.install b/community/cdfs/cdfs.install index 3693d60ed..d24929157 100644 --- a/community/cdfs/cdfs.install +++ b/community/cdfs/cdfs.install @@ -1,11 +1,14 @@ post_install() { - /sbin/depmod -a + EXTRAMODULES='extramodules-3.2-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_upgrade() { - /sbin/depmod -a + EXTRAMODULES='extramodules-3.2-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_remove() { - /sbin/depmod -a + EXTRAMODULES='extramodules-3.2-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) } diff --git a/community/clucene/PKGBUILD b/community/clucene/PKGBUILD index bc43ff644..57834619c 100644 --- a/community/clucene/PKGBUILD +++ b/community/clucene/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 60839 2011-12-18 22:57:14Z arodseth $ +# $Id: PKGBUILD 62283 2012-01-19 00:04:00Z arodseth $ # Maintainer: Alexander Rødseth # Contributor: Alois Nespor <alois.nespor@gmail.com> # Contributor: Tobias Powalowski <tpowa@archlinux.org> pkgname=clucene pkgver=2.3.3.4 -pkgrel=2 +pkgrel=3 pkgdesc="C++ port of the high-performance text search engine Lucene" arch=('i686' 'x86_64' 'mips64el') url="http://clucene.sourceforge.net/" @@ -17,6 +17,9 @@ sha256sums=('ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab') build() { cd "$srcdir" + sed 's:core:core -lclucene-shared:' \ + -i "$pkgname-core-$pkgver/src/core/libclucene-core.pc.cmake" + mkdir build cd build cmake "../$pkgname-core-$pkgver" \ @@ -25,9 +28,6 @@ build() { -DENABLE_ASCII_MODE=OFF \ -DENABLE_PACKAGING=OFF \ -DDISABLE_MULTITHREADING=OFF - # The three lines above are from - # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-cpp/clucene/clucene-2.3.3.4.ebuild - # Thanks, Gentoo make } diff --git a/community/converseen/PKGBUILD b/community/converseen/PKGBUILD index bb0935d2c..be3e3c257 100644 --- a/community/converseen/PKGBUILD +++ b/community/converseen/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 61388 2011-12-30 00:12:01Z giovanni $ +# $Id: PKGBUILD 62171 2012-01-17 08:26:12Z giovanni $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: archtux <antonio.arias99999 at gmail.com> pkgname=converseen -pkgver=0.4.7 -pkgrel=2 +pkgver=0.4.8 +pkgrel=1 pkgdesc="The batch image converter and resizer" arch=('i686' 'x86_64') url="http://converseen.sourceforge.net/" @@ -13,7 +13,7 @@ depends=('imagemagick' 'qt' 'libwmf' 'openexr') makedepends=('cmake') install=converseen.install source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2") -md5sums=('d21cb571b268ddf4bcdc395d01c0dc49') +md5sums=('65cdb89445a3063b9c8362b411d3e3ef') build() { cd "${srcdir}" diff --git a/community/coq/PKGBUILD b/community/coq/PKGBUILD index 4fd420e77..7accbc9fa 100644 --- a/community/coq/PKGBUILD +++ b/community/coq/PKGBUILD @@ -2,16 +2,17 @@ # Contributor: George Giorgidze <giorgidze@gmail.com> pkgname=coq -pkgver=8.3pl2 -pkgrel=3 +pkgver=8.3pl3 +pkgrel=1 pkgdesc='Formal proof management system.' arch=('i686' 'x86_64' 'mips64el') url='http://coq.inria.fr/' license=('GPL') -depends=('gtk2') -makedepends=('ocaml' 'lablgtk2' 'camlp5-transitional' 'netpbm' 'hevea') +options=('!emptydirs') +depends=('gtk2' 'lablgtk2' 'ocaml') +makedepends=('camlp5-transitional' 'netpbm' 'hevea') source=("http://coq.inria.fr/distrib/V${pkgver}/files/${pkgname}-${pkgver}.tar.gz") -md5sums=('db415f6c5372f5a443699c62f5affcb4') +md5sums=('37e9a52110a025128667c03fed75f9c2') build() { cd ${pkgname}-${pkgver} diff --git a/community/dmd/PKGBUILD b/community/dmd/PKGBUILD index 43ecb19f7..8738d72cf 100644 --- a/community/dmd/PKGBUILD +++ b/community/dmd/PKGBUILD @@ -1,44 +1,67 @@ -# $Id: PKGBUILD 61677 2012-01-06 12:49:05Z cbrannon $ -# Maintainer: Chris Brannon <cmbrannon79@gmail.com> +# $Id: PKGBUILD 62087 2012-01-15 20:40:34Z svenstaro $ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Chris Brannon <cmbrannon79@gmail.com> # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Anders Bergh <anders1@gmail.com> # Contributor: Alexander Fehr <pizzapunk gmail com> -pkgname=dmd -pkgver=1.072 +pkgname=('dmd' 'libphobos') +pkgbase=dmd +pkgver=2.057 pkgrel=1 -pkgdesc="The Digital Mars D compiler." -arch=('i686' x86_64) -url="http://www.digitalmars.com/d/1.0/" +pkgdesc="The Digital Mars D compiler" +arch=('i686' 'x86_64') +url="http://www.digitalmars.com/d/2.0/" source=(http://ftp.digitalmars.com/$pkgname.$pkgver.zip) -install='dmd.install' -provides=('d-compiler') license=('custom') -options=('!strip') -depends=(gcc-libs) -optdepends=('libphobos: D standard runtime library' - 'libtango: Alternative runtime library') +md5sums=('531c4b60eb002ea8abbe5c80b2eb677d') -[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +[[ $CARCH == "x86_64" ]] && _archbits="64" +[[ $CARCH == "i686" ]] && _archbits="32" build() { - # Copy the license. - install -Dm644 "$srcdir/dmd/license.txt" "$pkgdir/usr/share/licenses/dmd/LICENSE" || return 1 - - if [ $CARCH == x86_64 ]; then - cd "$srcdir/dmd/linux/bin64" - else - cd "$srcdir/dmd/linux/bin32" - fi - install -dm755 "$pkgdir/usr/bin" - install -m755 dmd rdmd dumpobj obj2asm "$pkgdir/usr/bin" - - for x in "$srcdir"/dmd/man/man1/*.1; do - install -Dm644 "$x" "$pkgdir/usr/share/man/man1/$(basename "$x")" || return 1 - done - - for x in "$srcdir"/dmd/man/man1/*.5; do - install -Dm644 "$x" "$pkgdir/usr/share/man/man5/$(basename "$x")" || return 1 - done + cd $srcdir/dmd2/src/ + + cd dmd + make -f posix.mak MODEL=$_archbits + + cd ../druntime + make -f posix.mak MODEL=$_archbits DMD=../dmd/dmd + + cd ../phobos + make -f posix.mak MODEL=$_archbits DMD=../dmd/dmd +} + +package_dmd() { + depends=('libphobos' 'gcc-libs') + + install -Dm755 $srcdir/dmd2/src/dmd/dmd $pkgdir/usr/bin/dmd + + mkdir -p $pkgdir/etc + echo -e "[Environment]\nDFLAGS=-I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L-lrt" > $pkgdir/etc/dmd.conf + + install -Dm644 $srcdir/dmd2/man/man1/dmd.1 $pkgdir/usr/share/man/man1/dmd.1 + install -Dm644 $srcdir/dmd2/man/man1/dmd.conf.5 $pkgdir/usr/share/man/man5/dmd.conf.5 + + install -Dm644 $srcdir/dmd2/license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE + + mkdir -p $pkgdir/usr/share/d/samples/ + cp -r $srcdir/dmd2/samples/d/* $pkgdir/usr/share/d/samples/ +} + +package_libphobos() { + install -Dm644 $srcdir/dmd2/src/druntime/lib/libdruntime.a $pkgdir/usr/lib/libdruntime.a + install -Dm644 $srcdir/dmd2/src/phobos/generated/linux/release/$_archbits/libphobos2.a $pkgdir/usr/lib/libphobos2.a + + mkdir -p $pkgdir/usr/include/d + cp -r $srcdir/dmd2/src/phobos/{*.d,etc,std} $pkgdir/usr/include/d + + mkdir -p $pkgdir/usr/include/d/druntime + cp -r $srcdir/dmd2/src/druntime/import $pkgdir/usr/include/d/druntime + + mkdir -p $pkgdir/usr/share/doc/d/ + cp -r $srcdir/dmd2/html $pkgdir/usr/share/doc/d/ + + install -Dm644 $srcdir/dmd2/src/druntime/LICENSE_1_0.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-druntime + install -Dm644 $srcdir/dmd2/src/phobos/phoboslicense.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-phobos } -md5sums=('d5489b94f06c7ca2f4b5de62f7e6815a') diff --git a/community/efax-gtk/PKGBUILD b/community/efax-gtk/PKGBUILD index 6376c66e4..98fa4a965 100644 --- a/community/efax-gtk/PKGBUILD +++ b/community/efax-gtk/PKGBUILD @@ -1,20 +1,20 @@ -# $Id: PKGBUILD 59587 2011-11-28 18:05:39Z giovanni $ +# $Id: PKGBUILD 61996 2012-01-13 21:14:06Z giovanni $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> pkgname=efax-gtk -pkgver=3.2.8 -pkgrel=2 +pkgver=3.2.9 +pkgrel=1 pkgdesc="A GUI front end for the 'efax' fax program" arch=('i686' 'x86_64') url="http://efax-gtk.sourceforge.net/" license=('GPL') -depends=('dbus-glib' 'gtk3' 'ghostscript') +depends=('dbus-glib' 'ghostscript' 'c++-gtk-utils') makedepends=('pkg-config') optdepends=('heirloom-mailx: to use the mail_fax script') backup=('etc/efax-gtkrc') install=efax-gtk.install source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.src.tgz") -md5sums=('275ad1706e5c38e2b153dddd8a16724f') +md5sums=('57fac8815c8f49fc7415d3558eb3f842') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/community/expac/PKGBUILD b/community/expac/PKGBUILD index 325f89f12..e4cdc270b 100644 --- a/community/expac/PKGBUILD +++ b/community/expac/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 51880 2011-07-17 19:50:14Z dreisner $ +# $Id: PKGBUILD 62143 2012-01-16 19:53:09Z dreisner $ # Maintainer: Dave Reisner <d@falconindy.com> pkgname=expac -pkgver=0.05 +pkgver=0.07 pkgrel=1 pkgdesc="pacman database extraction utility" arch=('i686' 'x86_64' 'mips64el') @@ -11,7 +11,7 @@ license=('GPL') depends=('pacman') makedepends=('perl') source=("https://github.com/downloads/falconindy/$pkgname/$pkgname-$pkgver.tar.gz") -md5sums=('366d741b21d1029c63a5e977d3fc08db') +md5sums=('1bc637b733051827982db12db84643f2') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/community/ghemical/PKGBUILD b/community/ghemical/PKGBUILD index 320a3aa7d..718b4823a 100644 --- a/community/ghemical/PKGBUILD +++ b/community/ghemical/PKGBUILD @@ -3,12 +3,12 @@ pkgname=ghemical pkgver=3.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="Computational chemistry package." license=("GPL") arch=(i686 x86_64 'mips64el') url="http://bioinformatics.org/ghemical/ghemical/" -depends=('libghemical>=3.0' 'liboglappth>=1.0' 'mesa' 'libglade' 'libxmu' 'ttf-dejavu' 'gtkglext' 'openbabel') +depends=('libghemical>=3.0' 'liboglappth>=1.0' 'libglade' 'gtkglext' 'openbabel') makedepends=('pkgconfig' 'intltool>=0.40.0' 'gettext') source=(http://bioinformatics.org/ghemical/download/release20111012/${pkgname}-${pkgver}.tar.gz ghemical.desktop) md5sums=('becf98626f0eba73f7f042bc92aa60ac' @@ -17,6 +17,8 @@ md5sums=('becf98626f0eba73f7f042bc92aa60ac' build() { cd -- "$srcdir/$pkgname-$pkgver/" ./configure --prefix=/usr + # Some users have reported crashes due to the courier font. + sed -i 's/courier 12/monospace/g' ./src/*.cpp make } diff --git a/community/gnash/PKGBUILD b/community/gnash/PKGBUILD index cf68b044b..4c27cb953 100644 --- a/community/gnash/PKGBUILD +++ b/community/gnash/PKGBUILD @@ -1,10 +1,10 @@ # $Id: PKGBUILD 82896 2010-06-18 18:30:20Z ibiru $ -# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> pkgbase=gnash pkgname=(gnash-common gnash-gtk) pkgver=0.8.9 -pkgrel=7 +pkgrel=8 arch=(i686 x86_64 mips64el) url="http://www.gnu.org/software/gnash/" license=(GPL3) @@ -15,10 +15,11 @@ makedepends=(curl giflib libldap sdl agg libjpeg libpng libtool pkgconfig boost) options=(!libtool !emptydirs) source=(http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2 - gentoo-ffmpeg-0.8.patch xul8.patch) -md5sums=('5b2be6b04a1bcc5fb404cc377034499e' - '98dec9a5c1b1084245a3f46b4022a6e2' - '9b77325d0b8b9d4150c4097771482d26') + gentoo-ffmpeg-0.8.patch xul8.patch nodebug.patch) +sha256sums=('f90dbdc6f03d787b239b9edacbea077b46d69ae9d85f08af23f256af389c48bd' + '5e6b9c2ccb0f6dda70745712dddf302d2b42895feda850f2ed126bf53d8815ca' + 'd484f1c21ef71847a2d4b3dd254d1fa93a58719d45bc9df8b8deabee388ce4e9' + '0ebb104a7632af997c7e6b268755949fa0c1eea5e32015b95a22d63d0e431551') build() { cd "$srcdir/gnash-$pkgver" @@ -30,6 +31,9 @@ build() { # Patch for compatibility with newer xulrunner headers patch -Np1 -i "$srcdir/xul8.patch" + # Disable very, very verbose debugging (gigabytes of logs) + patch -Np1 -i "$srcdir/nodebug.patch" + ./autogen.sh ./configure \ --prefix=/usr \ diff --git a/community/gnash/nodebug.patch b/community/gnash/nodebug.patch new file mode 100644 index 000000000..ca160b898 --- /dev/null +++ b/community/gnash/nodebug.patch @@ -0,0 +1,48 @@ +diff -u -r gnash-0.8.9/libbase/log.h gnash-0.8.9-nodebug/libbase/log.h +--- gnash-0.8.9/libbase/log.h 2011-02-26 19:11:08.000000000 +0100 ++++ gnash-0.8.9-nodebug/libbase/log.h 2012-01-18 09:39:02.004103494 +0100 +@@ -331,27 +331,27 @@ + + // Define to 0 to completely remove parse debugging at compile-time + #ifndef VERBOSE_PARSE +-#define VERBOSE_PARSE 1 ++#define VERBOSE_PARSE 0 + #endif + + // Define to 0 to completely remove action debugging at compile-time + #ifndef VERBOSE_ACTION +-#define VERBOSE_ACTION 1 ++#define VERBOSE_ACTION 0 + #endif + + // Define to 0 to remove ActionScript errors verbosity at compile-time + #ifndef VERBOSE_ASCODING_ERRORS +-#define VERBOSE_ASCODING_ERRORS 1 ++#define VERBOSE_ASCODING_ERRORS 0 + #endif + + // Define to 0 this to remove invalid SWF verbosity at compile-time + #ifndef VERBOSE_MALFORMED_SWF +-#define VERBOSE_MALFORMED_SWF 1 ++#define VERBOSE_MALFORMED_SWF 0 + #endif + + // Define to 0 this to remove Networking verbosity at compile-time + #ifndef VERBOSE_NETWORKING +-#define VERBOSE_NETWORKING 1 ++#define VERBOSE_NETWORKING 0 + #endif + + #if VERBOSE_PARSE +diff -u -r gnash-0.8.9/libcore/vm/ActionExec.cpp gnash-0.8.9-nodebug/libcore/vm/ActionExec.cpp +--- gnash-0.8.9/libcore/vm/ActionExec.cpp 2011-03-13 17:47:36.000000000 +0100 ++++ gnash-0.8.9-nodebug/libcore/vm/ActionExec.cpp 2012-01-18 09:40:25.653458508 +0100 +@@ -46,7 +46,7 @@ + // too much information for my tastes. I really want just + // to see how stack changes while executing actions... + // --strk Fri Jun 30 02:28:46 CEST 2006 +-# define DEBUG_STACK 1 ++//# define DEBUG_STACK 1 + + // Max number of stack item to dump. 0 for unlimited. + # define STACK_DUMP_LIMIT 32 diff --git a/community/grsync/PKGBUILD b/community/grsync/PKGBUILD index b57328678..bd12228fd 100644 --- a/community/grsync/PKGBUILD +++ b/community/grsync/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 52933 2011-07-30 07:01:49Z spupykin $ +# $Id: PKGBUILD 62005 2012-01-14 00:21:54Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: William Rea <sillywilly@gmail.com> pkgname=grsync -pkgver=1.2.0 +pkgver=1.2.1 pkgrel=1 pkgdesc="GTK GUI for rsync" arch=('i686' 'x86_64' 'mips64el') @@ -13,11 +13,11 @@ depends=('gtk2' 'rsync') makedepends=('gettext' 'intltool') install=grsync.install source=(http://www.opbyte.it/release/grsync-$pkgver.tar.gz) -md5sums=('6364df4a3a7c9ebc25799762e77dc351') +md5sums=('e57f46d67f7f9e8df08fdd0b97db10a6') build() { - cd $startdir/src/grsync-$pkgver - [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr + cd $srcdir/grsync-$pkgver + [ $NOEXTRACT -eq 1 ] || LDFLAGS=-lm ./configure --prefix=/usr --disable-unity make - make DESTDIR=$startdir/pkg install + make DESTDIR=$pkgdir install } diff --git a/community/grsync/grsync.install b/community/grsync/grsync.install index 5f0358791..1eb57303c 100644 --- a/community/grsync/grsync.install +++ b/community/grsync/grsync.install @@ -1,7 +1,7 @@ post_install() { [ -x `which update-mime-database` ] && update-mime-database usr/share/mime [ -x `which gtk-update-icon-cache` ] && gtk-update-icon-cache -q -t -f usr/share/icons/hicolor - /bin/true + bin/true } post_upgrade() { diff --git a/community/gtkwave/PKGBUILD b/community/gtkwave/PKGBUILD index e363851a6..55cdd5758 100644 --- a/community/gtkwave/PKGBUILD +++ b/community/gtkwave/PKGBUILD @@ -1,9 +1,10 @@ -# $Id: PKGBUILD 58564 2011-11-15 03:42:53Z ebelanger $ -# Maintainer: Thomas Dziedzic < gostrc at gmail > +# $Id: PKGBUILD 62223 2012-01-18 16:26:00Z kkeen $ +# Maintainer: Kyle Keen <keenerd@gmail.com> +# Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: Jared Casper <jaredcasper@gmail.com> pkgname=gtkwave -pkgver=3.3.28 +pkgver=3.3.30 pkgrel=1 pkgdesc='A wave viewer which reads LXT, LXT2, VZT, GHW and VCD/EVCD files' arch=('i686' 'x86_64' 'mips64el') @@ -13,7 +14,7 @@ depends=('bzip2' 'xz' 'gtk2') makedepends=('gperf') install='gtkwave.install' source=("http://gtkwave.sourceforge.net/gtkwave-${pkgver}.tar.gz") -md5sums=('396cc15cfc12801c9ad6af507ee4a0f1') +md5sums=('44e784b13734123036dcd6890cff7f53') build() { cd "${srcdir}/gtkwave-${pkgver}" @@ -30,8 +31,6 @@ package() { make DESTDIR="${pkgdir}" install - install -D -m644 "${srcdir}/gtkwave-${pkgver}/.gtkwaverc" \ - "${pkgdir}/usr/share/gtkwave/sample.gtkwaverc" install -D -m644 "${srcdir}/gtkwave-${pkgver}/LICENSE.TXT" \ "${pkgdir}/usr/share/licenses/gtkwave/LICENSE.TXT" install -D -m644 "${srcdir}/gtkwave-${pkgver}/MIT.TXT" \ diff --git a/community/gtkwave/gtkwave.install b/community/gtkwave/gtkwave.install index 3c64a44d6..bc2e66b0d 100644 --- a/community/gtkwave/gtkwave.install +++ b/community/gtkwave/gtkwave.install @@ -1,5 +1,5 @@ post_install() { - echo 'Make sure you copy the /usr/share/gtkwave/sample.gtkwaverc file to' + echo 'Make sure you copy the /usr/share/gtkwave/examples/gtkwaverc file to' echo 'your home directory (as .gtkwaverc) or to your VCD project directory.' echo 'It contains the prefs for a good configuration that most people find' echo 'ergonomic. It is not strictly necessary however.' diff --git a/community/ipset/PKGBUILD b/community/ipset/PKGBUILD index 09eb63959..ac95e6229 100644 --- a/community/ipset/PKGBUILD +++ b/community/ipset/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 59646 2011-11-29 01:17:13Z seblu $ -# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net> +# $Id: PKGBUILD 62118 2012-01-16 09:00:54Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> pkgname=ipset -pkgver=6.10 +pkgver=6.11 pkgrel=1 pkgdesc='Administration tool for IP sets' arch=('i686' 'x86_64') @@ -11,12 +11,11 @@ license=('GPL2') depends=('libmnl') makedepends=('linux-headers') source=("http://ipset.netfilter.org/$pkgname-$pkgver.tar.bz2") -md5sums=('2dc677ab126269d09db5cd908c045591') +md5sums=('bfcc92e30a0fcf10ae6e7c4affa03c84') build() { cd $pkgname-$pkgver - ./autogen.sh - ./configure --prefix=/usr + ./configure --prefix=/usr --with-kmod=no make } diff --git a/community/libcgns/PKGBUILD b/community/libcgns/PKGBUILD index 3ed223977..4338d5222 100644 --- a/community/libcgns/PKGBUILD +++ b/community/libcgns/PKGBUILD @@ -3,9 +3,9 @@ pkgname=libcgns _basever=3.1.3 -_relver=3 +_relver=4 pkgver=${_basever}.${_relver} -pkgrel=2 +pkgrel=1 pkgdesc='General purpose library for the storage and retrieval of computational fluid dynamics analysis data by CGNS standard' arch=('i686' 'x86_64') url='http://www.cgns.org' @@ -13,7 +13,7 @@ license=('custom') conflicts=('libcgns2') makedepends=('cmake') source=("http://downloads.sourceforge.net/project/cgns/cgnslib_${_basever:0:3}/cgnslib_${_basever}-${_relver}.tar.gz") -md5sums=('8d19e0c69779d7ea74b1731e09a96b9d') +md5sums=('442bba32b576f3429cbd086af43fd4ae') # need to tell cmake when to build 64bit version [[ "$CARCH" == "i686" ]] && _64bits=OFF diff --git a/community/libdbi-drivers/PKGBUILD b/community/libdbi-drivers/PKGBUILD index b3d03e021..2e8348def 100644 --- a/community/libdbi-drivers/PKGBUILD +++ b/community/libdbi-drivers/PKGBUILD @@ -1,5 +1,5 @@ -# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de> -# Contributor: Olivier Médoc <o_medoc@yahoo.fr> +# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de> +# Contributor: Olivier Médoc <o_medoc@yahoo.fr> # Contributor: Ashok `ScriptDevil` Gautham <ScriptDevil.Arch@gmail.com> pkgname=libdbi-drivers diff --git a/community/libopenraw/PKGBUILD b/community/libopenraw/PKGBUILD index 528ef4569..b40eac3cf 100644 --- a/community/libopenraw/PKGBUILD +++ b/community/libopenraw/PKGBUILD @@ -1,16 +1,17 @@ -# $Id: PKGBUILD 59667 2011-11-29 09:17:08Z arodseth $ +# $Id: PKGBUILD 62429 2012-01-19 22:28:28Z foutrelis $ # Maintainer: Alexander Rødseth <rodseth@gmail.com> # Contributor: Ronald van Haren <ronald.archlinux.org> # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> # Contributor: <boromil@gmail.com> pkgname=libopenraw pkgver=0.0.9 -pkgrel=1 +pkgrel=2 pkgdesc="Library for decoding RAW files" arch=('i686' 'x86_64' 'mips64el') url="http://libopenraw.freedesktop.org/" license=('LGPL') -makedepends=('boost' 'libjpeg' 'libxml2') +depends=('gdk-pixbuf2') +makedepends=('boost' 'libxml2') options=('!libtool') source=("http://libopenraw.freedesktop.org/download/$pkgname-$pkgver.tar.bz2") md5sums=('3611d8aea870d25314665ef53093288e') diff --git a/community/libzdb/PKGBUILD b/community/libzdb/PKGBUILD new file mode 100644 index 000000000..ef3dc2aac --- /dev/null +++ b/community/libzdb/PKGBUILD @@ -0,0 +1,21 @@ +# $Id: PKGBUILD 62125 2012-01-16 09:28:05Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=libzdb +pkgver=2.10 +pkgrel=1 +pkgdesc="Zild Database Library" +arch=(i686 x86_64) +url="http://www.tildeslash.com/libzdb/" +license=('GPL') +depends=('postgresql-libs' 'sqlite3' 'libmysqlclient') +options=(!libtool) +source=(http://www.tildeslash.com/libzdb/dist/libzdb-$pkgver.tar.gz) +md5sums=('fdc04b4b7f33cdcdfc6b559ba9965825') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make + make DESTDIR="$pkgdir/" install +} diff --git a/community/lilypond/PKGBUILD b/community/lilypond/PKGBUILD index 633f0f38a..e8e45cdb3 100644 --- a/community/lilypond/PKGBUILD +++ b/community/lilypond/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 60869 2011-12-19 16:37:27Z spupykin $ +# $Id: PKGBUILD 62129 2012-01-16 13:56:57Z bisson $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Geoffroy Carrier <geoffroy@archlinux.org> # Contributor: William Rea <sillywilly@gmail.com> @@ -6,7 +6,7 @@ pkgname=lilypond pkgver=2.14.2 -pkgrel=3 +pkgrel=4 pkgdesc="An automated music engraving system" arch=('i686' 'x86_64' 'mips64el') url="http://lilypond.org" diff --git a/community/linux-tools/PKGBUILD b/community/linux-tools/PKGBUILD index 345d8f9ad..026c0aa1d 100644 --- a/community/linux-tools/PKGBUILD +++ b/community/linux-tools/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 61664 2012-01-06 00:12:09Z seblu $ -# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net> +# $Id: PKGBUILD 62053 2012-01-15 02:27:29Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> pkgbase=linux-tools pkgname=('perf' 'cpupower') pkgver=3.2 -kernver=${pkgver} +kernver=${pkgver}.1 [[ ${kernver##*rc} != $kernver ]] && testing='testing' -pkgrel=1 +pkgrel=2 license=('GPL2') arch=('i686' 'x86_64') url='http://www.kernel.org' @@ -16,16 +16,18 @@ makedepends=('asciidoc' 'xmlto') makedepends+=('python2' 'libnewt' 'elfutils' 'pciutils') source=("http://ftp.kernel.org/pub/linux/kernel/v3.0/$testing/linux-$kernver.tar.xz" 'cpupower.rc' - 'cpupower.conf') -md5sums=('364066fa18767ec0ae5f4e4abcf9dc51' - 'd8b119eff7dc1a2d655eb71a47fa6215' - '218fd36a7957d3170ed8bd1a0be1f62f') + 'cpupower.conf' + 'cpupower.service') +md5sums=('cd2f8b7752c85c337af809391f4afb94' + '26af384ca282bc0dc38ff65acc7bb4b9' + '857ccdd0598511e3bf4b63522754dc48' + '20870541e88109d2f153be3c58a277f1') build() { msg2 'Build perf' cd linux-$kernver/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" PERF_VERSION=$pkgver-$pkgrel \ - all man + make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" \ + PERF_VERSION=$pkgver-$pkgrel all man msg2 'Build cpupower' # we cannot use --as-needed @@ -39,8 +41,8 @@ package_perf() { depends=('python2' 'libnewt' 'elfutils') cd linux-${kernver}/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" PERF_VERSION=$pkgver \ - install install-man + make PYTHON=python2 DESTDIR="${pkgdir}/usr" perfexecdir="lib/$pkgname" \ + PERF_VERSION=$pkgver install install-man } package_cpupower() { @@ -52,6 +54,7 @@ package_cpupower() { # install rc.d script install -D -m 755 cpupower.rc "$pkgdir/etc/rc.d/cpupower" install -D -m 644 cpupower.conf "$pkgdir/etc/conf.d/cpupower" + install -D -m 644 cpupower.service "$pkgdir/lib/systemd/system/cpupower.service" cd linux-$kernver/tools/power/cpupower make \ diff --git a/community/linux-tools/cpupower.conf b/community/linux-tools/cpupower.conf index 0f56836b1..ee8602953 100644 --- a/community/linux-tools/cpupower.conf +++ b/community/linux-tools/cpupower.conf @@ -1,14 +1,28 @@ -# valid governors: -# ondemand, performance, powersave, -# conservative, userspace -#governor="ondemand" +# Define CPUs governor +# valid governors: ondemand, performance, powersave, conservative, userspace. +#governor='ondemand' -# limit frequency range (optional) -# valid suffixes: Hz, kHz (default), MHz, GHz, THz +# Limit frequency range +# Valid suffixes: Hz, kHz (default), MHz, GHz, THz #min_freq="2.25GHz" #max_freq="3GHz" -# use freq to set up the exact cpu frequency using it with userspace governor +# Specific frequency to be set. +# Requires userspace governor to be available and loaded. #freq= +# Utilizes cores in one processor package/socket first before processes are +# scheduled to other processor packages/sockets. +# See man (1) CPUPOWER-SET for additional details. +#mc_scheduler= + +# Utilizes thread siblings of one processor core first before processes are +# scheduled to other cores. See man (1) CPUPOWER-SET for additional details. +#smp_scheduler= + +# Sets a register on supported Intel processore which allows software to convey +# its policy for the relative importance of performance versus energy savings to +# the processor. See man (1) CPUPOWER-SET for additional details. +#perf_bias= + # vim:set ts=2 sw=2 ft=sh et: diff --git a/community/linux-tools/cpupower.rc b/community/linux-tools/cpupower.rc index 812637b61..9b0bcddb7 100644 --- a/community/linux-tools/cpupower.rc +++ b/community/linux-tools/cpupower.rc @@ -8,19 +8,29 @@ case "$1" in start|restart) stat_busy "Setting cpupower rules" + declare -i fail=0 - declare params='' - if [[ "$governor" ]]; then - params="-g $governor " - params+="${min_freq:+-d $min_freq} " - params+="${max_freq:+-u $max_freq} " - params+="${freq:+-f $freq} " - cpupower frequency-set $params >/dev/null || { stat_fail; exit 1; } - stat_done - else - stat_append ': Invalid configuration' - stat_fail + # frequency-set options + declare -a params=() + params+=(${governor:+-g $governor}) + params+=(${min_freq:+-d $min_freq}) + params+=(${max_freq:+-u $max_freq}) + params+=(${freq:+-f $freq}) + if ((${#params[@]} > 0)); then + cpupower frequency-set "${params[@]}" >/dev/null || fail=1 fi + + # set options + declare -a params=() + params+=(${mc_scheduler:+-m $mc_scheduler}) + params+=(${smp_scheduler:+-s $smp_scheduler}) + params+=(${perf_bias:+-b $perf_bias}) + if ((${#params[@]} > 0)); then + cpupower set "${params[@]}" >/dev/null || fail=1 + fi + + # print failure if any + (($fail > 0)) && stat_fail && exit 1 || stat_done ;; *) echo "usage: $0 {start|restart}" diff --git a/community/linux-tools/cpupower.service b/community/linux-tools/cpupower.service new file mode 100644 index 000000000..f77cfdc97 --- /dev/null +++ b/community/linux-tools/cpupower.service @@ -0,0 +1,10 @@ +[Unit] +Description=Apply cpupower configuration + +[Service] +Type=oneshot +ExecStart=/etc/rc.d/cpupower start +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/community/luarocks/PKGBUILD b/community/luarocks/PKGBUILD index 639c0fce3..8f395f63f 100644 --- a/community/luarocks/PKGBUILD +++ b/community/luarocks/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 61062 2011-12-21 13:24:55Z cbrannon $ +# $Id: PKGBUILD 62343 2012-01-19 11:02:08Z cbrannon $ # Maintainer: Chris Brannon <cmbrannon79@gmail.com> # Contributor: Geoffroy Carrier <geoffroy@archlinux.org> pkgname=luarocks -pkgver=2.0.7 +pkgver=2.0.7.1 pkgrel=1 pkgdesc='Deployment and management system for Lua modules' arch=('i686' 'x86_64' 'mips64el') @@ -33,4 +33,4 @@ package() { install -D COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } -md5sums=('3a9f80418025e2c43ac369ee6837b659') +md5sums=('37003e5c78792e353acde684426bdeac') diff --git a/community/megaglest/PKGBUILD b/community/megaglest/PKGBUILD index b57dc2405..a1f316dc2 100644 --- a/community/megaglest/PKGBUILD +++ b/community/megaglest/PKGBUILD @@ -1,22 +1,22 @@ -# $Id: PKGBUILD 60139 2011-12-05 22:27:28Z svenstaro $ +# $Id: PKGBUILD 62066 2012-01-15 14:56:57Z svenstaro $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Larry Hajali <larryhaja [at] gmail [dot] com> pkgname=megaglest -pkgver=3.6.0.1 -_pkgver=3.6.0 +pkgver=3.6.0.2 pkgrel=1 pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world." arch=('i686' 'x86_64' 'mips64el') url="http://sourceforge.net/projects/megaglest/" license=('GPL3') -depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'mesa' 'lua' 'icu' 'ftgl' 'glew') -makedepends=('ftjam' 'p7zip' 'wxgtk' 'cmake') -source=("http://downloads.sourceforge.net/project/${pkgname}/current_release/${pkgname}-source-${pkgver}.tar.xz") -md5sums=('099a35b97e101aa2b8facf144a5d96c8') +depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'libgl' 'lua' 'icu' 'ftgl' 'glew' + 'libircclient' 'miniupnpc' 'wxgtk') +makedepends=('ftjam' 'cmake' 'mesa') +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-source-${pkgver}.tar.xz") +md5sums=('9d840a04b41aef2cba503de7bf433b8d') build() { - cd "${srcdir}"/"${pkgname}"-"${_pkgver}"/ + cd "${srcdir}"/"${pkgname}"-"${pkgver}"/ [[ -d build ]] && rm -r build mkdir build && cd build @@ -28,7 +28,7 @@ build() { } package() { - cd "${srcdir}"/"${pkgname}"-"${_pkgver}"/ + cd "${srcdir}"/"${pkgname}"-"${pkgver}"/ cd build make DESTDIR="$pkgdir" install diff --git a/community/minidlna/PKGBUILD b/community/minidlna/PKGBUILD index dffb76d45..5da48ee45 100644 --- a/community/minidlna/PKGBUILD +++ b/community/minidlna/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 58407 2011-11-12 17:17:53Z ibiru $ +# $Id: PKGBUILD 62167 2012-01-17 08:00:28Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer:Biginoz < biginoz AT free point fr> # Contributor: Ignacio Galmarino <igalmarino@gmail.com> @@ -6,7 +6,7 @@ pkgname=minidlna pkgver=1.0.22 -pkgrel=4 +pkgrel=5 pkgdesc="A DLNA/UPnP-AV Media server (aka ReadyDLNA)" arch=('i686' 'x86_64' 'mips64el') url="http://sourceforge.net/projects/minidlna/" @@ -19,7 +19,7 @@ changelog=changelog source=(http://downloads.sourceforge.net/minidlna/minidlna_${pkgver}_src.tar.gz minidlna.rc) md5sums=('3de2f6b54f43bb998dfad3c8fa75cef3' - '8b064a6c344a3ad8029e2619dfe07b77') + 'b64b8b749f1c23b3f1a2ee6d6ded07fd') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/community/minidlna/minidlna.rc b/community/minidlna/minidlna.rc index df44a549f..6e6f88f35 100755 --- a/community/minidlna/minidlna.rc +++ b/community/minidlna/minidlna.rc @@ -2,46 +2,65 @@ . /etc/rc.conf . /etc/rc.d/functions -. /etc/minidlna.conf . /etc/conf.d/minidlna -PID=`pidof -o %PPID /usr/sbin/minidlna` +daemon_name=minidlna + +get_pid() { + pidof -o %PPID /usr/sbin/minidlna +} case "$1" in start) stat_busy "Starting minidlna" - [ -z "$PID" ] && su -s /bin/sh -l -c /usr/sbin/minidlna - $MINIDLNA_USER - if [ $? -gt 0 ]; then - stat_fail + PID=$(get_pid) + if [[ -z "$PID" ]]; then + rm -f /var/run/$daemon_name.pid + touch /var/run/$daemon_name.pid && chown $MINIDLNA_USER:$MINIDLNA_USER /var/run/$daemon_name.pid + su -s /bin/sh -l -c /usr/sbin/minidlna - $MINIDLNA_USER + if [[ $? -gt 0 ]]; then + stat_fail + exit 1 + else + add_daemon $daemon_name + stat_done + fi else - add_daemon minidlna - stat_done + stat_fail + exit 1 fi ;; + stop) stat_busy "Stopping minidlna" - [ ! -z "$PID" ] && kill $PID &> /dev/null + PID=$(get_pid) + [[ -n $PID ]] && kill $PID &> /dev/null if [ $? -gt 0 ]; then stat_fail + exit 1 else + rm -f /var/run/$daemon_name.pid &> /dev/null rm_daemon minidlna stat_done fi ;; + clean) - $0 stop - sleep 1 - stat_busy "Cleaning minidlna cache" - [ -z $db_dir ] || rm -r $db_dir/* - stat_done - sleep 1 - $0 start - ;; + $0 stop + sleep 1 + stat_busy "Cleaning minidlna cache" + [ -z $db_dir ] || rm -r $db_dir/* + stat_done + sleep 1 + $0 start + ;; + restart) $0 stop sleep 1 $0 start ;; + *) echo "usage: $0 {start|stop|restart|clean}" esac diff --git a/community/open-vm-tools-modules/PKGBUILD b/community/open-vm-tools-modules/PKGBUILD index 3b7007215..d0ce60605 100644 --- a/community/open-vm-tools-modules/PKGBUILD +++ b/community/open-vm-tools-modules/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 61571 2012-01-03 12:07:32Z spupykin $ +# $Id: PKGBUILD 62251 2012-01-18 19:54:06Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Krzysztof Raczkowski <raczkow@gmail.com> pkgname=open-vm-tools-modules pkgver=2011.12.20 _pkgsubver=562307 -pkgrel=1 +pkgrel=3 pkgdesc="kernel modules for the open source implementation of VMware Tools" arch=('i686' 'x86_64' 'mips64el') url="http://open-vm-tools.sourceforge.net/" @@ -28,7 +28,7 @@ build() { --without-x --with-kernel-release=$KERNEL_RELEASE cd modules - echo '#define COMPAT_LINUX_VERSION_CHECK_LT(a, b, c) 1' >>linux/shared/compat_version.h +# echo '#define COMPAT_LINUX_VERSION_CHECK_LT(a, b, c) 1' >>linux/shared/compat_version.h make modules } @@ -43,8 +43,8 @@ package() { for MOD in `find -type f -name '*.ko'`; do install -Dm644 $MOD $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ done - sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install gzip $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/*.ko install -D -m 644 ${srcdir}/modprobe.conf ${pkgdir}/etc/modprobe.d/${pkgname}.conf + sed -i "s|extramodules-.*-ARCH|extramodules-3.${_kernver}-ARCH|" $startdir/$pkgname.install } diff --git a/community/open-vm-tools-modules/open-vm-tools-modules.install b/community/open-vm-tools-modules/open-vm-tools-modules.install index 187dfb1bb..ba2f9ddc2 100644 --- a/community/open-vm-tools-modules/open-vm-tools-modules.install +++ b/community/open-vm-tools-modules/open-vm-tools-modules.install @@ -1,8 +1,6 @@ -KERNEL_VERSION='3.1.0-4-ARCH' - post_install() { - depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 - + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) echo ">>> Enabling vmxnet driver in /etc/modprobe.d/open-vm-tools-modules.conf" echo ">>> (this will disable pcnet32 driver)" echo ">>>" @@ -12,12 +10,13 @@ post_install() { } post_upgrade() { - depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_remove() { - depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 - + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) echo ">>>" echo ">>> Remember to un-blacklist pcnet32 driver" echo ">>>" diff --git a/community/packagekit/PKGBUILD b/community/packagekit/PKGBUILD index 4f7436675..95957f648 100644 --- a/community/packagekit/PKGBUILD +++ b/community/packagekit/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 56266 2011-10-04 10:14:17Z jconder $ +# $Id: PKGBUILD 62160 2012-01-17 00:26:49Z jconder $ # Maintainer: Jonathan Conder <jonno.conder@gmail.com> pkgbase='packagekit' pkgname=('packagekit' 'packagekit-qt' 'packagekit-qt2' 'packagekit-python') -pkgver=0.6.19 +pkgver=0.6.21 pkgrel=1 pkgdesc="A system designed to make installation and updates of packages easier." arch=('i686' 'x86_64' 'mips64el') @@ -12,20 +12,23 @@ makedepends=('dbus-glib' 'gobject-introspection' 'gtk-doc' 'intltool' 'networkmanager' 'pacman' 'pm-utils' 'polkit' 'python2' 'qt' 'shared-mime-info' 'sqlite3' 'udev') options=('!libtool') -source=("http://www.packagekit.org/releases/PackageKit-$pkgver.tar.xz") -sha256sums=('961c6408de08ebaf15c09e74afd06918d699be8974b5c35c2c9663e5b12b5223') +source=("http://www.packagekit.org/releases/PackageKit-$pkgver.tar.xz" + 'alpm.patch') +sha256sums=('68e5d4d07adf50b1fae6cbc0963555345ba7fc12d86d3e3387874547a5448b8e' + 'fbe54a89c3495376a0b939b67fec5b2e57bed46e92b3f4816d797745882481e6') build() { cd "$srcdir/PackageKit-$pkgver" - # TODO: remove when this is fixed upstream - find -name '*.moc' -print0 | xargs -0 rm + patch -Np1 -i "$srcdir/alpm.patch" sed -i 's@SUBDIRS = test@SUBDIRS =@' 'backends/Makefile.in' sed -i 's@python @python2 @' 'lib/python/packagekit/Makefile.in' sed -i 's@bin/python@bin/python2@' 'lib/python/packagekit/'*.py export PYTHON=/usr/bin/python2 + # TODO: remove when upstream is patched + autoreconf ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ @@ -51,7 +54,7 @@ package_packagekit() { backup=('var/lib/PackageKit/transactions.db' 'etc/PackageKit/alpm.d/pacman.conf' 'etc/PackageKit/alpm.d/repos.list') - depends=('dbus-glib' 'pacman>=3.5.0' 'pacman<3.6.0' 'polkit' + depends=('dbus-glib' 'pacman>=4.0.0' 'pacman<4.1.0' 'polkit' 'shared-mime-info' 'sqlite3' 'udev') optdepends=('networkmanager') install='packagekit.install' diff --git a/community/packagekit/alpm.patch b/community/packagekit/alpm.patch index 75dee853a..d39ce14e1 100644 --- a/community/packagekit/alpm.patch +++ b/community/packagekit/alpm.patch @@ -1,253 +1,3114 @@ +diff --git a/backends/alpm/Makefile.am b/backends/alpm/Makefile.am +index 5a5468a..d8c3dfc 100644 +--- a/backends/alpm/Makefile.am ++++ b/backends/alpm/Makefile.am +@@ -5,6 +5,7 @@ PK_BACKEND_REPO_FILE = $(confdir)/repos.list + PK_BACKEND_DEFAULT_PATH = "/bin:/usr/bin:/sbin:/usr/sbin" + PK_BACKEND_DEFAULT_ROOT = "/" + PK_BACKEND_DEFAULT_DBPATH = $(localstatedir)/lib/pacman/ ++PK_BACKEND_DEFAULT_GPGDIR = $(sysconfdir)/pacman.d/gnupg/ + PK_BACKEND_DEFAULT_CACHEDIR = $(localstatedir)/cache/pacman/pkg/ + PK_BACKEND_DEFAULT_LOGFILE = $(localstatedir)/log/pacman.log + +@@ -17,6 +18,7 @@ DEFS = -DPK_BACKEND_CONFIG_FILE=\"$(PK_BACKEND_CONFIG_FILE)\" \ + -DPK_BACKEND_DEFAULT_PATH=\"$(PK_BACKEND_DEFAULT_PATH)\" \ + -DPK_BACKEND_DEFAULT_ROOT=\"$(PK_BACKEND_DEFAULT_ROOT)\" \ + -DPK_BACKEND_DEFAULT_DBPATH=\"$(PK_BACKEND_DEFAULT_DBPATH)\" \ ++ -DPK_BACKEND_DEFAULT_GPGDIR=\"$(PK_BACKEND_DEFAULT_GPGDIR)\" \ + -DPK_BACKEND_DEFAULT_CACHEDIR=\"$(PK_BACKEND_DEFAULT_CACHEDIR)\" \ + -DPK_BACKEND_DEFAULT_LOGFILE=\"$(PK_BACKEND_DEFAULT_LOGFILE)\" \ + -DALPM_CACHE_PATH=\"$(ALPM_CACHE_PATH)\" \ diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c -index 0077329..ba993f0 100644 +index ba993f0..93f6d95 100644 --- a/backends/alpm/pk-backend-alpm.c +++ b/backends/alpm/pk-backend-alpm.c -@@ -29,6 +29,7 @@ +@@ -22,10 +22,13 @@ + */ + + #include <config.h> ++#include <locale.h> + #include <glib/gstdio.h> + #include <sys/utsname.h> ++#include <pk-backend-spawn.h> + + #include "pk-backend-alpm.h" ++#include "pk-backend-config.h" #include "pk-backend-databases.h" #include "pk-backend-error.h" #include "pk-backend-groups.h" -+#include "pk-backend-transaction.h" - - PkBackend *backend = NULL; +@@ -35,7 +38,8 @@ PkBackend *backend = NULL; GCancellable *cancellable = NULL; -diff --git a/backends/alpm/pk-backend-error.c b/backends/alpm/pk-backend-error.c -index 6383175..255f1fb 100644 ---- a/backends/alpm/pk-backend-error.c -+++ b/backends/alpm/pk-backend-error.c -@@ -25,20 +25,6 @@ + static GStaticMutex mutex = G_STATIC_MUTEX_INIT; - #include "pk-backend-error.h" +-pmdb_t *localdb = NULL; ++alpm_handle_t *alpm = NULL; ++alpm_db_t *localdb = NULL; --static void --pk_backend_output_locked (PkBackend *self) --{ -- gchar *output; -- -- g_return_if_fail (self != NULL); + gchar *xfercmd = NULL; + alpm_list_t *holdpkgs = NULL; +@@ -162,7 +166,7 @@ out: + } + + static void +-pk_backend_logcb (pmloglevel_t level, const gchar *format, va_list args) ++pk_backend_logcb (alpm_loglevel_t level, const gchar *format, va_list args) + { + gchar *output; + +@@ -176,12 +180,12 @@ pk_backend_logcb (pmloglevel_t level, const gchar *format, va_list args) + + /* report important output to PackageKit */ + switch (level) { +- case PM_LOG_DEBUG: +- case PM_LOG_FUNCTION: ++ case ALPM_LOG_DEBUG: ++ case ALPM_LOG_FUNCTION: + g_debug ("%s", output); + break; + +- case PM_LOG_WARNING: ++ case ALPM_LOG_WARNING: + g_warning ("%s", output); + pk_backend_output (backend, output); + break; +@@ -194,44 +198,99 @@ pk_backend_logcb (pmloglevel_t level, const gchar *format, va_list args) + g_free (output); + } + +-static gboolean +-pk_backend_initialize_alpm (PkBackend *self, GError **error) ++static void ++pk_backend_configure_environment (PkBackend *self) + { + struct utsname un; +- gchar *user_agent; ++ gchar *value; + +- g_return_val_if_fail (self != NULL, FALSE); ++ g_return_if_fail (self != NULL); + + /* PATH might have been nuked by D-Bus */ + g_setenv ("PATH", PK_BACKEND_DEFAULT_PATH, FALSE); + + uname (&un); +- user_agent = g_strdup_printf ("%s/%s (%s %s) libalpm/%s", +- PACKAGE_TARNAME, PACKAGE_VERSION, +- un.sysname, un.machine, alpm_version ()); +- g_setenv ("HTTP_USER_AGENT", user_agent, FALSE); +- g_free (user_agent); - -- output = g_strdup_printf ("If you are certain no other package manager " -- "is running, you can remove %s\n", -- alpm_option_get_lockfile ()); -- pk_backend_output (self, output); -- g_free (output); --} +- g_debug ("initializing"); +- if (alpm_initialize () < 0) { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); ++ value = g_strdup_printf ("%s/%s (%s %s) libalpm/%s", PACKAGE_TARNAME, ++ PACKAGE_VERSION, un.sysname, un.machine, ++ alpm_version ()); ++ g_setenv ("HTTP_USER_AGENT", value, FALSE); ++ g_free (value); ++ ++ value = pk_backend_get_locale (self); ++ if (value != NULL) { ++ setlocale (LC_ALL, value); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_proxy_http (self); ++ if (value != NULL) { ++ gchar *uri = pk_backend_spawn_convert_uri (value); ++ g_setenv ("http_proxy", uri, TRUE); ++ g_free (uri); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_proxy_https (self); ++ if (value != NULL) { ++ gchar *uri = pk_backend_spawn_convert_uri (value); ++ g_setenv ("https_proxy", uri, TRUE); ++ g_free (uri); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_proxy_ftp (self); ++ if (value != NULL) { ++ gchar *uri = pk_backend_spawn_convert_uri (value); ++ g_setenv ("ftp_proxy", uri, TRUE); ++ g_free (uri); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_proxy_socks (self); ++ if (value != NULL) { ++ gchar *uri = pk_backend_spawn_convert_uri (value); ++ g_setenv ("socks_proxy", uri, TRUE); ++ g_free (uri); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_no_proxy (self); ++ if (value != NULL) { ++ g_setenv ("no_proxy", value, TRUE); ++ g_free (value); ++ } ++ ++ value = pk_backend_get_pac (self); ++ if (value != NULL) { ++ gchar *uri = pk_backend_spawn_convert_uri (value); ++ g_setenv ("pac", uri, TRUE); ++ g_free (uri); ++ g_free (value); ++ } ++} ++ ++static gboolean ++pk_backend_initialize_alpm (PkBackend *self, GError **error) ++{ ++ g_return_val_if_fail (self != NULL, FALSE); ++ ++ pk_backend_configure_environment (self); ++ ++ alpm = pk_backend_configure (PK_BACKEND_CONFIG_FILE, error); ++ if (alpm == NULL) { + return FALSE; + } + + backend = self; +- localdb = alpm_option_get_localdb (); ++ alpm_option_set_logcb (alpm, pk_backend_logcb); ++ ++ localdb = alpm_option_get_localdb (alpm); + if (localdb == NULL) { +- g_set_error (error, ALPM_ERROR, pm_errno, "[%s]: %s", "local", +- alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "[%s]: %s", "local", ++ alpm_strerror (errno)); + } + +- /* set some sane defaults */ +- alpm_option_set_logcb (pk_backend_logcb); +- alpm_option_set_root (PK_BACKEND_DEFAULT_ROOT); +- alpm_option_set_dbpath (PK_BACKEND_DEFAULT_DBPATH); +- alpm_option_set_logfile (PK_BACKEND_DEFAULT_LOGFILE); - + return TRUE; + } + +@@ -240,17 +299,20 @@ pk_backend_destroy_alpm (PkBackend *self) + { + g_return_if_fail (self != NULL); + +- if (backend != NULL) { +- if (alpm_trans_get_flags () != -1) { +- alpm_trans_release (); ++ if (alpm != NULL) { ++ if (alpm_trans_get_flags (alpm) < 0) { ++ alpm_trans_release (alpm); + } +- alpm_release (); ++ alpm_release (alpm); ++ ++ alpm = NULL; + backend = NULL; + } + + FREELIST (syncfirsts); + FREELIST (holdpkgs); + g_free (xfercmd); ++ xfercmd = NULL; + } + void - pk_backend_error (PkBackend *self, GError *error) +diff --git a/backends/alpm/pk-backend-alpm.h b/backends/alpm/pk-backend-alpm.h +index 23a2724..ecd6d0f 100644 +--- a/backends/alpm/pk-backend-alpm.h ++++ b/backends/alpm/pk-backend-alpm.h +@@ -28,7 +28,8 @@ + extern PkBackend *backend; + extern GCancellable *cancellable; + +-extern pmdb_t *localdb; ++extern alpm_handle_t *alpm; ++extern alpm_db_t *localdb; + + extern gchar *xfercmd; + extern alpm_list_t *holdpkgs; +diff --git a/backends/alpm/pk-backend-config.c b/backends/alpm/pk-backend-config.c +index 21a4c54..a51a984 100644 +--- a/backends/alpm/pk-backend-config.c ++++ b/backends/alpm/pk-backend-config.c +@@ -28,29 +28,44 @@ + + #include "pk-backend-alpm.h" + #include "pk-backend-config.h" ++#include "pk-backend-databases.h" + #include "pk-backend-error.h" + +-typedef struct { +- gboolean checkspace, ilovecandy, showsize, totaldl, usedelta, usesyslog; ++typedef struct ++{ ++ gboolean checkspace, ilovecandy, totaldl, usedelta, usesyslog, ++ verbosepkglists; + +- gchar *arch, *cleanmethod, *dbpath, *logfile, *root, *xfercmd; ++ gchar *arch, *cleanmethod, *dbpath, *gpgdir, *logfile, *root, ++ *xfercmd; + +- alpm_list_t *cachedirs, *holdpkgs, *ignoregrps, *ignorepkgs, +- *noextracts, *noupgrades, *syncfirsts; ++ alpm_list_t *cachedirs, *holdpkgs, *ignoregroups, *ignorepkgs, ++ *noextracts, *noupgrades, *syncfirsts; + +- alpm_list_t *repos; +- GHashTable *servers; +- GRegex *xrepo, *xarch; ++ alpm_list_t *repos; ++ GHashTable *servers; ++ GHashTable *levels; ++ GRegex *xrepo, *xarch; + } PkBackendConfig; + + static PkBackendConfig * + pk_backend_config_new (void) { -@@ -86,7 +72,6 @@ pk_backend_error (PkBackend *self, GError *error) + PkBackendConfig *config = g_new0 (PkBackendConfig, 1); ++ alpm_siglevel_t *level = g_new0 (alpm_siglevel_t, 1); ++ + config->servers = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, NULL); ++ config->levels = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, ++ g_free); ++ ++ *level |= ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL; ++ *level |= ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL; ++ g_hash_table_insert (config->levels, g_strdup ("options"), level); ++ + config->xrepo = g_regex_new ("\\$repo", 0, 0, NULL); + config->xarch = g_regex_new ("\\$arch", 0, 0, NULL); ++ + return config; + } - case PM_ERR_HANDLE_LOCK: - code = PK_ERROR_ENUM_CANNOT_GET_LOCK; -- pk_backend_output_locked (self); - break; +@@ -76,13 +91,14 @@ pk_backend_config_free (PkBackendConfig *config) + g_free (config->arch); + g_free (config->cleanmethod); + g_free (config->dbpath); ++ g_free (config->gpgdir); + g_free (config->logfile); + g_free (config->root); + g_free (config->xfercmd); - case PM_ERR_DB_OPEN: -@@ -187,15 +172,6 @@ pk_backend_error (PkBackend *self, GError *error) - pk_backend_error_code (self, code, "%s", error->message); + FREELIST (config->cachedirs); + FREELIST (config->holdpkgs); +- FREELIST (config->ignoregrps); ++ FREELIST (config->ignoregroups); + FREELIST (config->ignorepkgs); + FREELIST (config->noextracts); + FREELIST (config->noupgrades); +@@ -92,6 +108,8 @@ pk_backend_config_free (PkBackendConfig *config) + g_hash_table_foreach_remove (config->servers, + pk_backend_config_servers_free, NULL); + g_hash_table_unref (config->servers); ++ g_hash_table_unref (config->levels); ++ + g_regex_unref (config->xrepo); + g_regex_unref (config->xarch); + } +@@ -113,14 +131,6 @@ pk_backend_config_set_ilovecandy (PkBackendConfig *config) } --void --pk_backend_output (PkBackend *self, const gchar *output) + static void +-pk_backend_config_set_showsize (PkBackendConfig *config) -{ -- g_return_if_fail (self != NULL); -- g_return_if_fail (output != NULL); +- g_return_if_fail (config != NULL); - -- pk_backend_message (self, PK_MESSAGE_ENUM_UNKNOWN, "%s", output); +- config->showsize = TRUE; -} - - GQuark - alpm_error_quark (void) +-static void + pk_backend_config_set_totaldl (PkBackendConfig *config) { -diff --git a/backends/alpm/pk-backend-error.h b/backends/alpm/pk-backend-error.h -index b01b06d..83fe4a5 100644 ---- a/backends/alpm/pk-backend-error.h -+++ b/backends/alpm/pk-backend-error.h -@@ -32,6 +32,4 @@ enum { + g_return_if_fail (config != NULL); +@@ -144,19 +154,28 @@ pk_backend_config_set_usesyslog (PkBackendConfig *config) + config->usesyslog = TRUE; + } - void pk_backend_error (PkBackend *self, GError *error); +-typedef struct { +- const gchar *name; +- void (*func) (PkBackendConfig *config); ++static void ++pk_backend_config_set_verbosepkglists (PkBackendConfig *config) ++{ ++ g_return_if_fail (config != NULL); ++ ++ config->verbosepkglists = TRUE; ++} ++ ++typedef struct ++{ ++ const gchar *name; ++ void (*func) (PkBackendConfig *config); + } PkBackendConfigBoolean; --void pk_backend_output (PkBackend *self, const gchar *output); -- - GQuark alpm_error_quark (void); -diff --git a/backends/alpm/pk-backend-transaction.c b/backends/alpm/pk-backend-transaction.c -index f919309..fdb840e 100644 ---- a/backends/alpm/pk-backend-transaction.c -+++ b/backends/alpm/pk-backend-transaction.c -@@ -32,6 +32,9 @@ static off_t dtotal = 0; - static pmpkg_t *dpkg = NULL; - static GString *dfiles = NULL; + /* keep this in alphabetical order */ + static const PkBackendConfigBoolean pk_backend_config_boolean_options[] = { + { "CheckSpace", pk_backend_config_set_checkspace }, + { "ILoveCandy", pk_backend_config_set_ilovecandy }, +- { "ShowSize", pk_backend_config_set_showsize }, + { "TotalDownload", pk_backend_config_set_totaldl }, + { "UseDelta", pk_backend_config_set_usedelta }, + { "UseSyslog", pk_backend_config_set_usesyslog }, ++ { "VerbosePkgLists", pk_backend_config_set_verbosepkglists }, + { NULL, NULL } + }; + +@@ -234,6 +253,17 @@ pk_backend_config_set_dbpath (PkBackendConfig *config, const gchar *path) + } -+static pmpkg_t *tpkg = NULL; -+static GString *toutput = NULL; + static void ++pk_backend_config_set_gpgdir (PkBackendConfig *config, const gchar *path) ++{ ++ g_return_if_fail (config != NULL); ++ g_return_if_fail (path != NULL); + - static gchar * - pk_backend_resolve_path (PkBackend *self, const gchar *basename) ++ g_free (config->gpgdir); ++ config->gpgdir = g_strdup (path); ++} ++ ++ ++static void + pk_backend_config_set_logfile (PkBackendConfig *config, const gchar *filename) { -@@ -332,6 +335,53 @@ pk_backend_transaction_conv_cb (pmtransconv_t question, gpointer data1, + g_return_if_fail (config != NULL); +@@ -263,9 +293,10 @@ pk_backend_config_set_xfercmd (PkBackendConfig *config, const gchar *command) + config->xfercmd = g_strdup (command); + } + +-typedef struct { +- const gchar *name; +- void (*func) (PkBackendConfig *config, const gchar *s); ++typedef struct ++{ ++ const gchar *name; ++ void (*func) (PkBackendConfig *config, const gchar *s); + } PkBackendConfigString; + + /* keep this in alphabetical order */ +@@ -274,6 +305,7 @@ static const PkBackendConfigString pk_backend_config_string_options[] = { + { "CacheDir", pk_backend_config_add_cachedir }, + { "CleanMethod", pk_backend_config_set_cleanmethod }, + { "DBPath", pk_backend_config_set_dbpath }, ++ { "GPGDir", pk_backend_config_set_gpgdir }, + { "LogFile", pk_backend_config_set_logfile }, + { "RootDir", pk_backend_config_set_root }, + { "XferCommand", pk_backend_config_set_xfercmd }, +@@ -313,12 +345,12 @@ pk_backend_config_add_holdpkg (PkBackendConfig *config, gchar *package) + } + + static void +-pk_backend_config_add_ignoregrp (PkBackendConfig *config, gchar *group) ++pk_backend_config_add_ignoregroup (PkBackendConfig *config, gchar *group) + { + g_return_if_fail (config != NULL); + g_return_if_fail (group != NULL); + +- config->ignoregrps = alpm_list_add (config->ignoregrps, group); ++ config->ignoregroups = alpm_list_add (config->ignoregroups, group); } static void -+pk_backend_output_end (PkBackend *self) +@@ -357,15 +389,16 @@ pk_backend_config_add_syncfirst (PkBackendConfig *config, gchar *package) + config->syncfirsts = alpm_list_add (config->syncfirsts, package); + } + +-typedef struct { +- const gchar *name; +- void (*func) (PkBackendConfig *config, gchar *value); ++typedef struct +{ -+ g_return_if_fail (self != NULL); ++ const gchar *name; ++ void (*func) (PkBackendConfig *config, gchar *value); + } PkBackendConfigList; + + /* keep this in alphabetical order */ + static const PkBackendConfigList pk_backend_config_list_options[] = { + { "HoldPkg", pk_backend_config_add_holdpkg }, +- { "IgnoreGroup", pk_backend_config_add_ignoregrp }, ++ { "IgnoreGroup", pk_backend_config_add_ignoregroup }, + { "IgnorePkg", pk_backend_config_add_ignorepkg }, + { "NoExtract", pk_backend_config_add_noextract }, + { "NoUpgrade", pk_backend_config_add_noupgrade }, +@@ -451,7 +484,7 @@ pk_backend_config_repo_add_server (PkBackendConfig *config, const gchar *repo, + return FALSE; + } + } else if (strstr (url, "$arch") != NULL) { +- g_set_error (e, ALPM_ERROR, PM_ERR_CONFIG_INVALID, ++ g_set_error (e, ALPM_ERROR, ALPM_ERR_CONFIG_INVALID, + "url contained $arch, which is not set"); + } + +@@ -463,6 +496,95 @@ pk_backend_config_repo_add_server (PkBackendConfig *config, const gchar *repo, + } + + static gboolean ++pk_backend_config_set_siglevel (PkBackendConfig *config, const gchar *section, ++ const gchar *list, GError **error) ++{ ++ alpm_siglevel_t *level; + -+ tpkg = NULL; ++ g_return_val_if_fail (config != NULL, FALSE); ++ g_return_val_if_fail (section != NULL, FALSE); ++ g_return_val_if_fail (list != NULL, FALSE); + -+ if (toutput != NULL) { -+ pk_backend_output (self, toutput->str); -+ g_string_free (toutput, TRUE); -+ toutput = NULL; ++ level = g_hash_table_lookup (config->levels, section); ++ if (level == NULL) { ++ level = g_hash_table_lookup (config->levels, "options"); ++ level = g_memdup (level, sizeof (alpm_siglevel_t)); ++ g_hash_table_insert (config->levels, g_strdup (section), level); + } -+} + -+static void -+pk_backend_output_start (PkBackend *self, pmpkg_t *pkg) -+{ -+ g_return_if_fail (self != NULL); -+ g_return_if_fail (pkg != NULL); ++ while (TRUE) { ++ gboolean package = TRUE, database = TRUE; ++ ++ if (g_str_has_prefix (list, "Package")) { ++ database = FALSE; ++ list += 7; ++ } else if (g_str_has_prefix (list, "Database")) { ++ package = FALSE; ++ list += 8; ++ } ++ ++ /* this also allows e.g. NeverEver, so put prefixes last */ ++ if (g_str_has_prefix (list, "Never") == 0) { ++ if (package) { ++ *level &= ~ALPM_SIG_PACKAGE; ++ } ++ if (database) { ++ *level &= ~ALPM_SIG_DATABASE; ++ } ++ } else if (g_str_has_prefix (list, "Optional") == 0) { ++ if (package) { ++ *level |= ALPM_SIG_PACKAGE; ++ *level |= ALPM_SIG_PACKAGE_OPTIONAL; ++ } ++ if (database) { ++ *level |= ALPM_SIG_DATABASE; ++ *level |= ALPM_SIG_DATABASE_OPTIONAL; ++ } ++ } else if (g_str_has_prefix (list, "Required") == 0) { ++ if (package) { ++ *level |= ALPM_SIG_PACKAGE; ++ *level &= ~ALPM_SIG_PACKAGE_OPTIONAL; ++ } ++ if (database) { ++ *level |= ALPM_SIG_DATABASE; ++ *level &= ~ALPM_SIG_DATABASE_OPTIONAL; ++ } ++ } else if (g_str_has_prefix (list, "TrustedOnly") == 0) { ++ if (package) { ++ *level &= ~ALPM_SIG_PACKAGE_MARGINAL_OK; ++ *level &= ~ALPM_SIG_PACKAGE_UNKNOWN_OK; ++ } ++ if (database) { ++ *level &= ~ALPM_SIG_DATABASE_MARGINAL_OK; ++ *level &= ~ALPM_SIG_DATABASE_UNKNOWN_OK; ++ } ++ } else if (g_str_has_prefix (list, "TrustAll") == 0) { ++ if (package) { ++ *level |= ALPM_SIG_PACKAGE_MARGINAL_OK; ++ *level |= ALPM_SIG_PACKAGE_UNKNOWN_OK; ++ } ++ if (database) { ++ *level |= ALPM_SIG_DATABASE_MARGINAL_OK; ++ *level |= ALPM_SIG_DATABASE_UNKNOWN_OK; ++ } ++ } else { ++ g_set_error (error, ALPM_ERROR, ALPM_ERR_CONFIG_INVALID, ++ "invalid SigLevel value: %s", list); ++ return FALSE; ++ } + -+ if (tpkg != NULL) { -+ pk_backend_output_end (self); ++ list = strchr (list, ' '); ++ if (list == NULL) { ++ break; ++ } else { ++ ++list; ++ } + } + -+ tpkg = pkg; ++ return TRUE; +} + ++static gboolean + pk_backend_config_parse (PkBackendConfig *config, const gchar *filename, + gchar *section, GError **error) + { +@@ -515,7 +637,7 @@ pk_backend_config_parse (PkBackendConfig *config, const gchar *filename, + + if (*str == '\0') { + g_set_error (&e, ALPM_ERROR, +- PM_ERR_CONFIG_INVALID, ++ ALPM_ERR_CONFIG_INVALID, + "empty section name"); + break; + } +@@ -532,7 +654,7 @@ pk_backend_config_parse (PkBackendConfig *config, const gchar *filename, + + /* parse a directive */ + if (section == NULL) { +- g_set_error (&e, ALPM_ERROR, PM_ERR_CONFIG_INVALID, ++ g_set_error (&e, ALPM_ERROR, ALPM_ERR_CONFIG_INVALID, + "directive must belong to a section"); + break; + } +@@ -590,9 +712,18 @@ pk_backend_config_parse (PkBackendConfig *config, const gchar *filename, + continue; + } + } ++ ++ if (g_strcmp0 (key, "SigLevel") == 0 && str != NULL) { ++ if (!pk_backend_config_set_siglevel (config, section, ++ str, &e)) { ++ break; ++ } else { ++ continue; ++ } ++ } + + /* report errors from above */ +- g_set_error (&e, ALPM_ERROR, PM_ERR_CONFIG_INVALID, ++ g_set_error (&e, ALPM_ERROR, ALPM_ERR_CONFIG_INVALID, + "unrecognised directive '%s'", key); + break; + } +@@ -611,107 +742,100 @@ pk_backend_config_parse (PkBackendConfig *config, const gchar *filename, + } + } + +-static gboolean +-pk_backend_config_configure_paths (PkBackendConfig *config, GError **error) ++static alpm_handle_t * ++pk_backend_config_initialize_alpm (PkBackendConfig *config, GError **error) + { ++ alpm_handle_t *handle; ++ enum _alpm_errno_t errno; ++ gsize dir = 1; ++ + g_return_val_if_fail (config != NULL, FALSE); + +- if (config->root == NULL) { ++ if (config->root == NULL || *config->root == '\0') { + config->root = g_strdup (PK_BACKEND_DEFAULT_ROOT); ++ } else if (!g_str_has_suffix (config->root, G_DIR_SEPARATOR_S)) { ++ dir = 0; + } + +- if (alpm_option_set_root (config->root) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "RootDir: %s", +- alpm_strerrorlast ()); +- return FALSE; ++ if (config->dbpath == NULL) { ++ config->dbpath = g_strconcat (config->root, ++ PK_BACKEND_DEFAULT_DBPATH + dir, ++ NULL); + } + +- if (config->dbpath == NULL) { +- config->dbpath = g_strconcat (alpm_option_get_root (), +- PK_BACKEND_DEFAULT_DBPATH + 1, ++ g_debug ("initializing alpm"); ++ handle = alpm_initialize (config->root, config->dbpath, &errno); ++ if (handle == NULL) { ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); ++ return handle; ++ } ++ ++ if (config->gpgdir == NULL) { ++ config->gpgdir = g_strconcat (config->root, ++ PK_BACKEND_DEFAULT_GPGDIR + dir, + NULL); + } + +- if (alpm_option_set_dbpath (config->dbpath) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "DBPath: %s", +- alpm_strerrorlast ()); +- return FALSE; ++ if (alpm_option_set_gpgdir (handle, config->gpgdir) < 0) { ++ errno = alpm_errno (handle); ++ g_set_error (error, ALPM_ERROR, errno, "GPGDir: %s", ++ alpm_strerror (errno)); ++ return handle; + } + + if (config->logfile == NULL) { +- config->logfile = g_strconcat (alpm_option_get_root (), +- PK_BACKEND_DEFAULT_LOGFILE + 1, ++ config->logfile = g_strconcat (config->root, ++ PK_BACKEND_DEFAULT_LOGFILE + dir, + NULL); + } + +- alpm_option_set_logfile (config->logfile); ++ if (alpm_option_set_logfile (handle, config->logfile) < 0) { ++ errno = alpm_errno (handle); ++ g_set_error (error, ALPM_ERROR, errno, "LogFile: %s", ++ alpm_strerror (errno)); ++ return handle; ++ } + + if (config->cachedirs == NULL) { +- gchar *path = g_strconcat (alpm_option_get_root (), +- PK_BACKEND_DEFAULT_CACHEDIR + 1, ++ gchar *path = g_strconcat (config->root, ++ PK_BACKEND_DEFAULT_CACHEDIR + dir, + NULL); + config->cachedirs = alpm_list_add (NULL, path); + } + + /* alpm takes ownership */ +- alpm_option_set_cachedirs (config->cachedirs); ++ if (alpm_option_set_cachedirs (handle, config->cachedirs) < 0) { ++ errno = alpm_errno (handle); ++ g_set_error (error, ALPM_ERROR, errno, "CacheDir: %s", ++ alpm_strerror (errno)); ++ return handle; ++ } + config->cachedirs = NULL; + +- return TRUE; ++ return handle; + } + +-static gboolean +-pk_backend_config_configure_repos (PkBackendConfig *config, GError **error) ++static alpm_handle_t * ++pk_backend_config_configure_alpm (PkBackendConfig *config, GError **error) + { +- const alpm_list_t *i; ++ alpm_handle_t *handle; ++ alpm_siglevel_t *level; + + g_return_val_if_fail (config != NULL, FALSE); + +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { +- if (alpm_db_unregister (i->data) < 0) { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); +- return FALSE; +- } +- } +- +- for (i = config->repos; i != NULL; i = i->next) { +- const gchar *key; +- gpointer value; +- pmdb_t *db; +- alpm_list_t *j; +- +- key = (const gchar *) i->data; +- value = g_hash_table_lookup (config->servers, key); +- +- db = alpm_db_register_sync (key); +- if (db == NULL) { +- g_set_error (error, ALPM_ERROR, pm_errno, "[%s]: %s", +- key, alpm_strerrorlast ()); +- return FALSE; +- } +- +- for (j = (alpm_list_t *) value; j != NULL; j = j->next) { +- alpm_db_setserver (db, (const gchar *) j->data); +- } ++ handle = pk_backend_config_initialize_alpm (config, error); ++ if (handle == NULL) { ++ return NULL; + } + +- return TRUE; +-} +- +-static gboolean +-pk_backend_config_configure_alpm (PkBackendConfig *config, GError **error) +-{ +- g_return_val_if_fail (config != NULL, FALSE); +- +- if (!pk_backend_config_configure_paths (config, error)) { +- return FALSE; +- } ++ alpm_option_set_checkspace (handle, config->checkspace); ++ alpm_option_set_usedelta (handle, config->usedelta); ++ alpm_option_set_usesyslog (handle, config->usesyslog); ++ alpm_option_set_arch (handle, config->arch); + +- alpm_option_set_checkspace (config->checkspace); +- alpm_option_set_usedelta (config->usedelta); +- alpm_option_set_usesyslog (config->usesyslog); +- alpm_option_set_arch (config->arch); ++ level = g_hash_table_lookup (config->levels, "options"); ++ alpm_option_set_default_siglevel (handle, *level); + + /* backend takes ownership */ + g_free (xfercmd); +@@ -719,9 +843,9 @@ pk_backend_config_configure_alpm (PkBackendConfig *config, GError **error) + config->xfercmd = NULL; + + if (xfercmd != NULL) { +- alpm_option_set_fetchcb (pk_backend_fetchcb); ++ alpm_option_set_fetchcb (handle, pk_backend_fetchcb); + } else { +- alpm_option_set_fetchcb (NULL); ++ alpm_option_set_fetchcb (handle, NULL); + } + + /* backend takes ownership */ +@@ -735,41 +859,53 @@ pk_backend_config_configure_alpm (PkBackendConfig *config, GError **error) + config->syncfirsts = NULL; + + /* alpm takes ownership */ +- alpm_option_set_ignoregrps (config->ignoregrps); +- config->ignoregrps = NULL; ++ alpm_option_set_ignoregroups (handle, config->ignoregroups); ++ config->ignoregroups = NULL; + + /* alpm takes ownership */ +- alpm_option_set_ignorepkgs (config->ignorepkgs); ++ alpm_option_set_ignorepkgs (handle, config->ignorepkgs); + config->ignorepkgs = NULL; + + /* alpm takes ownership */ +- alpm_option_set_noextracts (config->noextracts); ++ alpm_option_set_noextracts (handle, config->noextracts); + config->noextracts = NULL; + + /* alpm takes ownership */ +- alpm_option_set_noupgrades (config->noupgrades); ++ alpm_option_set_noupgrades (handle, config->noupgrades); + config->noupgrades = NULL; + +- if (!pk_backend_config_configure_repos (config, error)) { +- return FALSE; +- } ++ pk_backend_configure_repos (config->repos, config->servers, ++ config->levels); + +- return TRUE; ++ return handle; + } + +-gboolean ++alpm_handle_t * + pk_backend_configure (const gchar *filename, GError **error) + { + PkBackendConfig *config; +- gboolean result; ++ alpm_handle_t *handle; ++ GError *e = NULL; + + g_return_val_if_fail (filename != NULL, FALSE); + ++ g_debug ("reading config from %s", filename); + config = pk_backend_config_new (); + +- result = pk_backend_config_parse (config, filename, NULL, error) && +- pk_backend_config_configure_alpm (config, error); ++ if (pk_backend_config_parse (config, filename, NULL, &e)) { ++ handle = pk_backend_config_configure_alpm (config, &e); ++ } else { ++ handle = NULL; ++ } + + pk_backend_config_free (config); +- return result; ++ if (e != NULL) { ++ g_propagate_error (error, e); ++ if (handle != NULL) { ++ alpm_release (handle); ++ } ++ return NULL; ++ } else { ++ return handle; ++ } + } +diff --git a/backends/alpm/pk-backend-config.h b/backends/alpm/pk-backend-config.h +index cb8b8dc..412f59c 100644 +--- a/backends/alpm/pk-backend-config.h ++++ b/backends/alpm/pk-backend-config.h +@@ -21,6 +21,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#include <alpm.h> + #include <glib.h> + +-gboolean pk_backend_configure (const gchar *filename, GError **error); ++alpm_handle_t *pk_backend_configure (const gchar *filename, GError **error); +diff --git a/backends/alpm/pk-backend-databases.c b/backends/alpm/pk-backend-databases.c +index f6ab06e..ac530c7 100644 +--- a/backends/alpm/pk-backend-databases.c ++++ b/backends/alpm/pk-backend-databases.c +@@ -26,7 +26,15 @@ + #include "pk-backend-databases.h" + #include "pk-backend-error.h" + ++typedef struct ++{ ++ gchar *name; ++ alpm_list_t *servers; ++ alpm_siglevel_t level; ++} PkBackendRepo; ++ + static GHashTable *disabled = NULL; ++static alpm_list_t *configured = NULL; + + static GHashTable * + disabled_repos_new (GError **error) +@@ -113,8 +121,8 @@ disabled_repos_free (GHashTable *table) + + /* write all disabled repos line by line */ + while (g_hash_table_iter_next (&iter, (gpointer *) &line, NULL) && +- g_data_output_stream_put_string (output, line, NULL, NULL) && +- g_data_output_stream_put_byte (output, '\n', NULL, NULL)); ++ g_data_output_stream_put_string (output, line, NULL, NULL) && ++ g_data_output_stream_put_byte (output, '\n', NULL, NULL)); + + g_object_unref (output); + g_object_unref (os); +@@ -128,37 +136,65 @@ disabled_repos_configure (GHashTable *table, GError **error) + { + const alpm_list_t *i; + +- g_debug ("reading config from %s", PK_BACKEND_CONFIG_FILE); ++ g_return_val_if_fail (table != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + +- /* read configuration from pacman.conf file */ +- if (!pk_backend_configure (PK_BACKEND_CONFIG_FILE, error)) { ++ if (alpm_db_unregister_all (alpm) < 0) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); + return FALSE; + } + +- /* disable disabled repos */ +- for (i = alpm_option_get_syncdbs (); i != NULL;) { +- pmdb_t *db = (pmdb_t *) i->data; +- const gchar *repo = alpm_db_get_name (db); ++ for (i = configured; i != NULL; i = i->next) { ++ PkBackendRepo *repo = (PkBackendRepo *) i->data; ++ alpm_db_t *db; + +- if (g_hash_table_lookup (table, repo) == NULL) { +- /* repo is not disabled */ +- i = i->next; ++ if (g_hash_table_lookup (table, repo->name) != NULL) { ++ /* repo is disabled */ + continue; + } + +- if (alpm_db_unregister (db) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "[%s]: %s", +- repo, alpm_strerrorlast ()); ++ db = alpm_db_register_sync (alpm, repo->name, repo->level); ++ if (db == NULL) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "[%s]: %s", ++ repo->name, alpm_strerror (errno)); + return FALSE; + } + +- /* start again because the list gets invalidated */ +- i = alpm_option_get_syncdbs (); ++ alpm_db_set_servers (db, alpm_list_strdup (repo->servers)); + } + + return TRUE; + } + +void -+pk_backend_output (PkBackend *self, const gchar *output) ++pk_backend_configure_repos (alpm_list_t *repos, GHashTable *servers, ++ GHashTable *levels) +{ -+ g_return_if_fail (self != NULL); -+ g_return_if_fail (output != NULL); ++ alpm_list_t *i; ++ ++ g_return_if_fail (servers != NULL); + -+ if (tpkg != NULL) { -+ if (toutput == NULL) { -+ toutput = g_string_new ("<b>"); -+ g_string_append (toutput, alpm_pkg_get_name (tpkg)); -+ g_string_append (toutput, "</b>\n"); ++ for (i = repos; i != NULL; i = i->next) { ++ PkBackendRepo *repo = g_new (PkBackendRepo, 1); ++ gpointer value = g_hash_table_lookup (servers, i->data); ++ ++ repo->name = g_strdup ((const gchar *) i->data); ++ repo->servers = alpm_list_strdup ((alpm_list_t *) value); ++ ++ value = g_hash_table_lookup (levels, i->data); ++ if (value != NULL) { ++ repo->level = *(alpm_siglevel_t *)value; ++ } else { ++ repo->level = ALPM_SIG_USE_DEFAULT; + } + -+ g_string_append (toutput, output); -+ } else { -+ PkMessageEnum type = PK_MESSAGE_ENUM_UNKNOWN; -+ pk_backend_message (self, type, "%s", output); ++ configured = alpm_list_add (configured, repo); + } +} + -+static void - pk_backend_transaction_dep_resolve (PkBackend *self) + gboolean + pk_backend_initialize_databases (PkBackend *self, GError **error) + { +@@ -179,11 +215,21 @@ pk_backend_initialize_databases (PkBackend *self, GError **error) + void + pk_backend_destroy_databases (PkBackend *self) { ++ alpm_list_t *i; ++ g_return_if_fail (self != NULL); -@@ -355,6 +405,7 @@ pk_backend_transaction_add_start (PkBackend *self, pmpkg_t *pkg) - pk_backend_set_status (self, PK_STATUS_ENUM_INSTALL); - pk_backend_pkg (self, pkg, PK_INFO_ENUM_INSTALLING); -+ pk_backend_output_start (self, pkg); + if (disabled != NULL) { + disabled_repos_free (disabled); + } ++ ++ for (i = configured; i != NULL; i = i->next) { ++ PkBackendRepo *repo = (PkBackendRepo *) i->data; ++ g_free (repo->name); ++ FREELIST (repo->servers); ++ g_free (repo); ++ } ++ alpm_list_free (configured); } - static void -@@ -374,20 +425,16 @@ pk_backend_transaction_add_done (PkBackend *self, pmpkg_t *pkg) + static gboolean +@@ -210,11 +256,12 @@ pk_backend_get_repo_list_thread (PkBackend *self) + gpointer key, value; - optdepends = alpm_pkg_get_optdepends (pkg); - if (optdepends != NULL) { -- GString *depends = g_string_new (""); + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (disabled != NULL, FALSE); + + /* emit enabled repos */ +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { +- pmdb_t *db = (pmdb_t *) i->data; ++ for (i = alpm_option_get_syncdbs (alpm); i != NULL; i = i->next) { ++ alpm_db_t *db = (alpm_db_t *) i->data; + const gchar *repo = alpm_db_get_name (db); + + if (pk_backend_cancelled (self)) { +@@ -269,7 +316,7 @@ pk_backend_repo_enable_thread (PkBackend *self) + pk_backend_repo_list_changed (self); + } + } else { +- int code = PM_ERR_DB_NOT_NULL; ++ int code = ALPM_ERR_DB_NOT_NULL; + g_set_error (&error, ALPM_ERROR, code, "[%s]: %s", + repo, alpm_strerror (code)); + } +@@ -292,21 +339,23 @@ pk_backend_repo_disable_thread (PkBackend *self) + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (disabled != NULL, FALSE); + + repo = pk_backend_get_string (self, "repo_id"); + + g_return_val_if_fail (repo != NULL, FALSE); + +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { +- pmdb_t *db = (pmdb_t *) i->data; ++ for (i = alpm_option_get_syncdbs (alpm); i != NULL; i = i->next) { ++ alpm_db_t *db = (alpm_db_t *) i->data; + const gchar *name = alpm_db_get_name (db); + + if (g_strcmp0 (repo, name) == 0) { + if (alpm_db_unregister (db) < 0) { +- g_set_error (&error, ALPM_ERROR, pm_errno, ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (&error, ALPM_ERROR, errno, + "[%s]: %s", repo, +- alpm_strerrorlast ()); ++ alpm_strerror (errno)); + } else { + g_hash_table_insert (disabled, g_strdup (repo), + GINT_TO_POINTER (1)); +@@ -316,7 +365,7 @@ pk_backend_repo_disable_thread (PkBackend *self) + } + + if (i == NULL) { +- int code = PM_ERR_DB_NULL; ++ int code = ALPM_ERR_DB_NULL; + g_set_error (&error, ALPM_ERROR, code, "[%s]: %s", repo, + alpm_strerror (code)); + } +diff --git a/backends/alpm/pk-backend-databases.h b/backends/alpm/pk-backend-databases.h +index f9eb2f9..2636cae 100644 +--- a/backends/alpm/pk-backend-databases.h ++++ b/backends/alpm/pk-backend-databases.h +@@ -24,6 +24,10 @@ + #include <alpm.h> + #include <pk-backend.h> + ++void pk_backend_configure_repos (alpm_list_t *repos, ++ GHashTable *servers, ++ GHashTable *levels); ++ + gboolean pk_backend_initialize_databases (PkBackend *self, + GError **error); + +diff --git a/backends/alpm/pk-backend-depends.c b/backends/alpm/pk-backend-depends.c +index 8bb8567..7c7b45a 100644 +--- a/backends/alpm/pk-backend-depends.c ++++ b/backends/alpm/pk-backend-depends.c +@@ -29,7 +29,7 @@ + #include "pk-backend-error.h" + #include "pk-backend-packages.h" + +-static pmpkg_t * ++static alpm_pkg_t * + alpm_list_find_pkg (const alpm_list_t *pkgs, const gchar *name) + { + g_return_val_if_fail (name != NULL, NULL); +@@ -50,11 +50,12 @@ pk_backend_find_provider (PkBackend *self, alpm_list_t *pkgs, + PkBitfield filters; + gboolean recursive, skip_local, skip_remote; + +- pmpkg_t *provider; ++ alpm_pkg_t *provider; + alpm_list_t *pkgcache, *syncdbs; + + g_return_val_if_fail (self != NULL, pkgs); + g_return_val_if_fail (depend != NULL, pkgs); ++ g_return_val_if_fail (alpm != NULL, pkgs); + g_return_val_if_fail (localdb != NULL, pkgs); + + recursive = pk_backend_get_bool (self, "recursive"); +@@ -84,8 +85,8 @@ pk_backend_find_provider (PkBackend *self, alpm_list_t *pkgs, + } + + /* look for remote dependencies */ +- syncdbs = alpm_option_get_syncdbs (); +- provider = alpm_find_dbs_satisfier (syncdbs, depend); ++ syncdbs = alpm_option_get_syncdbs (alpm); ++ provider = alpm_find_dbs_satisfier (alpm, syncdbs, depend); + + if (provider != NULL) { + if (!skip_remote) { +@@ -96,7 +97,7 @@ pk_backend_find_provider (PkBackend *self, alpm_list_t *pkgs, + pkgs = alpm_list_add (pkgs, provider); + } + } else { +- int code = PM_ERR_UNSATISFIED_DEPS; ++ int code = ALPM_ERR_UNSATISFIED_DEPS; + g_set_error (error, ALPM_ERROR, code, "%s: %s", depend, + alpm_strerror (code)); + } +@@ -108,7 +109,7 @@ static alpm_list_t * + pk_backend_find_requirer (PkBackend *self, alpm_list_t *pkgs, const gchar *name, + GError **error) + { +- pmpkg_t *requirer; ++ alpm_pkg_t *requirer; + + g_return_val_if_fail (self != NULL, pkgs); + g_return_val_if_fail (name != NULL, pkgs); +@@ -127,7 +128,7 @@ pk_backend_find_requirer (PkBackend *self, alpm_list_t *pkgs, const gchar *name, + pkgs = alpm_list_add (pkgs, requirer); + } + } else { +- int code = PM_ERR_PKG_NOT_FOUND; ++ int code = ALPM_ERR_PKG_NOT_FOUND; + g_set_error (error, ALPM_ERROR, code, "%s: %s", name, + alpm_strerror (code)); + } +@@ -150,7 +151,7 @@ pk_backend_get_depends_thread (PkBackend *self) + + /* construct an initial package list */ + for (; *packages != NULL; ++packages) { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; + + if (pk_backend_cancelled (self)) { + break; +@@ -206,7 +207,7 @@ pk_backend_get_requires_thread (PkBackend *self) + + /* construct an initial package list */ + for (; *packages != NULL; ++packages) { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; + + if (pk_backend_cancelled (self)) { + break; +diff --git a/backends/alpm/pk-backend-error.c b/backends/alpm/pk-backend-error.c +index 255f1fb..57c4b4b 100644 +--- a/backends/alpm/pk-backend-error.c ++++ b/backends/alpm/pk-backend-error.c +@@ -33,140 +33,159 @@ pk_backend_error (PkBackend *self, GError *error) + g_return_if_fail (self != NULL); + g_return_if_fail (error != NULL); + +- if (error->domain == ALPM_ERROR) { +- switch (error->code) { +- case PM_ERR_MEMORY: +- case PM_ERR_SYSTEM: +- code = PK_ERROR_ENUM_OOM; +- break; +- +- case PM_ERR_BADPERMS: +- code = PK_ERROR_ENUM_NOT_AUTHORIZED; +- break; +- +- case PM_ERR_NOT_A_FILE: +- case PM_ERR_NOT_A_DIR: +- code = PK_ERROR_ENUM_FILE_NOT_FOUND; +- break; +- +- case PM_ERR_WRONG_ARGS: +- case PM_ERR_HANDLE_NULL: +- case PM_ERR_DB_NULL: +- case PM_ERR_TRANS_NULL: +- case PM_ERR_TRANS_NOT_INITIALIZED: +- case PM_ERR_TRANS_NOT_PREPARED: +- case PM_ERR_TRANS_NOT_LOCKED: +- case PM_ERR_INVALID_REGEX: +- code = PK_ERROR_ENUM_INTERNAL_ERROR; +- break; +- +- case PM_ERR_DISK_SPACE: +- code = PK_ERROR_ENUM_NO_SPACE_ON_DEVICE; +- break; +- +- case PM_ERR_HANDLE_NOT_NULL: +- case PM_ERR_DB_NOT_NULL: +- case PM_ERR_TRANS_NOT_NULL: +- code = PK_ERROR_ENUM_FAILED_INITIALIZATION; +- break; +- +- case PM_ERR_HANDLE_LOCK: +- code = PK_ERROR_ENUM_CANNOT_GET_LOCK; +- break; - -- g_string_append_printf (depends, -- "Optional dependencies for %s:\n", -- name); -+ pk_backend_output (self, "Optional dependencies:\n"); +- case PM_ERR_DB_OPEN: +- case PM_ERR_DB_NOT_FOUND: +- case PM_ERR_PKG_REPO_NOT_FOUND: +- code = PK_ERROR_ENUM_REPO_NOT_FOUND; +- break; +- +- case PM_ERR_DB_CREATE: +- code = PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG; +- break; +- +- case PM_ERR_DB_VERSION: +- case PM_ERR_DB_REMOVE: +- code = PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR; +- break; +- +- case PM_ERR_DB_WRITE: +- code = PK_ERROR_ENUM_REPO_NOT_AVAILABLE; +- break; +- +- case PM_ERR_SERVER_BAD_URL: +- code = PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR; +- break; +- +- case PM_ERR_SERVER_NONE: +- code = PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY; +- break; +- +- case PM_ERR_TRANS_DUP_TARGET: +- case PM_ERR_TRANS_ABORT: +- code = PK_ERROR_ENUM_TRANSACTION_ERROR; +- break; +- +- case PM_ERR_TRANS_TYPE: +- code = PK_ERROR_ENUM_CANNOT_CANCEL; +- break; +- +- case PM_ERR_PKG_NOT_FOUND: +- code = PK_ERROR_ENUM_PACKAGE_NOT_FOUND; +- break; +- +- case PM_ERR_PKG_IGNORED: +- code = PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED; +- break; +- +- case PM_ERR_PKG_INVALID: +- case PM_ERR_PKG_OPEN: +- case PM_ERR_PKG_INVALID_NAME: +- case PM_ERR_DLT_INVALID: +- code = PK_ERROR_ENUM_INVALID_PACKAGE_FILE; +- break; +- +- case PM_ERR_PKG_CANT_REMOVE: +- code = PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE; +- break; +- +- case PM_ERR_PKG_INVALID_ARCH: +- code = PK_ERROR_ENUM_INCOMPATIBLE_ARCHITECTURE; +- break; +- +- case PM_ERR_DLT_PATCHFAILED: +- code = PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD; +- break; +- +- case PM_ERR_UNSATISFIED_DEPS: +- code = PK_ERROR_ENUM_DEP_RESOLUTION_FAILED; +- break; +- +- case PM_ERR_CONFLICTING_DEPS: +- code = PK_ERROR_ENUM_PACKAGE_CONFLICTS; +- break; +- +- case PM_ERR_FILE_CONFLICTS: +- code = PK_ERROR_ENUM_FILE_CONFLICTS; +- break; +- +- case PM_ERR_RETRIEVE: +- case PM_ERR_LIBFETCH: +- case PM_ERR_EXTERNAL_DOWNLOAD: +- code = PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED; +- break; +- +- case PM_ERR_LIBARCHIVE: +- code = PK_ERROR_ENUM_LOCAL_INSTALL_FAILED; +- break; +- +- case PM_ERR_CONFIG_INVALID: +- code = PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE; +- break; +- +- case PM_ERR_PKG_HELD: +- code = PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE; +- break; +- } ++ if (error->domain != ALPM_ERROR) { ++ pk_backend_error_code (self, code, "%s", error->message); ++ return; ++ } ++ ++ switch (error->code) { ++ case ALPM_ERR_MEMORY: ++ case ALPM_ERR_SYSTEM: ++ code = PK_ERROR_ENUM_OOM; ++ break; ++ ++ case ALPM_ERR_BADPERMS: ++ code = PK_ERROR_ENUM_NOT_AUTHORIZED; ++ break; ++ ++ case ALPM_ERR_NOT_A_FILE: ++ case ALPM_ERR_NOT_A_DIR: ++ code = PK_ERROR_ENUM_FILE_NOT_FOUND; ++ break; ++ ++ case ALPM_ERR_WRONG_ARGS: ++ case ALPM_ERR_HANDLE_NULL: ++ case ALPM_ERR_DB_NULL: ++ case ALPM_ERR_TRANS_NULL: ++ case ALPM_ERR_TRANS_NOT_INITIALIZED: ++ case ALPM_ERR_TRANS_NOT_PREPARED: ++ case ALPM_ERR_TRANS_NOT_LOCKED: ++ case ALPM_ERR_INVALID_REGEX: ++ code = PK_ERROR_ENUM_INTERNAL_ERROR; ++ break; ++ ++ case ALPM_ERR_DISK_SPACE: ++ code = PK_ERROR_ENUM_NO_SPACE_ON_DEVICE; ++ break; ++ ++ case ALPM_ERR_HANDLE_NOT_NULL: ++ case ALPM_ERR_DB_NOT_NULL: ++ case ALPM_ERR_TRANS_NOT_NULL: ++ code = PK_ERROR_ENUM_FAILED_INITIALIZATION; ++ break; ++ ++ case ALPM_ERR_HANDLE_LOCK: ++ code = PK_ERROR_ENUM_CANNOT_GET_LOCK; ++ break; ++ ++ case ALPM_ERR_DB_OPEN: ++ case ALPM_ERR_DB_NOT_FOUND: ++ case ALPM_ERR_PKG_REPO_NOT_FOUND: ++ code = PK_ERROR_ENUM_REPO_NOT_FOUND; ++ break; ++ ++ case ALPM_ERR_DB_CREATE: ++ code = PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG; ++ break; ++ ++ case ALPM_ERR_DB_INVALID: ++ case ALPM_ERR_DB_VERSION: ++ case ALPM_ERR_DB_REMOVE: ++ case ALPM_ERR_SERVER_BAD_URL: ++ code = PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR; ++ break; ++ ++ case ALPM_ERR_DB_INVALID_SIG: ++ case ALPM_ERR_PKG_INVALID_SIG: ++ case ALPM_ERR_SIG_INVALID: ++ code = PK_ERROR_ENUM_BAD_GPG_SIGNATURE; ++ break; ++ ++ case ALPM_ERR_DB_WRITE: ++ code = PK_ERROR_ENUM_REPO_NOT_AVAILABLE; ++ break; ++ ++ case ALPM_ERR_SERVER_NONE: ++ code = PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY; ++ break; ++ ++ case ALPM_ERR_TRANS_DUP_TARGET: ++ case ALPM_ERR_TRANS_ABORT: ++ code = PK_ERROR_ENUM_TRANSACTION_ERROR; ++ break; ++ ++ case ALPM_ERR_TRANS_TYPE: ++ code = PK_ERROR_ENUM_CANNOT_CANCEL; ++ break; ++ ++ case ALPM_ERR_PKG_NOT_FOUND: ++ code = PK_ERROR_ENUM_PACKAGE_NOT_FOUND; ++ break; ++ ++ case ALPM_ERR_PKG_IGNORED: ++ code = PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED; ++ break; ++ ++ case ALPM_ERR_PKG_INVALID: ++ case ALPM_ERR_PKG_OPEN: ++ case ALPM_ERR_PKG_INVALID_NAME: ++ case ALPM_ERR_DLT_INVALID: ++ code = PK_ERROR_ENUM_INVALID_PACKAGE_FILE; ++ break; ++ ++ case ALPM_ERR_PKG_INVALID_CHECKSUM: ++ code = PK_ERROR_ENUM_PACKAGE_CORRUPT; ++ break; ++ ++ case ALPM_ERR_PKG_CANT_REMOVE: ++ code = PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE; ++ break; ++ ++ case ALPM_ERR_PKG_INVALID_ARCH: ++ code = PK_ERROR_ENUM_INCOMPATIBLE_ARCHITECTURE; ++ break; ++ ++ case ALPM_ERR_SIG_MISSING: ++ code = PK_ERROR_ENUM_MISSING_GPG_SIGNATURE; ++ break; ++ ++ case ALPM_ERR_DLT_PATCHFAILED: ++ code = PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD; ++ break; ++ ++ case ALPM_ERR_UNSATISFIED_DEPS: ++ code = PK_ERROR_ENUM_DEP_RESOLUTION_FAILED; ++ break; ++ ++ case ALPM_ERR_CONFLICTING_DEPS: ++ code = PK_ERROR_ENUM_PACKAGE_CONFLICTS; ++ break; ++ ++ case ALPM_ERR_FILE_CONFLICTS: ++ code = PK_ERROR_ENUM_FILE_CONFLICTS; ++ break; ++ ++ case ALPM_ERR_RETRIEVE: ++ case ALPM_ERR_LIBCURL: ++ case ALPM_ERR_EXTERNAL_DOWNLOAD: ++ code = PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED; ++ break; ++ ++ case ALPM_ERR_LIBARCHIVE: ++ code = PK_ERROR_ENUM_LOCAL_INSTALL_FAILED; ++ break; ++ ++ case ALPM_ERR_GPGME: ++ code = PK_ERROR_ENUM_GPG_FAILURE; ++ break; ++ ++ case ALPM_ERR_CONFIG_INVALID: ++ code = PK_ERROR_ENUM_FAILED_CONFIG_PARSING; ++ break; ++ ++ case ALPM_ERR_PKG_HELD: ++ code = PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE; ++ break; + } + + pk_backend_error_code (self, code, "%s", error->message); +diff --git a/backends/alpm/pk-backend-error.h b/backends/alpm/pk-backend-error.h +index 83fe4a5..0a029e4 100644 +--- a/backends/alpm/pk-backend-error.h ++++ b/backends/alpm/pk-backend-error.h +@@ -26,8 +26,8 @@ + #define ALPM_ERROR (alpm_error_quark ()) + + enum { +- PM_ERR_CONFIG_INVALID = 0x10000, +- PM_ERR_PKG_HELD ++ ALPM_ERR_CONFIG_INVALID = 0x10000, ++ ALPM_ERR_PKG_HELD + }; + + void pk_backend_error (PkBackend *self, GError *error); +diff --git a/backends/alpm/pk-backend-groups.c b/backends/alpm/pk-backend-groups.c +index 59e304d..6056c54 100644 +--- a/backends/alpm/pk-backend-groups.c ++++ b/backends/alpm/pk-backend-groups.c +@@ -125,7 +125,7 @@ pk_backend_destroy_groups (PkBackend *self) + } + + const gchar * +-alpm_pkg_get_group (pmpkg_t *pkg) ++alpm_pkg_get_group (alpm_pkg_t *pkg) + { + const alpm_list_t *i; + +diff --git a/backends/alpm/pk-backend-groups.h b/backends/alpm/pk-backend-groups.h +index 28dcf65..d736e37 100644 +--- a/backends/alpm/pk-backend-groups.h ++++ b/backends/alpm/pk-backend-groups.h +@@ -29,4 +29,4 @@ gboolean pk_backend_initialize_groups (PkBackend *self, + + void pk_backend_destroy_groups (PkBackend *self); + +-const gchar *alpm_pkg_get_group (pmpkg_t *pkg); ++const gchar *alpm_pkg_get_group (alpm_pkg_t *pkg); +diff --git a/backends/alpm/pk-backend-install.c b/backends/alpm/pk-backend-install.c +index 65a6c11..5b5e2b2 100644 +--- a/backends/alpm/pk-backend-install.c ++++ b/backends/alpm/pk-backend-install.c +@@ -32,15 +32,19 @@ + static gint + alpm_add_file (const gchar *filename) + { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; ++ alpm_siglevel_t level; + + g_return_val_if_fail (filename != NULL, -1); ++ g_return_val_if_fail (alpm != NULL, -1); + +- if (alpm_pkg_load (filename, 1, &pkg) < 0) { ++ level = alpm_option_get_default_siglevel (alpm); ++ ++ if (alpm_pkg_load (alpm, filename, 1, level, &pkg) < 0) { + return -1; + } + +- if (alpm_add_pkg (pkg) < 0) { ++ if (alpm_add_pkg (alpm, pkg) < 0) { + alpm_pkg_free (pkg); + return -1; + } +@@ -61,8 +65,9 @@ pk_backend_transaction_add_targets (PkBackend *self, GError **error) + + for (; *paths != NULL; ++paths) { + if (alpm_add_file (*paths) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "%s: %s", +- *paths, alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "%s: %s", ++ *paths, alpm_strerror (errno)); + return FALSE; + } + } +diff --git a/backends/alpm/pk-backend-packages.c b/backends/alpm/pk-backend-packages.c +index e9a7c94..2d057aa 100644 +--- a/backends/alpm/pk-backend-packages.c ++++ b/backends/alpm/pk-backend-packages.c +@@ -27,13 +27,11 @@ + #include "pk-backend-packages.h" + + gchar * +-alpm_pkg_build_id (pmpkg_t *pkg) ++alpm_pkg_build_id (alpm_pkg_t *pkg) + { + const gchar *name, *version, *arch, *repo; +- pmdb_t *db; + + g_return_val_if_fail (pkg != NULL, NULL); +- g_return_val_if_fail (localdb != NULL, NULL); + + name = alpm_pkg_get_name (pkg); + version = alpm_pkg_get_version (pkg); +@@ -43,19 +41,18 @@ alpm_pkg_build_id (pmpkg_t *pkg) + arch = "any"; + } + +- db = alpm_pkg_get_db (pkg); +- /* TODO: check */ +- if (db == NULL || db == localdb) { +- repo = "installed"; ++ /* TODO: check correctness */ ++ if (alpm_pkg_get_origin (pkg) == PKG_FROM_SYNCDB) { ++ repo = alpm_db_get_name (alpm_pkg_get_db (pkg)); + } else { +- repo = alpm_db_get_name (db); ++ repo = "installed"; + } + + return pk_package_id_build (name, version, arch, repo); + } + + void +-pk_backend_pkg (PkBackend *self, pmpkg_t *pkg, PkInfoEnum info) ++pk_backend_pkg (PkBackend *self, alpm_pkg_t *pkg, PkInfoEnum info) + { + gchar *package; + +@@ -67,16 +64,17 @@ pk_backend_pkg (PkBackend *self, pmpkg_t *pkg, PkInfoEnum info) + g_free (package); + } + +-pmpkg_t * ++alpm_pkg_t * + pk_backend_find_pkg (PkBackend *self, const gchar *package_id, GError **error) + { + gchar **package; + const gchar *repo_id; +- pmdb_t *db = NULL; +- pmpkg_t *pkg; ++ alpm_db_t *db = NULL; ++ alpm_pkg_t *pkg; + + g_return_val_if_fail (self != NULL, NULL); + g_return_val_if_fail (package_id != NULL, NULL); ++ g_return_val_if_fail (alpm != NULL, NULL); + g_return_val_if_fail (localdb != NULL, NULL); + + package = pk_package_id_split (package_id); +@@ -86,8 +84,8 @@ pk_backend_find_pkg (PkBackend *self, const gchar *package_id, GError **error) + if (g_strcmp0 (repo_id, "installed") == 0) { + db = localdb; + } else { +- const alpm_list_t *i; +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { ++ const alpm_list_t *i = alpm_option_get_syncdbs (alpm); ++ for (; i != NULL; i = i->next) { + const gchar *repo = alpm_db_get_name (i->data); + + if (g_strcmp0 (repo, repo_id) == 0) { +@@ -111,7 +109,7 @@ pk_backend_find_pkg (PkBackend *self, const gchar *package_id, GError **error) + } - for (i = optdepends; i != NULL; i = i->next) { -- g_string_append_printf (depends, "%s\n", + if (pkg == NULL) { +- int code = PM_ERR_PKG_NOT_FOUND; ++ int code = ALPM_ERR_PKG_NOT_FOUND; + g_set_error (error, ALPM_ERROR, code, "%s: %s", package_id, + alpm_strerror (code)); + } +@@ -123,7 +121,7 @@ static gboolean + pk_backend_resolve_package (PkBackend *self, const gchar *package, + GError **error) + { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; + + PkBitfield filters; + gboolean skip_local, skip_remote; +@@ -142,7 +140,7 @@ pk_backend_resolve_package (PkBackend *self, const gchar *package, + PK_FILTER_ENUM_NOT_INSTALLED); + skip_remote = pk_bitfield_contain (filters, PK_FILTER_ENUM_INSTALLED); + +- if (alpm_pkg_get_db (pkg) == localdb) { ++ if (alpm_pkg_get_origin (pkg) == PKG_FROM_LOCALDB) { + if (!skip_local) { + pk_backend_pkg (self, pkg, PK_INFO_ENUM_INSTALLED); + } +@@ -158,7 +156,7 @@ pk_backend_resolve_package (PkBackend *self, const gchar *package, + static gboolean + pk_backend_resolve_name (PkBackend *self, const gchar *name, GError **error) + { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; + int code; + + PkBitfield filters; +@@ -166,6 +164,7 @@ pk_backend_resolve_name (PkBackend *self, const gchar *name, GError **error) + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (name != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (localdb != NULL, FALSE); + + filters = pk_backend_get_uint (self, "filters"); +@@ -180,8 +179,8 @@ pk_backend_resolve_name (PkBackend *self, const gchar *name, GError **error) + return TRUE; + } + } else if (!skip_remote) { +- const alpm_list_t *i; +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { ++ const alpm_list_t *i = alpm_option_get_syncdbs (alpm); ++ for (; i != NULL; i = i->next) { + pkg = alpm_db_get_pkg (i->data, name); + if (pkg != NULL) { + pk_backend_pkg (self, pkg, +@@ -191,7 +190,7 @@ pk_backend_resolve_name (PkBackend *self, const gchar *name, GError **error) + } + } + +- code = PM_ERR_PKG_NOT_FOUND; ++ code = ALPM_ERR_PKG_NOT_FOUND; + g_set_error (error, ALPM_ERROR, code, "%s: %s", name, + alpm_strerror (code)); + return FALSE; +@@ -254,7 +253,7 @@ pk_backend_get_details_thread (PkBackend *self) + g_return_val_if_fail (packages != NULL, FALSE); + + for (; *packages != NULL; ++packages) { +- pmpkg_t *pkg; ++ alpm_pkg_t *pkg; + const alpm_list_t *i; + + GString *licenses; +@@ -286,7 +285,7 @@ pk_backend_get_details_thread (PkBackend *self) + desc = alpm_pkg_get_desc (pkg); + url = alpm_pkg_get_url (pkg); + +- if (alpm_pkg_get_db (pkg) == localdb) { ++ if (alpm_pkg_get_origin (pkg) == PKG_FROM_LOCALDB) { + size = alpm_pkg_get_isize (pkg); + } else { + size = alpm_pkg_download_size (pkg); +@@ -317,17 +316,19 @@ pk_backend_get_files_thread (PkBackend *self) + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + packages = pk_backend_get_strv (self, "package_ids"); + + g_return_val_if_fail (packages != NULL, FALSE); + + for (; *packages != NULL; ++packages) { +- pmpkg_t *pkg; +- const alpm_list_t *i; ++ alpm_pkg_t *pkg; ++ const gchar *root; + + GString *files; +- const gchar *root; ++ alpm_filelist_t *filelist; ++ gsize i; + + if (pk_backend_cancelled (self)) { + break; +@@ -338,11 +339,13 @@ pk_backend_get_files_thread (PkBackend *self) + break; + } + ++ root = alpm_option_get_root (alpm); + files = g_string_new (""); +- root = alpm_option_get_root (); +- for (i = alpm_pkg_get_files (pkg); i != NULL; i = i->next) { +- g_string_append_printf (files, ";%s%s", root, - (const gchar *) i->data); -+ const gchar *depend = i->data; -+ gchar *output = g_strdup_printf ("%s\n", depend); -+ pk_backend_output (self, output); -+ g_free (output); ++ ++ filelist = alpm_pkg_get_files (pkg); ++ for (i = 0; i < filelist->count; ++i) { ++ const gchar *file = filelist->files[i].name; ++ g_string_append_printf (files, ";%s%s", root, file); + } + + pk_backend_files (self, *packages, files->str + 1); +diff --git a/backends/alpm/pk-backend-packages.h b/backends/alpm/pk-backend-packages.h +index 4b2d7f8..2d54684 100644 +--- a/backends/alpm/pk-backend-packages.h ++++ b/backends/alpm/pk-backend-packages.h +@@ -24,10 +24,11 @@ + #include <alpm.h> + #include <pk-backend.h> + +-gchar *alpm_pkg_build_id (pmpkg_t *pkg); ++gchar *alpm_pkg_build_id (alpm_pkg_t *pkg); + +-void pk_backend_pkg (PkBackend *self, pmpkg_t *pkg, +- PkInfoEnum info); ++void pk_backend_pkg (PkBackend *self, alpm_pkg_t *pkg, ++ PkInfoEnum info); + +-pmpkg_t *pk_backend_find_pkg (PkBackend *self, const gchar *package_id, +- GError **error); ++alpm_pkg_t *pk_backend_find_pkg (PkBackend *self, ++ const gchar *package_id, ++ GError **error); +diff --git a/backends/alpm/pk-backend-remove.c b/backends/alpm/pk-backend-remove.c +index 03329b1..1993061 100644 +--- a/backends/alpm/pk-backend-remove.c ++++ b/backends/alpm/pk-backend-remove.c +@@ -29,29 +29,14 @@ + #include "pk-backend-remove.h" + #include "pk-backend-transaction.h" + +-static gint +-alpm_remove_local (const gchar *name) +-{ +- pmpkg_t *pkg; +- +- g_return_val_if_fail (name != NULL, -1); +- g_return_val_if_fail (localdb != NULL, -1); +- +- pkg = alpm_db_get_pkg (localdb, name); +- if (pkg == NULL) { +- pm_errno = PM_ERR_PKG_NOT_FOUND; +- return -1; +- } +- +- return alpm_remove_pkg (pkg); +-} +- + static gboolean + pk_backend_transaction_remove_targets (PkBackend *self, GError **error) + { + gchar **packages; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); ++ g_return_val_if_fail (localdb != NULL, FALSE); + + packages = pk_backend_get_strv (self, "package_ids"); + +@@ -61,9 +46,11 @@ pk_backend_transaction_remove_targets (PkBackend *self, GError **error) + gchar **package = pk_package_id_split (*packages); + gchar *name = package[PK_PACKAGE_ID_NAME]; + +- if (alpm_remove_local (name) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "%s: %s", +- name, alpm_strerrorlast ()); ++ alpm_pkg_t *pkg = alpm_db_get_pkg (localdb, name); ++ if (pkg == NULL || alpm_remove_pkg (alpm, pkg) < 0) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "%s: %s", name, ++ alpm_strerror (errno)); + g_strfreev (package); + return FALSE; + } +@@ -79,14 +66,17 @@ pk_backend_transaction_remove_simulate (PkBackend *self, GError **error) + { + const alpm_list_t *i; + ++ g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); ++ + if (!pk_backend_transaction_simulate (self, error)) { + return FALSE; + } + +- for (i = alpm_trans_get_remove (); i != NULL; i = i->next) { ++ for (i = alpm_trans_get_remove (alpm); i != NULL; i = i->next) { + const gchar *name = alpm_pkg_get_name (i->data); + if (alpm_list_find_str (holdpkgs, name)) { +- g_set_error (error, ALPM_ERROR, PM_ERR_PKG_HELD, ++ g_set_error (error, ALPM_ERROR, ALPM_ERR_PKG_HELD, + "%s: %s", name, + "could not remove HoldPkg"); + return FALSE; +@@ -99,14 +89,14 @@ pk_backend_transaction_remove_simulate (PkBackend *self, GError **error) + static gboolean + pk_backend_simulate_remove_packages_thread (PkBackend *self) + { +- pmtransflag_t flags = PM_TRANS_FLAG_CASCADE; ++ alpm_transflag_t flags = ALPM_TRANS_FLAG_CASCADE; + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); + + /* remove unneeded packages that were required by those to be removed */ + if (pk_backend_get_bool (self, "autoremove")) { +- flags |= PM_TRANS_FLAG_RECURSE; ++ flags |= ALPM_TRANS_FLAG_RECURSE; + } + + if (pk_backend_transaction_initialize (self, flags, &error) && +@@ -121,18 +111,18 @@ pk_backend_simulate_remove_packages_thread (PkBackend *self) + static gboolean + pk_backend_remove_packages_thread (PkBackend *self) + { +- pmtransflag_t flags = 0; ++ alpm_transflag_t flags = 0; + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); + + /* remove packages that depend on those to be removed */ + if (pk_backend_get_bool (self, "allow_deps")) { +- flags |= PM_TRANS_FLAG_CASCADE; ++ flags |= ALPM_TRANS_FLAG_CASCADE; + } + /* remove unneeded packages that were required by those to be removed */ + if (pk_backend_get_bool (self, "autoremove")) { +- flags |= PM_TRANS_FLAG_RECURSE; ++ flags |= ALPM_TRANS_FLAG_RECURSE; + } + + if (pk_backend_transaction_initialize (self, flags, &error) && +diff --git a/backends/alpm/pk-backend-search.c b/backends/alpm/pk-backend-search.c +index 592472d..c4e80ae 100644 +--- a/backends/alpm/pk-backend-search.c ++++ b/backends/alpm/pk-backend-search.c +@@ -55,9 +55,10 @@ static gpointer + pk_backend_pattern_chroot (const gchar *needle, GError **error) + { + g_return_val_if_fail (needle != NULL, NULL); ++ g_return_val_if_fail (alpm != NULL, NULL); + + if (G_IS_DIR_SEPARATOR (*needle)) { +- const gchar *file = needle, *root = alpm_option_get_root (); ++ const gchar *file = needle, *root = alpm_option_get_root (alpm); + + /* adjust needle to the correct prefix */ + for (; *file == *root; ++file, ++root) { +@@ -74,7 +75,7 @@ pk_backend_pattern_chroot (const gchar *needle, GError **error) + } + + static gboolean +-pk_backend_match_all (pmpkg_t *pkg, gpointer pattern) ++pk_backend_match_all (alpm_pkg_t *pkg, gpointer pattern) + { + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (pattern != NULL, FALSE); +@@ -84,10 +85,10 @@ pk_backend_match_all (pmpkg_t *pkg, gpointer pattern) + } + + static gboolean +-pk_backend_match_details (pmpkg_t *pkg, GRegex *regex) ++pk_backend_match_details (alpm_pkg_t *pkg, GRegex *regex) + { + const gchar *desc; +- pmdb_t *db; ++ alpm_db_t *db; + const alpm_list_t *i; + + g_return_val_if_fail (pkg != NULL, FALSE); +@@ -123,32 +124,38 @@ pk_backend_match_details (pmpkg_t *pkg, GRegex *regex) + } + + static gboolean +-pk_backend_match_file (pmpkg_t *pkg, const gchar *needle) ++pk_backend_match_file (alpm_pkg_t *pkg, const gchar *needle) + { +- const alpm_list_t *i; ++ alpm_filelist_t *files; ++ gsize i; + + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (needle != NULL, FALSE); + ++ files = alpm_pkg_get_files (pkg); ++ + /* match any file the package contains */ + if (G_IS_DIR_SEPARATOR (*needle)) { +- for (i = alpm_pkg_get_files (pkg); i != NULL; i = i->next) { ++ for (i = 0; i < files->count; ++i) { ++ const gchar *file = files->files[i].name; + /* match the full path of file */ +- if (g_strcmp0 (i->data, needle + 1) == 0) { ++ if (g_strcmp0 (file, needle + 1) == 0) { + return TRUE; + } + } + } else { +- for (i = alpm_pkg_get_files (pkg); i != NULL; i = i->next) { +- const gchar *file = strrchr (i->data, G_DIR_SEPARATOR); +- if (file == NULL) { +- file = i->data; ++ for (i = 0; i < files->count; ++i) { ++ const gchar *file = files->files[i].name; ++ const gchar *name = strrchr (file, G_DIR_SEPARATOR); ++ ++ if (name == NULL) { ++ name = file; + } else { +- ++file; ++ ++name; + } + + /* match the basename of file */ +- if (g_strcmp0 (file, needle) == 0) { ++ if (g_strcmp0 (name, needle) == 0) { + return TRUE; + } + } +@@ -158,7 +165,7 @@ pk_backend_match_file (pmpkg_t *pkg, const gchar *needle) + } + + static gboolean +-pk_backend_match_group (pmpkg_t *pkg, const gchar *needle) ++pk_backend_match_group (alpm_pkg_t *pkg, const gchar *needle) + { + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (needle != NULL, FALSE); +@@ -168,7 +175,7 @@ pk_backend_match_group (pmpkg_t *pkg, const gchar *needle) + } + + static gboolean +-pk_backend_match_name (pmpkg_t *pkg, GRegex *regex) ++pk_backend_match_name (alpm_pkg_t *pkg, GRegex *regex) + { + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (regex != NULL, FALSE); +@@ -178,7 +185,7 @@ pk_backend_match_name (pmpkg_t *pkg, GRegex *regex) + } + + static gboolean +-pk_backend_match_provides (pmpkg_t *pkg, gpointer pattern) ++pk_backend_match_provides (alpm_pkg_t *pkg, gpointer pattern) + { + /* TODO: implement GStreamer codecs, Pango fonts, etc. */ + const alpm_list_t *i; +@@ -215,7 +222,7 @@ typedef enum { + } SearchType; + + typedef gpointer (*PatternFunc) (const gchar *needle, GError **error); +-typedef gboolean (*MatchFunc) (pmpkg_t *pkg, gpointer pattern); ++typedef gboolean (*MatchFunc) (alpm_pkg_t *pkg, gpointer pattern); + + static PatternFunc pattern_funcs[] = { + pk_backend_pattern_needle, +@@ -245,9 +252,9 @@ static MatchFunc match_funcs[] = { + }; + + static gboolean +-alpm_pkg_is_local (pmpkg_t *pkg) ++alpm_pkg_is_local (alpm_pkg_t *pkg) + { +- pmpkg_t *local; ++ alpm_pkg_t *local; + + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (localdb != NULL, FALSE); +@@ -274,7 +281,7 @@ alpm_pkg_is_local (pmpkg_t *pkg) + } + + static void +-pk_backend_search_db (PkBackend *self, pmdb_t *db, MatchFunc match, ++pk_backend_search_db (PkBackend *self, alpm_db_t *db, MatchFunc match, + const alpm_list_t *patterns) + { + const alpm_list_t *i, *j; +@@ -326,6 +333,7 @@ pk_backend_search_thread (PkBackend *self) + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (localdb != NULL, FALSE); + + needles = pk_backend_get_strv (self, "search"); +@@ -366,7 +374,7 @@ pk_backend_search_thread (PkBackend *self) + goto out; + } + +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { ++ for (i = alpm_option_get_syncdbs (alpm); i != NULL; i = i->next) { + if (pk_backend_cancelled (self)) { + break; } +diff --git a/backends/alpm/pk-backend-sync.c b/backends/alpm/pk-backend-sync.c +index 9e1e02b..c770159 100644 +--- a/backends/alpm/pk-backend-sync.c ++++ b/backends/alpm/pk-backend-sync.c +@@ -30,41 +30,13 @@ + #include "pk-backend-sync.h" + #include "pk-backend-transaction.h" + +-static gint +-alpm_add_dbtarget (const gchar *repo, const gchar *name) +-{ +- const alpm_list_t *i; +- pmpkg_t *pkg; +- +- g_return_val_if_fail (repo != NULL, -1); +- g_return_val_if_fail (name != NULL, -1); +- +- for (i = alpm_option_get_syncdbs (); i != NULL; i = i->next) { +- if (g_strcmp0 (alpm_db_get_name (i->data), repo) == 0) { +- break; +- } +- } +- +- if (i == NULL) { +- pm_errno = PM_ERR_DB_NOT_FOUND; +- return -1; +- } - -- pk_backend_output (self, depends->str); -- g_string_free (depends, TRUE); +- pkg = alpm_db_get_pkg (i->data, name); +- if (pkg == NULL) { +- pm_errno = PM_ERR_PKG_NOT_FOUND; +- return -1; +- } +- +- return alpm_add_pkg (pkg); +-} +- + static gboolean + pk_backend_transaction_sync_targets (PkBackend *self, GError **error) + { + gchar **packages; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + packages = pk_backend_get_strv (self, "package_ids"); + +@@ -75,9 +47,28 @@ pk_backend_transaction_sync_targets (PkBackend *self, GError **error) + gchar *repo = package[PK_PACKAGE_ID_DATA]; + gchar *name = package[PK_PACKAGE_ID_NAME]; + +- if (alpm_add_dbtarget (repo, name) < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "%s/%s: %s", +- repo, name, alpm_strerrorlast ()); ++ const alpm_list_t *i = alpm_option_get_syncdbs (alpm); ++ alpm_pkg_t *pkg; ++ ++ for (; i != NULL; i = i->next) { ++ if (g_strcmp0 (alpm_db_get_name (i->data), repo) == 0) { ++ break; ++ } ++ } ++ ++ if (i == NULL) { ++ enum _alpm_errno_t errno = ALPM_ERR_DB_NOT_FOUND; ++ g_set_error (error, ALPM_ERROR, errno, "%s/%s: %s", ++ repo, name, alpm_strerror (errno)); ++ g_strfreev (package); ++ return FALSE; ++ } ++ ++ pkg = alpm_db_get_pkg (i->data, name); ++ if (pkg == NULL || alpm_add_pkg (alpm, pkg) < 0) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "%s/%s: %s", ++ repo, name, alpm_strerror (errno)); + g_strfreev (package); + return FALSE; + } +@@ -93,23 +84,27 @@ pk_backend_download_packages_thread (PkBackend *self) + { + alpm_list_t *cachedirs; + const gchar *directory; +- pmtransflag_t flags = 0; ++ alpm_transflag_t flags = 0; + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + directory = pk_backend_get_string (self, "directory"); + + if (directory != NULL) { + /* download files to a PackageKit directory */ + gchar *cachedir = strdup (directory); +- cachedirs = alpm_list_strdup (alpm_option_get_cachedirs ()); +- alpm_option_set_cachedirs (alpm_list_add (NULL, cachedir)); ++ const alpm_list_t *old = alpm_option_get_cachedirs (alpm); ++ alpm_list_t *new = alpm_list_add (NULL, cachedir); ++ ++ cachedirs = alpm_list_strdup (old); ++ alpm_option_set_cachedirs (alpm, new); + } + +- flags |= PM_TRANS_FLAG_NODEPS; +- flags |= PM_TRANS_FLAG_NOCONFLICTS; +- flags |= PM_TRANS_FLAG_DOWNLOADONLY; ++ flags |= ALPM_TRANS_FLAG_NODEPS; ++ flags |= ALPM_TRANS_FLAG_NOCONFLICTS; ++ flags |= ALPM_TRANS_FLAG_DOWNLOADONLY; + + if (pk_backend_transaction_initialize (self, flags, &error) && + pk_backend_transaction_sync_targets (self, &error) && +@@ -118,7 +113,7 @@ pk_backend_download_packages_thread (PkBackend *self) + } + + if (directory != NULL) { +- alpm_option_set_cachedirs (cachedirs); ++ alpm_option_set_cachedirs (alpm, cachedirs); } -+ pk_backend_output_end (self); + + return pk_backend_transaction_finish (self, error); +@@ -190,16 +185,17 @@ pk_backend_install_packages (PkBackend *self, gboolean only_trusted, + } + + static gboolean +-pk_backend_replaces_dependencies (PkBackend *self, pmpkg_t *pkg) ++pk_backend_replaces_dependencies (PkBackend *self, alpm_pkg_t *pkg) + { + const alpm_list_t *i, *replaces; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (pkg != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + replaces = alpm_pkg_get_replaces (pkg); +- for (i = alpm_trans_get_remove (); i != NULL; i = i->next) { +- pmpkg_t *rpkg = (pmpkg_t *) i->data; ++ for (i = alpm_trans_get_remove (alpm); i != NULL; i = i->next) { ++ alpm_pkg_t *rpkg = (alpm_pkg_t *) i->data; + const gchar *rname = alpm_pkg_get_name (rpkg); + + if (pk_backend_cancelled (self)) { +@@ -208,7 +204,7 @@ pk_backend_replaces_dependencies (PkBackend *self, pmpkg_t *pkg) + continue; + } + +- if (alpm_pkg_get_reason (rpkg) == PM_PKG_REASON_EXPLICIT) { ++ if (alpm_pkg_get_reason (rpkg) == ALPM_PKG_REASON_EXPLICIT) { + return FALSE; + } + } +@@ -224,6 +220,7 @@ pk_backend_update_packages_thread (PkBackend *self) + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (localdb != NULL, FALSE); + + if (!pk_backend_transaction_initialize (self, 0, &error) || +@@ -233,8 +230,8 @@ pk_backend_update_packages_thread (PkBackend *self) + } + + /* change the install reason of packages that replace dependencies */ +- for (i = alpm_trans_get_add (); i != NULL; i = i->next) { +- pmpkg_t *pkg = (pmpkg_t *) i->data; ++ for (i = alpm_trans_get_add (alpm); i != NULL; i = i->next) { ++ alpm_pkg_t *pkg = (alpm_pkg_t *) i->data; + const gchar *name = alpm_pkg_get_name (pkg); + + if (pk_backend_cancelled (self)) { +@@ -254,7 +251,8 @@ pk_backend_update_packages_thread (PkBackend *self) + + for (i = asdeps; i != NULL; i = i->next) { + const gchar *name = (const gchar *) i->data; +- alpm_db_set_pkgreason (localdb, name, PM_PKG_REASON_DEPEND); ++ alpm_pkg_t *pkg = alpm_db_get_pkg (localdb, name); ++ alpm_db_set_pkgreason (alpm, pkg, ALPM_PKG_REASON_DEPEND); + } + + out: +diff --git a/backends/alpm/pk-backend-transaction.c b/backends/alpm/pk-backend-transaction.c +index fdb840e..76402f0 100644 +--- a/backends/alpm/pk-backend-transaction.c ++++ b/backends/alpm/pk-backend-transaction.c +@@ -29,10 +29,10 @@ + static off_t dcomplete = 0; + static off_t dtotal = 0; + +-static pmpkg_t *dpkg = NULL; ++static alpm_pkg_t *dpkg = NULL; + static GString *dfiles = NULL; + +-static pmpkg_t *tpkg = NULL; ++static alpm_pkg_t *tpkg = NULL; + static GString *toutput = NULL; + + static gchar * +@@ -51,25 +51,26 @@ pk_backend_resolve_path (PkBackend *self, const gchar *basename) + } + + static gboolean +-alpm_pkg_has_basename (pmpkg_t *pkg, const gchar *basename) ++alpm_pkg_has_basename (alpm_pkg_t *pkg, const gchar *basename) + { + const alpm_list_t *i; + + g_return_val_if_fail (pkg != NULL, FALSE); + g_return_val_if_fail (basename != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + if (g_strcmp0 (alpm_pkg_get_filename (pkg), basename) == 0) { + return TRUE; + } + +- if (alpm_option_get_usedelta () == 0) { ++ if (alpm_option_get_usedelta (alpm) == 0) { + return FALSE; + } + + for (i = alpm_pkg_get_deltas (pkg); i != NULL; i = i->next) { +- const gchar *patch = alpm_delta_get_filename (i->data); ++ alpm_delta_t *delta = (alpm_delta_t *) i->data; + +- if (g_strcmp0 (patch, basename) == 0) { ++ if (g_strcmp0 (delta->delta, basename) == 0) { + return TRUE; + } + } +@@ -109,6 +110,7 @@ pk_backend_transaction_download_start (PkBackend *self, const gchar *basename) + + g_return_if_fail (self != NULL); + g_return_if_fail (basename != NULL); ++ g_return_if_fail (alpm != NULL); + + /* continue or finish downloading the current package */ + if (dpkg != NULL) { +@@ -127,8 +129,8 @@ pk_backend_transaction_download_start (PkBackend *self, const gchar *basename) + } + + /* figure out what the next package is */ +- for (i = alpm_trans_get_add (); i != NULL; i = i->next) { +- pmpkg_t *pkg = (pmpkg_t *) i->data; ++ for (i = alpm_trans_get_add (alpm); i != NULL; i = i->next) { ++ alpm_pkg_t *pkg = (alpm_pkg_t *) i->data; + + if (alpm_pkg_has_basename (pkg, basename)) { + dpkg = pkg; +@@ -202,16 +204,17 @@ pk_backend_transaction_dlcb (const gchar *basename, off_t complete, off_t total) + } + + static void +-pk_backend_transaction_progress_cb (pmtransprog_t type, const gchar *target, ++pk_backend_transaction_progress_cb (alpm_progress_t type, const gchar *target, + gint percent, gsize targets, gsize current) + { + static gint recent = 101; + gsize overall = percent + (current - 1) * 100; + + /* TODO: revert when fixed upstream */ +- if (type == PM_TRANS_PROGRESS_CONFLICTS_START || +- type == PM_TRANS_PROGRESS_DISKSPACE_START || +- type == PM_TRANS_PROGRESS_INTEGRITY_START) { ++ if (type == ALPM_PROGRESS_CONFLICTS_START || ++ type == ALPM_PROGRESS_DISKSPACE_START || ++ type == ALPM_PROGRESS_INTEGRITY_START || ++ type == ALPM_PROGRESS_LOAD_START) { + if (current < targets) { + overall = percent + current++ * 100; + } +@@ -228,12 +231,13 @@ pk_backend_transaction_progress_cb (pmtransprog_t type, const gchar *target, + + /* update transaction progress */ + switch (type) { +- case PM_TRANS_PROGRESS_ADD_START: +- case PM_TRANS_PROGRESS_UPGRADE_START: +- case PM_TRANS_PROGRESS_REMOVE_START: +- case PM_TRANS_PROGRESS_CONFLICTS_START: +- case PM_TRANS_PROGRESS_DISKSPACE_START: +- case PM_TRANS_PROGRESS_INTEGRITY_START: ++ case ALPM_PROGRESS_ADD_START: ++ case ALPM_PROGRESS_UPGRADE_START: ++ case ALPM_PROGRESS_REMOVE_START: ++ case ALPM_PROGRESS_CONFLICTS_START: ++ case ALPM_PROGRESS_DISKSPACE_START: ++ case ALPM_PROGRESS_INTEGRITY_START: ++ case ALPM_PROGRESS_LOAD_START: + if (percent == recent) { + break; + } +@@ -253,7 +257,7 @@ pk_backend_transaction_progress_cb (pmtransprog_t type, const gchar *target, + } + + static void +-pk_backend_install_ignorepkg (PkBackend *self, pmpkg_t *pkg, gint *result) ++pk_backend_install_ignorepkg (PkBackend *self, alpm_pkg_t *pkg, gint *result) + { + gchar *output; + +@@ -280,50 +284,52 @@ pk_backend_install_ignorepkg (PkBackend *self, pmpkg_t *pkg, gint *result) } static void -@@ -398,6 +445,7 @@ pk_backend_transaction_remove_start (PkBackend *self, pmpkg_t *pkg) +-pk_backend_select_provider (PkBackend *self, pmdepend_t *dep, +- const alpm_list_t *providers) ++pk_backend_select_provider (PkBackend *self, const alpm_list_t *providers, ++ alpm_depend_t *depend) + { + gchar *output; + + g_return_if_fail (self != NULL); +- g_return_if_fail (dep != NULL); ++ g_return_if_fail (depend != NULL); + g_return_if_fail (providers != NULL); - pk_backend_set_status (self, PK_STATUS_ENUM_REMOVE); - pk_backend_pkg (self, pkg, PK_INFO_ENUM_REMOVING); -+ pk_backend_output_start (self, pkg); + output = g_strdup_printf ("provider package was selected " + "(%s provides %s)\n", + alpm_pkg_get_name (providers->data), +- alpm_dep_get_name (dep)); ++ depend->name); + pk_backend_output (self, output); + g_free (output); } static void -@@ -413,6 +461,7 @@ pk_backend_transaction_remove_done (PkBackend *self, pmpkg_t *pkg) +-pk_backend_transaction_conv_cb (pmtransconv_t question, gpointer data1, ++pk_backend_transaction_conv_cb (alpm_question_t question, gpointer data1, + gpointer data2, gpointer data3, gint *result) + { + g_return_if_fail (result != NULL); + g_return_if_fail (backend != NULL); + + switch (question) { +- case PM_TRANS_CONV_INSTALL_IGNOREPKG: ++ case ALPM_QUESTION_INSTALL_IGNOREPKG: + pk_backend_install_ignorepkg (backend, data1, result); + break; - alpm_logaction ("removed %s (%s)\n", name, version); +- case PM_TRANS_CONV_REPLACE_PKG: +- case PM_TRANS_CONV_CONFLICT_PKG: +- case PM_TRANS_CONV_CORRUPTED_PKG: +- case PM_TRANS_CONV_LOCAL_NEWER: ++ case ALPM_QUESTION_REPLACE_PKG: ++ case ALPM_QUESTION_CONFLICT_PKG: ++ case ALPM_QUESTION_CORRUPTED_PKG: ++ case ALPM_QUESTION_LOCAL_NEWER: + /* these actions are mostly harmless */ + g_debug ("safe question %d", question); + *result = 1; + break; + +- case PM_TRANS_CONV_REMOVE_PKGS: ++ case ALPM_QUESTION_REMOVE_PKGS: ++ /* TODO: handle keys better */ ++ case ALPM_QUESTION_IMPORT_KEY: + g_debug ("unsafe question %d", question); + *result = 0; + break; + +- case PM_TRANS_CONV_SELECT_PROVIDER: ++ case ALPM_QUESTION_SELECT_PROVIDER: + pk_backend_select_provider (backend, data1, data2); + *result = 0; + break; +@@ -349,7 +355,7 @@ pk_backend_output_end (PkBackend *self) + } + + static void +-pk_backend_output_start (PkBackend *self, pmpkg_t *pkg) ++pk_backend_output_start (PkBackend *self, alpm_pkg_t *pkg) + { + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); +@@ -398,7 +404,7 @@ pk_backend_transaction_test_commit (PkBackend *self) + } + + static void +-pk_backend_transaction_add_start (PkBackend *self, pmpkg_t *pkg) ++pk_backend_transaction_add_start (PkBackend *self, alpm_pkg_t *pkg) + { + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); +@@ -409,18 +415,19 @@ pk_backend_transaction_add_start (PkBackend *self, pmpkg_t *pkg) + } + + static void +-pk_backend_transaction_add_done (PkBackend *self, pmpkg_t *pkg) ++pk_backend_transaction_add_done (PkBackend *self, alpm_pkg_t *pkg) + { + const gchar *name, *version; + const alpm_list_t *i, *optdepends; + + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); ++ g_return_if_fail (alpm != NULL); + + name = alpm_pkg_get_name (pkg); + version = alpm_pkg_get_version (pkg); + +- alpm_logaction ("installed %s (%s)\n", name, version); ++ alpm_logaction (alpm, "installed %s (%s)\n", name, version); pk_backend_pkg (self, pkg, PK_INFO_ENUM_FINISHED); -+ pk_backend_output_end (self); + + optdepends = alpm_pkg_get_optdepends (pkg); +@@ -438,7 +445,7 @@ pk_backend_transaction_add_done (PkBackend *self, pmpkg_t *pkg) } static void -@@ -438,6 +487,7 @@ pk_backend_transaction_upgrade_start (PkBackend *self, pmpkg_t *pkg, +-pk_backend_transaction_remove_start (PkBackend *self, pmpkg_t *pkg) ++pk_backend_transaction_remove_start (PkBackend *self, alpm_pkg_t *pkg) + { + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); +@@ -449,24 +456,25 @@ pk_backend_transaction_remove_start (PkBackend *self, pmpkg_t *pkg) + } + + static void +-pk_backend_transaction_remove_done (PkBackend *self, pmpkg_t *pkg) ++pk_backend_transaction_remove_done (PkBackend *self, alpm_pkg_t *pkg) + { + const gchar *name, *version; - pk_backend_set_status (self, state); - pk_backend_pkg (self, pkg, info); -+ pk_backend_output_start (self, pkg); + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); ++ g_return_if_fail (alpm != NULL); + + name = alpm_pkg_get_name (pkg); + version = alpm_pkg_get_version (pkg); + +- alpm_logaction ("removed %s (%s)\n", name, version); ++ alpm_logaction (alpm, "removed %s (%s)\n", name, version); + pk_backend_pkg (self, pkg, PK_INFO_ENUM_FINISHED); + pk_backend_output_end (self); } static void -@@ -463,22 +513,18 @@ pk_backend_transaction_upgrade_done (PkBackend *self, pmpkg_t *pkg, - alpm_pkg_get_optdepends (old), - (alpm_list_fn_cmp) g_strcmp0); - if (optdepends != NULL) { -- GString *depends = g_string_new (""); -- -- g_string_append_printf (depends, -- "New optional dependencies for %s\n", -- name); -+ pk_backend_output (self, "New optional dependencies:\n"); +-pk_backend_transaction_upgrade_start (PkBackend *self, pmpkg_t *pkg, +- pmpkg_t *old) ++pk_backend_transaction_upgrade_start (PkBackend *self, alpm_pkg_t *pkg, ++ alpm_pkg_t *old) + { + PkRoleEnum role; + PkStatusEnum state; +@@ -491,8 +499,8 @@ pk_backend_transaction_upgrade_start (PkBackend *self, pmpkg_t *pkg, + } - for (i = optdepends; i != NULL; i = i->next) { -- g_string_append_printf (depends, "%s\n", -- (const gchar *) i->data); -+ const gchar *depend = i->data; -+ gchar *output = g_strdup_printf ("%s\n", depend); -+ pk_backend_output (self, output); -+ g_free (output); - } + static void +-pk_backend_transaction_upgrade_done (PkBackend *self, pmpkg_t *pkg, +- pmpkg_t *old) ++pk_backend_transaction_upgrade_done (PkBackend *self, alpm_pkg_t *pkg, ++ alpm_pkg_t *old) + { + const gchar *name, *pre, *post; + const alpm_list_t *i; +@@ -501,12 +509,13 @@ pk_backend_transaction_upgrade_done (PkBackend *self, pmpkg_t *pkg, + g_return_if_fail (self != NULL); + g_return_if_fail (pkg != NULL); + g_return_if_fail (old != NULL); ++ g_return_if_fail (alpm != NULL); -- pk_backend_output (self, depends->str); + name = alpm_pkg_get_name (pkg); + pre = alpm_pkg_get_version (old); + post = alpm_pkg_get_version (pkg); + +- alpm_logaction ("upgraded %s (%s -> %s)\n", name, pre, post); ++ alpm_logaction (alpm, "upgraded %s (%s -> %s)\n", name, pre, post); + pk_backend_pkg (self, pkg, PK_INFO_ENUM_FINISHED); + + optdepends = alpm_list_diff (alpm_pkg_get_optdepends (pkg), +@@ -528,53 +537,65 @@ pk_backend_transaction_upgrade_done (PkBackend *self, pmpkg_t *pkg, + } + + static void +-pk_backend_transaction_event_cb (pmtransevt_t event, gpointer data, ++pk_backend_transaction_setup (PkBackend *self) ++{ ++ g_return_if_fail (self != NULL); ++ ++ pk_backend_set_status (self, PK_STATUS_ENUM_SETUP); ++} ++ ++static void ++pk_backend_transaction_event_cb (alpm_event_t event, gpointer data, + gpointer old) + { + g_return_if_fail (backend != NULL); + + /* figure out the backend status and package info */ + switch (event) { +- case PM_TRANS_EVT_CHECKDEPS_START: +- case PM_TRANS_EVT_RESOLVEDEPS_START: ++ case ALPM_EVENT_CHECKDEPS_START: ++ case ALPM_EVENT_RESOLVEDEPS_START: + pk_backend_transaction_dep_resolve (backend); + break; + +- case PM_TRANS_EVT_FILECONFLICTS_START: +- case PM_TRANS_EVT_INTERCONFLICTS_START: +- case PM_TRANS_EVT_INTEGRITY_START: +- case PM_TRANS_EVT_DELTA_INTEGRITY_START: +- case PM_TRANS_EVT_DISKSPACE_START: ++ case ALPM_EVENT_FILECONFLICTS_START: ++ case ALPM_EVENT_INTERCONFLICTS_START: ++ case ALPM_EVENT_INTEGRITY_START: ++ case ALPM_EVENT_DELTA_INTEGRITY_START: ++ case ALPM_EVENT_DISKSPACE_START: + pk_backend_transaction_test_commit (backend); + break; + +- case PM_TRANS_EVT_ADD_START: ++ case ALPM_EVENT_ADD_START: + pk_backend_transaction_add_start (backend, data); + break; + +- case PM_TRANS_EVT_ADD_DONE: ++ case ALPM_EVENT_ADD_DONE: + pk_backend_transaction_add_done (backend, data); + break; + +- case PM_TRANS_EVT_REMOVE_START: ++ case ALPM_EVENT_REMOVE_START: + pk_backend_transaction_remove_start (backend, data); + break; + +- case PM_TRANS_EVT_REMOVE_DONE: ++ case ALPM_EVENT_REMOVE_DONE: + pk_backend_transaction_remove_done (backend, data); + break; + +- case PM_TRANS_EVT_UPGRADE_START: ++ case ALPM_EVENT_UPGRADE_START: + pk_backend_transaction_upgrade_start (backend, data, + old); + break; + +- case PM_TRANS_EVT_UPGRADE_DONE: ++ case ALPM_EVENT_UPGRADE_DONE: + pk_backend_transaction_upgrade_done (backend, data, + old); + break; + +- case PM_TRANS_EVT_SCRIPTLET_INFO: ++ case ALPM_EVENT_LOAD_START: ++ pk_backend_transaction_setup (backend); ++ break; ++ ++ case ALPM_EVENT_SCRIPTLET_INFO: + pk_backend_output (backend, data); + break; + +@@ -588,27 +609,32 @@ static void + transaction_cancelled_cb (GCancellable *object, gpointer data) + { + g_return_if_fail (data != NULL); ++ g_return_if_fail (alpm != NULL); + +- alpm_trans_interrupt (); ++ alpm_trans_interrupt (alpm); + } + + gboolean +-pk_backend_transaction_initialize (PkBackend *self, pmtransflag_t flags, ++pk_backend_transaction_initialize (PkBackend *self, alpm_transflag_t flags, + GError **error) + { + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (cancellable != NULL, FALSE); + +- if (alpm_trans_init (flags, pk_backend_transaction_event_cb, +- pk_backend_transaction_conv_cb, +- pk_backend_transaction_progress_cb) < 0) { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); ++ if (alpm_trans_init (alpm, flags) < 0) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); + return FALSE; + } + +- alpm_option_set_dlcb (pk_backend_transaction_dlcb); +- alpm_option_set_totaldlcb (pk_backend_transaction_totaldlcb); ++ alpm_option_set_eventcb (alpm, pk_backend_transaction_event_cb); ++ alpm_option_set_questioncb (alpm, pk_backend_transaction_conv_cb); ++ alpm_option_set_progresscb (alpm, pk_backend_transaction_progress_cb); ++ ++ alpm_option_set_dlcb (alpm, pk_backend_transaction_dlcb); ++ alpm_option_set_totaldlcb (alpm, pk_backend_transaction_totaldlcb); + + g_cancellable_connect (cancellable, + G_CALLBACK (transaction_cancelled_cb), +@@ -649,10 +675,11 @@ alpm_miss_build_list (const alpm_list_t *i) + } + + for (; i != NULL; i = i->next) { +- pmdepend_t *dep = alpm_miss_get_dep (i->data); +- gchar *depend = alpm_dep_compute_string (dep); ++ alpm_depmissing_t *miss = (alpm_depmissing_t *) i->data; ++ gchar *depend = alpm_dep_compute_string (miss->depend); ++ + g_string_append_printf (list, "%s <- %s, ", depend, +- alpm_miss_get_target (i->data)); ++ miss->target); + free (depend); + } + +@@ -661,25 +688,21 @@ alpm_miss_build_list (const alpm_list_t *i) + } + + static void +-alpm_dep_free (gpointer dep) ++alpm_depend_free (alpm_depend_t *depend) + { +- /* TODO: remove when implemented in libalpm */ +- free ((gpointer) alpm_dep_get_name (dep)); +- free ((gpointer) alpm_dep_get_version (dep)); +- free (dep); ++ free (depend->name); ++ free (depend->version); ++ free (depend); + } + + static void +-alpm_miss_free (gpointer miss) ++alpm_depmissing_free (gpointer miss) + { +- /* TODO: remove when implemented in libalpm */ +- const gchar *temp = alpm_miss_get_causingpkg (miss); +- if (temp != NULL) { +- free ((gpointer) temp); +- } ++ alpm_depmissing_t *self = (alpm_depmissing_t *) miss; + +- free ((gpointer) alpm_miss_get_target (miss)); +- alpm_dep_free (alpm_miss_get_dep (miss)); ++ free (self->target); ++ alpm_depend_free (self->depend); ++ free (self->causingpkg); + free (miss); + } + +@@ -695,17 +718,20 @@ alpm_conflict_build_list (const alpm_list_t *i) + } + + for (; i != NULL; i = i->next) { +- const gchar *first = alpm_conflict_get_package1 (i->data); +- const gchar *second = alpm_conflict_get_package2 (i->data); +- const gchar *reason = alpm_conflict_get_reason (i->data); - -- g_string_free (depends, TRUE); - alpm_list_free (optdepends); +- if (g_strcmp0 (first, reason) == 0 || +- g_strcmp0 (second, reason) == 0) { +- g_string_append_printf (list, "%s <-> %s, ", first, +- second); ++ alpm_conflict_t *conflict = (alpm_conflict_t *) i->data; ++ alpm_depend_t *depend = conflict->reason; ++ ++ if (g_strcmp0 (conflict->package1, depend->name) == 0 || ++ g_strcmp0 (conflict->package2, depend->name) == 0) { ++ g_string_append_printf (list, "%s <-> %s, ", ++ conflict->package1, ++ conflict->package2); + } else { +- g_string_append_printf (list, "%s <-> %s (%s), ", first, +- second, reason); ++ gchar *reason = alpm_dep_compute_string (depend); ++ g_string_append_printf (list, "%s <-> %s (%s), ", ++ conflict->package1, ++ conflict->package2, reason); ++ g_free (reason); + } } -+ pk_backend_output_end (self); + +@@ -716,10 +742,10 @@ alpm_conflict_build_list (const alpm_list_t *i) + static void + alpm_conflict_free (gpointer conflict) + { +- /* TODO: remove when implemented in libalpm */ +- free ((gpointer) alpm_conflict_get_package1 (conflict)); +- free ((gpointer) alpm_conflict_get_package2 (conflict)); +- free ((gpointer) alpm_conflict_get_reason (conflict)); ++ alpm_conflict_t *self = (alpm_conflict_t *) conflict; ++ ++ free (self->package1); ++ free (self->package2); + free (conflict); } +@@ -735,15 +761,17 @@ alpm_fileconflict_build_list (const alpm_list_t *i) + } + + for (; i != NULL; i = i->next) { +- const gchar *target = alpm_fileconflict_get_target (i->data); +- const gchar *file = alpm_fileconflict_get_file (i->data); +- const gchar *ctarget = alpm_fileconflict_get_ctarget (i->data); +- if (*ctarget != '\0') { ++ alpm_fileconflict_t *conflict = (alpm_fileconflict_t *) i->data; ++ ++ if (*conflict->ctarget != '\0') { + g_string_append_printf (list, "%s <-> %s (%s), ", +- target, ctarget, file); ++ conflict->target, ++ conflict->ctarget, ++ conflict->file); + } else { +- g_string_append_printf (list, "%s (%s), ", target, +- file); ++ g_string_append_printf (list, "%s (%s), ", ++ conflict->target, ++ conflict->file); + } + } + +@@ -754,14 +782,11 @@ alpm_fileconflict_build_list (const alpm_list_t *i) static void -@@ -896,6 +942,13 @@ pk_backend_transaction_end (PkBackend *self, GError **error) - alpm_option_set_dlcb (NULL); - alpm_option_set_totaldlcb (NULL); + alpm_fileconflict_free (gpointer conflict) + { +- /* TODO: remove when implemented in libalpm */ +- const gchar *temp = alpm_fileconflict_get_ctarget (conflict); +- if (*temp != '\0') { +- free ((gpointer) temp); +- } ++ alpm_fileconflict_t *self = (alpm_fileconflict_t *) conflict; -+ if (dpkg != NULL) { -+ pk_backend_transaction_download_end (self); -+ } -+ if (tpkg != NULL) { -+ pk_backend_output_end (self); -+ } +- free ((gpointer) alpm_fileconflict_get_target (conflict)); +- free ((gpointer) alpm_fileconflict_get_file (conflict)); ++ free (self->target); ++ free (self->file); ++ free (self->ctarget); + free (conflict); + } + +@@ -771,29 +796,32 @@ pk_backend_transaction_simulate (PkBackend *self, GError **error) + alpm_list_t *data = NULL; + gchar *prefix; + +- if (alpm_trans_prepare (&data) >= 0) { ++ g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); ++ ++ if (alpm_trans_prepare (alpm, &data) >= 0) { + return TRUE; + } + +- switch (pm_errno) { +- case PM_ERR_PKG_INVALID_ARCH: ++ switch (alpm_errno (alpm)) { ++ case ALPM_ERR_PKG_INVALID_ARCH: + prefix = alpm_pkg_build_list (data); + alpm_list_free (data); + break; + +- case PM_ERR_UNSATISFIED_DEPS: ++ case ALPM_ERR_UNSATISFIED_DEPS: + prefix = alpm_miss_build_list (data); +- alpm_list_free_inner (data, alpm_miss_free); ++ alpm_list_free_inner (data, alpm_depmissing_free); + alpm_list_free (data); + break; + +- case PM_ERR_CONFLICTING_DEPS: ++ case ALPM_ERR_CONFLICTING_DEPS: + prefix = alpm_conflict_build_list (data); + alpm_list_free_inner (data, alpm_conflict_free); + alpm_list_free (data); + break; + +- case PM_ERR_FILE_CONFLICTS: ++ case ALPM_ERR_FILE_CONFLICTS: + prefix = alpm_fileconflict_build_list (data); + alpm_list_free_inner (data, alpm_fileconflict_free); + alpm_list_free (data); +@@ -802,18 +830,21 @@ pk_backend_transaction_simulate (PkBackend *self, GError **error) + default: + prefix = NULL; + if (data != NULL) { +- g_warning ("unhandled error %d", pm_errno); ++ g_warning ("unhandled error %d", ++ alpm_errno (alpm)); + } + break; + } + + if (prefix != NULL) { +- g_set_error (error, ALPM_ERROR, pm_errno, "%s: %s", prefix, +- alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "%s: %s", prefix, ++ alpm_strerror (errno)); + g_free (prefix); + } else { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); + } + + return FALSE; +@@ -826,10 +857,11 @@ pk_backend_transaction_packages (PkBackend *self) + PkInfoEnum info; + + g_return_if_fail (self != NULL); ++ g_return_if_fail (alpm != NULL); + g_return_if_fail (localdb != NULL); + + /* emit packages that would have been installed */ +- for (i = alpm_trans_get_add (); i != NULL; i = i->next) { ++ for (i = alpm_trans_get_add (alpm); i != NULL; i = i->next) { + if (pk_backend_cancelled (self)) { + break; + } else { +@@ -856,7 +888,7 @@ pk_backend_transaction_packages (PkBackend *self) + } + + /* emit packages that would have been removed */ +- for (i = alpm_trans_get_remove (); i != NULL; i = i->next) { ++ for (i = alpm_trans_get_remove (alpm); i != NULL; i = i->next) { + if (pk_backend_cancelled (self)) { + break; + } else { +@@ -890,6 +922,9 @@ pk_backend_transaction_commit (PkBackend *self, GError **error) + alpm_list_t *data = NULL; + gchar *prefix; + ++ g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); ++ + if (pk_backend_cancelled (self)) { + return TRUE; + } +@@ -897,19 +932,19 @@ pk_backend_transaction_commit (PkBackend *self, GError **error) + pk_backend_set_allow_cancel (self, FALSE); + pk_backend_set_status (self, PK_STATUS_ENUM_RUNNING); + +- if (alpm_trans_commit (&data) >= 0) { ++ if (alpm_trans_commit (alpm, &data) >= 0) { + return TRUE; + } + +- switch (pm_errno) { +- case PM_ERR_FILE_CONFLICTS: ++ switch (alpm_errno (alpm)) { ++ case ALPM_ERR_FILE_CONFLICTS: + prefix = alpm_fileconflict_build_list (data); + alpm_list_free_inner (data, alpm_fileconflict_free); + alpm_list_free (data); + break; + +- case PM_ERR_PKG_INVALID: +- case PM_ERR_DLT_INVALID: ++ case ALPM_ERR_PKG_INVALID: ++ case ALPM_ERR_DLT_INVALID: + prefix = alpm_string_build_list (data); + alpm_list_free (data); + break; +@@ -917,18 +952,21 @@ pk_backend_transaction_commit (PkBackend *self, GError **error) + default: + prefix = NULL; + if (data != NULL) { +- g_warning ("unhandled error %d", pm_errno); ++ g_warning ("unhandled error %d", ++ alpm_errno (alpm)); + } + break; + } + + if (prefix != NULL) { +- g_set_error (error, ALPM_ERROR, pm_errno, "%s: %s", prefix, +- alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "%s: %s", prefix, ++ alpm_strerror (errno)); + g_free (prefix); + } else { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); + } + + return FALSE; +@@ -938,9 +976,14 @@ gboolean + pk_backend_transaction_end (PkBackend *self, GError **error) + { + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + - if (alpm_trans_release () < 0) { - g_set_error_literal (error, ALPM_ERROR, pm_errno, - alpm_strerrorlast ()); ++ alpm_option_set_eventcb (alpm, NULL); ++ alpm_option_set_questioncb (alpm, NULL); ++ alpm_option_set_progresscb (alpm, NULL); + +- alpm_option_set_dlcb (NULL); +- alpm_option_set_totaldlcb (NULL); ++ alpm_option_set_dlcb (alpm, NULL); ++ alpm_option_set_totaldlcb (alpm, NULL); + + if (dpkg != NULL) { + pk_backend_transaction_download_end (self); +@@ -949,9 +992,10 @@ pk_backend_transaction_end (PkBackend *self, GError **error) + pk_backend_output_end (self); + } + +- if (alpm_trans_release () < 0) { +- g_set_error_literal (error, ALPM_ERROR, pm_errno, +- alpm_strerrorlast ()); ++ if (alpm_trans_release (alpm) < 0) { ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error_literal (error, ALPM_ERROR, errno, ++ alpm_strerror (errno)); + return FALSE; + } + diff --git a/backends/alpm/pk-backend-transaction.h b/backends/alpm/pk-backend-transaction.h -index 7bc1af0..6bb1d69 100644 +index 6bb1d69..e3733d6 100644 --- a/backends/alpm/pk-backend-transaction.h +++ b/backends/alpm/pk-backend-transaction.h -@@ -41,3 +41,6 @@ gboolean pk_backend_transaction_end (PkBackend *self, +@@ -25,7 +25,7 @@ + #include <pk-backend.h> + + gboolean pk_backend_transaction_initialize (PkBackend *self, +- pmtransflag_t flags, ++ alpm_transflag_t flags, + GError **error); + + gboolean pk_backend_transaction_simulate (PkBackend *self, +diff --git a/backends/alpm/pk-backend-update.c b/backends/alpm/pk-backend-update.c +index a281953..37ade1e 100644 +--- a/backends/alpm/pk-backend-update.c ++++ b/backends/alpm/pk-backend-update.c +@@ -34,7 +34,7 @@ + #include "pk-backend-update.h" + + static gchar * +-alpm_pkg_build_replaces (pmpkg_t *pkg) ++alpm_pkg_build_replaces (alpm_pkg_t *pkg) + { + const alpm_list_t *i; + GString *string = NULL; +@@ -44,7 +44,7 @@ alpm_pkg_build_replaces (pmpkg_t *pkg) - gboolean pk_backend_transaction_finish (PkBackend *self, - GError *error); + /* make a list of the packages that package replaces */ + for (i = alpm_pkg_get_replaces (pkg); i != NULL; i = i->next) { +- pmpkg_t *replaces = alpm_db_get_pkg (localdb, i->data); ++ alpm_pkg_t *replaces = alpm_db_get_pkg (localdb, i->data); + + if (replaces != NULL) { + gchar *package = alpm_pkg_build_id (replaces); +@@ -65,7 +65,7 @@ alpm_pkg_build_replaces (pmpkg_t *pkg) + } + + static gchar * +-alpm_pkg_build_urls (pmpkg_t *pkg) ++alpm_pkg_build_urls (alpm_pkg_t *pkg) + { + GString *string = g_string_new (""); + #ifdef ALPM_PACKAGE_URL +@@ -97,7 +97,7 @@ alpm_pkg_build_urls (pmpkg_t *pkg) + } + + static gboolean +-alpm_pkg_same_pkgver (pmpkg_t *a, pmpkg_t *b) ++alpm_pkg_same_pkgver (alpm_pkg_t *a, alpm_pkg_t *b) + { + const gchar *version_a, *version_b, *last_a, *last_b; + gsize length_a, length_b; +@@ -145,8 +145,8 @@ pk_backend_get_update_detail_thread (PkBackend *self) + + /* collect details about updates */ + for (; *packages != NULL; ++packages) { +- pmpkg_t *pkg, *old; +- pmdb_t *db; ++ alpm_pkg_t *pkg, *old; ++ alpm_db_t *db; + + gchar *upgrades, *replaces, *urls; + const gchar *reason; +@@ -245,18 +245,19 @@ pk_backend_update_databases (PkBackend *self, gint force, GError **error) { + const alpm_list_t *i; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + + if (!pk_backend_transaction_initialize (self, 0, error)) { + return FALSE; + } + +- alpm_logaction ("synchronizing package lists\n"); ++ alpm_logaction (alpm, "synchronizing package lists\n"); + +- dlcb = alpm_option_get_dlcb (); +- totaldlcb = alpm_option_get_totaldlcb (); ++ dlcb = alpm_option_get_dlcb (alpm); ++ totaldlcb = alpm_option_get_totaldlcb (alpm); + + /* set total size to minus the number of databases */ +- i = alpm_option_get_syncdbs (); ++ i = alpm_option_get_syncdbs (alpm); + totaldlcb (-alpm_list_count (i)); + + for (; i != NULL; i = i->next) { +@@ -274,9 +275,10 @@ pk_backend_update_databases (PkBackend *self, gint force, GError **error) { + /* fake the download when already up to date */ + dlcb ("", 1, 1); + } else if (result < 0) { +- g_set_error (error, ALPM_ERROR, pm_errno, "[%s]: %s", ++ enum _alpm_errno_t errno = alpm_errno (alpm); ++ g_set_error (error, ALPM_ERROR, errno, "[%s]: %s", + alpm_db_get_name (i->data), +- alpm_strerrorlast ()); ++ alpm_strerror (errno)); + break; + } + } +@@ -292,20 +294,21 @@ pk_backend_update_databases (PkBackend *self, gint force, GError **error) { + } + + static gboolean +-alpm_pkg_is_ignorepkg (pmpkg_t *pkg) ++alpm_pkg_is_ignorepkg (alpm_pkg_t *pkg) + { +- const alpm_list_t *ignorepkgs, *ignoregrps, *i; ++ const alpm_list_t *ignorepkgs, *ignoregroups, *i; + + g_return_val_if_fail (pkg != NULL, TRUE); ++ g_return_val_if_fail (alpm != NULL, TRUE); + +- ignorepkgs = alpm_option_get_ignorepkgs (); ++ ignorepkgs = alpm_option_get_ignorepkgs (alpm); + if (alpm_list_find_str (ignorepkgs, alpm_pkg_get_name (pkg)) != NULL) { + return TRUE; + } + +- ignoregrps = alpm_option_get_ignoregrps (); ++ ignoregroups = alpm_option_get_ignoregroups (alpm); + for (i = alpm_pkg_get_groups (pkg); i != NULL; i = i->next) { +- if (alpm_list_find_str (ignoregrps, i->data) != NULL) { ++ if (alpm_list_find_str (ignoregroups, i->data) != NULL) { + return TRUE; + } + } +@@ -314,7 +317,7 @@ alpm_pkg_is_ignorepkg (pmpkg_t *pkg) + } + + static gboolean +-alpm_pkg_is_syncfirst (pmpkg_t *pkg) ++alpm_pkg_is_syncfirst (alpm_pkg_t *pkg) + { + g_return_val_if_fail (pkg != NULL, FALSE); + +@@ -325,8 +328,18 @@ alpm_pkg_is_syncfirst (pmpkg_t *pkg) + return FALSE; + } + +-static pmpkg_t * +-alpm_pkg_find_update (pmpkg_t *pkg, const alpm_list_t *dbs) ++static gboolean ++alpm_pkg_replaces (alpm_pkg_t *pkg, const gchar *name) ++{ ++ g_return_val_if_fail (pkg != NULL, FALSE); ++ g_return_val_if_fail (name != NULL, FALSE); ++ ++ return alpm_list_find_str (alpm_pkg_get_replaces (pkg), name) != NULL; ++} ++ + -+void pk_backend_output (PkBackend *self, -+ const gchar *output); ++static alpm_pkg_t * ++alpm_pkg_find_update (alpm_pkg_t *pkg, const alpm_list_t *dbs) + { + const gchar *name; + const alpm_list_t *i; +@@ -336,7 +349,7 @@ alpm_pkg_find_update (pmpkg_t *pkg, const alpm_list_t *dbs) + name = alpm_pkg_get_name (pkg); + + for (; dbs != NULL; dbs = dbs->next) { +- pmpkg_t *update = alpm_db_get_pkg (dbs->data, name); ++ alpm_pkg_t *update = alpm_db_get_pkg (dbs->data, name); + + if (update != NULL) { + if (alpm_pkg_vercmp (alpm_pkg_get_version (update), +@@ -349,8 +362,7 @@ alpm_pkg_find_update (pmpkg_t *pkg, const alpm_list_t *dbs) + + i = alpm_db_get_pkgcache (dbs->data); + for (; i != NULL; i = i->next) { +- if (alpm_list_find_str (alpm_pkg_get_replaces (i->data), +- name) != NULL) { ++ if (alpm_pkg_replaces (i->data, name)) { + return i->data; + } + } +@@ -367,6 +379,7 @@ pk_backend_get_updates_thread (PkBackend *self) + const alpm_list_t *i, *syncdbs; + + g_return_val_if_fail (self != NULL, FALSE); ++ g_return_val_if_fail (alpm != NULL, FALSE); + g_return_val_if_fail (localdb != NULL, FALSE); + + time (&one_hour_ago); +@@ -385,9 +398,9 @@ pk_backend_get_updates_thread (PkBackend *self) + } + + /* find outdated and replacement packages */ +- syncdbs = alpm_option_get_syncdbs (); ++ syncdbs = alpm_option_get_syncdbs (alpm); + for (i = alpm_db_get_pkgcache (localdb); i != NULL; i = i->next) { +- pmpkg_t *upgrade = alpm_pkg_find_update (i->data, syncdbs); ++ alpm_pkg_t *upgrade = alpm_pkg_find_update (i->data, syncdbs); + + if (pk_backend_cancelled (self)) { + break; diff --git a/community/pax-utils/PKGBUILD b/community/pax-utils/PKGBUILD new file mode 100644 index 000000000..25e86bdbf --- /dev/null +++ b/community/pax-utils/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 62235 2012-01-18 17:21:27Z tredaelli $ +# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com> +# Contributor: sh0 <mee@sh0.org> +# Contributor: Maxwel <msg.maxwel@gmail.com> + +pkgname=pax-utils +pkgver=0.2.3 +pkgrel=1 +pkgdesc='ELF related utils for ELF 32/64 binaries that can check files for security relevant properties' +url='http://hardened.gentoo.org/pax-utils.xml' +arch=('i686' 'x86_64') +license=('GPL') +depends=('bash' 'libcap') +checkdepends=('python2') +source=("http://distfiles.gentoo.org/distfiles/${pkgname}-${pkgver}.tar.xz") +md5sums=('d2d27891742d14d81b205cf4e42de28a') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + sed -i 's/python /python2 /' tests/source/dotest + make USE_CAP='yes' +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/community/pcsc-tools/PKGBUILD b/community/pcsc-tools/PKGBUILD index a22b0529b..510ffeff2 100644 --- a/community/pcsc-tools/PKGBUILD +++ b/community/pcsc-tools/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 59828 2011-11-30 21:11:50Z giovanni $ +# $Id: PKGBUILD 61978 2012-01-12 11:22:03Z giovanni $ # Maintainer: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Lorenzo Nizzi Grifi Gargiolli <lorenzo.nizzi.grifi@gmail.com> # Contributor: marc0s <marc0s@fsfe.org> pkgname=pcsc-tools -pkgver=1.4.17 -pkgrel=5 +pkgver=1.4.18 +pkgrel=1 pkgdesc="PC/SC Architecture smartcard tools" arch=('i686' 'x86_64' 'mips64el') url="http://ludovic.rousseau.free.fr/softwares/pcsc-tools/" @@ -13,7 +13,7 @@ license=('GPL') depends=('pcsclite' 'pcsc-perl' 'gtk2-perl' 'glib-perl') makedepends=('pkg-config') source=("http://ludovic.rousseau.free.fr/softwares/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('2767238e1e737f94d13a91bdab1174ca') +md5sums=('647ec2779cec69c910906fe5496f4e6c') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/community/percona-server/PKGBUILD b/community/percona-server/PKGBUILD index 4a03ded15..3eea37da6 100644 --- a/community/percona-server/PKGBUILD +++ b/community/percona-server/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> pkgname=percona-server -pkgver=5.5.18_rel23.0 +pkgver=5.5.19_rel24.0 pkgrel=1 pkgdesc="A backwards-compatible drop-in replacement for MySQL that provides improved performance, diagnostics and instrumentation, and manageability of the server" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ url="http://www.percona.com/software/percona-server/" options=('!libtool' 'emptydirs') backup=('etc/mysql/my.cnf') install=percona.install -source=("http://www.percona.com/redir/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/Percona-Server-${pkgver/_/-}.tar.gz" +source=("http://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/source/Percona-Server-${pkgver/_/-}.tar.gz" 'mysqld' 'my.cnf') @@ -98,6 +98,6 @@ package() { install -dm700 "${pkgdir}"/var/lib/mysql } -md5sums=('17b266f5c10d01838522188f313a1ead' +md5sums=('eb8c21bbb8179e0a4709d51c037e682c' '243864805611764a7e5883c1dba7afd8' '1c949c0dbea5206af0db14942d9927b6') diff --git a/community/perl-file-rsyncp/PKGBUILD b/community/perl-file-rsyncp/PKGBUILD new file mode 100644 index 000000000..7ed76655e --- /dev/null +++ b/community/perl-file-rsyncp/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 62351 2012-01-19 15:52:14Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> + +pkgname=perl-file-rsyncp +pkgver=0.70 +pkgrel=1 +pkgdesc='Perl interface to rsync file list encoding and decoding' +arch=('i686' 'x86_64') +license=('GPL' 'PerlArtistic') +options=('!emptydirs' '!makeflags') +url='http://search.cpan.org/dist/File-RsyncP' +source=("http://search.cpan.org/CPAN/authors/id/C/CB/CBARRATT/File-RsyncP-$pkgver.tar.gz") +md5sums=('f244372d15a2991b8700f62e73ac51e4') + +build() { + cd File-RsyncP-$pkgver + USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd File-RsyncP-$pkgver + make test +} + +package() { + cd File-RsyncP-$pkgver + make install DESTDIR="$pkgdir/" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/perl-io-dirent/PKGBUILD b/community/perl-io-dirent/PKGBUILD new file mode 100644 index 000000000..f176527e9 --- /dev/null +++ b/community/perl-io-dirent/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 62356 2012-01-19 16:17:05Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> + +pkgname=perl-io-dirent +pkgver=0.05 +pkgrel=1 +pkgdesc='Perl IO::Dirent module - Access to dirent structs returned by readdir' +arch=('i686' 'x86_64') +license=('GPL' 'PerlArtistic') +url='http://search.cpan.org/~scottw/IO-Dirent/' +options=('!emptydirs') +source=("http://search.cpan.org/CPAN/authors/id/S/SC/SCOTTW/IO-Dirent-$pkgver.tar.gz") +md5sums=('248ab22c31a310c3482fd99592ae550c') + +build() { + cd IO-Dirent-$pkgver + USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd IO-Dirent-$pkgver + make test +} + +package() { + cd IO-Dirent-$pkgver + make install DESTDIR="$pkgdir/" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/pgadmin3/PKGBUILD b/community/pgadmin3/PKGBUILD index c05aceb50..8293d399f 100644 --- a/community/pgadmin3/PKGBUILD +++ b/community/pgadmin3/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 55823 2011-09-22 21:47:07Z spupykin $ +# $Id: PKGBUILD 61990 2012-01-13 12:30:02Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Douglas Soares de Andrade <dsa@aur.archlinux.org> # Contributor: Benjamin Andresen <benny@klapmuetz.org> # Contributor: bekks <eduard.warkentin@gmx.de> pkgname=pgadmin3 -pkgver=1.14.0 +pkgver=1.14.1 pkgrel=1 pkgdesc="A comprehensive design and management interface for PostgreSQL database" arch=('i686' 'x86_64' 'mips64el') @@ -15,20 +15,20 @@ depends=('wxgtk' 'postgresql-libs' 'libxslt') makedepends=('libpqxx' 'krb5' 'postgresql') source=(ftp://ftp.de.postgresql.org/pub/packages/databases/PostgreSQL/pgadmin3/release/v${pkgver}/src/pgadmin3-${pkgver}.tar.gz pgadmin3.desktop) -md5sums=('27bf1694809a7d9adf4feec508374df2' +md5sums=('ba943ac3a1d748bd32123c3d442606b2' 'd07ba4df54baead30b66d19d7450bcad') build() { - cd $srcdir/pgadmin3-${pkgver} - [ -f Makefile ] || ./configure --prefix=/usr - make + cd $srcdir/pgadmin3-${pkgver} + [ -f Makefile ] || ./configure --prefix=/usr + make } package() { - cd $srcdir/pgadmin3-${pkgver} - make DESTDIR=$pkgdir/ install - install -Dm644 i18n/$pkgname.lng $pkgdir/usr/share/pgadmin3/i18n - install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE - install -Dm644 pgadmin/include/images/pgAdmin3.ico $pkgdir/usr/share/pgadmin3/pixmaps/pgAdmin3.ico - install -Dm644 $srcdir/pgadmin3.desktop $pkgdir/usr/share/applications/pgadmin3.desktop + cd $srcdir/pgadmin3-${pkgver} + make DESTDIR=$pkgdir/ install + install -Dm644 i18n/$pkgname.lng $pkgdir/usr/share/pgadmin3/i18n + install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE + install -Dm644 pgadmin/include/images/pgAdmin3.ico $pkgdir/usr/share/pgadmin3/pixmaps/pgAdmin3.ico + install -Dm644 $srcdir/pgadmin3.desktop $pkgdir/usr/share/applications/pgadmin3.desktop } diff --git a/community/pinot/PKGBUILD b/community/pinot/PKGBUILD index def587def..9b123e6fb 100644 --- a/community/pinot/PKGBUILD +++ b/community/pinot/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 60809 2011-12-18 16:48:56Z jlichtblau $ +# $Id: PKGBUILD 62141 2012-01-16 19:53:05Z dreisner $ # Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> # Contributor: Alexander Fehr <pizzapunk gmail com> # Contributor: William Rea <sillywilly@gmail.com> @@ -6,7 +6,7 @@ pkgname=pinot pkgver=0.98 -pkgrel=1 +pkgrel=2 pkgdesc='Personal search and metasearch tool' arch=('i686' 'x86_64' 'mips64el') url='http://pinot.berlios.de/' diff --git a/community/pkgtools/PKGBUILD b/community/pkgtools/PKGBUILD index facae0d8e..5988a08f9 100644 --- a/community/pkgtools/PKGBUILD +++ b/community/pkgtools/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Daenyth <Daenyth+Arch AT gmail DOT com> pkgname=pkgtools pkgver=23 -pkgrel=2 +pkgrel=3 pkgdesc="A collection of scripts for Arch Linux packages" arch=('i686' 'x86_64' 'mips64el') url="http://bbs.archlinux.org/viewtopic.php?pid=384196" diff --git a/community/pokerth/PKGBUILD b/community/pokerth/PKGBUILD index daf38691f..f1a9d2baf 100644 --- a/community/pokerth/PKGBUILD +++ b/community/pokerth/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 61635 2012-01-05 05:53:39Z bpiotrowski $ +# $Id: PKGBUILD 62237 2012-01-18 17:30:42Z bpiotrowski $ # Maintainer: Mateusz Herych <heniekk@gmail.com> # Maintainer: BartÅ‚omiej Piotrowski <barthalion@gmail.com> # Contributor: Vasco Costa <vasco.costa@meiodigital.com> pkgname=pokerth _realname=PokerTH -pkgver=0.9 +pkgver=0.9.1 pkgrel=1 pkgdesc="Poker game written in C++/QT4" arch=('i686' 'x86_64' 'mips64el') @@ -15,7 +15,7 @@ depends=('curl' 'boost-libs>=1.43.0' 'gsasl' 'gnutls' 'qt' 'sdl_mixer' 'libircclient' 'tinyxml') makedepends=('boost') source=(http://downloads.sourceforge.net/sourceforge/pokerth/$_realname-$pkgver-src.tar.bz2) -md5sums=('849eb1a70735177c96bf4608d4637c7c') +md5sums=('c22ec528ebb47c44b93149b63619004f') build() { cd "$srcdir/$_realname-$pkgver-src" diff --git a/community/python2-basemap/PKGBUILD b/community/python2-basemap/PKGBUILD index 1c4567710..87f49c01d 100644 --- a/community/python2-basemap/PKGBUILD +++ b/community/python2-basemap/PKGBUILD @@ -1,28 +1,25 @@ -# $Id: PKGBUILD 51032 2011-07-04 14:39:21Z stephane $ +# $Id: PKGBUILD 62219 2012-01-18 13:46:59Z stephane $ # Maintainer: Stéphane Gaudreault <stephane@archlinux.org> # Contributor: Julien Morin <jmorin@cp.dias.ie> pkgname=python2-basemap -pkgver=1.0.1 -pkgrel=2 +pkgver=1.0.2 +pkgrel=1 pkgdesc="Toolkit for plotting data on map projections" arch=('i686' 'x86_64' 'mips64el') url="http://matplotlib.sourceforge.net/basemap/doc/html/" license=('custom') depends=('python2-matplotlib' 'geos' 'shapelib' 'python2-numpy' 'python2-httplib2') -makedepends=('python2-distribute') optdepends=('python-imaging: Python Imaging Library is only needed for bluemarble and warpimage methods.') -provides=('python-matplotlib-basemap') -replaces=('python-matplotlib-basemap') -conflicts=('python-matplotlib-basemap') source=("http://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-${pkgver}/basemap-${pkgver}.tar.gz") -sha1sums=('bd278580c004ec597020e313cc2c568593a018eb') +sha1sums=('234cdf591e6217de78452d7be2500781c85f5fb4') build() { cd "${srcdir}/basemap-${pkgver}" # Remove the bundled librarie rm -r geos-?.?.? + sed -i "s/lib64/lib/g" setup.py python2 setup.py config @@ -40,8 +37,8 @@ package() { rm "${pkgdir}"/usr/lib/python${_pybasever}/site-packages/mpl_toolkits/__init__.{py,pyc,pyo} # License - install -Dm644 LICENSE_data "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm644 LICENSE_pyshapelib "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 LICENSE_data "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 LICENSE_pyshp "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 LICENSE_proj4 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/community/qtspim/PKGBUILD b/community/qtspim/PKGBUILD new file mode 100644 index 000000000..a1ac5584b --- /dev/null +++ b/community/qtspim/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> +# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> + +pkgname=qtspim +pkgver=9.1.5 +pkgrel=1 +pkgdesc="New user interface for spim, a MIPS simulator." +arch=('i686' 'x86_64') +url="http://spimsimulator.sourceforge.net/" +license=('BSD') +depends=('qt') +makedepends=('subversion') + +__svntrunk="https://spimsimulator.svn.sourceforge.net/svnroot/spimsimulator" +__svnmod=('QtSpim' 'CPU' 'Documentation' 'Setup') +__svnrev=592 + +build() { + cd "$srcdir" + msg "Connecting to SVN server...." + + for i in "${__svnmod[@]}"; do + if [[ -d "$i/.svn" ]]; then + (cd "$i" && svn up -r "$__svnrev") + else + svn co "$__svntrunk/$i" --config-dir ./ -r "$__svnrev" "$i" + fi + done + + msg "SVN checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/build" + mkdir "$srcdir/build" + for i in "${__svnmod[@]}"; do + cp -r "$srcdir/$i" "$srcdir/build" + done + cd "$srcdir/build/QtSpim" + + qmake + make +} + +package() { + cd "$srcdir/build/QtSpim" + + install -Dm755 QtSpim "$pkgdir/usr/bin/qtspim" + + install -dm755 "$pkgdir/usr/share/qtspim" + cp -r help "$pkgdir/usr/share/qtspim" + rm -rf "$pkgdir/usr/share/qtspim/help/.svn" + + cd "$srcdir/build" + + install -Dm644 Documentation/spim.man "$pkgdir/usr/share/man/man1/qtspim.1" + install -Dm644 Setup/qtspim_debian_deployment/qtspim.desktop \ + "$pkgdir/usr/share/applications/qtspim.desktop" + install -Dm644 Setup/qtspim_debian_deployment/copyright \ + "$pkgdir/usr/share/licenses/$pkgname/copyright" + install -Dm644 Setup/NewIcon48x48.png "$pkgdir/usr/share/qtspim/qtspim.png" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/quagga/PKGBUILD b/community/quagga/PKGBUILD index 2b9f4ec71..fdd3acd26 100644 --- a/community/quagga/PKGBUILD +++ b/community/quagga/PKGBUILD @@ -1,9 +1,9 @@ # $Id$ -# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net> +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> pkgname=quagga pkgver=0.99.20 -pkgrel=1 +pkgrel=2 pkgdesc='BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite' arch=('i686' 'x86_64') url='http://www.quagga.net' diff --git a/community/quagga/quagga.install b/community/quagga/quagga.install index 058f4f1d7..c5d88b976 100644 --- a/community/quagga/quagga.install +++ b/community/quagga/quagga.install @@ -1,22 +1,36 @@ +infodir=/usr/share/info +filelist=(quagga.info quagga.info-1 quagga.info-2) + post_install() { groupadd -r quagga useradd -MNr -s /bin/false -d /run/quagga -g quagga quagga && passwd -l quagga &>/dev/null install -d -m 750 -o quagga -g quagga /{run,etc,var/log}/quagga - : + post_upgrade +} + +post_upgrade() { + if [[ -x /usr/bin/install-info ]]; then + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done + fi } pre_remove() { for d in zebra ripd ripngd bgpd ospfd ospf6d isisd; do /etc/rc.d/$d stop &>/dev/null done - : + if [[ -x /usr/bin/install-info ]]; then + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done + fi } post_remove() { userdel quagga &>/dev/null groupdel quagga &>/dev/null rmdir /{etc,var/log}/quagga - : } # vim: ft=sh ts=2 sw=2 et: diff --git a/community/qucs/PKGBUILD b/community/qucs/PKGBUILD index 6f544051f..411fc3b37 100644 --- a/community/qucs/PKGBUILD +++ b/community/qucs/PKGBUILD @@ -1,6 +1,6 @@ -# $Id: PKGBUILD 43749 2011-03-29 15:48:34Z spupykin $ +# $Id: PKGBUILD 62313 2012-01-19 07:59:07Z arodseth $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: Víctor Martínez Romanos <vmromanos@gmail.com> +# Contributor: VÃctor MartÃnez Romanos <vmromanos@gmail.com> pkgname=qucs pkgver=0.0.16 diff --git a/community/r8168-lts/PKGBUILD b/community/r8168-lts/PKGBUILD index 254303c85..3e9caf37d 100644 --- a/community/r8168-lts/PKGBUILD +++ b/community/r8168-lts/PKGBUILD @@ -4,17 +4,17 @@ pkgname=r8168-lts _pkgname=r8168 pkgver=8.027.00 -pkgrel=2 +pkgrel=3 pkgdesc="A kernel module for Realtek 8168 network cards for kernel26-lts" url="http://www.realtek.com.tw" license=("GPL") arch=('i686' 'x86_64') -depends=('glibc' "kernel26-lts>=2.6.32" "kernel26-lts<2.6.33") -makedepends=("kernel26-lts-headers>=2.6.32" "kernel26-lts-headers<2.6.33") +depends=('glibc' "linux-lts>=3.0" "linux-lts<3.1") +makedepends=("linux-lts-headers>=3.0" "linux-lts-headers<3.1") source=(http://r8168.googlecode.com/files/$_pkgname-$pkgver.tar.bz2) install=$pkgname.install -_extramodules=extramodules-2.6.32-lts +_extramodules=extramodules-3.0-lts _kernver="$(cat /lib/modules/$_extramodules/version || true)" build() { diff --git a/community/r8168-lts/r8168-lts.install b/community/r8168-lts/r8168-lts.install index fd4f92f63..2aab9e1e3 100644 --- a/community/r8168-lts/r8168-lts.install +++ b/community/r8168-lts/r8168-lts.install @@ -1,5 +1,5 @@ rebuild_module_dependencies() { - EXTRAMODULES='extramodules-2.6.32-lts' + EXTRAMODULES='extramodules-3.0-lts' depmod $(cat /lib/modules/$EXTRAMODULES/version) } diff --git a/community/redis/PKGBUILD b/community/redis/PKGBUILD index f2afabf04..0efcbcd23 100644 --- a/community/redis/PKGBUILD +++ b/community/redis/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 61232 2011-12-25 17:05:47Z spupykin $ +# $Id: PKGBUILD 62009 2012-01-14 09:42:42Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Jan-Erik Rediger <badboy at archlinux dot us> # Contributor: nofxx <x@<nick>.com> pkgname=redis -pkgver=2.4.5 +pkgver=2.4.6 pkgrel=1 pkgdesc="Advanced key-value store" arch=('i686' 'x86_64' 'mips64el') @@ -18,7 +18,7 @@ backup=("etc/redis.conf" source=("http://redis.googlecode.com/files/${pkgname}-${pkgver}.tar.gz" "redis.d" "redis.logrotate") -md5sums=('babeb1a1d05281b5e00ca0a519cfc3f9' +md5sums=('41d394074bcde762872ecb5506f35aee' '9726d06d0a0c60cb5d55a31b3dc1e55d' '9e2d75b7a9dc421122d673fe520ef17f') diff --git a/community/roxterm/PKGBUILD b/community/roxterm/PKGBUILD index 19b42db02..42d7051a2 100644 --- a/community/roxterm/PKGBUILD +++ b/community/roxterm/PKGBUILD @@ -1,32 +1,32 @@ -# $Id: PKGBUILD 56631 2011-10-09 09:38:40Z ttopper $ +# $Id: PKGBUILD 62226 2012-01-18 16:36:56Z ttopper $ # Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de> # Contributor: Alexander Fehr <pizzapunk gmail com> pkgname=roxterm -pkgver=2.2.2 +pkgver=2.4.2 pkgrel=1 pkgdesc="Tabbed, VTE-based terminal emulator" arch=('i686' 'x86_64' 'mips64el') url="http://roxterm.sourceforge.net/" license=('GPL3') -depends=('dbus-glib' 'vte3' 'hicolor-icon-theme' 'dbus' 'dbus-core' 'glib2') -makedepends=('docbook-xsl' 'xmlto' 'po4a') +depends=('dbus-glib' 'vte3' 'hicolor-icon-theme' 'libsm') +makedepends=('docbook-xsl' 'xmlto' 'po4a' 'python2' 'python2-lockfile' 'imagemagick' 'librsvg') install=roxterm.install -source=(http://downloads.sourceforge.net/roxterm/roxterm-$pkgver.tar.gz) -sha1sums=('e51f24e045fb7ecc38ea0f17b06ed2de3aec92cf') -md5sums=('ad3c2e92c588ab312e8b199a9082efcd') +source=("http://downloads.sourceforge.net/roxterm/roxterm-$pkgver.tar.bz2") +sha1sums=('663f5ffedebde550317cff4b3e61d2772881cd2f') +md5sums=('7c3bb1471f814a8bfdfcf169ad18e425') build() { cd "${srcdir}/roxterm-${pkgver}" - ./configure --prefix=/usr - make + python2 mscript.py configure + python2 mscript.py build } package() { cd "${srcdir}/roxterm-${pkgver}" - make DESTDIR="${pkgdir}" install + python2 mscript.py install --destdir=${pkgdir} --prefix="usr" } # vim:set ts=2 sw=2 et: diff --git a/community/smalltalk/PKGBUILD b/community/smalltalk/PKGBUILD index 3c9a6080d..eb69eeed3 100644 --- a/community/smalltalk/PKGBUILD +++ b/community/smalltalk/PKGBUILD @@ -1,19 +1,23 @@ -# $Id: PKGBUILD 59718 2011-11-29 13:35:33Z stephane $ +# $Id: PKGBUILD 62241 2012-01-18 17:54:17Z tdziedzic $ # Maintainer: Kaiting Chen <kaitocracy@gmail.com> # Contributor: mrshpot <mrshpot at gmail dot com> # Contributor: Michael Fellinger <m.fellinger@gmail.com> pkgname=smalltalk pkgver=3.2.4 -pkgrel=3 +pkgrel=4 pkgdesc='A free implementation of Smalltalk-80 by the GNU project' url='http://smalltalk.gnu.org/' license=('GPL' 'LGPL') arch=('i686' 'x86_64' 'mips64el') -options=('!libtool') +options=('!libtool' '!emptydirs') -depends=('gmp' 'libffi' 'libsigsegv' 'readline') +depends=('gmp' 'libffi' 'libsigsegv' 'readline' 'libltdl') makedepends=('gdbm' 'gtk2' 'sqlite3' 'tk' 'zip') +optdepends=('tk: for gst-blox' + 'sqlite3' + 'sed: for examples' + 'gtk2') source=("ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz") md5sums=('a36a7c9beddca08dc492b500738efc82') @@ -30,8 +34,16 @@ build() { --with-readline \ --with-tcl --with-tk \ --with-x --without-emacs + make } + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make check +} + package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="$pkgdir" install diff --git a/community/springlobby/PKGBUILD b/community/springlobby/PKGBUILD index a9ca89546..d44f0bfcc 100644 --- a/community/springlobby/PKGBUILD +++ b/community/springlobby/PKGBUILD @@ -1,21 +1,22 @@ -# $Id: PKGBUILD 61573 2012-01-03 13:42:06Z svenstaro $ +# $Id: PKGBUILD 62116 2012-01-16 02:08:51Z svenstaro $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: DuGi <dugi@irc.pl> pkgname=springlobby -pkgver=0.140 +pkgver=0.141 pkgrel=1 pkgdesc="A free cross-platform lobby client for the Spring RTS project." arch=('i686' 'x86_64' 'mips64el') url="http://springlobby.info/" license=('GPL2') -depends=('wxgtk' 'curl' 'libtorrent-rasterbar' 'boost-libs') +depends=('hicolor-icon-theme' 'wxgtk' 'curl' 'libtorrent-rasterbar' 'boost-libs') optdepends=('sdl' 'sdl_sound' 'sdl_mixer') makedepends=('boost' 'asio' 'cmake') +install=springlobby.install source=(http://www.springlobby.info/tarballs/${pkgname}-${pkgver}.tar.bz2 springlobby.desktop springlobby.png) -md5sums=('e43fe2f9f1c002669d37e10b0fb2a2f5' +md5sums=('a7e5a9b031a1e72a1df59575289fed3f' '45f8b59d033931d02e734fe3bd7777dd' '1f388187539aeb0358b51995e26ed890') diff --git a/community/springlobby/springlobby.install b/community/springlobby/springlobby.install new file mode 100644 index 000000000..1a05f573e --- /dev/null +++ b/community/springlobby/springlobby.install @@ -0,0 +1,11 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community/stk/PKGBUILD b/community/stk/PKGBUILD index ea4e904e3..1b7a9dba8 100644 --- a/community/stk/PKGBUILD +++ b/community/stk/PKGBUILD @@ -3,7 +3,7 @@ pkgname=stk pkgver=4.4.2 -pkgrel=5 +pkgrel=6 pkgdesc="The Synthesis ToolKit in C++" arch=('i686' 'x86_64' 'mips64el') url="http://ccrma.stanford.edu/software/stk/" @@ -80,6 +80,9 @@ package() { # install license install -Dm644 ../$pkgname.license \ "$pkgdir/usr/share/licenses/stk/LICENSE" + + # remove .DS_Store directory: https://bugs.archlinux.org/task/25255 + rm -rf ${pkgdir}/usr/lib/stk/rawwaves/.DS_Store } # vim:set ts=2 sw=2 et: diff --git a/community/stk/stk.license b/community/stk/stk.license new file mode 100644 index 000000000..613db6ddd --- /dev/null +++ b/community/stk/stk.license @@ -0,0 +1,39 @@ +The Synthesis ToolKit in C++ (STK) is a set of open source audio +signal processing and algorithmic synthesis classes written in the +C++ programming language. STK was designed to facilitate rapid +development of music synthesis and audio processing software, with +an emphasis on cross-platform functionality, realtime control, +ease of use, and educational example code. STK currently runs +with realtime support (audio and MIDI) on Linux, Macintosh OS X, +and Windows computer platforms. Generic, non-realtime support has +been tested under NeXTStep, Sun, and other platforms and should +work with any standard C++ compiler. + +STK WWW site: http://ccrma.stanford.edu/software/stk/ + +The Synthesis ToolKit in C++ (STK) +Copyright (c) 1995-2010 Perry R. Cook and Gary P. Scavone + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +Any person wishing to distribute modifications to the Software is +asked to send the modifications to the original developer so that they +can be incorporated into the canonical version. This is, however, not +a binding provision of this license. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/community/stunnel/PKGBUILD b/community/stunnel/PKGBUILD index e4bb96b47..ed5f0c53c 100644 --- a/community/stunnel/PKGBUILD +++ b/community/stunnel/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 61258 2011-12-26 17:36:12Z dreisner $ +# $Id: PKGBUILD 61992 2012-01-13 15:53:58Z lfleischer $ # Maintainer: Kaiting Chen <kaitocracy@gmail.com> # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> # Contributor: Kevin Piche <kevin@archlinux.org> pkgname=stunnel -pkgver=4.50 -pkgrel=3 +pkgver=4.52 +pkgrel=1 pkgdesc="A program that allows you to encrypt arbitrary TCP connections inside SSL" arch=('i686' 'x86_64' 'mips64el') url="http://www.stunnel.org" @@ -18,10 +18,10 @@ source=("ftp://ftp.stunnel.org/stunnel/$pkgname-$pkgver.tar.gz"{,.asc} 'stunnel.rc.d' 'stunnel.tmpfiles.conf') -md5sums=('d68b4565294496a8bdf23c728a679f53' - 'ea9e85daef0cc96ce21649901b3514f7' +md5sums=('f5e713dda0e8efa659f372832ecd0c2c' + '3e84d222525e724788d3c2b29b899610' 'f15398497e10e080c2406d2fc541660c' - 'cb647c71ff4cb1e035b6e515d5f13ebf' + 'd42a1dda7b44aab73fba670fbcfcc8a6' '2e065a39998e57727ee79887bbd1751e') build() { diff --git a/community/tellico/PKGBUILD b/community/tellico/PKGBUILD index cf6abf2ea..186518a6f 100644 --- a/community/tellico/PKGBUILD +++ b/community/tellico/PKGBUILD @@ -1,12 +1,11 @@ -# $Id: PKGBUILD 61284 2011-12-28 02:21:17Z seblu $ +# $Id: PKGBUILD 62153 2012-01-16 21:08:22Z andrea $ # Maintainer: Ray Rashif <schiv@archlinux.org # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org> -# Contributor: mdv pkgname=tellico -pkgver=2.3.4 -pkgrel=2 +pkgver=2.3.5 +pkgrel=1 pkgdesc="A collection manager for KDE" arch=('i686' 'x86_64' 'mips64el') url="http://tellico-project.org/" @@ -16,7 +15,7 @@ depends=('kdebase-workspace' 'yaz' 'exempi' 'libksane' 'taglib' makedepends=('automoc4' 'cmake') install=$pkgname.install source=("http://tellico-project.org/files/${pkgname}-${pkgver}.tar.bz2") -md5sums=('0a955754e89fc96d9745266ec97410c7') +md5sums=('e6a1835d2622b79c4bfd95271bce858e') build() { cd "${srcdir}" @@ -36,5 +35,3 @@ package() { # fix python 2.7 path find "$pkgdir" -iname "*.py" | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' } - -# vim:set ts=2 sw=2 et: diff --git a/community/tellico/tellico.install b/community/tellico/tellico.install index be3fad925..3f06b8deb 100644 --- a/community/tellico/tellico.install +++ b/community/tellico/tellico.install @@ -10,5 +10,3 @@ post_upgrade() { post_remove() { post_install } - -# vim:set ts=2 sw=2 et: diff --git a/community/tix/PKGBUILD b/community/tix/PKGBUILD index 684ed1441..f82903c16 100644 --- a/community/tix/PKGBUILD +++ b/community/tix/PKGBUILD @@ -1,6 +1,6 @@ -# $Id: PKGBUILD 40224 2011-02-22 01:59:57Z stephane $ +# $Id: PKGBUILD 62313 2012-01-19 07:59:07Z arodseth $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: Brice Méalier <mealier_brice@yahoo.fr> +# Contributor: Brice Méalier <mealier_brice@yahoo.fr> pkgname=tix pkgver=8.4.3 diff --git a/community/tomoyo-tools/PKGBUILD b/community/tomoyo-tools/PKGBUILD index c21b75200..a9bd200a1 100644 --- a/community/tomoyo-tools/PKGBUILD +++ b/community/tomoyo-tools/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 58253 2011-11-09 13:16:03Z spupykin $ +# $Id: PKGBUILD 62318 2012-01-19 08:04:12Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Jamie Nguyen <jamie AT tomoyolinux.co.uk> pkgname=tomoyo-tools -_basever=2.4.0 +_basever=2.5.0 _timestamp=20111025 -_file=52848 +_file=53357 pkgver=${_basever}.${_timestamp} pkgrel=1 pkgdesc='TOMOYO Linux 2.3.x userspace tools for Linux kernels 2.6.36 - 3.0' @@ -17,7 +17,7 @@ depends=('ncurses') conflicts=('ccs-tools') install=tomoyo-tools.install source=("http://sourceforge.jp/frs/redir.php?f=/tomoyo/${_file}/${pkgname}-${_basever}-${_timestamp}.tar.gz") -md5sums=('eeee0afbccae2291e16dbbb64cf85370') +md5sums=('99999779698ea5f44c74d49e8c640ec1') build() { cd "${srcdir}/${pkgname}" diff --git a/community/twinkle/PKGBUILD b/community/twinkle/PKGBUILD index 850dad358..e35b2fd7c 100644 --- a/community/twinkle/PKGBUILD +++ b/community/twinkle/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 59974 2011-12-02 21:01:27Z ibiru $ -# Maintainer: +# $Id: PKGBUILD 62127 2012-01-16 09:29:34Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Jeff Mickey <jeff@archlinux.org> # Contributor: Alexander Baldeck <alexander@archlinux.org> # Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com> pkgname=twinkle pkgver=1.4.2 -pkgrel=12 +pkgrel=13 pkgdesc="A softphone for voice over IP and instant messaging communications using the SIP protocol" arch=('i686' 'x86_64' 'mips64el') url="http://www.twinklephone.com/" @@ -21,8 +21,9 @@ build() { cd ${srcdir}/${pkgname}-${pkgver} . /etc/profile.d/qt3.sh ./configure --prefix=/usr \ - --without-kde \ - --with-speex + --without-kde \ + --with-speex \ + --without-ilbc make } diff --git a/community/vdrift/PKGBUILD b/community/vdrift/PKGBUILD index 97439f4f2..c5facfb67 100644 --- a/community/vdrift/PKGBUILD +++ b/community/vdrift/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 57538 2011-10-30 16:10:55Z svenstaro $ +# $Id: PKGBUILD 62149 2012-01-16 19:53:31Z dreisner $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Anton Bazhenov <anton.bazhenov at gmail> # Contributor: Lone_Wolf lonewolf@xs4all.nl pkgname=vdrift pkgver=2011.10.22 -pkgrel=1 +pkgrel=3 pkgdesc="An open source driving simulation made with drift racing in mind" arch=('i686' 'x86_64' 'mips64el') url="http://vdrift.net/" @@ -14,6 +14,7 @@ depends=('bullet' 'curl' 'sdl_gfx' 'sdl_image' 'glew' 'libvorbis' 'vdrift-data') makedepends=('scons' 'boost' 'asio') source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-${pkgver//./-}.tar.bz2) md5sums=('6f8806ab1be303e9e1e47522c9eee890') +install=vdrift.install build() { cd "$srcdir"/$pkgname-${pkgver//./-} @@ -29,7 +30,7 @@ build() { #sed -i '/types.h/d' src/http.h # build and install - scons \ + scons $MAKEFLAGS \ "destdir"="$pkgdir" \ "arch"=$_sconsarch \ "release"=1 \ diff --git a/community/vdrift/vdrift.install b/community/vdrift/vdrift.install new file mode 100644 index 000000000..868f6717b --- /dev/null +++ b/community/vdrift/vdrift.install @@ -0,0 +1,11 @@ +post_upgrade() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} diff --git a/community/vhba-module/PKGBUILD b/community/vhba-module/PKGBUILD index 0fbc59ffe..d3a518972 100644 --- a/community/vhba-module/PKGBUILD +++ b/community/vhba-module/PKGBUILD @@ -1,19 +1,18 @@ -# $Id: PKGBUILD 58264 2011-11-09 15:50:55Z jelle $ +# $Id: PKGBUILD 62359 2012-01-19 16:30:10Z ibiru $ # Maintainer: Mateusz Herych <heniekk@gmail.com> # Contributor: Charles Lindsay <charles@chaoslizard.org> pkgname=vhba-module pkgver=20110915 -#_kernver='3.1.0-ARCH' -_extramodules=extramodules-3.1-ARCH +_extramodules=extramodules-3.2-ARCH _kernver="$(cat /lib/modules/${_extramodules}/version)" -pkgrel=2 +pkgrel=3 pkgdesc="Kernel module that emulates SCSI devices" arch=('i686' 'x86_64' 'mips64el') url="http://cdemu.sourceforge.net/" license=('GPL2') -depends=('linux>=3.1' 'linux<3.2') -makedepends=('linux-headers>=3.1') +depends=('linux>=3.2' 'linux<3.3') +makedepends=('linux-headers>=3.2') install=vhba-module.install source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.gz) md5sums=('fb90cd8fc4cd74d08c92e8235f99f1f4') diff --git a/community/vhba-module/vhba-module.install b/community/vhba-module/vhba-module.install index eca9bb285..665a1d3c5 100644 --- a/community/vhba-module/vhba-module.install +++ b/community/vhba-module/vhba-module.install @@ -1,7 +1,7 @@ post_install() { echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot." echo ">> This module needs to be recompiled for every kernel version upgrade." - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } @@ -10,7 +10,7 @@ post_upgrade() { } post_remove() { - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD index b4fa346e8..8ff5888e8 100644 --- a/community/virtualbox-modules/PKGBUILD +++ b/community/virtualbox-modules/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 60898 2011-12-19 18:08:36Z ibiru $ +# $Id: PKGBUILD 62232 2012-01-18 17:19:12Z ibiru $ #Maintainer: Ionut Biru <ibiru@archlinux.org> pkgbase=virtualbox-modules pkgname=('virtualbox-modules' 'virtualbox-archlinux-modules') pkgver=4.1.8 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url='http://virtualbox.org' license=('GPL') @@ -16,7 +16,7 @@ md5sums=('2092bba46baa62fab5520d67dee2ece8' '4c88bd122677a35f68abd76eb01b378b' 'ed1341881437455d9735875ddf455fbe') -_extramodules=extramodules-3.1-ARCH +_extramodules=extramodules-3.2-ARCH _kernver="$(cat /lib/modules/${_extramodules}/version || true)" export KERN_DIR=/lib/modules/${_kernver}/build @@ -51,7 +51,7 @@ package_virtualbox-archlinux-modules(){ pkgdesc="Additions only for Arch Linux guests (kernel modules)" license=('GPL') install=virtualbox-archlinux-modules.install - depends=('linux>=3.1' 'linux<3.2') + depends=('linux>=3.2' 'linux<3.3') replaces=('virtualbox-guest-modules') conflicts=('virtualbox-guest-modules') @@ -76,7 +76,7 @@ package_virtualbox-modules(){ pkgdesc="Kernel modules for VirtualBox" license=('GPL') install=virtualbox-modules.install - depends=('linux>=3.1' 'linux<3.2') + depends=('linux>=3.2' 'linux<3.3') source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" diff --git a/community/virtualbox-modules/virtualbox-archlinux-modules.install b/community/virtualbox-modules/virtualbox-archlinux-modules.install index 39a0e4063..74af049cc 100644 --- a/community/virtualbox-modules/virtualbox-archlinux-modules.install +++ b/community/virtualbox-modules/virtualbox-archlinux-modules.install @@ -2,16 +2,16 @@ post_install() { cat << EOF ===> You may want to load vboxguest, vboxsf and vboxvideo EOF - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_upgrade() { - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_remove() { - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } diff --git a/community/virtualbox-modules/virtualbox-modules.install b/community/virtualbox-modules/virtualbox-modules.install index ec29d3a87..eeab16ca9 100644 --- a/community/virtualbox-modules/virtualbox-modules.install +++ b/community/virtualbox-modules/virtualbox-modules.install @@ -3,17 +3,17 @@ post_install() { ===> You must load vboxdrv module before starting VirtualBox: ===> # modprobe vboxdrv EOF - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } post_upgrade() { - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) echo 'In order to use the new version, reload all virtualbox modules manually.' } post_remove() { - EXTRAMODULES='extramodules-3.1-ARCH' + EXTRAMODULES='extramodules-3.2-ARCH' depmod $(cat /lib/modules/$EXTRAMODULES/version) } diff --git a/community/xmonad/PKGBUILD b/community/xmonad/PKGBUILD index 95051d2dc..0d015a40d 100644 --- a/community/xmonad/PKGBUILD +++ b/community/xmonad/PKGBUILD @@ -1,16 +1,17 @@ -# $Id: PKGBUILD 60796 2011-12-18 11:10:08Z jelle $ +# $Id: PKGBUILD 62068 2012-01-15 15:18:39Z jelle $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Vesa Kaihlavirta <vegai@iki.fi> # Contributor: shild <shildv@gmail.com> pkgname=xmonad pkgver=0.10 -pkgrel=1 +pkgrel=2 pkgdesc="A lightweight X11 tiled window manager written in Haskell" arch=('i686' 'x86_64' 'mips64el') url="http://xmonad.org/" license=('BSD') depends=('ghc=7.0.3' 'gmp' 'haskell-x11=1.5.0.1' 'sh' 'haskell-mtl=2.0.1.0' 'haskell-utf8-string=0.3.6') +optdepends=('xorg-xmessage: for displaying visual error messages') install='xmonad.install' source=(http://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz xmonad.desktop |