diff options
author | root <root@rshg054.dnsready.net> | 2013-03-23 00:06:21 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-03-23 00:06:21 -0700 |
commit | a42cd7aaabfdb3ecc0a538548e8dbcc7ca860b2d (patch) | |
tree | bbea919c4d1e7d8d747e636040d0cd510c279d68 | |
parent | 6b3123e5628817e3cef9c44989dffd21c49b0817 (diff) |
Sat Mar 23 00:06:20 PDT 2013
95 files changed, 7483 insertions, 2298 deletions
diff --git a/community/bbswitch/PKGBUILD b/community/bbswitch/PKGBUILD index 3dbf06f98..9552835c9 100644 --- a/community/bbswitch/PKGBUILD +++ b/community/bbswitch/PKGBUILD @@ -3,9 +3,9 @@ # Contributor: Samsagax <samsagax@gmail.com> pkgname=bbswitch -pkgver=0.5 +pkgver=0.6 _extramodules=extramodules-3.8-ARCH # Don't forget to update bbswitch.install -pkgrel=3 +pkgrel=1 pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops" arch=('i686' 'x86_64') url=("http://github.com/Bumblebee-Project/bbswitch") @@ -13,17 +13,14 @@ license=('GPL') depends=('linux>=3.8' 'linux<3.9') makedepends=('linux-headers>=3.8' 'linux-headers<3.9') install=bbswitch.install -source=("https://github.com/downloads/Bumblebee-Project/bbswitch/${pkgname}-${pkgver}.tar.gz" - "https://github.com/Bumblebee-Project/bbswitch/commit/5593d9519364dc7f6f28c3dd8358afb907f39c0f.patch") -md5sums=('5e0e6eb9c5e8c10db56e5b349b43bba7' - 'd76180b8f6fd092038d5ae7c71a9caa8') +source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz") +md5sums=('c5496e3225c8e70d02a24bfd8a50faf6') build() { cd ${srcdir}/${pkgname}-${pkgver} _kernver="$(cat /usr/lib/modules/${_extramodules}/version)" - patch -Np1 < ${srcdir}/5593d9519364dc7f6f28c3dd8358afb907f39c0f.patch make KDIR=/usr/src/linux-${_kernver} } diff --git a/community/bsd-games/PKGBUILD b/community/bsd-games/PKGBUILD index 470e8a2f0..00bb7c247 100644 --- a/community/bsd-games/PKGBUILD +++ b/community/bsd-games/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 73816 2012-07-15 23:02:25Z cbrannon $ +# $Id: PKGBUILD 86789 2013-03-22 02:13:44Z eric $ # Maintainer: Chris Brannon <cmbrannon79@gmail.com> # Contributor: Abhishek Dasgupta <abhidg@gmail.com> # Contributor: SmackleFunky <smacklefunky@optusnet.com.au> @@ -17,15 +17,21 @@ source=(ftp://ftp.ibiblio.org/pub/Linux/games/$pkgname-$pkgver.tar.gz config.params stdio.h.diff gamescreen.h.diff getline.diff number.c.diff bsd-games-2.17-64bit.patch bad-ntohl-cast.diff null-check.diff) +md5sums=('238a38a3a017ca9b216fc42bde405639' + '9916baef5cb8aa09361f67de12ca7bef' + '784f68c796b9e099ac008aecef1af998' + '9c0fa6e2345bd0a7945c9a41d5ba68aa' + '5356bd6999ae53dd27cb2a0f837a3e70' + '47249a90f38ccb4dd07625b245bbc728' + '257813b76a41c8b2c02701571c804227' + '3d21a9dad2e603ddf3842972e4ff85a1' + 'a43ca0b4b9ebc4eec26372c52014ac0a') build() { cd "${srcdir}/$pkgname-$pkgver" [ "$CARCH" = "x86_64" ] && patch -p1 < "$srcdir/bsd-games-2.17-64bit.patch" cp "${srcdir}/config.params" . -# Patches - sed -i "s%PKGDIR%$pkgdir%" config.params - # Several games use their own internal functions named getline. All # are different, and none is the getline from glibc. So we need a patch # in order to compile. Each internal getline function is prefixed @@ -65,6 +71,7 @@ build() { package() { cd "${srcdir}/$pkgname-$pkgver" + sed -i "s%PKGDIR%$pkgdir%g" hide-game install-man install-score Makeconfig subst.sed make install # This make install command does install to $pkgdir, because of the # change to config.params in the build function. @@ -91,12 +98,3 @@ package() { install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/COPYING" } -md5sums=('238a38a3a017ca9b216fc42bde405639' - '9916baef5cb8aa09361f67de12ca7bef' - '784f68c796b9e099ac008aecef1af998' - '9c0fa6e2345bd0a7945c9a41d5ba68aa' - '5356bd6999ae53dd27cb2a0f837a3e70' - '47249a90f38ccb4dd07625b245bbc728' - '257813b76a41c8b2c02701571c804227' - '3d21a9dad2e603ddf3842972e4ff85a1' - 'a43ca0b4b9ebc4eec26372c52014ac0a') diff --git a/community/cinnamon-control-center/PKGBUILD b/community/cinnamon-control-center/PKGBUILD index c066ea4b3..74b724004 100644 --- a/community/cinnamon-control-center/PKGBUILD +++ b/community/cinnamon-control-center/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 85563 2013-03-03 05:46:41Z bgyorgy $ +# $Id: PKGBUILD 86850 2013-03-22 21:27:24Z faidoc $ # Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com # Based on gnome-control-center: # Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Jan de Groot <jgc@archlinux.org> pkgname=cinnamon-control-center -pkgver=1.7.1 -pkgrel=3 +pkgver=1.7.2 +pkgrel=1 pkgdesc="The Control Center for Cinnamon" arch=('i686' 'x86_64') depends=('cinnamon' 'cheese' 'libgtop' 'network-manager-applet') @@ -17,34 +17,12 @@ url="https://github.com/linuxmint/cinnamon-control-center" install=cinnamon-control-center.install license=('GPL') options=('!libtool' '!emptydirs') -source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz" - "pulse3.0.patch" - "sound-nua-rename.patch" - "fix-audio-input-icons.patch" - "fix-faces-location.patch") -sha256sums=('eab36af1accfce7b4d5eaf07a865d7290add07b875ed5e52072c1ad2e8570c1e' - 'ddf7c99a1d45a7be54e69e90f194e33f3e56a7f294aa369bfb2e541d8241156e' - '2f49543e4ccabf5c8ce1cd9e4c37e5b291c23cff494eaa671857b2dcf7af4c5b' - '2cefa2764db206c9c6258e3f374988056907dda0c5bbeedbc249fc7c058a0d6b' - '7360f3e018765e80a7afc5a469c1d54ec3fdeb7e58c867596ef26773fb8e7a8a') +source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz") +sha256sums=('09af52ae7417b611b91ca9fdafbde08c68356f2b66241780b513ad2249a831c1') build() { cd $pkgname-$pkgver - patch -Np1 -i ../pulse3.0.patch - - # Upstream patch: Change sound module registered name from sound-nua to 'sound' - patch -Np1 -i ../sound-nua-rename.patch - - # Fix icons on Sound preferences dialog - patch -Np1 -i ../fix-audio-input-icons.patch - - # Fix faces location on User accounts dialog - patch -Np1 -i ../fix-faces-location.patch - - # Use freedesktop as default sound theme instead of ubuntu (otherwise the Sound panel craches) - patch -RNp1 -i debian/patches/98_default_sound_theme.patch - autoreconf -fi ./configure --prefix=/usr --sysconfdir=/etc \ diff --git a/community/cinnamon-control-center/fix-audio-input-icons.patch b/community/cinnamon-control-center/fix-audio-input-icons.patch deleted file mode 100644 index 77c9b3c5b..000000000 --- a/community/cinnamon-control-center/fix-audio-input-icons.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur cinnamon-control-center-1.7.1.orig/panels/sound-nua/gvc-mixer-dialog.c cinnamon-control-center-1.7.1/panels/sound-nua/gvc-mixer-dialog.c ---- cinnamon-control-center-1.7.1.orig/panels/sound-nua/gvc-mixer-dialog.c 2013-02-19 17:37:17.000000000 +0100 -+++ cinnamon-control-center-1.7.1/panels/sound-nua/gvc-mixer-dialog.c 2013-02-26 23:12:37.192399508 +0100 -@@ -1929,9 +1929,9 @@ - gvc_channel_bar_set_name (GVC_CHANNEL_BAR (self->priv->input_bar), - _("_Input volume:")); - gvc_channel_bar_set_low_icon_name (GVC_CHANNEL_BAR (self->priv->input_bar), -- "audio-input-microphone-low-symbolic"); -+ "cin-audio-input-microphone-low-symbolic"); - gvc_channel_bar_set_high_icon_name (GVC_CHANNEL_BAR (self->priv->input_bar), -- "audio-input-microphone-high-symbolic"); -+ "cin-audio-input-microphone-high-symbolic"); - gtk_widget_set_sensitive (self->priv->input_bar, FALSE); - - if (self->priv->size_group != NULL) { diff --git a/community/cinnamon-control-center/fix-faces-location.patch b/community/cinnamon-control-center/fix-faces-location.patch deleted file mode 100644 index 1af65fa99..000000000 --- a/community/cinnamon-control-center/fix-faces-location.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur cinnamon-control-center-1.7.1.orig/panels/user-accounts/um-photo-dialog.c cinnamon-control-center-1.7.1/panels/user-accounts/um-photo-dialog.c ---- cinnamon-control-center-1.7.1.orig/panels/user-accounts/um-photo-dialog.c 2013-02-19 17:37:17.000000000 +0100 -+++ cinnamon-control-center-1.7.1/panels/user-accounts/um-photo-dialog.c 2013-02-27 19:17:18.249329833 +0100 -@@ -406,7 +406,7 @@ - for (i = 0; dirs[i] != NULL; i++) { - char *path; - -- path = g_build_filename (dirs[i], "pixmaps", "faces", NULL); -+ path = g_build_filename (dirs[i], "pixmaps", "cinnamon", "faces", NULL); - dir = g_dir_open (path, 0, NULL); - if (dir == NULL) { - g_free (path); diff --git a/community/cinnamon-control-center/pulse3.0.patch b/community/cinnamon-control-center/pulse3.0.patch deleted file mode 100644 index 9341b788e..000000000 --- a/community/cinnamon-control-center/pulse3.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 10a0c18b8e3058144586880019b68ab4ea40ce78 Mon Sep 17 00:00:00 2001 -From: David Henningsson <david.henningsson@canonical.com> -Date: Fri, 07 Dec 2012 10:52:09 +0000 -Subject: sound: Fix port handling for the unknown availability case - -The current code assumes that port availability transitions will be -between YES and NO, and doesn't account for the fact that it may also be -UNKNOWN. This causes spurious entries if the port availability -transitions between YES and UNKNOWN. ---- -diff --git a/panels/sound/gvc-mixer-control.c b/panels/sound/gvc-mixer-control.c -index 34ddc0c..2f6cf34 100644 ---- a/panels/sound/gvc-mixer-control.c -+++ b/panels/sound/gvc-mixer-control.c -@@ -2138,7 +2138,7 @@ update_card (GvcMixerControl *control, - else { - for (i = 0; i < info->n_ports; i++) { - if (g_strcmp0 (card_port->port, info->ports[i]->name) == 0) { -- if (card_port->available != info->ports[i]->available) { -+ if ((card_port->available == PA_PORT_AVAILABLE_NO) != (info->ports[i]->available == PA_PORT_AVAILABLE_NO)) { - card_port->available = info->ports[i]->available; - g_debug ("sync port availability on card %i, card port name '%s', new available value %i", - gvc_mixer_card_get_index (card), --- -cgit v0.9.0.2
\ No newline at end of file diff --git a/community/cinnamon-control-center/sound-nua-rename.patch b/community/cinnamon-control-center/sound-nua-rename.patch deleted file mode 100644 index fb25b9f42..000000000 --- a/community/cinnamon-control-center/sound-nua-rename.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/panels/sound-nua/cc-sound-panel.c b/panels/sound-nua/cc-sound-panel.c -index 1c115f0..092f319 100644 ---- a/panels/sound-nua/cc-sound-panel.c -+++ b/panels/sound-nua/cc-sound-panel.c -@@ -120,7 +120,7 @@ enum { - cc_sound_panel_register_type (G_TYPE_MODULE (module)); - g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, - CC_TYPE_SOUND_PANEL, -- "sound-nua", 0); -+ "sound", 0); - } - - /* GIO extension stuff */ -diff --git a/panels/sound/cc-sound-panel.c b/panels/sound/cc-sound-panel.c -index 2f69c0f..3b78ce2 100644 ---- a/panels/sound/cc-sound-panel.c -+++ b/panels/sound/cc-sound-panel.c -@@ -127,7 +127,7 @@ enum { - cc_sound_panel_register_type (G_TYPE_MODULE (module)); - g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, - CC_TYPE_SOUND_PANEL, -- "sound", 0); -+ "gnome-sound", 0); - } - - /* GIO extension stuff */ diff --git a/community/cinnamon/PKGBUILD b/community/cinnamon/PKGBUILD index 722ca2356..594f40855 100644 --- a/community/cinnamon/PKGBUILD +++ b/community/cinnamon/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 86162 2013-03-12 14:14:05Z faidoc $ +# $Id: PKGBUILD 86852 2013-03-22 21:33:07Z faidoc $ # Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com> # Contributor: M0Rf30 # Contributor: unifiedlinux # Contributor: CReimer pkgname=cinnamon -pkgver=1.7.2 -pkgrel=3 +pkgver=1.7.3 +pkgrel=1 pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience" arch=('i686' 'x86_64') url="http://cinnamon.linuxmint.com/" @@ -24,13 +24,11 @@ optdepends=('cinnamon-control-center: extended configurations for Cinnamon' options=('!libtool' '!emptydirs') install=${pkgname}.install source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/tarball/$pkgver" - "gnome-autogen.sh" "keyboard_applet.patch" "fix-control-center-check.patch") -md5sums=('d136978607d2584ea1ca29db436f96df' - 'a925691c9b57a6a884dcf07da057fd1f' +md5sums=('c733e2a2280508aecf3ee010587e6743' '2b1ece84416c3e4de030be15f1774d82' - 'fd429779aa986ffb3f481149f19a0baf') + 'c3f25b06d345d9d36c197cd96e08f496') build() { cd ${srcdir}/linuxmint-Cinnamon* @@ -42,10 +40,6 @@ build() { # Check for the cc-panel path, not for the unneeded binary patch -Np1 -i ${srcdir}/fix-control-center-check.patch - cp ${srcdir}/gnome-autogen.sh . - sed -i 's/\ --warn-all\ --warn-error//' src/Makefile.am - sed -i 's/gnome-autogen.sh/.\/gnome-autogen.sh/g' autogen.sh - chmod +x gnome-autogen.sh ./autogen.sh --prefix=/usr \ --sysconfdir=/etc \ diff --git a/community/cinnamon/fix-control-center-check.patch b/community/cinnamon/fix-control-center-check.patch index 4c7b3bb0e..981b1c1a5 100644 --- a/community/cinnamon/fix-control-center-check.patch +++ b/community/cinnamon/fix-control-center-check.patch @@ -9,4 +9,4 @@ diff -Naur cinnamon-1.7.1.orig/files/usr/bin/cinnamon-settings cinnamon-1.7.1/fi + elif os.path.exists("/usr/lib/cinnamon-control-center-1/panels"): print "Unknown module %s, using cinnamon-control-center" % module os.execvp("/usr/lib/cinnamon-settings/cinnamon-settings.py", ("",) + tuple(sys.argv[1:])) - elif os.path.exists("/usr/bin/gnome-control-center"): + elif os.path.exists("/usr/bin/gnome-control-center"):
\ No newline at end of file diff --git a/community/cinnamon/gnome-autogen.sh b/community/cinnamon/gnome-autogen.sh deleted file mode 100644 index 2467a1de2..000000000 --- a/community/cinnamon/gnome-autogen.sh +++ /dev/null @@ -1,538 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -#name of package -test "$PKG_NAME" || PKG_NAME=Package -test "$srcdir" || srcdir=. - -# default version requirements ... -test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53 -test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9 -test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3 -test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40 -test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0 -test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25 -test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0 -test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0 -test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0 -test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2 - -# a list of required m4 macros. Package can set an initial value -test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS= -test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS= - -# Not all echo versions allow -n, so we check what is possible. This test is -# based on the one in autoconf. -ECHO_C= -ECHO_N= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ;; - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -# some terminal codes ... -if tty < /dev/null 1>/dev/null 2>&1; then - boldface="`tput bold 2>/dev/null`" - normal="`tput sgr0 2>/dev/null`" -else - boldface= - normal= -fi -printbold() { - echo $ECHO_N "$boldface" $ECHO_C - echo "$@" - echo $ECHO_N "$normal" $ECHO_C -} -printerr() { - echo "$@" >&2 -} - -# Usage: -# compare_versions MIN_VERSION ACTUAL_VERSION -# returns true if ACTUAL_VERSION >= MIN_VERSION -compare_versions() { - ch_min_version=$1 - ch_actual_version=$2 - ch_status=0 - IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." - set $ch_actual_version - for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes - if [ -z "$ch_min" ]; then break; fi - if [ -z "$ch_cur" ]; then ch_status=1; break; fi - if [ $ch_cur -gt $ch_min ]; then break; fi - if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi - done - IFS="$ch_save_IFS" - return $ch_status -} - -# Usage: -# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE -# checks to see if the package is available -version_check() { - vc_package=$1 - vc_variable=$2 - vc_checkprogs=$3 - vc_min_version=$4 - vc_source=$5 - vc_status=1 - - vc_checkprog=`eval echo "\\$$vc_variable"` - if [ -n "$vc_checkprog" ]; then - printbold "using $vc_checkprog for $vc_package" - return 0 - fi - - if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then - vc_comparator="=" - else - vc_comparator=">=" - fi - printbold "checking for $vc_package $vc_comparator $vc_min_version..." - for vc_checkprog in $vc_checkprogs; do - echo $ECHO_N " testing $vc_checkprog... " $ECHO_C - if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then - vc_actual_version=`$vc_checkprog --version | head -n 1 | \ - sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` - if compare_versions $vc_min_version $vc_actual_version; then - echo "found $vc_actual_version" - # set variables - eval "$vc_variable=$vc_checkprog; \ - ${vc_variable}_VERSION=$vc_actual_version" - vc_status=0 - break - else - echo "too old (found version $vc_actual_version)" - fi - else - echo "not found." - fi - done - if [ "$vc_status" != 0 ]; then - printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed" - printerr " to build $PKG_NAME. Download the appropriate package for" - printerr " from your distribution or get the source tarball at" - printerr " $vc_source" - printerr - exit $vc_status - fi - return $vc_status -} - -# Usage: -# require_m4macro filename.m4 -# adds filename.m4 to the list of required macros -require_m4macro() { - case "$REQUIRED_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; - esac -} - -forbid_m4macro() { - case "$FORBIDDEN_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; - esac -} - -# Usage: -# add_to_cm_macrodirs dirname -# Adds the dir to $cm_macrodirs, if it's not there yet. -add_to_cm_macrodirs() { - case $cm_macrodirs in - "$1 "* | *" $1 "* | *" $1") ;; - *) cm_macrodirs="$cm_macrodirs $1";; - esac -} - -# Usage: -# print_m4macros_error -# Prints an error message saying that autoconf macros were misused -print_m4macros_error() { - printerr "***Error***: some autoconf macros required to build $PKG_NAME" - printerr " were not found in your aclocal path, or some forbidden" - printerr " macros were found. Perhaps you need to adjust your" - printerr " ACLOCAL_FLAGS?" - printerr -} - -# Usage: -# check_m4macros -# Checks that all the requested macro files are in the aclocal macro path -# Uses REQUIRED_M4MACROS and ACLOCAL variables. -check_m4macros() { - # construct list of macro directories - cm_macrodirs=`$ACLOCAL --print-ac-dir` - # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9 - # but it contains only Automake's own macros, so we can ignore it. - - # Read the dirlist file, supported by Automake >= 1.7. - # If AUTOMAKE was defined, no version was detected. - if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then - cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` - if [ -n "$cm_dirlist" ] ; then - for cm_dir in $cm_dirlist; do - if [ -d $cm_dir ]; then - add_to_cm_macrodirs $cm_dir - fi - done - fi - fi - - # Parse $ACLOCAL_FLAGS - set - $ACLOCAL_FLAGS - while [ $# -gt 0 ]; do - if [ "$1" = "-I" ]; then - add_to_cm_macrodirs "$2" - shift - fi - shift - done - - cm_status=0 - if [ -n "$REQUIRED_M4MACROS" ]; then - printbold "Checking for required M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $REQUIRED_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - # The macro dir in Cygwin environments may contain a file - # called dirlist containing other directories to look in. - if [ -f "$cm_dir/dirlist" ]; then - for cm_otherdir in `cat $cm_dir/dirlist`; do - if [ -f "$cm_otherdir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - fi - done - if $cm_macrofound; then - : - else - printerr " $cm_macro not found" - cm_status=1 - fi - done - fi - if [ "$cm_status" != 0 ]; then - print_m4macros_error - exit $cm_status - fi - if [ -n "$FORBIDDEN_M4MACROS" ]; then - printbold "Checking for forbidden M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $FORBIDDEN_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - if $cm_macrofound; then - printerr " $cm_macro found (should be cleared from macros dir)" - cm_status=1 - fi - done - fi - if [ "$cm_status" != 0 ]; then - print_m4macros_error - exit $cm_status - fi -} - -# try to catch the case where the macros2/ directory hasn't been cleared out. -forbid_m4macro gnome-cxx-check.m4 - -want_libtool=false -want_gettext=false -want_glib_gettext=false -want_intltool=false -want_pkg_config=false -want_gtk_doc=false -want_gnome_doc_utils=false -want_maintainer_mode=false - -find_configure_files() { - configure_ac= - if test -f "$1/configure.ac"; then - configure_ac="$1/configure.ac" - elif test -f "$1/configure.in"; then - configure_ac="$1/configure.in" - fi - if test "x$configure_ac" != x; then - echo "$configure_ac" - # TODO We have not detected the right autoconf yet! - autoconf -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do - find_configure_files "$1/$dir" - done - fi -} - -configure_files="`find_configure_files $srcdir`" - -for configure_ac in $configure_files; do - dirname=`dirname $configure_ac` - if [ -f $dirname/NO-AUTO-GEN ]; then - echo skipping $dirname -- flagged as no auto-gen - continue - fi - if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null || - grep "^LT_INIT" $configure_ac >/dev/null; then - want_libtool=true - fi - if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then - want_gettext=true - fi - if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then - want_glib_gettext=true - fi - if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null || - grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then - want_intltool=true - fi - if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then - want_pkg_config=true - fi - if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then - want_gtk_doc=true - fi - if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then - want_gnome_doc_utils=true - fi - - # check that AM_MAINTAINER_MODE is used - if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then - want_maintainer_mode=true - fi - - if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then - require_m4macro yelp.m4 - fi - - # check to make sure gnome-common macros can be found ... - if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null || - grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null || - grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then - require_m4macro gnome-common.m4 - fi - if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null || - grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then - require_m4macro gnome-compiler-flags.m4 - fi - if grep "^GNOME_CODE_COVERAGE" $configure_ac >/dev/null; then - require_m4macro gnome-code-coverage.m4 - fi -done - -#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13 -WANT_AUTOCONF_2_5=1 -export WANT_AUTOCONF_2_5 -version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ - "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" -AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` - -case $REQUIRED_AUTOMAKE_VERSION in - 1.4*) automake_progs="automake-1.4" ;; - 1.5*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;; - 1.6*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;; - 1.7*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;; - 1.8*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;; - 1.9*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;; - 1.10*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10" ;; - 1.11*) automake_progs="automake-1.13 automake-1.12 automake-1.11" ;; - 1.12*) automake_progs="automake-1.13 automake-1.12" ;; - 1.13*) automake_progs="automake-1.13" ;; -esac -version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ - "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" -ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` - -if $want_libtool; then - version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION \ - "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" - require_m4macro libtool.m4 -fi - -if $want_gettext; then - version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ - "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" - require_m4macro gettext.m4 -fi - -if $want_glib_gettext; then - version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ - "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" - require_m4macro glib-gettext.m4 -fi - -if $want_intltool; then - version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/intltool/" - require_m4macro intltool.m4 -fi - -if $want_pkg_config; then - version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ - "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" - require_m4macro pkg.m4 -fi - -if $want_gtk_doc; then - version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" - require_m4macro gtk-doc.m4 -fi - -if $want_gnome_doc_utils; then - version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" -fi - -if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - version_check gnome-common DOC_COMMON gnome-doc-common \ - $REQUIRED_DOC_COMMON_VERSION " " -fi - -check_m4macros - -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then - printerr "**Warning**: I am going to run \`configure' with no arguments." - printerr "If you wish to pass any to it, please specify them on the" - printerr \`$0\'" command line." - printerr -fi - -topdir=`pwd` -for configure_ac in $configure_files; do - dirname=`dirname $configure_ac` - basename=`basename $configure_ac` - if [ -f $dirname/NO-AUTO-GEN ]; then - echo skipping $dirname -- flagged as no auto-gen - elif [ ! -w $dirname ]; then - echo skipping $dirname -- directory is read only - else - printbold "Processing $configure_ac" - cd $dirname - - # Note that the order these tools are called should match what - # autoconf's "autoupdate" package does. See bug 138584 for - # details. - - # programs that might install new macros get run before aclocal - if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null || - grep "^LT_INIT" $basename >/dev/null; then - printbold "Running $LIBTOOLIZE..." - $LIBTOOLIZE --force --copy || exit 1 - fi - - if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then - printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 - elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then - if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then - printbold "Running autopoint..." - autopoint --force || exit 1 - else - printbold "Running $GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GETTEXTIZE --force --copy || exit 1 - fi - fi - - if grep "^AC_PROG_INTLTOOL" $basename >/dev/null || - grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then - printbold "Running $INTLTOOLIZE..." - $INTLTOOLIZE --force --copy --automake || exit 1 - fi - if grep "^GTK_DOC_CHECK" $basename >/dev/null; then - printbold "Running $GTKDOCIZE..." - $GTKDOCIZE --copy || exit 1 - fi - - if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - printbold "Running gnome-doc-common..." - gnome-doc-common --copy || exit 1 - fi - if grep "^GNOME_DOC_INIT" $basename >/dev/null; then - printbold "Running $GNOME_DOC_PREPARE..." - $GNOME_DOC_PREPARE --force --copy || exit 1 - fi - - # Now run aclocal to pull in any additional macros needed - - # if the AC_CONFIG_MACRO_DIR() macro is used, pass that - # directory to aclocal. - m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` - if [ -n "$m4dir" ]; then - m4dir="-I $m4dir" - fi - printbold "Running $ACLOCAL..." - $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1 - - if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then - printerr "*** obsolete gnome macros were used in $configure_ac" - fi - - # Now that all the macros are sorted, run autoconf and autoheader ... - printbold "Running $AUTOCONF..." - $AUTOCONF || exit 1 - if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then - printbold "Running $AUTOHEADER..." - $AUTOHEADER || exit 1 - # this prevents automake from thinking config.h.in is out of - # date, since autoheader doesn't touch the file if it doesn't - # change. - test -f config.h.in && touch config.h.in - fi - - # Finally, run automake to create the makefiles ... - printbold "Running $AUTOMAKE..." - if [ -f COPYING ]; then - cp -pf COPYING COPYING.autogen_bak - fi - if [ -f INSTALL ]; then - cp -pf INSTALL INSTALL.autogen_bak - fi - if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then - $AUTOMAKE --gnu --add-missing --copy -Wno-portability || exit 1 - else - $AUTOMAKE --gnu --add-missing --copy || exit 1 - fi - if [ -f COPYING.autogen_bak ]; then - cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING - rm -f COPYING.autogen_bak - fi - if [ -f INSTALL.autogen_bak ]; then - cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL - rm -f INSTALL.autogen_bak - fi - - cd "$topdir" - fi -done - -conf_flags="" - -if $want_maintainer_mode; then - conf_flags="--enable-maintainer-mode" -fi - -if test x$NOCONFIGURE = x; then - printbold Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/community/couchdb/PKGBUILD b/community/couchdb/PKGBUILD index c09195ce1..8fd1b505d 100644 --- a/community/couchdb/PKGBUILD +++ b/community/couchdb/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 82681 2013-01-23 00:15:50Z eric $ +# $Id: PKGBUILD 86802 2013-03-22 11:40:46Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua # Contributor: Michael Fellinger <m.fellinger@gmail.com> @@ -19,16 +19,18 @@ backup=('etc/couchdb/local.ini' source=("http://apache-mirror.rbc.ru/pub/apache/couchdb/$pkgver/apache-couchdb-$pkgver.tar.gz"{,.asc} "couchdb.service" "couchdb.tmpfiles" - "couchdb.rc") + "couchdb.rc" + "build-fix.patch") md5sums=('df75b03e56c2431ede7625200f0d44a7' 'e6e943c1da93cfcb41a4286daa80195d' '8914a7ffc6745f94106d96206709acb4' '1e254ebe32eeb061be64193bafa35dbf' - 'a75ee9b310a950eea13b07274b7a0669') + 'a75ee9b310a950eea13b07274b7a0669' + '71afe48505dfc07ba2091786b4650fa2') build() { cd "$srcdir/apache-$pkgname-$pkgver" - + patch -p1 <$srcdir/build-fix.patch ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var diff --git a/community/couchdb/build-fix.patch b/community/couchdb/build-fix.patch new file mode 100644 index 000000000..d847b3cf2 --- /dev/null +++ b/community/couchdb/build-fix.patch @@ -0,0 +1,5568 @@ +diff -wbBur apache-couchdb-1.2.1/src/Makefile.am apache-couchdb-1.2.1.q/src/Makefile.am +--- apache-couchdb-1.2.1/src/Makefile.am 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/Makefile.am 2013-03-22 15:28:06.836935634 +0400 +@@ -10,4 +10,4 @@ + ## License for the specific language governing permissions and limitations under + ## the License. + +-SUBDIRS = couchdb ejson erlang-oauth etap ibrowse mochiweb snappy ++SUBDIRS = couchdb ejson erlang-oauth ibrowse mochiweb snappy +diff -wbBur apache-couchdb-1.2.1/src/Makefile.in apache-couchdb-1.2.1.q/src/Makefile.in +--- apache-couchdb-1.2.1/src/Makefile.in 2012-12-21 01:28:49.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/Makefile.in 2013-03-22 15:28:11.563602246 +0400 +@@ -267,7 +267,7 @@ + version_release = @version_release@ + version_revision = @version_revision@ + version_stage = @version_stage@ +-SUBDIRS = couchdb ejson erlang-oauth etap ibrowse mochiweb snappy ++SUBDIRS = couchdb ejson erlang-oauth ibrowse mochiweb snappy + all: all-recursive + + .SUFFIXES: +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochifmt.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -369,8 +369,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + tokenize_test() -> + {?MODULE, [{raw, "ABC"}]} = tokenize("ABC"), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt_records.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_records.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochifmt_records.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_records.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -9,11 +9,15 @@ + %% M:format("{0.bar}", [#rec{bar=foo}]). + %% foo + +--module(mochifmt_records, [Recs]). ++-module(mochifmt_records). + -author('bob@mochimedia.com'). +--export([get_value/2]). ++-export([new/1, get_value/3]). + +-get_value(Key, Rec) when is_tuple(Rec) and is_atom(element(1, Rec)) -> ++new([{_Rec, RecFields}]=Recs) when is_list(RecFields) -> ++ {?MODULE, Recs}. ++ ++get_value(Key, Rec, {?MODULE, Recs}) ++ when is_tuple(Rec) and is_atom(element(1, Rec)) -> + try begin + Atom = list_to_existing_atom(Key), + {_, Fields} = proplists:lookup(element(1, Rec), Recs), +@@ -21,7 +25,7 @@ + end + catch error:_ -> mochifmt:get_value(Key, Rec) + end; +-get_value(Key, Args) -> ++get_value(Key, Args, {?MODULE, _Recs}) -> + mochifmt:get_value(Key, Args). + + get_rec_index(Atom, [Atom | _], Index) -> +@@ -33,6 +37,6 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochifmt_std.erl apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_std.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochifmt_std.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochifmt_std.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -3,28 +3,31 @@ + + %% @doc Template module for a mochifmt formatter. + +--module(mochifmt_std, []). ++-module(mochifmt_std). + -author('bob@mochimedia.com'). +--export([format/2, get_value/2, format_field/2, get_field/2, convert_field/2]). ++-export([new/0, format/3, get_value/3, format_field/3, get_field/3, convert_field/3]). + +-format(Format, Args) -> ++new() -> ++ {?MODULE}. ++ ++format(Format, Args, {?MODULE}=THIS) -> + mochifmt:format(Format, Args, THIS). + +-get_field(Key, Args) -> ++get_field(Key, Args, {?MODULE}=THIS) -> + mochifmt:get_field(Key, Args, THIS). + +-convert_field(Key, Args) -> ++convert_field(Key, Args, {?MODULE}) -> + mochifmt:convert_field(Key, Args). + +-get_value(Key, Args) -> ++get_value(Key, Args, {?MODULE}) -> + mochifmt:get_value(Key, Args). + +-format_field(Arg, Format) -> ++format_field(Arg, Format, {?MODULE}=THIS) -> + mochifmt:format_field(Arg, Format, THIS). + + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiglobal.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiglobal.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiglobal.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiglobal.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -30,7 +30,7 @@ + put(_K, V, Mod) -> + Bin = compile(Mod, V), + code:purge(Mod), +- code:load_binary(Mod, atom_to_list(Mod) ++ ".erl", Bin), ++ {module, Mod} = code:load_binary(Mod, atom_to_list(Mod) ++ ".erl", Bin), + ok. + + -spec delete(atom()) -> boolean(). +@@ -77,8 +77,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + get_put_delete_test() -> + K = '$$test$$mochiglobal', + delete(K), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochihex.erl apache-couchdb-1.2.1.q/src/mochiweb/mochihex.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochihex.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochihex.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -8,9 +8,6 @@ + + -export([to_hex/1, to_bin/1, to_int/1, dehex/1, hexdigit/1]). + +-%% @type iolist() = [char() | binary() | iolist()] +-%% @type iodata() = iolist() | binary() +- + %% @spec to_hex(integer | iolist()) -> string() + %% @doc Convert an iolist to a hexadecimal string. + to_hex(0) -> +@@ -68,8 +65,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + to_hex_test() -> + "ff000ff1" = to_hex([255, 0, 15, 241]), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochijson2.erl apache-couchdb-1.2.1.q/src/mochiweb/mochijson2.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochijson2.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochijson2.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -40,9 +40,9 @@ + -module(mochijson2). + -author('bob@mochimedia.com'). + -export([encoder/1, encode/1]). +--export([decoder/1, decode/1]). ++-export([decoder/1, decode/1, decode/2]). + +-% This is a macro to placate syntax highlighters.. ++%% This is a macro to placate syntax highlighters.. + -define(Q, $\"). + -define(ADV_COL(S, N), S#decoder{offset=N+S#decoder.offset, + column=N+S#decoder.column}). +@@ -64,15 +64,14 @@ + -define(IS_WHITESPACE(C), + (C =:= $\s orelse C =:= $\t orelse C =:= $\r orelse C =:= $\n)). + +-%% @type iolist() = [char() | binary() | iolist()] +-%% @type iodata() = iolist() | binary() + %% @type json_string() = atom | binary() + %% @type json_number() = integer() | float() + %% @type json_array() = [json_term()] + %% @type json_object() = {struct, [{json_string(), json_term()}]} ++%% @type json_eep18_object() = {[{json_string(), json_term()}]} + %% @type json_iolist() = {json, iolist()} + %% @type json_term() = json_string() | json_number() | json_array() | +-%% json_object() | json_iolist() ++%% json_object() | json_eep18_object() | json_iolist() + + -record(encoder, {handler=null, + utf8=false}). +@@ -102,6 +101,14 @@ + State = parse_decoder_options(Options, #decoder{}), + fun (O) -> json_decode(O, State) end. + ++%% @spec decode(iolist(), [{format, proplist | eep18 | struct}]) -> json_term() ++%% @doc Decode the given iolist to Erlang terms using the given object format ++%% for decoding, where proplist returns JSON objects as [{binary(), json_term()}] ++%% proplists, eep18 returns JSON objects as {[binary(), json_term()]}, and struct ++%% returns them as-is. ++decode(S, Options) -> ++ json_decode(S, parse_decoder_options(Options, #decoder{})). ++ + %% @spec decode(iolist()) -> json_term() + %% @doc Decode the given iolist to Erlang terms. + decode(S) -> +@@ -119,7 +126,10 @@ + parse_decoder_options([], State) -> + State; + parse_decoder_options([{object_hook, Hook} | Rest], State) -> +- parse_decoder_options(Rest, State#decoder{object_hook=Hook}). ++ parse_decoder_options(Rest, State#decoder{object_hook=Hook}); ++parse_decoder_options([{format, Format} | Rest], State) ++ when Format =:= struct orelse Format =:= eep18 orelse Format =:= proplist -> ++ parse_decoder_options(Rest, State#decoder{object_hook=Format}). + + json_encode(true, _State) -> + <<"true">>; +@@ -139,6 +149,10 @@ + json_encode_proplist(Props, State); + json_encode({struct, Props}, State) when is_list(Props) -> + json_encode_proplist(Props, State); ++json_encode({Props}, State) when is_list(Props) -> ++ json_encode_proplist(Props, State); ++json_encode({}, State) -> ++ json_encode_proplist([], State); + json_encode(Array, State) when is_list(Array) -> + json_encode_array(Array, State); + json_encode({array, Array}, State) when is_list(Array) -> +@@ -318,8 +332,12 @@ + decode_object(B, S1) + end. + +-make_object(V, #decoder{object_hook=null}) -> ++make_object(V, #decoder{object_hook=N}) when N =:= null orelse N =:= struct -> + V; ++make_object({struct, P}, #decoder{object_hook=eep18}) -> ++ {P}; ++make_object({struct, P}, #decoder{object_hook=proplist}) -> ++ P; + make_object(V, #decoder{object_hook=Hook}) -> + Hook(V). + +@@ -559,8 +577,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + + %% testing constructs borrowed from the Yaws JSON implementation. +@@ -838,12 +856,34 @@ + + handler_test() -> + ?assertEqual( +- {'EXIT',{json_encode,{bad_term,{}}}}, +- catch encode({})), +- F = fun ({}) -> [] end, ++ {'EXIT',{json_encode,{bad_term,{x,y}}}}, ++ catch encode({x,y})), ++ F = fun ({x,y}) -> [] end, + ?assertEqual( + <<"[]">>, +- iolist_to_binary((encoder([{handler, F}]))({}))), ++ iolist_to_binary((encoder([{handler, F}]))({x, y}))), + ok. + ++encode_empty_test_() -> ++ [{A, ?_assertEqual(<<"{}">>, iolist_to_binary(encode(B)))} ++ || {A, B} <- [{"eep18 {}", {}}, ++ {"eep18 {[]}", {[]}}, ++ {"{struct, []}", {struct, []}}]]. ++ ++encode_test_() -> ++ P = [{<<"k">>, <<"v">>}], ++ JSON = iolist_to_binary(encode({struct, P})), ++ [{atom_to_list(F), ++ ?_assertEqual(JSON, iolist_to_binary(encode(decode(JSON, [{format, F}]))))} ++ || F <- [struct, eep18, proplist]]. ++ ++format_test_() -> ++ P = [{<<"k">>, <<"v">>}], ++ JSON = iolist_to_binary(encode({struct, P})), ++ [{atom_to_list(F), ++ ?_assertEqual(A, decode(JSON, [{format, F}]))} ++ || {F, A} <- [{struct, {struct, P}}, ++ {eep18, {P}}, ++ {proplist, P}]]. ++ + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochijson.erl apache-couchdb-1.2.1.q/src/mochiweb/mochijson.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochijson.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochijson.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -15,8 +15,6 @@ + -define(INC_COL(S), S#decoder{column=1+S#decoder.column}). + -define(INC_LINE(S), S#decoder{column=1, line=1+S#decoder.line}). + +-%% @type iolist() = [char() | binary() | iolist()] +-%% @type iodata() = iolist() | binary() + %% @type json_string() = atom | string() | binary() + %% @type json_number() = integer() | float() + %% @type json_array() = {array, [json_term()]} +@@ -406,8 +404,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + %% testing constructs borrowed from the Yaws JSON implementation. + +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochilists.erl apache-couchdb-1.2.1.q/src/mochiweb/mochilists.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochilists.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochilists.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -55,8 +55,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + set_defaults_test() -> + ?assertEqual( +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochilogfile2.erl apache-couchdb-1.2.1.q/src/mochiweb/mochilogfile2.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochilogfile2.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochilogfile2.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -57,8 +57,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + name_test() -> + D = mochitemp:mkdtemp(), + FileName = filename:join(D, "open_close_test.log"), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochinum.erl apache-couchdb-1.2.1.q/src/mochiweb/mochinum.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochinum.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochinum.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -243,8 +243,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + int_ceil_test() -> + ?assertEqual(1, int_ceil(0.0001)), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochitemp.erl apache-couchdb-1.2.1.q/src/mochiweb/mochitemp.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochitemp.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochitemp.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -135,8 +135,9 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). ++ + pushenv(L) -> + [{K, os:getenv(K)} || K <- L]. + popenv(L) -> +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiutf8.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiutf8.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiutf8.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiutf8.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -5,8 +5,9 @@ + %% invalid bytes. + + -module(mochiutf8). +--export([valid_utf8_bytes/1, codepoint_to_bytes/1, bytes_to_codepoints/1]). +--export([bytes_foldl/3, codepoint_foldl/3, read_codepoint/1, len/1]). ++-export([valid_utf8_bytes/1, codepoint_to_bytes/1, codepoints_to_bytes/1]). ++-export([bytes_to_codepoints/1, bytes_foldl/3, codepoint_foldl/3]). ++-export([read_codepoint/1, len/1]). + + %% External API + +@@ -192,8 +193,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + binary_skip_bytes_test() -> + ?assertEqual(<<"foo">>, +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_acceptor.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_acceptor.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_acceptor.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_acceptor.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -14,10 +14,10 @@ + proc_lib:spawn_link(?MODULE, init, [Server, Listen, Loop]). + + init(Server, Listen, Loop) -> +- T1 = now(), ++ T1 = os:timestamp(), + case catch mochiweb_socket:accept(Listen) of + {ok, Socket} -> +- gen_server:cast(Server, {accepted, self(), timer:now_diff(now(), T1)}), ++ gen_server:cast(Server, {accepted, self(), timer:now_diff(os:timestamp(), T1)}), + call_loop(Loop, Socket); + {error, closed} -> + exit(normal); +@@ -35,6 +35,8 @@ + + call_loop({M, F}, Socket) -> + M:F(Socket); ++call_loop({M, F, [A1]}, Socket) -> ++ M:F(Socket, A1); + call_loop({M, F, A}, Socket) -> + erlang:apply(M, F, [Socket | A]); + call_loop(Loop, Socket) -> +@@ -43,6 +45,6 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb.app.src apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.app.src +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb.app.src 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.app.src 2013-03-22 15:26:58.000000000 +0400 +@@ -1,9 +1,9 @@ + %% This is generated from src/mochiweb.app.src + {application, mochiweb, + [{description, "MochiMedia Web Server"}, +- {vsn, "1.4.1"}, ++ {vsn, "2.5.0"}, + {modules, []}, + {registered, []}, +- {mod, {mochiweb_app, []}}, + {env, []}, +- {applications, [kernel, stdlib, crypto, inets]}]}. ++ {applications, [kernel, stdlib, crypto, inets, ssl, xmerl, ++ compiler, syntax_tools]}]}. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_charref.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_charref.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_charref.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_charref.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -1,17 +1,17 @@ + %% @author Bob Ippolito <bob@mochimedia.com> + %% @copyright 2007 Mochi Media, Inc. + +-%% @doc Converts HTML 4 charrefs and entities to codepoints. ++%% @doc Converts HTML 5 charrefs and entities to codepoints (or lists of code points). + -module(mochiweb_charref). + -export([charref/1]). + + %% External API. + +-%% @spec charref(S) -> integer() | undefined + %% @doc Convert a decimal charref, hex charref, or html entity to a unicode + %% codepoint, or return undefined on failure. + %% The input should not include an ampersand or semicolon. + %% charref("#38") = 38, charref("#x26") = 38, charref("amp") = 38. ++-spec charref(binary() | string()) -> integer() | [integer()] | undefined. + charref(B) when is_binary(B) -> + charref(binary_to_list(B)); + charref([$#, C | L]) when C =:= $x orelse C =:= $X -> +@@ -29,266 +29,2141 @@ + + %% Internal API. + +-entity("nbsp") -> 160; +-entity("iexcl") -> 161; +-entity("cent") -> 162; +-entity("pound") -> 163; +-entity("curren") -> 164; +-entity("yen") -> 165; +-entity("brvbar") -> 166; +-entity("sect") -> 167; +-entity("uml") -> 168; +-entity("copy") -> 169; +-entity("ordf") -> 170; +-entity("laquo") -> 171; +-entity("not") -> 172; +-entity("shy") -> 173; +-entity("reg") -> 174; +-entity("macr") -> 175; +-entity("deg") -> 176; +-entity("plusmn") -> 177; +-entity("sup2") -> 178; +-entity("sup3") -> 179; +-entity("acute") -> 180; +-entity("micro") -> 181; +-entity("para") -> 182; +-entity("middot") -> 183; +-entity("cedil") -> 184; +-entity("sup1") -> 185; +-entity("ordm") -> 186; +-entity("raquo") -> 187; +-entity("frac14") -> 188; +-entity("frac12") -> 189; +-entity("frac34") -> 190; +-entity("iquest") -> 191; +-entity("Agrave") -> 192; +-entity("Aacute") -> 193; +-entity("Acirc") -> 194; +-entity("Atilde") -> 195; +-entity("Auml") -> 196; +-entity("Aring") -> 197; +-entity("AElig") -> 198; +-entity("Ccedil") -> 199; +-entity("Egrave") -> 200; +-entity("Eacute") -> 201; +-entity("Ecirc") -> 202; +-entity("Euml") -> 203; +-entity("Igrave") -> 204; +-entity("Iacute") -> 205; +-entity("Icirc") -> 206; +-entity("Iuml") -> 207; +-entity("ETH") -> 208; +-entity("Ntilde") -> 209; +-entity("Ograve") -> 210; +-entity("Oacute") -> 211; +-entity("Ocirc") -> 212; +-entity("Otilde") -> 213; +-entity("Ouml") -> 214; +-entity("times") -> 215; +-entity("Oslash") -> 216; +-entity("Ugrave") -> 217; +-entity("Uacute") -> 218; +-entity("Ucirc") -> 219; +-entity("Uuml") -> 220; +-entity("Yacute") -> 221; +-entity("THORN") -> 222; +-entity("szlig") -> 223; +-entity("agrave") -> 224; +-entity("aacute") -> 225; +-entity("acirc") -> 226; +-entity("atilde") -> 227; +-entity("auml") -> 228; +-entity("aring") -> 229; +-entity("aelig") -> 230; +-entity("ccedil") -> 231; +-entity("egrave") -> 232; +-entity("eacute") -> 233; +-entity("ecirc") -> 234; +-entity("euml") -> 235; +-entity("igrave") -> 236; +-entity("iacute") -> 237; +-entity("icirc") -> 238; +-entity("iuml") -> 239; +-entity("eth") -> 240; +-entity("ntilde") -> 241; +-entity("ograve") -> 242; +-entity("oacute") -> 243; +-entity("ocirc") -> 244; +-entity("otilde") -> 245; +-entity("ouml") -> 246; +-entity("divide") -> 247; +-entity("oslash") -> 248; +-entity("ugrave") -> 249; +-entity("uacute") -> 250; +-entity("ucirc") -> 251; +-entity("uuml") -> 252; +-entity("yacute") -> 253; +-entity("thorn") -> 254; +-entity("yuml") -> 255; +-entity("fnof") -> 402; +-entity("Alpha") -> 913; +-entity("Beta") -> 914; +-entity("Gamma") -> 915; +-entity("Delta") -> 916; +-entity("Epsilon") -> 917; +-entity("Zeta") -> 918; +-entity("Eta") -> 919; +-entity("Theta") -> 920; +-entity("Iota") -> 921; +-entity("Kappa") -> 922; +-entity("Lambda") -> 923; +-entity("Mu") -> 924; +-entity("Nu") -> 925; +-entity("Xi") -> 926; +-entity("Omicron") -> 927; +-entity("Pi") -> 928; +-entity("Rho") -> 929; +-entity("Sigma") -> 931; +-entity("Tau") -> 932; +-entity("Upsilon") -> 933; +-entity("Phi") -> 934; +-entity("Chi") -> 935; +-entity("Psi") -> 936; +-entity("Omega") -> 937; +-entity("alpha") -> 945; +-entity("beta") -> 946; +-entity("gamma") -> 947; +-entity("delta") -> 948; +-entity("epsilon") -> 949; +-entity("zeta") -> 950; +-entity("eta") -> 951; +-entity("theta") -> 952; +-entity("iota") -> 953; +-entity("kappa") -> 954; +-entity("lambda") -> 955; +-entity("mu") -> 956; +-entity("nu") -> 957; +-entity("xi") -> 958; +-entity("omicron") -> 959; +-entity("pi") -> 960; +-entity("rho") -> 961; +-entity("sigmaf") -> 962; +-entity("sigma") -> 963; +-entity("tau") -> 964; +-entity("upsilon") -> 965; +-entity("phi") -> 966; +-entity("chi") -> 967; +-entity("psi") -> 968; +-entity("omega") -> 969; +-entity("thetasym") -> 977; +-entity("upsih") -> 978; +-entity("piv") -> 982; +-entity("bull") -> 8226; +-entity("hellip") -> 8230; +-entity("prime") -> 8242; +-entity("Prime") -> 8243; +-entity("oline") -> 8254; +-entity("frasl") -> 8260; +-entity("weierp") -> 8472; +-entity("image") -> 8465; +-entity("real") -> 8476; +-entity("trade") -> 8482; +-entity("alefsym") -> 8501; +-entity("larr") -> 8592; +-entity("uarr") -> 8593; +-entity("rarr") -> 8594; +-entity("darr") -> 8595; +-entity("harr") -> 8596; +-entity("crarr") -> 8629; +-entity("lArr") -> 8656; +-entity("uArr") -> 8657; +-entity("rArr") -> 8658; +-entity("dArr") -> 8659; +-entity("hArr") -> 8660; +-entity("forall") -> 8704; +-entity("part") -> 8706; +-entity("exist") -> 8707; +-entity("empty") -> 8709; +-entity("nabla") -> 8711; +-entity("isin") -> 8712; +-entity("notin") -> 8713; +-entity("ni") -> 8715; +-entity("prod") -> 8719; +-entity("sum") -> 8721; +-entity("minus") -> 8722; +-entity("lowast") -> 8727; +-entity("radic") -> 8730; +-entity("prop") -> 8733; +-entity("infin") -> 8734; +-entity("ang") -> 8736; +-entity("and") -> 8743; +-entity("or") -> 8744; +-entity("cap") -> 8745; +-entity("cup") -> 8746; +-entity("int") -> 8747; +-entity("there4") -> 8756; +-entity("sim") -> 8764; +-entity("cong") -> 8773; +-entity("asymp") -> 8776; +-entity("ne") -> 8800; +-entity("equiv") -> 8801; +-entity("le") -> 8804; +-entity("ge") -> 8805; +-entity("sub") -> 8834; +-entity("sup") -> 8835; +-entity("nsub") -> 8836; +-entity("sube") -> 8838; +-entity("supe") -> 8839; +-entity("oplus") -> 8853; +-entity("otimes") -> 8855; +-entity("perp") -> 8869; +-entity("sdot") -> 8901; +-entity("lceil") -> 8968; +-entity("rceil") -> 8969; +-entity("lfloor") -> 8970; +-entity("rfloor") -> 8971; +-entity("lang") -> 9001; +-entity("rang") -> 9002; +-entity("loz") -> 9674; +-entity("spades") -> 9824; +-entity("clubs") -> 9827; +-entity("hearts") -> 9829; +-entity("diams") -> 9830; +-entity("quot") -> 34; +-entity("amp") -> 38; +-entity("lt") -> 60; +-entity("gt") -> 62; +-entity("OElig") -> 338; +-entity("oelig") -> 339; +-entity("Scaron") -> 352; +-entity("scaron") -> 353; +-entity("Yuml") -> 376; +-entity("circ") -> 710; +-entity("tilde") -> 732; +-entity("ensp") -> 8194; +-entity("emsp") -> 8195; +-entity("thinsp") -> 8201; +-entity("zwnj") -> 8204; +-entity("zwj") -> 8205; +-entity("lrm") -> 8206; +-entity("rlm") -> 8207; +-entity("ndash") -> 8211; +-entity("mdash") -> 8212; +-entity("lsquo") -> 8216; +-entity("rsquo") -> 8217; +-entity("sbquo") -> 8218; +-entity("ldquo") -> 8220; +-entity("rdquo") -> 8221; +-entity("bdquo") -> 8222; +-entity("dagger") -> 8224; +-entity("Dagger") -> 8225; +-entity("permil") -> 8240; +-entity("lsaquo") -> 8249; +-entity("rsaquo") -> 8250; +-entity("euro") -> 8364; +-entity(_) -> undefined. ++%% [2011-10-14] Generated from: ++%% http://www.w3.org/TR/html5/named-character-references.html + ++entity("AElig") -> 16#000C6; ++entity("AMP") -> 16#00026; ++entity("Aacute") -> 16#000C1; ++entity("Abreve") -> 16#00102; ++entity("Acirc") -> 16#000C2; ++entity("Acy") -> 16#00410; ++entity("Afr") -> 16#1D504; ++entity("Agrave") -> 16#000C0; ++entity("Alpha") -> 16#00391; ++entity("Amacr") -> 16#00100; ++entity("And") -> 16#02A53; ++entity("Aogon") -> 16#00104; ++entity("Aopf") -> 16#1D538; ++entity("ApplyFunction") -> 16#02061; ++entity("Aring") -> 16#000C5; ++entity("Ascr") -> 16#1D49C; ++entity("Assign") -> 16#02254; ++entity("Atilde") -> 16#000C3; ++entity("Auml") -> 16#000C4; ++entity("Backslash") -> 16#02216; ++entity("Barv") -> 16#02AE7; ++entity("Barwed") -> 16#02306; ++entity("Bcy") -> 16#00411; ++entity("Because") -> 16#02235; ++entity("Bernoullis") -> 16#0212C; ++entity("Beta") -> 16#00392; ++entity("Bfr") -> 16#1D505; ++entity("Bopf") -> 16#1D539; ++entity("Breve") -> 16#002D8; ++entity("Bscr") -> 16#0212C; ++entity("Bumpeq") -> 16#0224E; ++entity("CHcy") -> 16#00427; ++entity("COPY") -> 16#000A9; ++entity("Cacute") -> 16#00106; ++entity("Cap") -> 16#022D2; ++entity("CapitalDifferentialD") -> 16#02145; ++entity("Cayleys") -> 16#0212D; ++entity("Ccaron") -> 16#0010C; ++entity("Ccedil") -> 16#000C7; ++entity("Ccirc") -> 16#00108; ++entity("Cconint") -> 16#02230; ++entity("Cdot") -> 16#0010A; ++entity("Cedilla") -> 16#000B8; ++entity("CenterDot") -> 16#000B7; ++entity("Cfr") -> 16#0212D; ++entity("Chi") -> 16#003A7; ++entity("CircleDot") -> 16#02299; ++entity("CircleMinus") -> 16#02296; ++entity("CirclePlus") -> 16#02295; ++entity("CircleTimes") -> 16#02297; ++entity("ClockwiseContourIntegral") -> 16#02232; ++entity("CloseCurlyDoubleQuote") -> 16#0201D; ++entity("CloseCurlyQuote") -> 16#02019; ++entity("Colon") -> 16#02237; ++entity("Colone") -> 16#02A74; ++entity("Congruent") -> 16#02261; ++entity("Conint") -> 16#0222F; ++entity("ContourIntegral") -> 16#0222E; ++entity("Copf") -> 16#02102; ++entity("Coproduct") -> 16#02210; ++entity("CounterClockwiseContourIntegral") -> 16#02233; ++entity("Cross") -> 16#02A2F; ++entity("Cscr") -> 16#1D49E; ++entity("Cup") -> 16#022D3; ++entity("CupCap") -> 16#0224D; ++entity("DD") -> 16#02145; ++entity("DDotrahd") -> 16#02911; ++entity("DJcy") -> 16#00402; ++entity("DScy") -> 16#00405; ++entity("DZcy") -> 16#0040F; ++entity("Dagger") -> 16#02021; ++entity("Darr") -> 16#021A1; ++entity("Dashv") -> 16#02AE4; ++entity("Dcaron") -> 16#0010E; ++entity("Dcy") -> 16#00414; ++entity("Del") -> 16#02207; ++entity("Delta") -> 16#00394; ++entity("Dfr") -> 16#1D507; ++entity("DiacriticalAcute") -> 16#000B4; ++entity("DiacriticalDot") -> 16#002D9; ++entity("DiacriticalDoubleAcute") -> 16#002DD; ++entity("DiacriticalGrave") -> 16#00060; ++entity("DiacriticalTilde") -> 16#002DC; ++entity("Diamond") -> 16#022C4; ++entity("DifferentialD") -> 16#02146; ++entity("Dopf") -> 16#1D53B; ++entity("Dot") -> 16#000A8; ++entity("DotDot") -> 16#020DC; ++entity("DotEqual") -> 16#02250; ++entity("DoubleContourIntegral") -> 16#0222F; ++entity("DoubleDot") -> 16#000A8; ++entity("DoubleDownArrow") -> 16#021D3; ++entity("DoubleLeftArrow") -> 16#021D0; ++entity("DoubleLeftRightArrow") -> 16#021D4; ++entity("DoubleLeftTee") -> 16#02AE4; ++entity("DoubleLongLeftArrow") -> 16#027F8; ++entity("DoubleLongLeftRightArrow") -> 16#027FA; ++entity("DoubleLongRightArrow") -> 16#027F9; ++entity("DoubleRightArrow") -> 16#021D2; ++entity("DoubleRightTee") -> 16#022A8; ++entity("DoubleUpArrow") -> 16#021D1; ++entity("DoubleUpDownArrow") -> 16#021D5; ++entity("DoubleVerticalBar") -> 16#02225; ++entity("DownArrow") -> 16#02193; ++entity("DownArrowBar") -> 16#02913; ++entity("DownArrowUpArrow") -> 16#021F5; ++entity("DownBreve") -> 16#00311; ++entity("DownLeftRightVector") -> 16#02950; ++entity("DownLeftTeeVector") -> 16#0295E; ++entity("DownLeftVector") -> 16#021BD; ++entity("DownLeftVectorBar") -> 16#02956; ++entity("DownRightTeeVector") -> 16#0295F; ++entity("DownRightVector") -> 16#021C1; ++entity("DownRightVectorBar") -> 16#02957; ++entity("DownTee") -> 16#022A4; ++entity("DownTeeArrow") -> 16#021A7; ++entity("Downarrow") -> 16#021D3; ++entity("Dscr") -> 16#1D49F; ++entity("Dstrok") -> 16#00110; ++entity("ENG") -> 16#0014A; ++entity("ETH") -> 16#000D0; ++entity("Eacute") -> 16#000C9; ++entity("Ecaron") -> 16#0011A; ++entity("Ecirc") -> 16#000CA; ++entity("Ecy") -> 16#0042D; ++entity("Edot") -> 16#00116; ++entity("Efr") -> 16#1D508; ++entity("Egrave") -> 16#000C8; ++entity("Element") -> 16#02208; ++entity("Emacr") -> 16#00112; ++entity("EmptySmallSquare") -> 16#025FB; ++entity("EmptyVerySmallSquare") -> 16#025AB; ++entity("Eogon") -> 16#00118; ++entity("Eopf") -> 16#1D53C; ++entity("Epsilon") -> 16#00395; ++entity("Equal") -> 16#02A75; ++entity("EqualTilde") -> 16#02242; ++entity("Equilibrium") -> 16#021CC; ++entity("Escr") -> 16#02130; ++entity("Esim") -> 16#02A73; ++entity("Eta") -> 16#00397; ++entity("Euml") -> 16#000CB; ++entity("Exists") -> 16#02203; ++entity("ExponentialE") -> 16#02147; ++entity("Fcy") -> 16#00424; ++entity("Ffr") -> 16#1D509; ++entity("FilledSmallSquare") -> 16#025FC; ++entity("FilledVerySmallSquare") -> 16#025AA; ++entity("Fopf") -> 16#1D53D; ++entity("ForAll") -> 16#02200; ++entity("Fouriertrf") -> 16#02131; ++entity("Fscr") -> 16#02131; ++entity("GJcy") -> 16#00403; ++entity("GT") -> 16#0003E; ++entity("Gamma") -> 16#00393; ++entity("Gammad") -> 16#003DC; ++entity("Gbreve") -> 16#0011E; ++entity("Gcedil") -> 16#00122; ++entity("Gcirc") -> 16#0011C; ++entity("Gcy") -> 16#00413; ++entity("Gdot") -> 16#00120; ++entity("Gfr") -> 16#1D50A; ++entity("Gg") -> 16#022D9; ++entity("Gopf") -> 16#1D53E; ++entity("GreaterEqual") -> 16#02265; ++entity("GreaterEqualLess") -> 16#022DB; ++entity("GreaterFullEqual") -> 16#02267; ++entity("GreaterGreater") -> 16#02AA2; ++entity("GreaterLess") -> 16#02277; ++entity("GreaterSlantEqual") -> 16#02A7E; ++entity("GreaterTilde") -> 16#02273; ++entity("Gscr") -> 16#1D4A2; ++entity("Gt") -> 16#0226B; ++entity("HARDcy") -> 16#0042A; ++entity("Hacek") -> 16#002C7; ++entity("Hat") -> 16#0005E; ++entity("Hcirc") -> 16#00124; ++entity("Hfr") -> 16#0210C; ++entity("HilbertSpace") -> 16#0210B; ++entity("Hopf") -> 16#0210D; ++entity("HorizontalLine") -> 16#02500; ++entity("Hscr") -> 16#0210B; ++entity("Hstrok") -> 16#00126; ++entity("HumpDownHump") -> 16#0224E; ++entity("HumpEqual") -> 16#0224F; ++entity("IEcy") -> 16#00415; ++entity("IJlig") -> 16#00132; ++entity("IOcy") -> 16#00401; ++entity("Iacute") -> 16#000CD; ++entity("Icirc") -> 16#000CE; ++entity("Icy") -> 16#00418; ++entity("Idot") -> 16#00130; ++entity("Ifr") -> 16#02111; ++entity("Igrave") -> 16#000CC; ++entity("Im") -> 16#02111; ++entity("Imacr") -> 16#0012A; ++entity("ImaginaryI") -> 16#02148; ++entity("Implies") -> 16#021D2; ++entity("Int") -> 16#0222C; ++entity("Integral") -> 16#0222B; ++entity("Intersection") -> 16#022C2; ++entity("InvisibleComma") -> 16#02063; ++entity("InvisibleTimes") -> 16#02062; ++entity("Iogon") -> 16#0012E; ++entity("Iopf") -> 16#1D540; ++entity("Iota") -> 16#00399; ++entity("Iscr") -> 16#02110; ++entity("Itilde") -> 16#00128; ++entity("Iukcy") -> 16#00406; ++entity("Iuml") -> 16#000CF; ++entity("Jcirc") -> 16#00134; ++entity("Jcy") -> 16#00419; ++entity("Jfr") -> 16#1D50D; ++entity("Jopf") -> 16#1D541; ++entity("Jscr") -> 16#1D4A5; ++entity("Jsercy") -> 16#00408; ++entity("Jukcy") -> 16#00404; ++entity("KHcy") -> 16#00425; ++entity("KJcy") -> 16#0040C; ++entity("Kappa") -> 16#0039A; ++entity("Kcedil") -> 16#00136; ++entity("Kcy") -> 16#0041A; ++entity("Kfr") -> 16#1D50E; ++entity("Kopf") -> 16#1D542; ++entity("Kscr") -> 16#1D4A6; ++entity("LJcy") -> 16#00409; ++entity("LT") -> 16#0003C; ++entity("Lacute") -> 16#00139; ++entity("Lambda") -> 16#0039B; ++entity("Lang") -> 16#027EA; ++entity("Laplacetrf") -> 16#02112; ++entity("Larr") -> 16#0219E; ++entity("Lcaron") -> 16#0013D; ++entity("Lcedil") -> 16#0013B; ++entity("Lcy") -> 16#0041B; ++entity("LeftAngleBracket") -> 16#027E8; ++entity("LeftArrow") -> 16#02190; ++entity("LeftArrowBar") -> 16#021E4; ++entity("LeftArrowRightArrow") -> 16#021C6; ++entity("LeftCeiling") -> 16#02308; ++entity("LeftDoubleBracket") -> 16#027E6; ++entity("LeftDownTeeVector") -> 16#02961; ++entity("LeftDownVector") -> 16#021C3; ++entity("LeftDownVectorBar") -> 16#02959; ++entity("LeftFloor") -> 16#0230A; ++entity("LeftRightArrow") -> 16#02194; ++entity("LeftRightVector") -> 16#0294E; ++entity("LeftTee") -> 16#022A3; ++entity("LeftTeeArrow") -> 16#021A4; ++entity("LeftTeeVector") -> 16#0295A; ++entity("LeftTriangle") -> 16#022B2; ++entity("LeftTriangleBar") -> 16#029CF; ++entity("LeftTriangleEqual") -> 16#022B4; ++entity("LeftUpDownVector") -> 16#02951; ++entity("LeftUpTeeVector") -> 16#02960; ++entity("LeftUpVector") -> 16#021BF; ++entity("LeftUpVectorBar") -> 16#02958; ++entity("LeftVector") -> 16#021BC; ++entity("LeftVectorBar") -> 16#02952; ++entity("Leftarrow") -> 16#021D0; ++entity("Leftrightarrow") -> 16#021D4; ++entity("LessEqualGreater") -> 16#022DA; ++entity("LessFullEqual") -> 16#02266; ++entity("LessGreater") -> 16#02276; ++entity("LessLess") -> 16#02AA1; ++entity("LessSlantEqual") -> 16#02A7D; ++entity("LessTilde") -> 16#02272; ++entity("Lfr") -> 16#1D50F; ++entity("Ll") -> 16#022D8; ++entity("Lleftarrow") -> 16#021DA; ++entity("Lmidot") -> 16#0013F; ++entity("LongLeftArrow") -> 16#027F5; ++entity("LongLeftRightArrow") -> 16#027F7; ++entity("LongRightArrow") -> 16#027F6; ++entity("Longleftarrow") -> 16#027F8; ++entity("Longleftrightarrow") -> 16#027FA; ++entity("Longrightarrow") -> 16#027F9; ++entity("Lopf") -> 16#1D543; ++entity("LowerLeftArrow") -> 16#02199; ++entity("LowerRightArrow") -> 16#02198; ++entity("Lscr") -> 16#02112; ++entity("Lsh") -> 16#021B0; ++entity("Lstrok") -> 16#00141; ++entity("Lt") -> 16#0226A; ++entity("Map") -> 16#02905; ++entity("Mcy") -> 16#0041C; ++entity("MediumSpace") -> 16#0205F; ++entity("Mellintrf") -> 16#02133; ++entity("Mfr") -> 16#1D510; ++entity("MinusPlus") -> 16#02213; ++entity("Mopf") -> 16#1D544; ++entity("Mscr") -> 16#02133; ++entity("Mu") -> 16#0039C; ++entity("NJcy") -> 16#0040A; ++entity("Nacute") -> 16#00143; ++entity("Ncaron") -> 16#00147; ++entity("Ncedil") -> 16#00145; ++entity("Ncy") -> 16#0041D; ++entity("NegativeMediumSpace") -> 16#0200B; ++entity("NegativeThickSpace") -> 16#0200B; ++entity("NegativeThinSpace") -> 16#0200B; ++entity("NegativeVeryThinSpace") -> 16#0200B; ++entity("NestedGreaterGreater") -> 16#0226B; ++entity("NestedLessLess") -> 16#0226A; ++entity("NewLine") -> 16#0000A; ++entity("Nfr") -> 16#1D511; ++entity("NoBreak") -> 16#02060; ++entity("NonBreakingSpace") -> 16#000A0; ++entity("Nopf") -> 16#02115; ++entity("Not") -> 16#02AEC; ++entity("NotCongruent") -> 16#02262; ++entity("NotCupCap") -> 16#0226D; ++entity("NotDoubleVerticalBar") -> 16#02226; ++entity("NotElement") -> 16#02209; ++entity("NotEqual") -> 16#02260; ++entity("NotEqualTilde") -> [16#02242, 16#00338]; ++entity("NotExists") -> 16#02204; ++entity("NotGreater") -> 16#0226F; ++entity("NotGreaterEqual") -> 16#02271; ++entity("NotGreaterFullEqual") -> [16#02267, 16#00338]; ++entity("NotGreaterGreater") -> [16#0226B, 16#00338]; ++entity("NotGreaterLess") -> 16#02279; ++entity("NotGreaterSlantEqual") -> [16#02A7E, 16#00338]; ++entity("NotGreaterTilde") -> 16#02275; ++entity("NotHumpDownHump") -> [16#0224E, 16#00338]; ++entity("NotHumpEqual") -> [16#0224F, 16#00338]; ++entity("NotLeftTriangle") -> 16#022EA; ++entity("NotLeftTriangleBar") -> [16#029CF, 16#00338]; ++entity("NotLeftTriangleEqual") -> 16#022EC; ++entity("NotLess") -> 16#0226E; ++entity("NotLessEqual") -> 16#02270; ++entity("NotLessGreater") -> 16#02278; ++entity("NotLessLess") -> [16#0226A, 16#00338]; ++entity("NotLessSlantEqual") -> [16#02A7D, 16#00338]; ++entity("NotLessTilde") -> 16#02274; ++entity("NotNestedGreaterGreater") -> [16#02AA2, 16#00338]; ++entity("NotNestedLessLess") -> [16#02AA1, 16#00338]; ++entity("NotPrecedes") -> 16#02280; ++entity("NotPrecedesEqual") -> [16#02AAF, 16#00338]; ++entity("NotPrecedesSlantEqual") -> 16#022E0; ++entity("NotReverseElement") -> 16#0220C; ++entity("NotRightTriangle") -> 16#022EB; ++entity("NotRightTriangleBar") -> [16#029D0, 16#00338]; ++entity("NotRightTriangleEqual") -> 16#022ED; ++entity("NotSquareSubset") -> [16#0228F, 16#00338]; ++entity("NotSquareSubsetEqual") -> 16#022E2; ++entity("NotSquareSuperset") -> [16#02290, 16#00338]; ++entity("NotSquareSupersetEqual") -> 16#022E3; ++entity("NotSubset") -> [16#02282, 16#020D2]; ++entity("NotSubsetEqual") -> 16#02288; ++entity("NotSucceeds") -> 16#02281; ++entity("NotSucceedsEqual") -> [16#02AB0, 16#00338]; ++entity("NotSucceedsSlantEqual") -> 16#022E1; ++entity("NotSucceedsTilde") -> [16#0227F, 16#00338]; ++entity("NotSuperset") -> [16#02283, 16#020D2]; ++entity("NotSupersetEqual") -> 16#02289; ++entity("NotTilde") -> 16#02241; ++entity("NotTildeEqual") -> 16#02244; ++entity("NotTildeFullEqual") -> 16#02247; ++entity("NotTildeTilde") -> 16#02249; ++entity("NotVerticalBar") -> 16#02224; ++entity("Nscr") -> 16#1D4A9; ++entity("Ntilde") -> 16#000D1; ++entity("Nu") -> 16#0039D; ++entity("OElig") -> 16#00152; ++entity("Oacute") -> 16#000D3; ++entity("Ocirc") -> 16#000D4; ++entity("Ocy") -> 16#0041E; ++entity("Odblac") -> 16#00150; ++entity("Ofr") -> 16#1D512; ++entity("Ograve") -> 16#000D2; ++entity("Omacr") -> 16#0014C; ++entity("Omega") -> 16#003A9; ++entity("Omicron") -> 16#0039F; ++entity("Oopf") -> 16#1D546; ++entity("OpenCurlyDoubleQuote") -> 16#0201C; ++entity("OpenCurlyQuote") -> 16#02018; ++entity("Or") -> 16#02A54; ++entity("Oscr") -> 16#1D4AA; ++entity("Oslash") -> 16#000D8; ++entity("Otilde") -> 16#000D5; ++entity("Otimes") -> 16#02A37; ++entity("Ouml") -> 16#000D6; ++entity("OverBar") -> 16#0203E; ++entity("OverBrace") -> 16#023DE; ++entity("OverBracket") -> 16#023B4; ++entity("OverParenthesis") -> 16#023DC; ++entity("PartialD") -> 16#02202; ++entity("Pcy") -> 16#0041F; ++entity("Pfr") -> 16#1D513; ++entity("Phi") -> 16#003A6; ++entity("Pi") -> 16#003A0; ++entity("PlusMinus") -> 16#000B1; ++entity("Poincareplane") -> 16#0210C; ++entity("Popf") -> 16#02119; ++entity("Pr") -> 16#02ABB; ++entity("Precedes") -> 16#0227A; ++entity("PrecedesEqual") -> 16#02AAF; ++entity("PrecedesSlantEqual") -> 16#0227C; ++entity("PrecedesTilde") -> 16#0227E; ++entity("Prime") -> 16#02033; ++entity("Product") -> 16#0220F; ++entity("Proportion") -> 16#02237; ++entity("Proportional") -> 16#0221D; ++entity("Pscr") -> 16#1D4AB; ++entity("Psi") -> 16#003A8; ++entity("QUOT") -> 16#00022; ++entity("Qfr") -> 16#1D514; ++entity("Qopf") -> 16#0211A; ++entity("Qscr") -> 16#1D4AC; ++entity("RBarr") -> 16#02910; ++entity("REG") -> 16#000AE; ++entity("Racute") -> 16#00154; ++entity("Rang") -> 16#027EB; ++entity("Rarr") -> 16#021A0; ++entity("Rarrtl") -> 16#02916; ++entity("Rcaron") -> 16#00158; ++entity("Rcedil") -> 16#00156; ++entity("Rcy") -> 16#00420; ++entity("Re") -> 16#0211C; ++entity("ReverseElement") -> 16#0220B; ++entity("ReverseEquilibrium") -> 16#021CB; ++entity("ReverseUpEquilibrium") -> 16#0296F; ++entity("Rfr") -> 16#0211C; ++entity("Rho") -> 16#003A1; ++entity("RightAngleBracket") -> 16#027E9; ++entity("RightArrow") -> 16#02192; ++entity("RightArrowBar") -> 16#021E5; ++entity("RightArrowLeftArrow") -> 16#021C4; ++entity("RightCeiling") -> 16#02309; ++entity("RightDoubleBracket") -> 16#027E7; ++entity("RightDownTeeVector") -> 16#0295D; ++entity("RightDownVector") -> 16#021C2; ++entity("RightDownVectorBar") -> 16#02955; ++entity("RightFloor") -> 16#0230B; ++entity("RightTee") -> 16#022A2; ++entity("RightTeeArrow") -> 16#021A6; ++entity("RightTeeVector") -> 16#0295B; ++entity("RightTriangle") -> 16#022B3; ++entity("RightTriangleBar") -> 16#029D0; ++entity("RightTriangleEqual") -> 16#022B5; ++entity("RightUpDownVector") -> 16#0294F; ++entity("RightUpTeeVector") -> 16#0295C; ++entity("RightUpVector") -> 16#021BE; ++entity("RightUpVectorBar") -> 16#02954; ++entity("RightVector") -> 16#021C0; ++entity("RightVectorBar") -> 16#02953; ++entity("Rightarrow") -> 16#021D2; ++entity("Ropf") -> 16#0211D; ++entity("RoundImplies") -> 16#02970; ++entity("Rrightarrow") -> 16#021DB; ++entity("Rscr") -> 16#0211B; ++entity("Rsh") -> 16#021B1; ++entity("RuleDelayed") -> 16#029F4; ++entity("SHCHcy") -> 16#00429; ++entity("SHcy") -> 16#00428; ++entity("SOFTcy") -> 16#0042C; ++entity("Sacute") -> 16#0015A; ++entity("Sc") -> 16#02ABC; ++entity("Scaron") -> 16#00160; ++entity("Scedil") -> 16#0015E; ++entity("Scirc") -> 16#0015C; ++entity("Scy") -> 16#00421; ++entity("Sfr") -> 16#1D516; ++entity("ShortDownArrow") -> 16#02193; ++entity("ShortLeftArrow") -> 16#02190; ++entity("ShortRightArrow") -> 16#02192; ++entity("ShortUpArrow") -> 16#02191; ++entity("Sigma") -> 16#003A3; ++entity("SmallCircle") -> 16#02218; ++entity("Sopf") -> 16#1D54A; ++entity("Sqrt") -> 16#0221A; ++entity("Square") -> 16#025A1; ++entity("SquareIntersection") -> 16#02293; ++entity("SquareSubset") -> 16#0228F; ++entity("SquareSubsetEqual") -> 16#02291; ++entity("SquareSuperset") -> 16#02290; ++entity("SquareSupersetEqual") -> 16#02292; ++entity("SquareUnion") -> 16#02294; ++entity("Sscr") -> 16#1D4AE; ++entity("Star") -> 16#022C6; ++entity("Sub") -> 16#022D0; ++entity("Subset") -> 16#022D0; ++entity("SubsetEqual") -> 16#02286; ++entity("Succeeds") -> 16#0227B; ++entity("SucceedsEqual") -> 16#02AB0; ++entity("SucceedsSlantEqual") -> 16#0227D; ++entity("SucceedsTilde") -> 16#0227F; ++entity("SuchThat") -> 16#0220B; ++entity("Sum") -> 16#02211; ++entity("Sup") -> 16#022D1; ++entity("Superset") -> 16#02283; ++entity("SupersetEqual") -> 16#02287; ++entity("Supset") -> 16#022D1; ++entity("THORN") -> 16#000DE; ++entity("TRADE") -> 16#02122; ++entity("TSHcy") -> 16#0040B; ++entity("TScy") -> 16#00426; ++entity("Tab") -> 16#00009; ++entity("Tau") -> 16#003A4; ++entity("Tcaron") -> 16#00164; ++entity("Tcedil") -> 16#00162; ++entity("Tcy") -> 16#00422; ++entity("Tfr") -> 16#1D517; ++entity("Therefore") -> 16#02234; ++entity("Theta") -> 16#00398; ++entity("ThickSpace") -> [16#0205F, 16#0200A]; ++entity("ThinSpace") -> 16#02009; ++entity("Tilde") -> 16#0223C; ++entity("TildeEqual") -> 16#02243; ++entity("TildeFullEqual") -> 16#02245; ++entity("TildeTilde") -> 16#02248; ++entity("Topf") -> 16#1D54B; ++entity("TripleDot") -> 16#020DB; ++entity("Tscr") -> 16#1D4AF; ++entity("Tstrok") -> 16#00166; ++entity("Uacute") -> 16#000DA; ++entity("Uarr") -> 16#0219F; ++entity("Uarrocir") -> 16#02949; ++entity("Ubrcy") -> 16#0040E; ++entity("Ubreve") -> 16#0016C; ++entity("Ucirc") -> 16#000DB; ++entity("Ucy") -> 16#00423; ++entity("Udblac") -> 16#00170; ++entity("Ufr") -> 16#1D518; ++entity("Ugrave") -> 16#000D9; ++entity("Umacr") -> 16#0016A; ++entity("UnderBar") -> 16#0005F; ++entity("UnderBrace") -> 16#023DF; ++entity("UnderBracket") -> 16#023B5; ++entity("UnderParenthesis") -> 16#023DD; ++entity("Union") -> 16#022C3; ++entity("UnionPlus") -> 16#0228E; ++entity("Uogon") -> 16#00172; ++entity("Uopf") -> 16#1D54C; ++entity("UpArrow") -> 16#02191; ++entity("UpArrowBar") -> 16#02912; ++entity("UpArrowDownArrow") -> 16#021C5; ++entity("UpDownArrow") -> 16#02195; ++entity("UpEquilibrium") -> 16#0296E; ++entity("UpTee") -> 16#022A5; ++entity("UpTeeArrow") -> 16#021A5; ++entity("Uparrow") -> 16#021D1; ++entity("Updownarrow") -> 16#021D5; ++entity("UpperLeftArrow") -> 16#02196; ++entity("UpperRightArrow") -> 16#02197; ++entity("Upsi") -> 16#003D2; ++entity("Upsilon") -> 16#003A5; ++entity("Uring") -> 16#0016E; ++entity("Uscr") -> 16#1D4B0; ++entity("Utilde") -> 16#00168; ++entity("Uuml") -> 16#000DC; ++entity("VDash") -> 16#022AB; ++entity("Vbar") -> 16#02AEB; ++entity("Vcy") -> 16#00412; ++entity("Vdash") -> 16#022A9; ++entity("Vdashl") -> 16#02AE6; ++entity("Vee") -> 16#022C1; ++entity("Verbar") -> 16#02016; ++entity("Vert") -> 16#02016; ++entity("VerticalBar") -> 16#02223; ++entity("VerticalLine") -> 16#0007C; ++entity("VerticalSeparator") -> 16#02758; ++entity("VerticalTilde") -> 16#02240; ++entity("VeryThinSpace") -> 16#0200A; ++entity("Vfr") -> 16#1D519; ++entity("Vopf") -> 16#1D54D; ++entity("Vscr") -> 16#1D4B1; ++entity("Vvdash") -> 16#022AA; ++entity("Wcirc") -> 16#00174; ++entity("Wedge") -> 16#022C0; ++entity("Wfr") -> 16#1D51A; ++entity("Wopf") -> 16#1D54E; ++entity("Wscr") -> 16#1D4B2; ++entity("Xfr") -> 16#1D51B; ++entity("Xi") -> 16#0039E; ++entity("Xopf") -> 16#1D54F; ++entity("Xscr") -> 16#1D4B3; ++entity("YAcy") -> 16#0042F; ++entity("YIcy") -> 16#00407; ++entity("YUcy") -> 16#0042E; ++entity("Yacute") -> 16#000DD; ++entity("Ycirc") -> 16#00176; ++entity("Ycy") -> 16#0042B; ++entity("Yfr") -> 16#1D51C; ++entity("Yopf") -> 16#1D550; ++entity("Yscr") -> 16#1D4B4; ++entity("Yuml") -> 16#00178; ++entity("ZHcy") -> 16#00416; ++entity("Zacute") -> 16#00179; ++entity("Zcaron") -> 16#0017D; ++entity("Zcy") -> 16#00417; ++entity("Zdot") -> 16#0017B; ++entity("ZeroWidthSpace") -> 16#0200B; ++entity("Zeta") -> 16#00396; ++entity("Zfr") -> 16#02128; ++entity("Zopf") -> 16#02124; ++entity("Zscr") -> 16#1D4B5; ++entity("aacute") -> 16#000E1; ++entity("abreve") -> 16#00103; ++entity("ac") -> 16#0223E; ++entity("acE") -> [16#0223E, 16#00333]; ++entity("acd") -> 16#0223F; ++entity("acirc") -> 16#000E2; ++entity("acute") -> 16#000B4; ++entity("acy") -> 16#00430; ++entity("aelig") -> 16#000E6; ++entity("af") -> 16#02061; ++entity("afr") -> 16#1D51E; ++entity("agrave") -> 16#000E0; ++entity("alefsym") -> 16#02135; ++entity("aleph") -> 16#02135; ++entity("alpha") -> 16#003B1; ++entity("amacr") -> 16#00101; ++entity("amalg") -> 16#02A3F; ++entity("amp") -> 16#00026; ++entity("and") -> 16#02227; ++entity("andand") -> 16#02A55; ++entity("andd") -> 16#02A5C; ++entity("andslope") -> 16#02A58; ++entity("andv") -> 16#02A5A; ++entity("ang") -> 16#02220; ++entity("ange") -> 16#029A4; ++entity("angle") -> 16#02220; ++entity("angmsd") -> 16#02221; ++entity("angmsdaa") -> 16#029A8; ++entity("angmsdab") -> 16#029A9; ++entity("angmsdac") -> 16#029AA; ++entity("angmsdad") -> 16#029AB; ++entity("angmsdae") -> 16#029AC; ++entity("angmsdaf") -> 16#029AD; ++entity("angmsdag") -> 16#029AE; ++entity("angmsdah") -> 16#029AF; ++entity("angrt") -> 16#0221F; ++entity("angrtvb") -> 16#022BE; ++entity("angrtvbd") -> 16#0299D; ++entity("angsph") -> 16#02222; ++entity("angst") -> 16#000C5; ++entity("angzarr") -> 16#0237C; ++entity("aogon") -> 16#00105; ++entity("aopf") -> 16#1D552; ++entity("ap") -> 16#02248; ++entity("apE") -> 16#02A70; ++entity("apacir") -> 16#02A6F; ++entity("ape") -> 16#0224A; ++entity("apid") -> 16#0224B; ++entity("apos") -> 16#00027; ++entity("approx") -> 16#02248; ++entity("approxeq") -> 16#0224A; ++entity("aring") -> 16#000E5; ++entity("ascr") -> 16#1D4B6; ++entity("ast") -> 16#0002A; ++entity("asymp") -> 16#02248; ++entity("asympeq") -> 16#0224D; ++entity("atilde") -> 16#000E3; ++entity("auml") -> 16#000E4; ++entity("awconint") -> 16#02233; ++entity("awint") -> 16#02A11; ++entity("bNot") -> 16#02AED; ++entity("backcong") -> 16#0224C; ++entity("backepsilon") -> 16#003F6; ++entity("backprime") -> 16#02035; ++entity("backsim") -> 16#0223D; ++entity("backsimeq") -> 16#022CD; ++entity("barvee") -> 16#022BD; ++entity("barwed") -> 16#02305; ++entity("barwedge") -> 16#02305; ++entity("bbrk") -> 16#023B5; ++entity("bbrktbrk") -> 16#023B6; ++entity("bcong") -> 16#0224C; ++entity("bcy") -> 16#00431; ++entity("bdquo") -> 16#0201E; ++entity("becaus") -> 16#02235; ++entity("because") -> 16#02235; ++entity("bemptyv") -> 16#029B0; ++entity("bepsi") -> 16#003F6; ++entity("bernou") -> 16#0212C; ++entity("beta") -> 16#003B2; ++entity("beth") -> 16#02136; ++entity("between") -> 16#0226C; ++entity("bfr") -> 16#1D51F; ++entity("bigcap") -> 16#022C2; ++entity("bigcirc") -> 16#025EF; ++entity("bigcup") -> 16#022C3; ++entity("bigodot") -> 16#02A00; ++entity("bigoplus") -> 16#02A01; ++entity("bigotimes") -> 16#02A02; ++entity("bigsqcup") -> 16#02A06; ++entity("bigstar") -> 16#02605; ++entity("bigtriangledown") -> 16#025BD; ++entity("bigtriangleup") -> 16#025B3; ++entity("biguplus") -> 16#02A04; ++entity("bigvee") -> 16#022C1; ++entity("bigwedge") -> 16#022C0; ++entity("bkarow") -> 16#0290D; ++entity("blacklozenge") -> 16#029EB; ++entity("blacksquare") -> 16#025AA; ++entity("blacktriangle") -> 16#025B4; ++entity("blacktriangledown") -> 16#025BE; ++entity("blacktriangleleft") -> 16#025C2; ++entity("blacktriangleright") -> 16#025B8; ++entity("blank") -> 16#02423; ++entity("blk12") -> 16#02592; ++entity("blk14") -> 16#02591; ++entity("blk34") -> 16#02593; ++entity("block") -> 16#02588; ++entity("bne") -> [16#0003D, 16#020E5]; ++entity("bnequiv") -> [16#02261, 16#020E5]; ++entity("bnot") -> 16#02310; ++entity("bopf") -> 16#1D553; ++entity("bot") -> 16#022A5; ++entity("bottom") -> 16#022A5; ++entity("bowtie") -> 16#022C8; ++entity("boxDL") -> 16#02557; ++entity("boxDR") -> 16#02554; ++entity("boxDl") -> 16#02556; ++entity("boxDr") -> 16#02553; ++entity("boxH") -> 16#02550; ++entity("boxHD") -> 16#02566; ++entity("boxHU") -> 16#02569; ++entity("boxHd") -> 16#02564; ++entity("boxHu") -> 16#02567; ++entity("boxUL") -> 16#0255D; ++entity("boxUR") -> 16#0255A; ++entity("boxUl") -> 16#0255C; ++entity("boxUr") -> 16#02559; ++entity("boxV") -> 16#02551; ++entity("boxVH") -> 16#0256C; ++entity("boxVL") -> 16#02563; ++entity("boxVR") -> 16#02560; ++entity("boxVh") -> 16#0256B; ++entity("boxVl") -> 16#02562; ++entity("boxVr") -> 16#0255F; ++entity("boxbox") -> 16#029C9; ++entity("boxdL") -> 16#02555; ++entity("boxdR") -> 16#02552; ++entity("boxdl") -> 16#02510; ++entity("boxdr") -> 16#0250C; ++entity("boxh") -> 16#02500; ++entity("boxhD") -> 16#02565; ++entity("boxhU") -> 16#02568; ++entity("boxhd") -> 16#0252C; ++entity("boxhu") -> 16#02534; ++entity("boxminus") -> 16#0229F; ++entity("boxplus") -> 16#0229E; ++entity("boxtimes") -> 16#022A0; ++entity("boxuL") -> 16#0255B; ++entity("boxuR") -> 16#02558; ++entity("boxul") -> 16#02518; ++entity("boxur") -> 16#02514; ++entity("boxv") -> 16#02502; ++entity("boxvH") -> 16#0256A; ++entity("boxvL") -> 16#02561; ++entity("boxvR") -> 16#0255E; ++entity("boxvh") -> 16#0253C; ++entity("boxvl") -> 16#02524; ++entity("boxvr") -> 16#0251C; ++entity("bprime") -> 16#02035; ++entity("breve") -> 16#002D8; ++entity("brvbar") -> 16#000A6; ++entity("bscr") -> 16#1D4B7; ++entity("bsemi") -> 16#0204F; ++entity("bsim") -> 16#0223D; ++entity("bsime") -> 16#022CD; ++entity("bsol") -> 16#0005C; ++entity("bsolb") -> 16#029C5; ++entity("bsolhsub") -> 16#027C8; ++entity("bull") -> 16#02022; ++entity("bullet") -> 16#02022; ++entity("bump") -> 16#0224E; ++entity("bumpE") -> 16#02AAE; ++entity("bumpe") -> 16#0224F; ++entity("bumpeq") -> 16#0224F; ++entity("cacute") -> 16#00107; ++entity("cap") -> 16#02229; ++entity("capand") -> 16#02A44; ++entity("capbrcup") -> 16#02A49; ++entity("capcap") -> 16#02A4B; ++entity("capcup") -> 16#02A47; ++entity("capdot") -> 16#02A40; ++entity("caps") -> [16#02229, 16#0FE00]; ++entity("caret") -> 16#02041; ++entity("caron") -> 16#002C7; ++entity("ccaps") -> 16#02A4D; ++entity("ccaron") -> 16#0010D; ++entity("ccedil") -> 16#000E7; ++entity("ccirc") -> 16#00109; ++entity("ccups") -> 16#02A4C; ++entity("ccupssm") -> 16#02A50; ++entity("cdot") -> 16#0010B; ++entity("cedil") -> 16#000B8; ++entity("cemptyv") -> 16#029B2; ++entity("cent") -> 16#000A2; ++entity("centerdot") -> 16#000B7; ++entity("cfr") -> 16#1D520; ++entity("chcy") -> 16#00447; ++entity("check") -> 16#02713; ++entity("checkmark") -> 16#02713; ++entity("chi") -> 16#003C7; ++entity("cir") -> 16#025CB; ++entity("cirE") -> 16#029C3; ++entity("circ") -> 16#002C6; ++entity("circeq") -> 16#02257; ++entity("circlearrowleft") -> 16#021BA; ++entity("circlearrowright") -> 16#021BB; ++entity("circledR") -> 16#000AE; ++entity("circledS") -> 16#024C8; ++entity("circledast") -> 16#0229B; ++entity("circledcirc") -> 16#0229A; ++entity("circleddash") -> 16#0229D; ++entity("cire") -> 16#02257; ++entity("cirfnint") -> 16#02A10; ++entity("cirmid") -> 16#02AEF; ++entity("cirscir") -> 16#029C2; ++entity("clubs") -> 16#02663; ++entity("clubsuit") -> 16#02663; ++entity("colon") -> 16#0003A; ++entity("colone") -> 16#02254; ++entity("coloneq") -> 16#02254; ++entity("comma") -> 16#0002C; ++entity("commat") -> 16#00040; ++entity("comp") -> 16#02201; ++entity("compfn") -> 16#02218; ++entity("complement") -> 16#02201; ++entity("complexes") -> 16#02102; ++entity("cong") -> 16#02245; ++entity("congdot") -> 16#02A6D; ++entity("conint") -> 16#0222E; ++entity("copf") -> 16#1D554; ++entity("coprod") -> 16#02210; ++entity("copy") -> 16#000A9; ++entity("copysr") -> 16#02117; ++entity("crarr") -> 16#021B5; ++entity("cross") -> 16#02717; ++entity("cscr") -> 16#1D4B8; ++entity("csub") -> 16#02ACF; ++entity("csube") -> 16#02AD1; ++entity("csup") -> 16#02AD0; ++entity("csupe") -> 16#02AD2; ++entity("ctdot") -> 16#022EF; ++entity("cudarrl") -> 16#02938; ++entity("cudarrr") -> 16#02935; ++entity("cuepr") -> 16#022DE; ++entity("cuesc") -> 16#022DF; ++entity("cularr") -> 16#021B6; ++entity("cularrp") -> 16#0293D; ++entity("cup") -> 16#0222A; ++entity("cupbrcap") -> 16#02A48; ++entity("cupcap") -> 16#02A46; ++entity("cupcup") -> 16#02A4A; ++entity("cupdot") -> 16#0228D; ++entity("cupor") -> 16#02A45; ++entity("cups") -> [16#0222A, 16#0FE00]; ++entity("curarr") -> 16#021B7; ++entity("curarrm") -> 16#0293C; ++entity("curlyeqprec") -> 16#022DE; ++entity("curlyeqsucc") -> 16#022DF; ++entity("curlyvee") -> 16#022CE; ++entity("curlywedge") -> 16#022CF; ++entity("curren") -> 16#000A4; ++entity("curvearrowleft") -> 16#021B6; ++entity("curvearrowright") -> 16#021B7; ++entity("cuvee") -> 16#022CE; ++entity("cuwed") -> 16#022CF; ++entity("cwconint") -> 16#02232; ++entity("cwint") -> 16#02231; ++entity("cylcty") -> 16#0232D; ++entity("dArr") -> 16#021D3; ++entity("dHar") -> 16#02965; ++entity("dagger") -> 16#02020; ++entity("daleth") -> 16#02138; ++entity("darr") -> 16#02193; ++entity("dash") -> 16#02010; ++entity("dashv") -> 16#022A3; ++entity("dbkarow") -> 16#0290F; ++entity("dblac") -> 16#002DD; ++entity("dcaron") -> 16#0010F; ++entity("dcy") -> 16#00434; ++entity("dd") -> 16#02146; ++entity("ddagger") -> 16#02021; ++entity("ddarr") -> 16#021CA; ++entity("ddotseq") -> 16#02A77; ++entity("deg") -> 16#000B0; ++entity("delta") -> 16#003B4; ++entity("demptyv") -> 16#029B1; ++entity("dfisht") -> 16#0297F; ++entity("dfr") -> 16#1D521; ++entity("dharl") -> 16#021C3; ++entity("dharr") -> 16#021C2; ++entity("diam") -> 16#022C4; ++entity("diamond") -> 16#022C4; ++entity("diamondsuit") -> 16#02666; ++entity("diams") -> 16#02666; ++entity("die") -> 16#000A8; ++entity("digamma") -> 16#003DD; ++entity("disin") -> 16#022F2; ++entity("div") -> 16#000F7; ++entity("divide") -> 16#000F7; ++entity("divideontimes") -> 16#022C7; ++entity("divonx") -> 16#022C7; ++entity("djcy") -> 16#00452; ++entity("dlcorn") -> 16#0231E; ++entity("dlcrop") -> 16#0230D; ++entity("dollar") -> 16#00024; ++entity("dopf") -> 16#1D555; ++entity("dot") -> 16#002D9; ++entity("doteq") -> 16#02250; ++entity("doteqdot") -> 16#02251; ++entity("dotminus") -> 16#02238; ++entity("dotplus") -> 16#02214; ++entity("dotsquare") -> 16#022A1; ++entity("doublebarwedge") -> 16#02306; ++entity("downarrow") -> 16#02193; ++entity("downdownarrows") -> 16#021CA; ++entity("downharpoonleft") -> 16#021C3; ++entity("downharpoonright") -> 16#021C2; ++entity("drbkarow") -> 16#02910; ++entity("drcorn") -> 16#0231F; ++entity("drcrop") -> 16#0230C; ++entity("dscr") -> 16#1D4B9; ++entity("dscy") -> 16#00455; ++entity("dsol") -> 16#029F6; ++entity("dstrok") -> 16#00111; ++entity("dtdot") -> 16#022F1; ++entity("dtri") -> 16#025BF; ++entity("dtrif") -> 16#025BE; ++entity("duarr") -> 16#021F5; ++entity("duhar") -> 16#0296F; ++entity("dwangle") -> 16#029A6; ++entity("dzcy") -> 16#0045F; ++entity("dzigrarr") -> 16#027FF; ++entity("eDDot") -> 16#02A77; ++entity("eDot") -> 16#02251; ++entity("eacute") -> 16#000E9; ++entity("easter") -> 16#02A6E; ++entity("ecaron") -> 16#0011B; ++entity("ecir") -> 16#02256; ++entity("ecirc") -> 16#000EA; ++entity("ecolon") -> 16#02255; ++entity("ecy") -> 16#0044D; ++entity("edot") -> 16#00117; ++entity("ee") -> 16#02147; ++entity("efDot") -> 16#02252; ++entity("efr") -> 16#1D522; ++entity("eg") -> 16#02A9A; ++entity("egrave") -> 16#000E8; ++entity("egs") -> 16#02A96; ++entity("egsdot") -> 16#02A98; ++entity("el") -> 16#02A99; ++entity("elinters") -> 16#023E7; ++entity("ell") -> 16#02113; ++entity("els") -> 16#02A95; ++entity("elsdot") -> 16#02A97; ++entity("emacr") -> 16#00113; ++entity("empty") -> 16#02205; ++entity("emptyset") -> 16#02205; ++entity("emptyv") -> 16#02205; ++entity("emsp") -> 16#02003; ++entity("emsp13") -> 16#02004; ++entity("emsp14") -> 16#02005; ++entity("eng") -> 16#0014B; ++entity("ensp") -> 16#02002; ++entity("eogon") -> 16#00119; ++entity("eopf") -> 16#1D556; ++entity("epar") -> 16#022D5; ++entity("eparsl") -> 16#029E3; ++entity("eplus") -> 16#02A71; ++entity("epsi") -> 16#003B5; ++entity("epsilon") -> 16#003B5; ++entity("epsiv") -> 16#003F5; ++entity("eqcirc") -> 16#02256; ++entity("eqcolon") -> 16#02255; ++entity("eqsim") -> 16#02242; ++entity("eqslantgtr") -> 16#02A96; ++entity("eqslantless") -> 16#02A95; ++entity("equals") -> 16#0003D; ++entity("equest") -> 16#0225F; ++entity("equiv") -> 16#02261; ++entity("equivDD") -> 16#02A78; ++entity("eqvparsl") -> 16#029E5; ++entity("erDot") -> 16#02253; ++entity("erarr") -> 16#02971; ++entity("escr") -> 16#0212F; ++entity("esdot") -> 16#02250; ++entity("esim") -> 16#02242; ++entity("eta") -> 16#003B7; ++entity("eth") -> 16#000F0; ++entity("euml") -> 16#000EB; ++entity("euro") -> 16#020AC; ++entity("excl") -> 16#00021; ++entity("exist") -> 16#02203; ++entity("expectation") -> 16#02130; ++entity("exponentiale") -> 16#02147; ++entity("fallingdotseq") -> 16#02252; ++entity("fcy") -> 16#00444; ++entity("female") -> 16#02640; ++entity("ffilig") -> 16#0FB03; ++entity("fflig") -> 16#0FB00; ++entity("ffllig") -> 16#0FB04; ++entity("ffr") -> 16#1D523; ++entity("filig") -> 16#0FB01; ++entity("fjlig") -> [16#00066, 16#0006A]; ++entity("flat") -> 16#0266D; ++entity("fllig") -> 16#0FB02; ++entity("fltns") -> 16#025B1; ++entity("fnof") -> 16#00192; ++entity("fopf") -> 16#1D557; ++entity("forall") -> 16#02200; ++entity("fork") -> 16#022D4; ++entity("forkv") -> 16#02AD9; ++entity("fpartint") -> 16#02A0D; ++entity("frac12") -> 16#000BD; ++entity("frac13") -> 16#02153; ++entity("frac14") -> 16#000BC; ++entity("frac15") -> 16#02155; ++entity("frac16") -> 16#02159; ++entity("frac18") -> 16#0215B; ++entity("frac23") -> 16#02154; ++entity("frac25") -> 16#02156; ++entity("frac34") -> 16#000BE; ++entity("frac35") -> 16#02157; ++entity("frac38") -> 16#0215C; ++entity("frac45") -> 16#02158; ++entity("frac56") -> 16#0215A; ++entity("frac58") -> 16#0215D; ++entity("frac78") -> 16#0215E; ++entity("frasl") -> 16#02044; ++entity("frown") -> 16#02322; ++entity("fscr") -> 16#1D4BB; ++entity("gE") -> 16#02267; ++entity("gEl") -> 16#02A8C; ++entity("gacute") -> 16#001F5; ++entity("gamma") -> 16#003B3; ++entity("gammad") -> 16#003DD; ++entity("gap") -> 16#02A86; ++entity("gbreve") -> 16#0011F; ++entity("gcirc") -> 16#0011D; ++entity("gcy") -> 16#00433; ++entity("gdot") -> 16#00121; ++entity("ge") -> 16#02265; ++entity("gel") -> 16#022DB; ++entity("geq") -> 16#02265; ++entity("geqq") -> 16#02267; ++entity("geqslant") -> 16#02A7E; ++entity("ges") -> 16#02A7E; ++entity("gescc") -> 16#02AA9; ++entity("gesdot") -> 16#02A80; ++entity("gesdoto") -> 16#02A82; ++entity("gesdotol") -> 16#02A84; ++entity("gesl") -> [16#022DB, 16#0FE00]; ++entity("gesles") -> 16#02A94; ++entity("gfr") -> 16#1D524; ++entity("gg") -> 16#0226B; ++entity("ggg") -> 16#022D9; ++entity("gimel") -> 16#02137; ++entity("gjcy") -> 16#00453; ++entity("gl") -> 16#02277; ++entity("glE") -> 16#02A92; ++entity("gla") -> 16#02AA5; ++entity("glj") -> 16#02AA4; ++entity("gnE") -> 16#02269; ++entity("gnap") -> 16#02A8A; ++entity("gnapprox") -> 16#02A8A; ++entity("gne") -> 16#02A88; ++entity("gneq") -> 16#02A88; ++entity("gneqq") -> 16#02269; ++entity("gnsim") -> 16#022E7; ++entity("gopf") -> 16#1D558; ++entity("grave") -> 16#00060; ++entity("gscr") -> 16#0210A; ++entity("gsim") -> 16#02273; ++entity("gsime") -> 16#02A8E; ++entity("gsiml") -> 16#02A90; ++entity("gt") -> 16#0003E; ++entity("gtcc") -> 16#02AA7; ++entity("gtcir") -> 16#02A7A; ++entity("gtdot") -> 16#022D7; ++entity("gtlPar") -> 16#02995; ++entity("gtquest") -> 16#02A7C; ++entity("gtrapprox") -> 16#02A86; ++entity("gtrarr") -> 16#02978; ++entity("gtrdot") -> 16#022D7; ++entity("gtreqless") -> 16#022DB; ++entity("gtreqqless") -> 16#02A8C; ++entity("gtrless") -> 16#02277; ++entity("gtrsim") -> 16#02273; ++entity("gvertneqq") -> [16#02269, 16#0FE00]; ++entity("gvnE") -> [16#02269, 16#0FE00]; ++entity("hArr") -> 16#021D4; ++entity("hairsp") -> 16#0200A; ++entity("half") -> 16#000BD; ++entity("hamilt") -> 16#0210B; ++entity("hardcy") -> 16#0044A; ++entity("harr") -> 16#02194; ++entity("harrcir") -> 16#02948; ++entity("harrw") -> 16#021AD; ++entity("hbar") -> 16#0210F; ++entity("hcirc") -> 16#00125; ++entity("hearts") -> 16#02665; ++entity("heartsuit") -> 16#02665; ++entity("hellip") -> 16#02026; ++entity("hercon") -> 16#022B9; ++entity("hfr") -> 16#1D525; ++entity("hksearow") -> 16#02925; ++entity("hkswarow") -> 16#02926; ++entity("hoarr") -> 16#021FF; ++entity("homtht") -> 16#0223B; ++entity("hookleftarrow") -> 16#021A9; ++entity("hookrightarrow") -> 16#021AA; ++entity("hopf") -> 16#1D559; ++entity("horbar") -> 16#02015; ++entity("hscr") -> 16#1D4BD; ++entity("hslash") -> 16#0210F; ++entity("hstrok") -> 16#00127; ++entity("hybull") -> 16#02043; ++entity("hyphen") -> 16#02010; ++entity("iacute") -> 16#000ED; ++entity("ic") -> 16#02063; ++entity("icirc") -> 16#000EE; ++entity("icy") -> 16#00438; ++entity("iecy") -> 16#00435; ++entity("iexcl") -> 16#000A1; ++entity("iff") -> 16#021D4; ++entity("ifr") -> 16#1D526; ++entity("igrave") -> 16#000EC; ++entity("ii") -> 16#02148; ++entity("iiiint") -> 16#02A0C; ++entity("iiint") -> 16#0222D; ++entity("iinfin") -> 16#029DC; ++entity("iiota") -> 16#02129; ++entity("ijlig") -> 16#00133; ++entity("imacr") -> 16#0012B; ++entity("image") -> 16#02111; ++entity("imagline") -> 16#02110; ++entity("imagpart") -> 16#02111; ++entity("imath") -> 16#00131; ++entity("imof") -> 16#022B7; ++entity("imped") -> 16#001B5; ++entity("in") -> 16#02208; ++entity("incare") -> 16#02105; ++entity("infin") -> 16#0221E; ++entity("infintie") -> 16#029DD; ++entity("inodot") -> 16#00131; ++entity("int") -> 16#0222B; ++entity("intcal") -> 16#022BA; ++entity("integers") -> 16#02124; ++entity("intercal") -> 16#022BA; ++entity("intlarhk") -> 16#02A17; ++entity("intprod") -> 16#02A3C; ++entity("iocy") -> 16#00451; ++entity("iogon") -> 16#0012F; ++entity("iopf") -> 16#1D55A; ++entity("iota") -> 16#003B9; ++entity("iprod") -> 16#02A3C; ++entity("iquest") -> 16#000BF; ++entity("iscr") -> 16#1D4BE; ++entity("isin") -> 16#02208; ++entity("isinE") -> 16#022F9; ++entity("isindot") -> 16#022F5; ++entity("isins") -> 16#022F4; ++entity("isinsv") -> 16#022F3; ++entity("isinv") -> 16#02208; ++entity("it") -> 16#02062; ++entity("itilde") -> 16#00129; ++entity("iukcy") -> 16#00456; ++entity("iuml") -> 16#000EF; ++entity("jcirc") -> 16#00135; ++entity("jcy") -> 16#00439; ++entity("jfr") -> 16#1D527; ++entity("jmath") -> 16#00237; ++entity("jopf") -> 16#1D55B; ++entity("jscr") -> 16#1D4BF; ++entity("jsercy") -> 16#00458; ++entity("jukcy") -> 16#00454; ++entity("kappa") -> 16#003BA; ++entity("kappav") -> 16#003F0; ++entity("kcedil") -> 16#00137; ++entity("kcy") -> 16#0043A; ++entity("kfr") -> 16#1D528; ++entity("kgreen") -> 16#00138; ++entity("khcy") -> 16#00445; ++entity("kjcy") -> 16#0045C; ++entity("kopf") -> 16#1D55C; ++entity("kscr") -> 16#1D4C0; ++entity("lAarr") -> 16#021DA; ++entity("lArr") -> 16#021D0; ++entity("lAtail") -> 16#0291B; ++entity("lBarr") -> 16#0290E; ++entity("lE") -> 16#02266; ++entity("lEg") -> 16#02A8B; ++entity("lHar") -> 16#02962; ++entity("lacute") -> 16#0013A; ++entity("laemptyv") -> 16#029B4; ++entity("lagran") -> 16#02112; ++entity("lambda") -> 16#003BB; ++entity("lang") -> 16#027E8; ++entity("langd") -> 16#02991; ++entity("langle") -> 16#027E8; ++entity("lap") -> 16#02A85; ++entity("laquo") -> 16#000AB; ++entity("larr") -> 16#02190; ++entity("larrb") -> 16#021E4; ++entity("larrbfs") -> 16#0291F; ++entity("larrfs") -> 16#0291D; ++entity("larrhk") -> 16#021A9; ++entity("larrlp") -> 16#021AB; ++entity("larrpl") -> 16#02939; ++entity("larrsim") -> 16#02973; ++entity("larrtl") -> 16#021A2; ++entity("lat") -> 16#02AAB; ++entity("latail") -> 16#02919; ++entity("late") -> 16#02AAD; ++entity("lates") -> [16#02AAD, 16#0FE00]; ++entity("lbarr") -> 16#0290C; ++entity("lbbrk") -> 16#02772; ++entity("lbrace") -> 16#0007B; ++entity("lbrack") -> 16#0005B; ++entity("lbrke") -> 16#0298B; ++entity("lbrksld") -> 16#0298F; ++entity("lbrkslu") -> 16#0298D; ++entity("lcaron") -> 16#0013E; ++entity("lcedil") -> 16#0013C; ++entity("lceil") -> 16#02308; ++entity("lcub") -> 16#0007B; ++entity("lcy") -> 16#0043B; ++entity("ldca") -> 16#02936; ++entity("ldquo") -> 16#0201C; ++entity("ldquor") -> 16#0201E; ++entity("ldrdhar") -> 16#02967; ++entity("ldrushar") -> 16#0294B; ++entity("ldsh") -> 16#021B2; ++entity("le") -> 16#02264; ++entity("leftarrow") -> 16#02190; ++entity("leftarrowtail") -> 16#021A2; ++entity("leftharpoondown") -> 16#021BD; ++entity("leftharpoonup") -> 16#021BC; ++entity("leftleftarrows") -> 16#021C7; ++entity("leftrightarrow") -> 16#02194; ++entity("leftrightarrows") -> 16#021C6; ++entity("leftrightharpoons") -> 16#021CB; ++entity("leftrightsquigarrow") -> 16#021AD; ++entity("leftthreetimes") -> 16#022CB; ++entity("leg") -> 16#022DA; ++entity("leq") -> 16#02264; ++entity("leqq") -> 16#02266; ++entity("leqslant") -> 16#02A7D; ++entity("les") -> 16#02A7D; ++entity("lescc") -> 16#02AA8; ++entity("lesdot") -> 16#02A7F; ++entity("lesdoto") -> 16#02A81; ++entity("lesdotor") -> 16#02A83; ++entity("lesg") -> [16#022DA, 16#0FE00]; ++entity("lesges") -> 16#02A93; ++entity("lessapprox") -> 16#02A85; ++entity("lessdot") -> 16#022D6; ++entity("lesseqgtr") -> 16#022DA; ++entity("lesseqqgtr") -> 16#02A8B; ++entity("lessgtr") -> 16#02276; ++entity("lesssim") -> 16#02272; ++entity("lfisht") -> 16#0297C; ++entity("lfloor") -> 16#0230A; ++entity("lfr") -> 16#1D529; ++entity("lg") -> 16#02276; ++entity("lgE") -> 16#02A91; ++entity("lhard") -> 16#021BD; ++entity("lharu") -> 16#021BC; ++entity("lharul") -> 16#0296A; ++entity("lhblk") -> 16#02584; ++entity("ljcy") -> 16#00459; ++entity("ll") -> 16#0226A; ++entity("llarr") -> 16#021C7; ++entity("llcorner") -> 16#0231E; ++entity("llhard") -> 16#0296B; ++entity("lltri") -> 16#025FA; ++entity("lmidot") -> 16#00140; ++entity("lmoust") -> 16#023B0; ++entity("lmoustache") -> 16#023B0; ++entity("lnE") -> 16#02268; ++entity("lnap") -> 16#02A89; ++entity("lnapprox") -> 16#02A89; ++entity("lne") -> 16#02A87; ++entity("lneq") -> 16#02A87; ++entity("lneqq") -> 16#02268; ++entity("lnsim") -> 16#022E6; ++entity("loang") -> 16#027EC; ++entity("loarr") -> 16#021FD; ++entity("lobrk") -> 16#027E6; ++entity("longleftarrow") -> 16#027F5; ++entity("longleftrightarrow") -> 16#027F7; ++entity("longmapsto") -> 16#027FC; ++entity("longrightarrow") -> 16#027F6; ++entity("looparrowleft") -> 16#021AB; ++entity("looparrowright") -> 16#021AC; ++entity("lopar") -> 16#02985; ++entity("lopf") -> 16#1D55D; ++entity("loplus") -> 16#02A2D; ++entity("lotimes") -> 16#02A34; ++entity("lowast") -> 16#02217; ++entity("lowbar") -> 16#0005F; ++entity("loz") -> 16#025CA; ++entity("lozenge") -> 16#025CA; ++entity("lozf") -> 16#029EB; ++entity("lpar") -> 16#00028; ++entity("lparlt") -> 16#02993; ++entity("lrarr") -> 16#021C6; ++entity("lrcorner") -> 16#0231F; ++entity("lrhar") -> 16#021CB; ++entity("lrhard") -> 16#0296D; ++entity("lrm") -> 16#0200E; ++entity("lrtri") -> 16#022BF; ++entity("lsaquo") -> 16#02039; ++entity("lscr") -> 16#1D4C1; ++entity("lsh") -> 16#021B0; ++entity("lsim") -> 16#02272; ++entity("lsime") -> 16#02A8D; ++entity("lsimg") -> 16#02A8F; ++entity("lsqb") -> 16#0005B; ++entity("lsquo") -> 16#02018; ++entity("lsquor") -> 16#0201A; ++entity("lstrok") -> 16#00142; ++entity("lt") -> 16#0003C; ++entity("ltcc") -> 16#02AA6; ++entity("ltcir") -> 16#02A79; ++entity("ltdot") -> 16#022D6; ++entity("lthree") -> 16#022CB; ++entity("ltimes") -> 16#022C9; ++entity("ltlarr") -> 16#02976; ++entity("ltquest") -> 16#02A7B; ++entity("ltrPar") -> 16#02996; ++entity("ltri") -> 16#025C3; ++entity("ltrie") -> 16#022B4; ++entity("ltrif") -> 16#025C2; ++entity("lurdshar") -> 16#0294A; ++entity("luruhar") -> 16#02966; ++entity("lvertneqq") -> [16#02268, 16#0FE00]; ++entity("lvnE") -> [16#02268, 16#0FE00]; ++entity("mDDot") -> 16#0223A; ++entity("macr") -> 16#000AF; ++entity("male") -> 16#02642; ++entity("malt") -> 16#02720; ++entity("maltese") -> 16#02720; ++entity("map") -> 16#021A6; ++entity("mapsto") -> 16#021A6; ++entity("mapstodown") -> 16#021A7; ++entity("mapstoleft") -> 16#021A4; ++entity("mapstoup") -> 16#021A5; ++entity("marker") -> 16#025AE; ++entity("mcomma") -> 16#02A29; ++entity("mcy") -> 16#0043C; ++entity("mdash") -> 16#02014; ++entity("measuredangle") -> 16#02221; ++entity("mfr") -> 16#1D52A; ++entity("mho") -> 16#02127; ++entity("micro") -> 16#000B5; ++entity("mid") -> 16#02223; ++entity("midast") -> 16#0002A; ++entity("midcir") -> 16#02AF0; ++entity("middot") -> 16#000B7; ++entity("minus") -> 16#02212; ++entity("minusb") -> 16#0229F; ++entity("minusd") -> 16#02238; ++entity("minusdu") -> 16#02A2A; ++entity("mlcp") -> 16#02ADB; ++entity("mldr") -> 16#02026; ++entity("mnplus") -> 16#02213; ++entity("models") -> 16#022A7; ++entity("mopf") -> 16#1D55E; ++entity("mp") -> 16#02213; ++entity("mscr") -> 16#1D4C2; ++entity("mstpos") -> 16#0223E; ++entity("mu") -> 16#003BC; ++entity("multimap") -> 16#022B8; ++entity("mumap") -> 16#022B8; ++entity("nGg") -> [16#022D9, 16#00338]; ++entity("nGt") -> [16#0226B, 16#020D2]; ++entity("nGtv") -> [16#0226B, 16#00338]; ++entity("nLeftarrow") -> 16#021CD; ++entity("nLeftrightarrow") -> 16#021CE; ++entity("nLl") -> [16#022D8, 16#00338]; ++entity("nLt") -> [16#0226A, 16#020D2]; ++entity("nLtv") -> [16#0226A, 16#00338]; ++entity("nRightarrow") -> 16#021CF; ++entity("nVDash") -> 16#022AF; ++entity("nVdash") -> 16#022AE; ++entity("nabla") -> 16#02207; ++entity("nacute") -> 16#00144; ++entity("nang") -> [16#02220, 16#020D2]; ++entity("nap") -> 16#02249; ++entity("napE") -> [16#02A70, 16#00338]; ++entity("napid") -> [16#0224B, 16#00338]; ++entity("napos") -> 16#00149; ++entity("napprox") -> 16#02249; ++entity("natur") -> 16#0266E; ++entity("natural") -> 16#0266E; ++entity("naturals") -> 16#02115; ++entity("nbsp") -> 16#000A0; ++entity("nbump") -> [16#0224E, 16#00338]; ++entity("nbumpe") -> [16#0224F, 16#00338]; ++entity("ncap") -> 16#02A43; ++entity("ncaron") -> 16#00148; ++entity("ncedil") -> 16#00146; ++entity("ncong") -> 16#02247; ++entity("ncongdot") -> [16#02A6D, 16#00338]; ++entity("ncup") -> 16#02A42; ++entity("ncy") -> 16#0043D; ++entity("ndash") -> 16#02013; ++entity("ne") -> 16#02260; ++entity("neArr") -> 16#021D7; ++entity("nearhk") -> 16#02924; ++entity("nearr") -> 16#02197; ++entity("nearrow") -> 16#02197; ++entity("nedot") -> [16#02250, 16#00338]; ++entity("nequiv") -> 16#02262; ++entity("nesear") -> 16#02928; ++entity("nesim") -> [16#02242, 16#00338]; ++entity("nexist") -> 16#02204; ++entity("nexists") -> 16#02204; ++entity("nfr") -> 16#1D52B; ++entity("ngE") -> [16#02267, 16#00338]; ++entity("nge") -> 16#02271; ++entity("ngeq") -> 16#02271; ++entity("ngeqq") -> [16#02267, 16#00338]; ++entity("ngeqslant") -> [16#02A7E, 16#00338]; ++entity("nges") -> [16#02A7E, 16#00338]; ++entity("ngsim") -> 16#02275; ++entity("ngt") -> 16#0226F; ++entity("ngtr") -> 16#0226F; ++entity("nhArr") -> 16#021CE; ++entity("nharr") -> 16#021AE; ++entity("nhpar") -> 16#02AF2; ++entity("ni") -> 16#0220B; ++entity("nis") -> 16#022FC; ++entity("nisd") -> 16#022FA; ++entity("niv") -> 16#0220B; ++entity("njcy") -> 16#0045A; ++entity("nlArr") -> 16#021CD; ++entity("nlE") -> [16#02266, 16#00338]; ++entity("nlarr") -> 16#0219A; ++entity("nldr") -> 16#02025; ++entity("nle") -> 16#02270; ++entity("nleftarrow") -> 16#0219A; ++entity("nleftrightarrow") -> 16#021AE; ++entity("nleq") -> 16#02270; ++entity("nleqq") -> [16#02266, 16#00338]; ++entity("nleqslant") -> [16#02A7D, 16#00338]; ++entity("nles") -> [16#02A7D, 16#00338]; ++entity("nless") -> 16#0226E; ++entity("nlsim") -> 16#02274; ++entity("nlt") -> 16#0226E; ++entity("nltri") -> 16#022EA; ++entity("nltrie") -> 16#022EC; ++entity("nmid") -> 16#02224; ++entity("nopf") -> 16#1D55F; ++entity("not") -> 16#000AC; ++entity("notin") -> 16#02209; ++entity("notinE") -> [16#022F9, 16#00338]; ++entity("notindot") -> [16#022F5, 16#00338]; ++entity("notinva") -> 16#02209; ++entity("notinvb") -> 16#022F7; ++entity("notinvc") -> 16#022F6; ++entity("notni") -> 16#0220C; ++entity("notniva") -> 16#0220C; ++entity("notnivb") -> 16#022FE; ++entity("notnivc") -> 16#022FD; ++entity("npar") -> 16#02226; ++entity("nparallel") -> 16#02226; ++entity("nparsl") -> [16#02AFD, 16#020E5]; ++entity("npart") -> [16#02202, 16#00338]; ++entity("npolint") -> 16#02A14; ++entity("npr") -> 16#02280; ++entity("nprcue") -> 16#022E0; ++entity("npre") -> [16#02AAF, 16#00338]; ++entity("nprec") -> 16#02280; ++entity("npreceq") -> [16#02AAF, 16#00338]; ++entity("nrArr") -> 16#021CF; ++entity("nrarr") -> 16#0219B; ++entity("nrarrc") -> [16#02933, 16#00338]; ++entity("nrarrw") -> [16#0219D, 16#00338]; ++entity("nrightarrow") -> 16#0219B; ++entity("nrtri") -> 16#022EB; ++entity("nrtrie") -> 16#022ED; ++entity("nsc") -> 16#02281; ++entity("nsccue") -> 16#022E1; ++entity("nsce") -> [16#02AB0, 16#00338]; ++entity("nscr") -> 16#1D4C3; ++entity("nshortmid") -> 16#02224; ++entity("nshortparallel") -> 16#02226; ++entity("nsim") -> 16#02241; ++entity("nsime") -> 16#02244; ++entity("nsimeq") -> 16#02244; ++entity("nsmid") -> 16#02224; ++entity("nspar") -> 16#02226; ++entity("nsqsube") -> 16#022E2; ++entity("nsqsupe") -> 16#022E3; ++entity("nsub") -> 16#02284; ++entity("nsubE") -> [16#02AC5, 16#00338]; ++entity("nsube") -> 16#02288; ++entity("nsubset") -> [16#02282, 16#020D2]; ++entity("nsubseteq") -> 16#02288; ++entity("nsubseteqq") -> [16#02AC5, 16#00338]; ++entity("nsucc") -> 16#02281; ++entity("nsucceq") -> [16#02AB0, 16#00338]; ++entity("nsup") -> 16#02285; ++entity("nsupE") -> [16#02AC6, 16#00338]; ++entity("nsupe") -> 16#02289; ++entity("nsupset") -> [16#02283, 16#020D2]; ++entity("nsupseteq") -> 16#02289; ++entity("nsupseteqq") -> [16#02AC6, 16#00338]; ++entity("ntgl") -> 16#02279; ++entity("ntilde") -> 16#000F1; ++entity("ntlg") -> 16#02278; ++entity("ntriangleleft") -> 16#022EA; ++entity("ntrianglelefteq") -> 16#022EC; ++entity("ntriangleright") -> 16#022EB; ++entity("ntrianglerighteq") -> 16#022ED; ++entity("nu") -> 16#003BD; ++entity("num") -> 16#00023; ++entity("numero") -> 16#02116; ++entity("numsp") -> 16#02007; ++entity("nvDash") -> 16#022AD; ++entity("nvHarr") -> 16#02904; ++entity("nvap") -> [16#0224D, 16#020D2]; ++entity("nvdash") -> 16#022AC; ++entity("nvge") -> [16#02265, 16#020D2]; ++entity("nvgt") -> [16#0003E, 16#020D2]; ++entity("nvinfin") -> 16#029DE; ++entity("nvlArr") -> 16#02902; ++entity("nvle") -> [16#02264, 16#020D2]; ++entity("nvlt") -> [16#0003C, 16#020D2]; ++entity("nvltrie") -> [16#022B4, 16#020D2]; ++entity("nvrArr") -> 16#02903; ++entity("nvrtrie") -> [16#022B5, 16#020D2]; ++entity("nvsim") -> [16#0223C, 16#020D2]; ++entity("nwArr") -> 16#021D6; ++entity("nwarhk") -> 16#02923; ++entity("nwarr") -> 16#02196; ++entity("nwarrow") -> 16#02196; ++entity("nwnear") -> 16#02927; ++entity("oS") -> 16#024C8; ++entity("oacute") -> 16#000F3; ++entity("oast") -> 16#0229B; ++entity("ocir") -> 16#0229A; ++entity("ocirc") -> 16#000F4; ++entity("ocy") -> 16#0043E; ++entity("odash") -> 16#0229D; ++entity("odblac") -> 16#00151; ++entity("odiv") -> 16#02A38; ++entity("odot") -> 16#02299; ++entity("odsold") -> 16#029BC; ++entity("oelig") -> 16#00153; ++entity("ofcir") -> 16#029BF; ++entity("ofr") -> 16#1D52C; ++entity("ogon") -> 16#002DB; ++entity("ograve") -> 16#000F2; ++entity("ogt") -> 16#029C1; ++entity("ohbar") -> 16#029B5; ++entity("ohm") -> 16#003A9; ++entity("oint") -> 16#0222E; ++entity("olarr") -> 16#021BA; ++entity("olcir") -> 16#029BE; ++entity("olcross") -> 16#029BB; ++entity("oline") -> 16#0203E; ++entity("olt") -> 16#029C0; ++entity("omacr") -> 16#0014D; ++entity("omega") -> 16#003C9; ++entity("omicron") -> 16#003BF; ++entity("omid") -> 16#029B6; ++entity("ominus") -> 16#02296; ++entity("oopf") -> 16#1D560; ++entity("opar") -> 16#029B7; ++entity("operp") -> 16#029B9; ++entity("oplus") -> 16#02295; ++entity("or") -> 16#02228; ++entity("orarr") -> 16#021BB; ++entity("ord") -> 16#02A5D; ++entity("order") -> 16#02134; ++entity("orderof") -> 16#02134; ++entity("ordf") -> 16#000AA; ++entity("ordm") -> 16#000BA; ++entity("origof") -> 16#022B6; ++entity("oror") -> 16#02A56; ++entity("orslope") -> 16#02A57; ++entity("orv") -> 16#02A5B; ++entity("oscr") -> 16#02134; ++entity("oslash") -> 16#000F8; ++entity("osol") -> 16#02298; ++entity("otilde") -> 16#000F5; ++entity("otimes") -> 16#02297; ++entity("otimesas") -> 16#02A36; ++entity("ouml") -> 16#000F6; ++entity("ovbar") -> 16#0233D; ++entity("par") -> 16#02225; ++entity("para") -> 16#000B6; ++entity("parallel") -> 16#02225; ++entity("parsim") -> 16#02AF3; ++entity("parsl") -> 16#02AFD; ++entity("part") -> 16#02202; ++entity("pcy") -> 16#0043F; ++entity("percnt") -> 16#00025; ++entity("period") -> 16#0002E; ++entity("permil") -> 16#02030; ++entity("perp") -> 16#022A5; ++entity("pertenk") -> 16#02031; ++entity("pfr") -> 16#1D52D; ++entity("phi") -> 16#003C6; ++entity("phiv") -> 16#003D5; ++entity("phmmat") -> 16#02133; ++entity("phone") -> 16#0260E; ++entity("pi") -> 16#003C0; ++entity("pitchfork") -> 16#022D4; ++entity("piv") -> 16#003D6; ++entity("planck") -> 16#0210F; ++entity("planckh") -> 16#0210E; ++entity("plankv") -> 16#0210F; ++entity("plus") -> 16#0002B; ++entity("plusacir") -> 16#02A23; ++entity("plusb") -> 16#0229E; ++entity("pluscir") -> 16#02A22; ++entity("plusdo") -> 16#02214; ++entity("plusdu") -> 16#02A25; ++entity("pluse") -> 16#02A72; ++entity("plusmn") -> 16#000B1; ++entity("plussim") -> 16#02A26; ++entity("plustwo") -> 16#02A27; ++entity("pm") -> 16#000B1; ++entity("pointint") -> 16#02A15; ++entity("popf") -> 16#1D561; ++entity("pound") -> 16#000A3; ++entity("pr") -> 16#0227A; ++entity("prE") -> 16#02AB3; ++entity("prap") -> 16#02AB7; ++entity("prcue") -> 16#0227C; ++entity("pre") -> 16#02AAF; ++entity("prec") -> 16#0227A; ++entity("precapprox") -> 16#02AB7; ++entity("preccurlyeq") -> 16#0227C; ++entity("preceq") -> 16#02AAF; ++entity("precnapprox") -> 16#02AB9; ++entity("precneqq") -> 16#02AB5; ++entity("precnsim") -> 16#022E8; ++entity("precsim") -> 16#0227E; ++entity("prime") -> 16#02032; ++entity("primes") -> 16#02119; ++entity("prnE") -> 16#02AB5; ++entity("prnap") -> 16#02AB9; ++entity("prnsim") -> 16#022E8; ++entity("prod") -> 16#0220F; ++entity("profalar") -> 16#0232E; ++entity("profline") -> 16#02312; ++entity("profsurf") -> 16#02313; ++entity("prop") -> 16#0221D; ++entity("propto") -> 16#0221D; ++entity("prsim") -> 16#0227E; ++entity("prurel") -> 16#022B0; ++entity("pscr") -> 16#1D4C5; ++entity("psi") -> 16#003C8; ++entity("puncsp") -> 16#02008; ++entity("qfr") -> 16#1D52E; ++entity("qint") -> 16#02A0C; ++entity("qopf") -> 16#1D562; ++entity("qprime") -> 16#02057; ++entity("qscr") -> 16#1D4C6; ++entity("quaternions") -> 16#0210D; ++entity("quatint") -> 16#02A16; ++entity("quest") -> 16#0003F; ++entity("questeq") -> 16#0225F; ++entity("quot") -> 16#00022; ++entity("rAarr") -> 16#021DB; ++entity("rArr") -> 16#021D2; ++entity("rAtail") -> 16#0291C; ++entity("rBarr") -> 16#0290F; ++entity("rHar") -> 16#02964; ++entity("race") -> [16#0223D, 16#00331]; ++entity("racute") -> 16#00155; ++entity("radic") -> 16#0221A; ++entity("raemptyv") -> 16#029B3; ++entity("rang") -> 16#027E9; ++entity("rangd") -> 16#02992; ++entity("range") -> 16#029A5; ++entity("rangle") -> 16#027E9; ++entity("raquo") -> 16#000BB; ++entity("rarr") -> 16#02192; ++entity("rarrap") -> 16#02975; ++entity("rarrb") -> 16#021E5; ++entity("rarrbfs") -> 16#02920; ++entity("rarrc") -> 16#02933; ++entity("rarrfs") -> 16#0291E; ++entity("rarrhk") -> 16#021AA; ++entity("rarrlp") -> 16#021AC; ++entity("rarrpl") -> 16#02945; ++entity("rarrsim") -> 16#02974; ++entity("rarrtl") -> 16#021A3; ++entity("rarrw") -> 16#0219D; ++entity("ratail") -> 16#0291A; ++entity("ratio") -> 16#02236; ++entity("rationals") -> 16#0211A; ++entity("rbarr") -> 16#0290D; ++entity("rbbrk") -> 16#02773; ++entity("rbrace") -> 16#0007D; ++entity("rbrack") -> 16#0005D; ++entity("rbrke") -> 16#0298C; ++entity("rbrksld") -> 16#0298E; ++entity("rbrkslu") -> 16#02990; ++entity("rcaron") -> 16#00159; ++entity("rcedil") -> 16#00157; ++entity("rceil") -> 16#02309; ++entity("rcub") -> 16#0007D; ++entity("rcy") -> 16#00440; ++entity("rdca") -> 16#02937; ++entity("rdldhar") -> 16#02969; ++entity("rdquo") -> 16#0201D; ++entity("rdquor") -> 16#0201D; ++entity("rdsh") -> 16#021B3; ++entity("real") -> 16#0211C; ++entity("realine") -> 16#0211B; ++entity("realpart") -> 16#0211C; ++entity("reals") -> 16#0211D; ++entity("rect") -> 16#025AD; ++entity("reg") -> 16#000AE; ++entity("rfisht") -> 16#0297D; ++entity("rfloor") -> 16#0230B; ++entity("rfr") -> 16#1D52F; ++entity("rhard") -> 16#021C1; ++entity("rharu") -> 16#021C0; ++entity("rharul") -> 16#0296C; ++entity("rho") -> 16#003C1; ++entity("rhov") -> 16#003F1; ++entity("rightarrow") -> 16#02192; ++entity("rightarrowtail") -> 16#021A3; ++entity("rightharpoondown") -> 16#021C1; ++entity("rightharpoonup") -> 16#021C0; ++entity("rightleftarrows") -> 16#021C4; ++entity("rightleftharpoons") -> 16#021CC; ++entity("rightrightarrows") -> 16#021C9; ++entity("rightsquigarrow") -> 16#0219D; ++entity("rightthreetimes") -> 16#022CC; ++entity("ring") -> 16#002DA; ++entity("risingdotseq") -> 16#02253; ++entity("rlarr") -> 16#021C4; ++entity("rlhar") -> 16#021CC; ++entity("rlm") -> 16#0200F; ++entity("rmoust") -> 16#023B1; ++entity("rmoustache") -> 16#023B1; ++entity("rnmid") -> 16#02AEE; ++entity("roang") -> 16#027ED; ++entity("roarr") -> 16#021FE; ++entity("robrk") -> 16#027E7; ++entity("ropar") -> 16#02986; ++entity("ropf") -> 16#1D563; ++entity("roplus") -> 16#02A2E; ++entity("rotimes") -> 16#02A35; ++entity("rpar") -> 16#00029; ++entity("rpargt") -> 16#02994; ++entity("rppolint") -> 16#02A12; ++entity("rrarr") -> 16#021C9; ++entity("rsaquo") -> 16#0203A; ++entity("rscr") -> 16#1D4C7; ++entity("rsh") -> 16#021B1; ++entity("rsqb") -> 16#0005D; ++entity("rsquo") -> 16#02019; ++entity("rsquor") -> 16#02019; ++entity("rthree") -> 16#022CC; ++entity("rtimes") -> 16#022CA; ++entity("rtri") -> 16#025B9; ++entity("rtrie") -> 16#022B5; ++entity("rtrif") -> 16#025B8; ++entity("rtriltri") -> 16#029CE; ++entity("ruluhar") -> 16#02968; ++entity("rx") -> 16#0211E; ++entity("sacute") -> 16#0015B; ++entity("sbquo") -> 16#0201A; ++entity("sc") -> 16#0227B; ++entity("scE") -> 16#02AB4; ++entity("scap") -> 16#02AB8; ++entity("scaron") -> 16#00161; ++entity("sccue") -> 16#0227D; ++entity("sce") -> 16#02AB0; ++entity("scedil") -> 16#0015F; ++entity("scirc") -> 16#0015D; ++entity("scnE") -> 16#02AB6; ++entity("scnap") -> 16#02ABA; ++entity("scnsim") -> 16#022E9; ++entity("scpolint") -> 16#02A13; ++entity("scsim") -> 16#0227F; ++entity("scy") -> 16#00441; ++entity("sdot") -> 16#022C5; ++entity("sdotb") -> 16#022A1; ++entity("sdote") -> 16#02A66; ++entity("seArr") -> 16#021D8; ++entity("searhk") -> 16#02925; ++entity("searr") -> 16#02198; ++entity("searrow") -> 16#02198; ++entity("sect") -> 16#000A7; ++entity("semi") -> 16#0003B; ++entity("seswar") -> 16#02929; ++entity("setminus") -> 16#02216; ++entity("setmn") -> 16#02216; ++entity("sext") -> 16#02736; ++entity("sfr") -> 16#1D530; ++entity("sfrown") -> 16#02322; ++entity("sharp") -> 16#0266F; ++entity("shchcy") -> 16#00449; ++entity("shcy") -> 16#00448; ++entity("shortmid") -> 16#02223; ++entity("shortparallel") -> 16#02225; ++entity("shy") -> 16#000AD; ++entity("sigma") -> 16#003C3; ++entity("sigmaf") -> 16#003C2; ++entity("sigmav") -> 16#003C2; ++entity("sim") -> 16#0223C; ++entity("simdot") -> 16#02A6A; ++entity("sime") -> 16#02243; ++entity("simeq") -> 16#02243; ++entity("simg") -> 16#02A9E; ++entity("simgE") -> 16#02AA0; ++entity("siml") -> 16#02A9D; ++entity("simlE") -> 16#02A9F; ++entity("simne") -> 16#02246; ++entity("simplus") -> 16#02A24; ++entity("simrarr") -> 16#02972; ++entity("slarr") -> 16#02190; ++entity("smallsetminus") -> 16#02216; ++entity("smashp") -> 16#02A33; ++entity("smeparsl") -> 16#029E4; ++entity("smid") -> 16#02223; ++entity("smile") -> 16#02323; ++entity("smt") -> 16#02AAA; ++entity("smte") -> 16#02AAC; ++entity("smtes") -> [16#02AAC, 16#0FE00]; ++entity("softcy") -> 16#0044C; ++entity("sol") -> 16#0002F; ++entity("solb") -> 16#029C4; ++entity("solbar") -> 16#0233F; ++entity("sopf") -> 16#1D564; ++entity("spades") -> 16#02660; ++entity("spadesuit") -> 16#02660; ++entity("spar") -> 16#02225; ++entity("sqcap") -> 16#02293; ++entity("sqcaps") -> [16#02293, 16#0FE00]; ++entity("sqcup") -> 16#02294; ++entity("sqcups") -> [16#02294, 16#0FE00]; ++entity("sqsub") -> 16#0228F; ++entity("sqsube") -> 16#02291; ++entity("sqsubset") -> 16#0228F; ++entity("sqsubseteq") -> 16#02291; ++entity("sqsup") -> 16#02290; ++entity("sqsupe") -> 16#02292; ++entity("sqsupset") -> 16#02290; ++entity("sqsupseteq") -> 16#02292; ++entity("squ") -> 16#025A1; ++entity("square") -> 16#025A1; ++entity("squarf") -> 16#025AA; ++entity("squf") -> 16#025AA; ++entity("srarr") -> 16#02192; ++entity("sscr") -> 16#1D4C8; ++entity("ssetmn") -> 16#02216; ++entity("ssmile") -> 16#02323; ++entity("sstarf") -> 16#022C6; ++entity("star") -> 16#02606; ++entity("starf") -> 16#02605; ++entity("straightepsilon") -> 16#003F5; ++entity("straightphi") -> 16#003D5; ++entity("strns") -> 16#000AF; ++entity("sub") -> 16#02282; ++entity("subE") -> 16#02AC5; ++entity("subdot") -> 16#02ABD; ++entity("sube") -> 16#02286; ++entity("subedot") -> 16#02AC3; ++entity("submult") -> 16#02AC1; ++entity("subnE") -> 16#02ACB; ++entity("subne") -> 16#0228A; ++entity("subplus") -> 16#02ABF; ++entity("subrarr") -> 16#02979; ++entity("subset") -> 16#02282; ++entity("subseteq") -> 16#02286; ++entity("subseteqq") -> 16#02AC5; ++entity("subsetneq") -> 16#0228A; ++entity("subsetneqq") -> 16#02ACB; ++entity("subsim") -> 16#02AC7; ++entity("subsub") -> 16#02AD5; ++entity("subsup") -> 16#02AD3; ++entity("succ") -> 16#0227B; ++entity("succapprox") -> 16#02AB8; ++entity("succcurlyeq") -> 16#0227D; ++entity("succeq") -> 16#02AB0; ++entity("succnapprox") -> 16#02ABA; ++entity("succneqq") -> 16#02AB6; ++entity("succnsim") -> 16#022E9; ++entity("succsim") -> 16#0227F; ++entity("sum") -> 16#02211; ++entity("sung") -> 16#0266A; ++entity("sup") -> 16#02283; ++entity("sup1") -> 16#000B9; ++entity("sup2") -> 16#000B2; ++entity("sup3") -> 16#000B3; ++entity("supE") -> 16#02AC6; ++entity("supdot") -> 16#02ABE; ++entity("supdsub") -> 16#02AD8; ++entity("supe") -> 16#02287; ++entity("supedot") -> 16#02AC4; ++entity("suphsol") -> 16#027C9; ++entity("suphsub") -> 16#02AD7; ++entity("suplarr") -> 16#0297B; ++entity("supmult") -> 16#02AC2; ++entity("supnE") -> 16#02ACC; ++entity("supne") -> 16#0228B; ++entity("supplus") -> 16#02AC0; ++entity("supset") -> 16#02283; ++entity("supseteq") -> 16#02287; ++entity("supseteqq") -> 16#02AC6; ++entity("supsetneq") -> 16#0228B; ++entity("supsetneqq") -> 16#02ACC; ++entity("supsim") -> 16#02AC8; ++entity("supsub") -> 16#02AD4; ++entity("supsup") -> 16#02AD6; ++entity("swArr") -> 16#021D9; ++entity("swarhk") -> 16#02926; ++entity("swarr") -> 16#02199; ++entity("swarrow") -> 16#02199; ++entity("swnwar") -> 16#0292A; ++entity("szlig") -> 16#000DF; ++entity("target") -> 16#02316; ++entity("tau") -> 16#003C4; ++entity("tbrk") -> 16#023B4; ++entity("tcaron") -> 16#00165; ++entity("tcedil") -> 16#00163; ++entity("tcy") -> 16#00442; ++entity("tdot") -> 16#020DB; ++entity("telrec") -> 16#02315; ++entity("tfr") -> 16#1D531; ++entity("there4") -> 16#02234; ++entity("therefore") -> 16#02234; ++entity("theta") -> 16#003B8; ++entity("thetasym") -> 16#003D1; ++entity("thetav") -> 16#003D1; ++entity("thickapprox") -> 16#02248; ++entity("thicksim") -> 16#0223C; ++entity("thinsp") -> 16#02009; ++entity("thkap") -> 16#02248; ++entity("thksim") -> 16#0223C; ++entity("thorn") -> 16#000FE; ++entity("tilde") -> 16#002DC; ++entity("times") -> 16#000D7; ++entity("timesb") -> 16#022A0; ++entity("timesbar") -> 16#02A31; ++entity("timesd") -> 16#02A30; ++entity("tint") -> 16#0222D; ++entity("toea") -> 16#02928; ++entity("top") -> 16#022A4; ++entity("topbot") -> 16#02336; ++entity("topcir") -> 16#02AF1; ++entity("topf") -> 16#1D565; ++entity("topfork") -> 16#02ADA; ++entity("tosa") -> 16#02929; ++entity("tprime") -> 16#02034; ++entity("trade") -> 16#02122; ++entity("triangle") -> 16#025B5; ++entity("triangledown") -> 16#025BF; ++entity("triangleleft") -> 16#025C3; ++entity("trianglelefteq") -> 16#022B4; ++entity("triangleq") -> 16#0225C; ++entity("triangleright") -> 16#025B9; ++entity("trianglerighteq") -> 16#022B5; ++entity("tridot") -> 16#025EC; ++entity("trie") -> 16#0225C; ++entity("triminus") -> 16#02A3A; ++entity("triplus") -> 16#02A39; ++entity("trisb") -> 16#029CD; ++entity("tritime") -> 16#02A3B; ++entity("trpezium") -> 16#023E2; ++entity("tscr") -> 16#1D4C9; ++entity("tscy") -> 16#00446; ++entity("tshcy") -> 16#0045B; ++entity("tstrok") -> 16#00167; ++entity("twixt") -> 16#0226C; ++entity("twoheadleftarrow") -> 16#0219E; ++entity("twoheadrightarrow") -> 16#021A0; ++entity("uArr") -> 16#021D1; ++entity("uHar") -> 16#02963; ++entity("uacute") -> 16#000FA; ++entity("uarr") -> 16#02191; ++entity("ubrcy") -> 16#0045E; ++entity("ubreve") -> 16#0016D; ++entity("ucirc") -> 16#000FB; ++entity("ucy") -> 16#00443; ++entity("udarr") -> 16#021C5; ++entity("udblac") -> 16#00171; ++entity("udhar") -> 16#0296E; ++entity("ufisht") -> 16#0297E; ++entity("ufr") -> 16#1D532; ++entity("ugrave") -> 16#000F9; ++entity("uharl") -> 16#021BF; ++entity("uharr") -> 16#021BE; ++entity("uhblk") -> 16#02580; ++entity("ulcorn") -> 16#0231C; ++entity("ulcorner") -> 16#0231C; ++entity("ulcrop") -> 16#0230F; ++entity("ultri") -> 16#025F8; ++entity("umacr") -> 16#0016B; ++entity("uml") -> 16#000A8; ++entity("uogon") -> 16#00173; ++entity("uopf") -> 16#1D566; ++entity("uparrow") -> 16#02191; ++entity("updownarrow") -> 16#02195; ++entity("upharpoonleft") -> 16#021BF; ++entity("upharpoonright") -> 16#021BE; ++entity("uplus") -> 16#0228E; ++entity("upsi") -> 16#003C5; ++entity("upsih") -> 16#003D2; ++entity("upsilon") -> 16#003C5; ++entity("upuparrows") -> 16#021C8; ++entity("urcorn") -> 16#0231D; ++entity("urcorner") -> 16#0231D; ++entity("urcrop") -> 16#0230E; ++entity("uring") -> 16#0016F; ++entity("urtri") -> 16#025F9; ++entity("uscr") -> 16#1D4CA; ++entity("utdot") -> 16#022F0; ++entity("utilde") -> 16#00169; ++entity("utri") -> 16#025B5; ++entity("utrif") -> 16#025B4; ++entity("uuarr") -> 16#021C8; ++entity("uuml") -> 16#000FC; ++entity("uwangle") -> 16#029A7; ++entity("vArr") -> 16#021D5; ++entity("vBar") -> 16#02AE8; ++entity("vBarv") -> 16#02AE9; ++entity("vDash") -> 16#022A8; ++entity("vangrt") -> 16#0299C; ++entity("varepsilon") -> 16#003F5; ++entity("varkappa") -> 16#003F0; ++entity("varnothing") -> 16#02205; ++entity("varphi") -> 16#003D5; ++entity("varpi") -> 16#003D6; ++entity("varpropto") -> 16#0221D; ++entity("varr") -> 16#02195; ++entity("varrho") -> 16#003F1; ++entity("varsigma") -> 16#003C2; ++entity("varsubsetneq") -> [16#0228A, 16#0FE00]; ++entity("varsubsetneqq") -> [16#02ACB, 16#0FE00]; ++entity("varsupsetneq") -> [16#0228B, 16#0FE00]; ++entity("varsupsetneqq") -> [16#02ACC, 16#0FE00]; ++entity("vartheta") -> 16#003D1; ++entity("vartriangleleft") -> 16#022B2; ++entity("vartriangleright") -> 16#022B3; ++entity("vcy") -> 16#00432; ++entity("vdash") -> 16#022A2; ++entity("vee") -> 16#02228; ++entity("veebar") -> 16#022BB; ++entity("veeeq") -> 16#0225A; ++entity("vellip") -> 16#022EE; ++entity("verbar") -> 16#0007C; ++entity("vert") -> 16#0007C; ++entity("vfr") -> 16#1D533; ++entity("vltri") -> 16#022B2; ++entity("vnsub") -> [16#02282, 16#020D2]; ++entity("vnsup") -> [16#02283, 16#020D2]; ++entity("vopf") -> 16#1D567; ++entity("vprop") -> 16#0221D; ++entity("vrtri") -> 16#022B3; ++entity("vscr") -> 16#1D4CB; ++entity("vsubnE") -> [16#02ACB, 16#0FE00]; ++entity("vsubne") -> [16#0228A, 16#0FE00]; ++entity("vsupnE") -> [16#02ACC, 16#0FE00]; ++entity("vsupne") -> [16#0228B, 16#0FE00]; ++entity("vzigzag") -> 16#0299A; ++entity("wcirc") -> 16#00175; ++entity("wedbar") -> 16#02A5F; ++entity("wedge") -> 16#02227; ++entity("wedgeq") -> 16#02259; ++entity("weierp") -> 16#02118; ++entity("wfr") -> 16#1D534; ++entity("wopf") -> 16#1D568; ++entity("wp") -> 16#02118; ++entity("wr") -> 16#02240; ++entity("wreath") -> 16#02240; ++entity("wscr") -> 16#1D4CC; ++entity("xcap") -> 16#022C2; ++entity("xcirc") -> 16#025EF; ++entity("xcup") -> 16#022C3; ++entity("xdtri") -> 16#025BD; ++entity("xfr") -> 16#1D535; ++entity("xhArr") -> 16#027FA; ++entity("xharr") -> 16#027F7; ++entity("xi") -> 16#003BE; ++entity("xlArr") -> 16#027F8; ++entity("xlarr") -> 16#027F5; ++entity("xmap") -> 16#027FC; ++entity("xnis") -> 16#022FB; ++entity("xodot") -> 16#02A00; ++entity("xopf") -> 16#1D569; ++entity("xoplus") -> 16#02A01; ++entity("xotime") -> 16#02A02; ++entity("xrArr") -> 16#027F9; ++entity("xrarr") -> 16#027F6; ++entity("xscr") -> 16#1D4CD; ++entity("xsqcup") -> 16#02A06; ++entity("xuplus") -> 16#02A04; ++entity("xutri") -> 16#025B3; ++entity("xvee") -> 16#022C1; ++entity("xwedge") -> 16#022C0; ++entity("yacute") -> 16#000FD; ++entity("yacy") -> 16#0044F; ++entity("ycirc") -> 16#00177; ++entity("ycy") -> 16#0044B; ++entity("yen") -> 16#000A5; ++entity("yfr") -> 16#1D536; ++entity("yicy") -> 16#00457; ++entity("yopf") -> 16#1D56A; ++entity("yscr") -> 16#1D4CE; ++entity("yucy") -> 16#0044E; ++entity("yuml") -> 16#000FF; ++entity("zacute") -> 16#0017A; ++entity("zcaron") -> 16#0017E; ++entity("zcy") -> 16#00437; ++entity("zdot") -> 16#0017C; ++entity("zeetrf") -> 16#02128; ++entity("zeta") -> 16#003B6; ++entity("zfr") -> 16#1D537; ++entity("zhcy") -> 16#00436; ++entity("zigrarr") -> 16#021DD; ++entity("zopf") -> 16#1D56B; ++entity("zscr") -> 16#1D4CF; ++entity("zwj") -> 16#0200D; ++entity("zwnj") -> 16#0200C; ++entity(_) -> undefined. + + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + exhaustive_entity_test() -> + T = mochiweb_cover:clause_lookup_table(?MODULE, entity), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_cookies.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cookies.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_cookies.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cookies.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -23,6 +23,7 @@ + + %% @type proplist() = [{Key::string(), Value::string()}]. + %% @type header() = {Name::string(), Value::string()}. ++%% @type int_seconds() = integer(). + + %% @spec cookie(Key::string(), Value::string()) -> header() + %% @doc Short-hand for <code>cookie(Key, Value, [])</code>. +@@ -30,7 +31,7 @@ + cookie(Key, Value, []). + + %% @spec cookie(Key::string(), Value::string(), Options::[Option]) -> header() +-%% where Option = {max_age, integer()} | {local_time, {date(), time()}} ++%% where Option = {max_age, int_seconds()} | {local_time, {date(), time()}} + %% | {domain, string()} | {path, string()} + %% | {secure, true | false} | {http_only, true | false} + %% +@@ -115,12 +116,33 @@ + orelse erlang:error({cookie_quoting_required, V}), + V. + ++ ++%% Return a date in the form of: Wdy, DD-Mon-YYYY HH:MM:SS GMT ++%% See also: rfc2109: 10.1.2 ++rfc2109_cookie_expires_date(LocalTime) -> ++ {{YYYY,MM,DD},{Hour,Min,Sec}} = ++ case calendar:local_time_to_universal_time_dst(LocalTime) of ++ [] -> ++ {Date, {Hour1, Min1, Sec1}} = LocalTime, ++ LocalTime2 = {Date, {Hour1 + 1, Min1, Sec1}}, ++ case calendar:local_time_to_universal_time_dst(LocalTime2) of ++ [Gmt] -> Gmt; ++ [_,Gmt] -> Gmt ++ end; ++ [Gmt] -> Gmt; ++ [_,Gmt] -> Gmt ++ end, ++ DayNumber = calendar:day_of_the_week({YYYY,MM,DD}), ++ lists:flatten( ++ io_lib:format("~s, ~2.2.0w-~3.s-~4.4.0w ~2.2.0w:~2.2.0w:~2.2.0w GMT", ++ [httpd_util:day(DayNumber),DD,httpd_util:month(MM),YYYY,Hour,Min,Sec])). ++ + add_seconds(Secs, LocalTime) -> + Greg = calendar:datetime_to_gregorian_seconds(LocalTime), + calendar:gregorian_seconds_to_datetime(Greg + Secs). + + age_to_cookie_date(Age, LocalTime) -> +- httpd_util:rfc1123_date(add_seconds(Age, LocalTime)). ++ rfc2109_cookie_expires_date(add_seconds(Age, LocalTime)). + + %% @spec parse_cookie(string()) -> [{K::string(), V::string()}] + %% @doc Parse the contents of a Cookie header field, ignoring cookie +@@ -203,8 +225,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + quote_test() -> + %% ?assertError eunit macro is not compatible with coverage module +@@ -293,14 +315,14 @@ + C2 = {"Set-Cookie", + "Customer=WILE_E_COYOTE; " + "Version=1; " +- "Expires=Tue, 15 May 2007 13:45:33 GMT; " ++ "Expires=Tue, 15-May-2007 13:45:33 GMT; " + "Max-Age=0"}, + C2 = cookie("Customer", "WILE_E_COYOTE", + [{max_age, -111}, {local_time, LocalTime}]), + C3 = {"Set-Cookie", + "Customer=WILE_E_COYOTE; " + "Version=1; " +- "Expires=Wed, 16 May 2007 13:45:50 GMT; " ++ "Expires=Wed, 16-May-2007 13:45:50 GMT; " + "Max-Age=86417"}, + C3 = cookie("Customer", "WILE_E_COYOTE", + [{max_age, 86417}, {local_time, LocalTime}]), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_cover.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cover.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_cover.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_cover.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -46,8 +46,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + foo_table(a) -> b; + foo_table("a") -> <<"b">>; + foo_table(123) -> {4, 3, 2}; +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_echo.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_echo.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_echo.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_echo.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -11,11 +11,14 @@ + mochiweb_socket_server:stop(?MODULE). + + start() -> +- mochiweb_socket_server:start([{name, ?MODULE}, ++ mochiweb_socket_server:start([{link, false} | options()]). ++ ++options() -> ++ [{name, ?MODULE}, + {port, 6789}, + {ip, "127.0.0.1"}, + {max, 1}, +- {loop, {?MODULE, loop}}]). ++ {loop, {?MODULE, loop}}]. + + loop(Socket) -> + case mochiweb_socket:recv(Socket, 0, 30000) of +@@ -33,6 +36,6 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -6,22 +6,9 @@ + -module(mochiweb). + -author('bob@mochimedia.com'). + +--export([start/0, stop/0]). + -export([new_request/1, new_response/1]). + -export([all_loaded/0, all_loaded/1, reload/0]). +- +-%% @spec start() -> ok +-%% @doc Start the MochiWeb server. +-start() -> +- ensure_started(crypto), +- application:start(mochiweb). +- +-%% @spec stop() -> ok +-%% @doc Stop the MochiWeb server. +-stop() -> +- Res = application:stop(mochiweb), +- application:stop(crypto), +- Res. ++-export([ensure_started/1]). + + reload() -> + [c:l(Module) || Module <- all_loaded()]. +@@ -78,8 +65,8 @@ + Code, + mochiweb_headers:make(Headers)). + +-%% Internal API +- ++%% @spec ensure_started(App::atom()) -> ok ++%% @doc Start the given App if it has not been started already. + ensure_started(App) -> + case application:start(App) of + ok -> +@@ -92,8 +78,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + -record(treq, {path, body= <<>>, xreply= <<>>}). + +@@ -112,7 +98,7 @@ + ssl -> + ServerOpts0 ++ [{ssl, true}, {ssl_opts, ssl_cert_opts()}] + end, +- {ok, Server} = mochiweb_http:start(ServerOpts), ++ {ok, Server} = mochiweb_http:start_link(ServerOpts), + Port = mochiweb_socket_server:get(Server, port), + Res = (catch ClientFun(Transport, Port)), + mochiweb_http:stop(Server), +@@ -123,6 +109,8 @@ + "/foo/bar/baz wibble quux" = R:get(path), + ok. + ++-define(LARGE_TIMEOUT, 60). ++ + single_http_GET_test() -> + do_GET(plain, 1). + +@@ -135,11 +123,13 @@ + multiple_https_GET_test() -> + do_GET(ssl, 3). + +-hundred_http_GET_test() -> +- do_GET(plain, 100). +- +-hundred_https_GET_test() -> +- do_GET(ssl, 100). ++hundred_http_GET_test_() -> % note the underscore ++ {timeout, ?LARGE_TIMEOUT, ++ fun() -> ?assertEqual(ok, do_GET(plain,100)) end}. ++ ++hundred_https_GET_test_() -> % note the underscore ++ {timeout, ?LARGE_TIMEOUT, ++ fun() -> ?assertEqual(ok, do_GET(ssl,100)) end}. + + single_128_http_POST_test() -> + do_POST(plain, 128, 1). +@@ -165,11 +155,13 @@ + multiple_100K_https_POST_test() -> + do_POST(ssl, 102400, 3). + +-hundred_128_http_POST_test() -> +- do_POST(plain, 128, 100). +- +-hundred_128_https_POST_test() -> +- do_POST(ssl, 128, 100). ++hundred_128_http_POST_test_() -> % note the underscore ++ {timeout, ?LARGE_TIMEOUT, ++ fun() -> ?assertEqual(ok, do_POST(plain, 128, 100)) end}. ++ ++hundred_128_https_POST_test_() -> % note the underscore ++ {timeout, ?LARGE_TIMEOUT, ++ fun() -> ?assertEqual(ok, do_POST(ssl, 128, 100)) end}. + + do_GET(Transport, Times) -> + PathPrefix = "/whatever/", +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_headers.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_headers.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_headers.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_headers.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -6,7 +6,7 @@ + -module(mochiweb_headers). + -author('bob@mochimedia.com'). + -export([empty/0, from_list/1, insert/3, enter/3, get_value/2, lookup/2]). +--export([delete_any/2, get_primary_value/2]). ++-export([delete_any/2, get_primary_value/2, get_combined_value/2]). + -export([default/3, enter_from_list/2, default_from_list/2]). + -export([to_list/1, make/1]). + -export([from_binary/1]). +@@ -24,8 +24,8 @@ + %% @doc Construct a headers() from the given list. + make(L) when is_list(L) -> + from_list(L); +-%% assume a tuple is already mochiweb_headers. +-make(T) when is_tuple(T) -> ++%% assume a non-list is already mochiweb_headers. ++make(T) -> + T. + + %% @spec from_binary(iolist()) -> headers() +@@ -112,6 +112,34 @@ + lists:takewhile(fun (C) -> C =/= $; end, V) + end. + ++%% @spec get_combined_value(key(), headers()) -> string() | undefined ++%% @doc Return the value from the given header using a case insensitive search. ++%% If the value of the header is a comma-separated list where holds values ++%% are all identical, the identical value will be returned. ++%% undefined will be returned for keys that are not present or the ++%% values in the list are not the same. ++%% ++%% NOTE: The process isn't designed for a general purpose. If you need ++%% to access all values in the combined header, please refer to ++%% '''tokenize_header_value/1'''. ++%% ++%% Section 4.2 of the RFC 2616 (HTTP 1.1) describes multiple message-header ++%% fields with the same field-name may be present in a message if and only ++%% if the entire field-value for that header field is defined as a ++%% comma-separated list [i.e., #(values)]. ++get_combined_value(K, T) -> ++ case get_value(K, T) of ++ undefined -> ++ undefined; ++ V -> ++ case sets:to_list(sets:from_list(tokenize_header_value(V))) of ++ [Val] -> ++ Val; ++ _ -> ++ undefined ++ end ++ end. ++ + %% @spec lookup(key(), headers()) -> {value, {key(), string()}} | none + %% @doc Return the case preserved key and value for the given header using + %% a case insensitive search. none will be returned for keys that are +@@ -164,6 +192,49 @@ + + %% Internal API + ++tokenize_header_value(undefined) -> ++ undefined; ++tokenize_header_value(V) -> ++ reversed_tokens(trim_and_reverse(V, false), [], []). ++ ++trim_and_reverse([S | Rest], Reversed) when S=:=$ ; S=:=$\n; S=:=$\t -> ++ trim_and_reverse(Rest, Reversed); ++trim_and_reverse(V, false) -> ++ trim_and_reverse(lists:reverse(V), true); ++trim_and_reverse(V, true) -> ++ V. ++ ++reversed_tokens([], [], Acc) -> ++ Acc; ++reversed_tokens([], Token, Acc) -> ++ [Token | Acc]; ++reversed_tokens("\"" ++ Rest, [], Acc) -> ++ case extract_quoted_string(Rest, []) of ++ {String, NewRest} -> ++ reversed_tokens(NewRest, [], [String | Acc]); ++ undefined -> ++ undefined ++ end; ++reversed_tokens("\"" ++ _Rest, _Token, _Acc) -> ++ undefined; ++reversed_tokens([C | Rest], [], Acc) when C=:=$ ;C=:=$\n;C=:=$\t;C=:=$, -> ++ reversed_tokens(Rest, [], Acc); ++reversed_tokens([C | Rest], Token, Acc) when C=:=$ ;C=:=$\n;C=:=$\t;C=:=$, -> ++ reversed_tokens(Rest, [], [Token | Acc]); ++reversed_tokens([C | Rest], Token, Acc) -> ++ reversed_tokens(Rest, [C | Token], Acc); ++reversed_tokens(_, _, _) -> ++ undefeined. ++ ++extract_quoted_string([], _Acc) -> ++ undefined; ++extract_quoted_string("\"\\" ++ Rest, Acc) -> ++ extract_quoted_string(Rest, "\"" ++ Acc); ++extract_quoted_string("\"" ++ Rest, Acc) -> ++ {Acc, Rest}; ++extract_quoted_string([C | Rest], Acc) -> ++ extract_quoted_string(Rest, [C | Acc]). ++ + expand({array, L}) -> + mochiweb_util:join(lists:reverse(L), ", "); + expand(V) -> +@@ -195,8 +266,8 @@ + %% + %% Tests. + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + make_test() -> + Identity = make([{hdr, foo}]), +@@ -237,6 +308,37 @@ + get_primary_value(<<"baz">>, H)), + ok. + ++get_combined_value_test() -> ++ H = make([{hdr, foo}, {baz, <<"wibble,taco">>}, {content_length, "123, 123"}, ++ {test, " 123, 123, 123 , 123,123 "}, ++ {test2, "456, 123, 123 , 123"}, ++ {test3, "123"}, {test4, " 123, "}]), ++ ?assertEqual( ++ "foo", ++ get_combined_value(hdr, H)), ++ ?assertEqual( ++ undefined, ++ get_combined_value(bar, H)), ++ ?assertEqual( ++ undefined, ++ get_combined_value(<<"baz">>, H)), ++ ?assertEqual( ++ "123", ++ get_combined_value(<<"content_length">>, H)), ++ ?assertEqual( ++ "123", ++ get_combined_value(<<"test">>, H)), ++ ?assertEqual( ++ undefined, ++ get_combined_value(<<"test2">>, H)), ++ ?assertEqual( ++ "123", ++ get_combined_value(<<"test3">>, H)), ++ ?assertEqual( ++ "123", ++ get_combined_value(<<"test4">>, H)), ++ ok. ++ + set_cookie_test() -> + H = make([{"set-cookie", foo}, {"set-cookie", bar}, {"set-cookie", baz}]), + ?assertEqual( +@@ -296,4 +398,23 @@ + [] = ?MODULE:to_list(?MODULE:from_binary([<<"\r\n\r\n">>])), + ok. + ++tokenize_header_value_test() -> ++ ?assertEqual(["a quote in a \"quote\"."], ++ tokenize_header_value("\"a quote in a \\\"quote\\\".\"")), ++ ?assertEqual(["abc"], tokenize_header_value("abc")), ++ ?assertEqual(["abc", "def"], tokenize_header_value("abc def")), ++ ?assertEqual(["abc", "def"], tokenize_header_value("abc , def")), ++ ?assertEqual(["abc", "def"], tokenize_header_value(",abc ,, def,,")), ++ ?assertEqual(["abc def"], tokenize_header_value("\"abc def\" ")), ++ ?assertEqual(["abc, def"], tokenize_header_value("\"abc, def\"")), ++ ?assertEqual(["\\a\\$"], tokenize_header_value("\"\\a\\$\"")), ++ ?assertEqual(["abc def", "foo, bar", "12345", ""], ++ tokenize_header_value("\"abc def\" \"foo, bar\" , 12345, \"\"")), ++ ?assertEqual(undefined, ++ tokenize_header_value(undefined)), ++ ?assertEqual(undefined, ++ tokenize_header_value("umatched quote\"")), ++ ?assertEqual(undefined, ++ tokenize_header_value("\"unmatched quote")). ++ + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_html.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_html.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_html.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_html.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -95,7 +95,12 @@ + to_tokens({Tag0, [], Acc}); + to_tokens({Tag0, Attrs, Acc}) -> + Tag = to_tag(Tag0), +- to_tokens([{Tag, Acc}], [{start_tag, Tag, Attrs, is_singleton(Tag)}]). ++ case is_singleton(Tag) of ++ true -> ++ to_tokens([], [{start_tag, Tag, Attrs, true}]); ++ false -> ++ to_tokens([{Tag, Acc}], [{start_tag, Tag, Attrs, false}]) ++ end. + + %% @spec to_html([html_token()] | html_node()) -> iolist() + %% @doc Convert a list of html_token() to a HTML document. +@@ -312,7 +317,8 @@ + {Tag, S1} = tokenize_literal(B, ?ADV_COL(S, 2)), + {S2, _} = find_gt(B, S1), + {{end_tag, Tag}, S2}; +- <<_:O/binary, "<", C, _/binary>> when ?IS_WHITESPACE(C) -> ++ <<_:O/binary, "<", C, _/binary>> ++ when ?IS_WHITESPACE(C); not ?IS_LITERAL_SAFE(C) -> + %% This isn't really strict HTML + {{data, Data, _Whitespace}, S1} = tokenize_data(B, ?INC_COL(S)), + {{data, <<$<, Data/binary>>, false}, S1}; +@@ -501,8 +507,6 @@ + tokenize_quoted_attr_value(B, S1, [Data|Acc], Q); + <<_:O/binary, Q, _/binary>> -> + { iolist_to_binary(lists:reverse(Acc)), ?INC_COL(S) }; +- <<_:O/binary, $\n, _/binary>> -> +- { iolist_to_binary(lists:reverse(Acc)), ?INC_LINE(S) }; + <<_:O/binary, C, _/binary>> -> + tokenize_quoted_attr_value(B, ?INC_COL(S), [C|Acc], Q) + end. +@@ -603,32 +607,33 @@ + end. + + tokenize_charref(Bin, S=#decoder{offset=O}) -> +- tokenize_charref(Bin, S, O). ++ try ++ tokenize_charref(Bin, S, O) ++ catch ++ throw:invalid_charref -> ++ {{data, <<"&">>, false}, S} ++ end. + + tokenize_charref(Bin, S=#decoder{offset=O}, Start) -> + case Bin of + <<_:O/binary>> -> +- <<_:Start/binary, Raw/binary>> = Bin, +- {{data, Raw, false}, S}; ++ throw(invalid_charref); + <<_:O/binary, C, _/binary>> when ?IS_WHITESPACE(C) + orelse C =:= ?SQUOTE + orelse C =:= ?QUOTE + orelse C =:= $/ + orelse C =:= $> -> +- Len = O - Start, +- <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin, +- {{data, Raw, false}, S}; ++ throw(invalid_charref); + <<_:O/binary, $;, _/binary>> -> + Len = O - Start, + <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin, + Data = case mochiweb_charref:charref(Raw) of + undefined -> +- Start1 = Start - 1, +- Len1 = Len + 2, +- <<_:Start1/binary, R:Len1/binary, _/binary>> = Bin, +- R; +- Unichar -> +- mochiutf8:codepoint_to_bytes(Unichar) ++ throw(invalid_charref); ++ Unichar when is_integer(Unichar) -> ++ mochiutf8:codepoint_to_bytes(Unichar); ++ Unichars when is_list(Unichars) -> ++ unicode:characters_to_binary(Unichars) + end, + {{data, Data, false}, ?INC_COL(S)}; + _ -> +@@ -759,8 +764,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + to_html_test() -> + ?assertEqual( +@@ -1232,6 +1237,14 @@ + { <<"img">>, [ { <<"src">>, <<"/images/icon>.png">> } ], [] } + ]}, + mochiweb_html:parse(D2)), ++ ++ %% Quoted attributes can contain whitespace and newlines ++ D3 = <<"<html><a href=\"#\" onclick=\"javascript: test(1,\ntrue);\"></html>">>, ++ ?assertEqual( ++ {<<"html">>,[],[ ++ { <<"a">>, [ { <<"href">>, <<"#">> }, {<<"onclick">>, <<"javascript: test(1,\ntrue);">>} ], [] } ++ ]}, ++ mochiweb_html:parse(D3)), + ok. + + parse_missing_attr_name_test() -> +@@ -1261,4 +1274,59 @@ + mochiweb_html:parse(D0)), + ok. + ++to_html_singleton_test() -> ++ D0 = <<"<link />">>, ++ T0 = {<<"link">>,[],[]}, ++ ?assertEqual(D0, iolist_to_binary(to_html(T0))), ++ ++ D1 = <<"<head><link /></head>">>, ++ T1 = {<<"head">>,[],[{<<"link">>,[],[]}]}, ++ ?assertEqual(D1, iolist_to_binary(to_html(T1))), ++ ++ D2 = <<"<head><link /><link /></head>">>, ++ T2 = {<<"head">>,[],[{<<"link">>,[],[]}, {<<"link">>,[],[]}]}, ++ ?assertEqual(D2, iolist_to_binary(to_html(T2))), ++ ++ %% Make sure singletons are converted to singletons. ++ D3 = <<"<head><link /></head>">>, ++ T3 = {<<"head">>,[],[{<<"link">>,[],[<<"funny">>]}]}, ++ ?assertEqual(D3, iolist_to_binary(to_html(T3))), ++ ++ D4 = <<"<link />">>, ++ T4 = {<<"link">>,[],[<<"funny">>]}, ++ ?assertEqual(D4, iolist_to_binary(to_html(T4))), ++ ++ ok. ++ ++parse_amp_test_() -> ++ [?_assertEqual( ++ {<<"html">>,[], ++ [{<<"body">>,[{<<"onload">>,<<"javascript:A('1&2')">>}],[]}]}, ++ mochiweb_html:parse("<html><body onload=\"javascript:A('1&2')\"></body></html>")), ++ ?_assertEqual( ++ {<<"html">>,[], ++ [{<<"body">>,[{<<"onload">>,<<"javascript:A('1& 2')">>}],[]}]}, ++ mochiweb_html:parse("<html><body onload=\"javascript:A('1& 2')\"></body></html>")), ++ ?_assertEqual( ++ {<<"html">>,[], ++ [{<<"body">>,[],[<<"& ">>]}]}, ++ mochiweb_html:parse("<html><body>& </body></html>")), ++ ?_assertEqual( ++ {<<"html">>,[], ++ [{<<"body">>,[],[<<"&">>]}]}, ++ mochiweb_html:parse("<html><body>&</body></html>"))]. ++ ++parse_unescaped_lt_test() -> ++ D1 = <<"<div> < < <a href=\"/\">Back</a></div>">>, ++ ?assertEqual( ++ {<<"div">>, [], [<<" < < ">>, {<<"a">>, [{<<"href">>, <<"/">>}], ++ [<<"Back">>]}]}, ++ mochiweb_html:parse(D1)), ++ ++ D2 = <<"<div> << <a href=\"/\">Back</a></div>">>, ++ ?assertEqual( ++ {<<"div">>, [], [<<" << ">>, {<<"a">>, [{<<"href">>, <<"/">>}], ++ [<<"Back">>]}]}, ++ mochiweb_html:parse(D2)). ++ + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_http.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_http.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_http.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_http.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -5,13 +5,13 @@ + + -module(mochiweb_http). + -author('bob@mochimedia.com'). +--export([start/0, start/1, stop/0, stop/1]). +--export([loop/2, default_body/1]). ++-export([start/1, start_link/1, stop/0, stop/1]). ++-export([loop/2]). + -export([after_response/2, reentry/1]). + -export([parse_range_request/1, range_skip_length/2]). + +--define(REQUEST_RECV_TIMEOUT, 300000). % timeout waiting for request line +--define(HEADERS_RECV_TIMEOUT, 30000). % timeout waiting for headers ++-define(REQUEST_RECV_TIMEOUT, 300000). %% timeout waiting for request line ++-define(HEADERS_RECV_TIMEOUT, 30000). %% timeout waiting for headers + + -define(MAX_HEADERS, 1000). + -define(DEFAULTS, [{name, ?MODULE}, +@@ -19,9 +19,7 @@ + + parse_options(Options) -> + {loop, HttpLoop} = proplists:lookup(loop, Options), +- Loop = fun (S) -> +- ?MODULE:loop(S, HttpLoop) +- end, ++ Loop = {?MODULE, loop, [HttpLoop]}, + Options1 = [{loop, Loop} | proplists:delete(loop, Options)], + mochilists:set_defaults(?DEFAULTS, Options1). + +@@ -31,15 +29,12 @@ + stop(Name) -> + mochiweb_socket_server:stop(Name). + +-start() -> +- start([{ip, "127.0.0.1"}, +- {loop, {?MODULE, default_body}}]). +- + %% @spec start(Options) -> ServerRet + %% Options = [option()] + %% Option = {name, atom()} | {ip, string() | tuple()} | {backlog, integer()} + %% | {nodelay, boolean()} | {acceptor_pool_size, integer()} + %% | {ssl, boolean()} | {profile_fun, undefined | (Props) -> ok} ++%% | {link, false} + %% @doc Start a mochiweb server. + %% profile_fun is used to profile accept timing. + %% After each accept, if defined, profile_fun is called with a proplist of a subset of the mochiweb_socket_server state and timing information. +@@ -48,62 +43,18 @@ + start(Options) -> + mochiweb_socket_server:start(parse_options(Options)). + +-frm(Body) -> +- ["<html><head></head><body>" +- "<form method=\"POST\">" +- "<input type=\"hidden\" value=\"message\" name=\"hidden\"/>" +- "<input type=\"submit\" value=\"regular POST\">" +- "</form>" +- "<br />" +- "<form method=\"POST\" enctype=\"multipart/form-data\"" +- " action=\"/multipart\">" +- "<input type=\"hidden\" value=\"multipart message\" name=\"hidden\"/>" +- "<input type=\"file\" name=\"file\"/>" +- "<input type=\"submit\" value=\"multipart POST\" />" +- "</form>" +- "<pre>", Body, "</pre>" +- "</body></html>"]. +- +-default_body(Req, M, "/chunked") when M =:= 'GET'; M =:= 'HEAD' -> +- Res = Req:ok({"text/plain", [], chunked}), +- Res:write_chunk("First chunk\r\n"), +- timer:sleep(5000), +- Res:write_chunk("Last chunk\r\n"), +- Res:write_chunk(""); +-default_body(Req, M, _Path) when M =:= 'GET'; M =:= 'HEAD' -> +- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()}, +- {parse_cookie, Req:parse_cookie()}, +- Req:dump()]]), +- Req:ok({"text/html", +- [mochiweb_cookies:cookie("mochiweb_http", "test_cookie")], +- frm(Body)}); +-default_body(Req, 'POST', "/multipart") -> +- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()}, +- {parse_cookie, Req:parse_cookie()}, +- {body, Req:recv_body()}, +- Req:dump()]]), +- Req:ok({"text/html", [], frm(Body)}); +-default_body(Req, 'POST', _Path) -> +- Body = io_lib:format("~p~n", [[{parse_qs, Req:parse_qs()}, +- {parse_cookie, Req:parse_cookie()}, +- {parse_post, Req:parse_post()}, +- Req:dump()]]), +- Req:ok({"text/html", [], frm(Body)}); +-default_body(Req, _Method, _Path) -> +- Req:respond({501, [], []}). +- +-default_body(Req) -> +- default_body(Req, Req:get(method), Req:get(path)). ++start_link(Options) -> ++ mochiweb_socket_server:start_link(parse_options(Options)). + + loop(Socket, Body) -> +- mochiweb_socket:setopts(Socket, [{packet, http}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, http}]), + request(Socket, Body). + + request(Socket, Body) -> +- mochiweb_socket:setopts(Socket, [{active, once}]), ++ ok = mochiweb_socket:setopts(Socket, [{active, once}]), + receive + {Protocol, _, {http_request, Method, Path, Version}} when Protocol == http orelse Protocol == ssl -> +- mochiweb_socket:setopts(Socket, [{packet, httph}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, httph}]), + headers(Socket, {Method, Path, Version}, [], Body, 0); + {Protocol, _, {http_error, "\r\n"}} when Protocol == http orelse Protocol == ssl -> + request(Socket, Body); +@@ -112,6 +63,13 @@ + {tcp_closed, _} -> + mochiweb_socket:close(Socket), + exit(normal); ++ {ssl_closed, _} -> ++ mochiweb_socket:close(Socket), ++ exit(normal); ++ {tcp_error,_,emsgsize} -> ++ % R15B02 returns this then closes the socket, so close and exit ++ mochiweb_socket:close(Socket), ++ exit(normal); + _Other -> + handle_invalid_request(Socket) + after ?REQUEST_RECV_TIMEOUT -> +@@ -126,10 +84,10 @@ + + headers(Socket, Request, Headers, _Body, ?MAX_HEADERS) -> + %% Too many headers sent, bad request. +- mochiweb_socket:setopts(Socket, [{packet, raw}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]), + handle_invalid_request(Socket, Request, Headers); + headers(Socket, Request, Headers, Body, HeaderCount) -> +- mochiweb_socket:setopts(Socket, [{active, once}]), ++ ok = mochiweb_socket:setopts(Socket, [{active, once}]), + receive + {Protocol, _, http_eoh} when Protocol == http orelse Protocol == ssl -> + Req = new_request(Socket, Request, Headers), +@@ -141,6 +99,10 @@ + {tcp_closed, _} -> + mochiweb_socket:close(Socket), + exit(normal); ++ {tcp_error,_,emsgsize} -> ++ % R15B02 returns this then closes the socket, so close and exit ++ mochiweb_socket:close(Socket), ++ exit(normal); + _Other -> + handle_invalid_request(Socket, Request, Headers) + after ?HEADERS_RECV_TIMEOUT -> +@@ -148,14 +110,19 @@ + exit(normal) + end. + ++call_body({M, F, A}, Req) -> ++ erlang:apply(M, F, [Req | A]); + call_body({M, F}, Req) -> + M:F(Req); + call_body(Body, Req) -> + Body(Req). + ++-spec handle_invalid_request(term()) -> no_return(). + handle_invalid_request(Socket) -> +- handle_invalid_request(Socket, {'GET', {abs_path, "/"}, {0,9}}, []). ++ handle_invalid_request(Socket, {'GET', {abs_path, "/"}, {0,9}}, []), ++ exit(normal). + ++-spec handle_invalid_request(term(), term(), term()) -> no_return(). + handle_invalid_request(Socket, Request, RevHeaders) -> + Req = new_request(Socket, Request, RevHeaders), + Req:respond({400, [], []}), +@@ -163,7 +130,7 @@ + exit(normal). + + new_request(Socket, Request, RevHeaders) -> +- mochiweb_socket:setopts(Socket, [{packet, raw}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]), + mochiweb:new_request({Socket, Request, lists:reverse(RevHeaders)}). + + after_response(Body, Req) -> +@@ -174,6 +141,7 @@ + exit(normal); + false -> + Req:cleanup(), ++ erlang:garbage_collect(), + ?MODULE:loop(Socket, Body) + end. + +@@ -211,6 +179,8 @@ + invalid_range; + {Start, End} when 0 =< Start, Start =< End, End < Size -> + {Start, End - Start + 1}; ++ {Start, End} when 0 =< Start, Start =< End, End >= Size -> ++ {Start, Size - Start}; + {_OutOfRange, _End} -> + invalid_range + end. +@@ -218,8 +188,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + range_test() -> + %% valid, single ranges +@@ -265,19 +235,23 @@ + BodySizeLess1 = BodySize - 1, + ?assertEqual({BodySizeLess1, 1}, + range_skip_length({BodySize - 1, none}, BodySize)), ++ ?assertEqual({BodySizeLess1, 1}, ++ range_skip_length({BodySize - 1, BodySize+5}, BodySize)), ++ ?assertEqual({BodySizeLess1, 1}, ++ range_skip_length({BodySize - 1, BodySize}, BodySize)), + + %% out of range, return whole thing + ?assertEqual({0, BodySize}, + range_skip_length({none, BodySize + 1}, BodySize)), + ?assertEqual({0, BodySize}, + range_skip_length({none, -1}, BodySize)), ++ ?assertEqual({0, BodySize}, ++ range_skip_length({0, BodySize + 1}, BodySize)), + + %% invalid ranges + ?assertEqual(invalid_range, + range_skip_length({-1, 30}, BodySize)), + ?assertEqual(invalid_range, +- range_skip_length({0, BodySize + 1}, BodySize)), +- ?assertEqual(invalid_range, + range_skip_length({-1, BodySize + 1}, BodySize)), + ?assertEqual(invalid_range, + range_skip_length({BodySize, 40}, BodySize)), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_io.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_io.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_io.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_io.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -38,9 +38,6 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). +- +- +- ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_mime.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_mime.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_mime.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_mime.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -11,72 +11,393 @@ + %% @doc Given a filename extension (e.g. ".html") return a guess for the MIME + %% type such as "text/html". Will return the atom undefined if no good + %% guess is available. +-from_extension(".html") -> +- "text/html"; +-from_extension(".xhtml") -> +- "application/xhtml+xml"; +-from_extension(".xml") -> +- "application/xml"; +-from_extension(".css") -> +- "text/css"; ++ ++from_extension(".stl") -> ++ "application/SLA"; ++from_extension(".stp") -> ++ "application/STEP"; ++from_extension(".step") -> ++ "application/STEP"; ++from_extension(".dwg") -> ++ "application/acad"; ++from_extension(".ez") -> ++ "application/andrew-inset"; ++from_extension(".ccad") -> ++ "application/clariscad"; ++from_extension(".drw") -> ++ "application/drafting"; ++from_extension(".tsp") -> ++ "application/dsptype"; ++from_extension(".dxf") -> ++ "application/dxf"; ++from_extension(".xls") -> ++ "application/excel"; ++from_extension(".unv") -> ++ "application/i-deas"; ++from_extension(".jar") -> ++ "application/java-archive"; ++from_extension(".hqx") -> ++ "application/mac-binhex40"; ++from_extension(".cpt") -> ++ "application/mac-compactpro"; ++from_extension(".pot") -> ++ "application/vnd.ms-powerpoint"; ++from_extension(".ppt") -> ++ "application/vnd.ms-powerpoint"; ++from_extension(".dms") -> ++ "application/octet-stream"; ++from_extension(".lha") -> ++ "application/octet-stream"; ++from_extension(".lzh") -> ++ "application/octet-stream"; ++from_extension(".oda") -> ++ "application/oda"; ++from_extension(".ogg") -> ++ "application/ogg"; ++from_extension(".ogm") -> ++ "application/ogg"; ++from_extension(".pdf") -> ++ "application/pdf"; ++from_extension(".pgp") -> ++ "application/pgp"; ++from_extension(".ai") -> ++ "application/postscript"; ++from_extension(".eps") -> ++ "application/postscript"; ++from_extension(".ps") -> ++ "application/postscript"; ++from_extension(".prt") -> ++ "application/pro_eng"; ++from_extension(".rtf") -> ++ "application/rtf"; ++from_extension(".smi") -> ++ "application/smil"; ++from_extension(".smil") -> ++ "application/smil"; ++from_extension(".sol") -> ++ "application/solids"; ++from_extension(".vda") -> ++ "application/vda"; ++from_extension(".xlm") -> ++ "application/vnd.ms-excel"; ++from_extension(".cod") -> ++ "application/vnd.rim.cod"; ++from_extension(".pgn") -> ++ "application/x-chess-pgn"; ++from_extension(".cpio") -> ++ "application/x-cpio"; ++from_extension(".csh") -> ++ "application/x-csh"; ++from_extension(".deb") -> ++ "application/x-debian-package"; ++from_extension(".dcr") -> ++ "application/x-director"; ++from_extension(".dir") -> ++ "application/x-director"; ++from_extension(".dxr") -> ++ "application/x-director"; ++from_extension(".gz") -> ++ "application/x-gzip"; ++from_extension(".hdf") -> ++ "application/x-hdf"; ++from_extension(".ipx") -> ++ "application/x-ipix"; ++from_extension(".ips") -> ++ "application/x-ipscript"; + from_extension(".js") -> + "application/x-javascript"; +-from_extension(".jpg") -> +- "image/jpeg"; +-from_extension(".gif") -> +- "image/gif"; +-from_extension(".png") -> +- "image/png"; ++from_extension(".skd") -> ++ "application/x-koan"; ++from_extension(".skm") -> ++ "application/x-koan"; ++from_extension(".skp") -> ++ "application/x-koan"; ++from_extension(".skt") -> ++ "application/x-koan"; ++from_extension(".latex") -> ++ "application/x-latex"; ++from_extension(".lsp") -> ++ "application/x-lisp"; ++from_extension(".scm") -> ++ "application/x-lotusscreencam"; ++from_extension(".mif") -> ++ "application/x-mif"; ++from_extension(".com") -> ++ "application/x-msdos-program"; ++from_extension(".exe") -> ++ "application/octet-stream"; ++from_extension(".cdf") -> ++ "application/x-netcdf"; ++from_extension(".nc") -> ++ "application/x-netcdf"; ++from_extension(".pl") -> ++ "application/x-perl"; ++from_extension(".pm") -> ++ "application/x-perl"; ++from_extension(".rar") -> ++ "application/x-rar-compressed"; ++from_extension(".sh") -> ++ "application/x-sh"; ++from_extension(".shar") -> ++ "application/x-shar"; + from_extension(".swf") -> + "application/x-shockwave-flash"; +-from_extension(".zip") -> +- "application/zip"; +-from_extension(".bz2") -> +- "application/x-bzip2"; +-from_extension(".gz") -> +- "application/x-gzip"; ++from_extension(".sit") -> ++ "application/x-stuffit"; ++from_extension(".sv4cpio") -> ++ "application/x-sv4cpio"; ++from_extension(".sv4crc") -> ++ "application/x-sv4crc"; ++from_extension(".tar.gz") -> ++ "application/x-tar-gz"; ++from_extension(".tgz") -> ++ "application/x-tar-gz"; + from_extension(".tar") -> + "application/x-tar"; +-from_extension(".tgz") -> +- "application/x-gzip"; ++from_extension(".tcl") -> ++ "application/x-tcl"; ++from_extension(".texi") -> ++ "application/x-texinfo"; ++from_extension(".texinfo") -> ++ "application/x-texinfo"; ++from_extension(".man") -> ++ "application/x-troff-man"; ++from_extension(".me") -> ++ "application/x-troff-me"; ++from_extension(".ms") -> ++ "application/x-troff-ms"; ++from_extension(".roff") -> ++ "application/x-troff"; ++from_extension(".t") -> ++ "application/x-troff"; ++from_extension(".tr") -> ++ "application/x-troff"; ++from_extension(".ustar") -> ++ "application/x-ustar"; ++from_extension(".src") -> ++ "application/x-wais-source"; ++from_extension(".zip") -> ++ "application/zip"; ++from_extension(".tsi") -> ++ "audio/TSP-audio"; ++from_extension(".au") -> ++ "audio/basic"; ++from_extension(".snd") -> ++ "audio/basic"; ++from_extension(".kar") -> ++ "audio/midi"; ++from_extension(".mid") -> ++ "audio/midi"; ++from_extension(".midi") -> ++ "audio/midi"; ++from_extension(".mp2") -> ++ "audio/mpeg"; ++from_extension(".mp3") -> ++ "audio/mpeg"; ++from_extension(".mpga") -> ++ "audio/mpeg"; ++from_extension(".aif") -> ++ "audio/x-aiff"; ++from_extension(".aifc") -> ++ "audio/x-aiff"; ++from_extension(".aiff") -> ++ "audio/x-aiff"; ++from_extension(".m3u") -> ++ "audio/x-mpegurl"; ++from_extension(".wax") -> ++ "audio/x-ms-wax"; ++from_extension(".wma") -> ++ "audio/x-ms-wma"; ++from_extension(".rpm") -> ++ "audio/x-pn-realaudio-plugin"; ++from_extension(".ram") -> ++ "audio/x-pn-realaudio"; ++from_extension(".rm") -> ++ "audio/x-pn-realaudio"; ++from_extension(".ra") -> ++ "audio/x-realaudio"; ++from_extension(".wav") -> ++ "audio/x-wav"; ++from_extension(".pdb") -> ++ "chemical/x-pdb"; ++from_extension(".ras") -> ++ "image/cmu-raster"; ++from_extension(".gif") -> ++ "image/gif"; ++from_extension(".ief") -> ++ "image/ief"; ++from_extension(".jpe") -> ++ "image/jpeg"; ++from_extension(".jpeg") -> ++ "image/jpeg"; ++from_extension(".jpg") -> ++ "image/jpeg"; ++from_extension(".jp2") -> ++ "image/jp2"; ++from_extension(".png") -> ++ "image/png"; ++from_extension(".tif") -> ++ "image/tiff"; ++from_extension(".tiff") -> ++ "image/tiff"; ++from_extension(".pnm") -> ++ "image/x-portable-anymap"; ++from_extension(".pbm") -> ++ "image/x-portable-bitmap"; ++from_extension(".pgm") -> ++ "image/x-portable-graymap"; ++from_extension(".ppm") -> ++ "image/x-portable-pixmap"; ++from_extension(".rgb") -> ++ "image/x-rgb"; ++from_extension(".xbm") -> ++ "image/x-xbitmap"; ++from_extension(".xwd") -> ++ "image/x-xwindowdump"; ++from_extension(".iges") -> ++ "model/iges"; ++from_extension(".igs") -> ++ "model/iges"; ++from_extension(".mesh") -> ++ "model/mesh"; ++from_extension(".") -> ++ ""; ++from_extension(".msh") -> ++ "model/mesh"; ++from_extension(".silo") -> ++ "model/mesh"; ++from_extension(".vrml") -> ++ "model/vrml"; ++from_extension(".wrl") -> ++ "model/vrml"; ++from_extension(".css") -> ++ "text/css"; ++from_extension(".htm") -> ++ "text/html"; ++from_extension(".html") -> ++ "text/html"; ++from_extension(".asc") -> ++ "text/plain"; ++from_extension(".c") -> ++ "text/plain"; ++from_extension(".cc") -> ++ "text/plain"; ++from_extension(".f90") -> ++ "text/plain"; ++from_extension(".f") -> ++ "text/plain"; ++from_extension(".hh") -> ++ "text/plain"; ++from_extension(".m") -> ++ "text/plain"; + from_extension(".txt") -> + "text/plain"; +-from_extension(".doc") -> +- "application/msword"; +-from_extension(".pdf") -> +- "application/pdf"; +-from_extension(".xls") -> +- "application/vnd.ms-excel"; +-from_extension(".rtf") -> +- "application/rtf"; ++from_extension(".rtx") -> ++ "text/richtext"; ++from_extension(".sgm") -> ++ "text/sgml"; ++from_extension(".sgml") -> ++ "text/sgml"; ++from_extension(".tsv") -> ++ "text/tab-separated-values"; ++from_extension(".jad") -> ++ "text/vnd.sun.j2me.app-descriptor"; ++from_extension(".etx") -> ++ "text/x-setext"; ++from_extension(".xml") -> ++ "application/xml"; ++from_extension(".dl") -> ++ "video/dl"; ++from_extension(".fli") -> ++ "video/fli"; ++from_extension(".flv") -> ++ "video/x-flv"; ++from_extension(".gl") -> ++ "video/gl"; ++from_extension(".mp4") -> ++ "video/mp4"; ++from_extension(".mpe") -> ++ "video/mpeg"; ++from_extension(".mpeg") -> ++ "video/mpeg"; ++from_extension(".mpg") -> ++ "video/mpeg"; + from_extension(".mov") -> + "video/quicktime"; +-from_extension(".mp3") -> +- "audio/mpeg"; ++from_extension(".qt") -> ++ "video/quicktime"; ++from_extension(".viv") -> ++ "video/vnd.vivo"; ++from_extension(".vivo") -> ++ "video/vnd.vivo"; ++from_extension(".asf") -> ++ "video/x-ms-asf"; ++from_extension(".asx") -> ++ "video/x-ms-asx"; ++from_extension(".wmv") -> ++ "video/x-ms-wmv"; ++from_extension(".wmx") -> ++ "video/x-ms-wmx"; ++from_extension(".wvx") -> ++ "video/x-ms-wvx"; ++from_extension(".avi") -> ++ "video/x-msvideo"; ++from_extension(".movie") -> ++ "video/x-sgi-movie"; ++from_extension(".mime") -> ++ "www/mime"; ++from_extension(".ice") -> ++ "x-conference/x-cooltalk"; ++from_extension(".vrm") -> ++ "x-world/x-vrml"; ++from_extension(".spx") -> ++ "audio/ogg"; ++from_extension(".xhtml") -> ++ "application/xhtml+xml"; ++from_extension(".bz2") -> ++ "application/x-bzip2"; ++from_extension(".doc") -> ++ "application/msword"; + from_extension(".z") -> + "application/x-compress"; +-from_extension(".wav") -> +- "audio/x-wav"; + from_extension(".ico") -> + "image/x-icon"; + from_extension(".bmp") -> + "image/bmp"; + from_extension(".m4a") -> + "audio/mpeg"; +-from_extension(".m3u") -> +- "audio/x-mpegurl"; +-from_extension(".exe") -> +- "application/octet-stream"; + from_extension(".csv") -> + "text/csv"; ++from_extension(".eot") -> ++ "application/vnd.ms-fontobject"; ++from_extension(".m4v") -> ++ "video/mp4"; ++from_extension(".svg") -> ++ "image/svg+xml"; ++from_extension(".svgz") -> ++ "image/svg+xml"; ++from_extension(".ttc") -> ++ "application/x-font-ttf"; ++from_extension(".ttf") -> ++ "application/x-font-ttf"; ++from_extension(".vcf") -> ++ "text/x-vcard"; ++from_extension(".webm") -> ++ "video/web"; ++from_extension(".webp") -> ++ "image/web"; ++from_extension(".woff") -> ++ "application/x-font-woff"; ++from_extension(".otf") -> ++ "font/opentype"; + from_extension(_) -> + undefined. + + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + exhaustive_from_extension_test() -> + T = mochiweb_cover:clause_lookup_table(?MODULE, from_extension), +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_multipart.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_multipart.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_multipart.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_multipart.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -128,7 +128,7 @@ + + parse_multipart_request(Req, Callback) -> + %% TODO: Support chunked? +- Length = list_to_integer(Req:get_header_value("content-length")), ++ Length = list_to_integer(Req:get_combined_header_value("content-length")), + Boundary = iolist_to_binary( + get_boundary(Req:get_header_value("content-type"))), + Prefix = <<"\r\n--", Boundary/binary>>, +@@ -240,24 +240,22 @@ + S + end. + +-find_in_binary(B, Data) when size(B) > 0 -> +- case size(Data) - size(B) of ++%% @spec find_in_binary(Pattern::binary(), Data::binary()) -> ++%% {exact, N} | {partial, N, K} | not_found ++%% @doc Searches for the given pattern in the given binary. ++find_in_binary(P, Data) when size(P) > 0 -> ++ PS = size(P), ++ DS = size(Data), ++ case DS - PS of + Last when Last < 0 -> +- partial_find(B, Data, 0, size(Data)); ++ partial_find(P, Data, 0, DS); + Last -> +- find_in_binary(B, size(B), Data, 0, Last) ++ case binary:match(Data, P) of ++ {Pos, _} -> {exact, Pos}; ++ nomatch -> partial_find(P, Data, Last+1, PS-1) ++ end + end. + +-find_in_binary(B, BS, D, N, Last) when N =< Last-> +- case D of +- <<_:N/binary, B:BS/binary, _/binary>> -> +- {exact, N}; +- _ -> +- find_in_binary(B, BS, D, 1 + N, Last) +- end; +-find_in_binary(B, BS, D, N, Last) when N =:= 1 + Last -> +- partial_find(B, D, N, BS - 1). +- + partial_find(_B, _D, _N, 0) -> + not_found; + partial_find(B, D, N, K) -> +@@ -295,8 +293,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + ssl_cert_opts() -> + EbinDir = filename:dirname(code:which(?MODULE)), +@@ -313,7 +311,7 @@ + ssl -> + ServerOpts0 ++ [{ssl, true}, {ssl_opts, ssl_cert_opts()}] + end, +- {ok, Server} = mochiweb_socket_server:start(ServerOpts), ++ {ok, Server} = mochiweb_socket_server:start_link(ServerOpts), + Port = mochiweb_socket_server:get(Server, port), + ClientOpts = [binary, {active, false}], + {ok, Client} = case Transport of +@@ -821,4 +819,54 @@ + 10))), + ok. + ++%% @todo Move somewhere more appropriate than in the test suite ++ ++multipart_parsing_benchmark_test() -> ++ run_multipart_parsing_benchmark(1). ++ ++run_multipart_parsing_benchmark(0) -> ok; ++run_multipart_parsing_benchmark(N) -> ++ multipart_parsing_benchmark(), ++ run_multipart_parsing_benchmark(N-1). ++ ++multipart_parsing_benchmark() -> ++ ContentType = "multipart/form-data; boundary=----------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5", ++ Chunk = binary:copy(<<"This Is_%Some=Quite0Long4String2Used9For7BenchmarKing.5">>, 102400), ++ BinContent = <<"------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"Filename\"\r\n\r\nhello.txt\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"success_action_status\"\r\n\r\n201\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"file\"; filename=\"hello.txt\"\r\nContent-Type: application/octet-stream\r\n\r\n", Chunk/binary, "\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5\r\nContent-Disposition: form-data; name=\"Upload\"\r\n\r\nSubmit Query\r\n------------ei4GI3GI3Ij5Ef1ae0KM7Ij5ei4Ij5--">>, ++ Expect = [{headers, ++ [{"content-disposition", ++ {"form-data", [{"name", "Filename"}]}}]}, ++ {body, <<"hello.txt">>}, ++ body_end, ++ {headers, ++ [{"content-disposition", ++ {"form-data", [{"name", "success_action_status"}]}}]}, ++ {body, <<"201">>}, ++ body_end, ++ {headers, ++ [{"content-disposition", ++ {"form-data", [{"name", "file"}, {"filename", "hello.txt"}]}}, ++ {"content-type", {"application/octet-stream", []}}]}, ++ {body, Chunk}, ++ body_end, ++ {headers, ++ [{"content-disposition", ++ {"form-data", [{"name", "Upload"}]}}]}, ++ {body, <<"Submit Query">>}, ++ body_end, ++ eof], ++ TestCallback = fun (Next) -> test_callback(Next, Expect) end, ++ ServerFun = fun (Socket) -> ++ ok = mochiweb_socket:send(Socket, BinContent), ++ exit(normal) ++ end, ++ ClientFun = fun (Socket) -> ++ Req = fake_request(Socket, ContentType, ++ byte_size(BinContent)), ++ Res = parse_multipart_request(Req, TestCallback), ++ {0, <<>>, ok} = Res, ++ ok ++ end, ++ ok = with_socket_server(plain, ServerFun, ClientFun), ++ ok. + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_request.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_request.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -3,7 +3,7 @@ + + %% @doc MochiWeb HTTP Request abstraction. + +--module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]). ++-module(mochiweb_request). + -author('bob@mochimedia.com'). + + -include_lib("kernel/include/file.hrl"). +@@ -11,17 +11,18 @@ + + -define(QUIP, "Any of you quaids got a smint?"). + +--export([get_header_value/1, get_primary_header_value/1, get/1, dump/0]). +--export([send/1, recv/1, recv/2, recv_body/0, recv_body/1, stream_body/3]). +--export([start_response/1, start_response_length/1, start_raw_response/1]). +--export([respond/1, ok/1]). +--export([not_found/0, not_found/1]). +--export([parse_post/0, parse_qs/0]). +--export([should_close/0, cleanup/0]). +--export([parse_cookie/0, get_cookie_value/1]). +--export([serve_file/2, serve_file/3]). +--export([accepted_encodings/1]). +--export([accepts_content_type/1]). ++-export([new/5]). ++-export([get_header_value/2, get_primary_header_value/2, get_combined_header_value/2, get/2, dump/1]). ++-export([send/2, recv/2, recv/3, recv_body/1, recv_body/2, stream_body/4]). ++-export([start_response/2, start_response_length/2, start_raw_response/2]). ++-export([respond/2, ok/2]). ++-export([not_found/1, not_found/2]). ++-export([parse_post/1, parse_qs/1]). ++-export([should_close/1, cleanup/1]). ++-export([parse_cookie/1, get_cookie_value/2]). ++-export([serve_file/3, serve_file/4]). ++-export([accepted_encodings/2]). ++-export([accepts_content_type/2, accepted_content_types/2]). + + -define(SAVE_QS, mochiweb_request_qs). + -define(SAVE_PATH, mochiweb_request_path). +@@ -32,11 +33,10 @@ + -define(SAVE_COOKIE, mochiweb_request_cookie). + -define(SAVE_FORCE_CLOSE, mochiweb_request_force_close). + +-%% @type iolist() = [iolist() | binary() | char()]. +-%% @type iodata() = binary() | iolist(). + %% @type key() = atom() | string() | binary() + %% @type value() = atom() | string() | binary() | integer() + %% @type headers(). A mochiweb_headers structure. ++%% @type request(). A mochiweb_request parameterized module instance. + %% @type response(). A mochiweb_response parameterized module instance. + %% @type ioheaders() = headers() | [{key(), value()}]. + +@@ -46,50 +46,58 @@ + % Maximum recv_body() length of 1MB + -define(MAX_RECV_BODY, (1024*1024)). + +-%% @spec get_header_value(K) -> undefined | Value ++%% @spec new(Socket, Method, RawPath, Version, headers()) -> request() ++%% @doc Create a new request instance. ++new(Socket, Method, RawPath, Version, Headers) -> ++ {?MODULE, [Socket, Method, RawPath, Version, Headers]}. ++ ++%% @spec get_header_value(K, request()) -> undefined | Value + %% @doc Get the value of a given request header. +-get_header_value(K) -> ++get_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) -> + mochiweb_headers:get_value(K, Headers). + +-get_primary_header_value(K) -> ++get_primary_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) -> + mochiweb_headers:get_primary_value(K, Headers). + ++get_combined_header_value(K, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) -> ++ mochiweb_headers:get_combined_value(K, Headers). ++ + %% @type field() = socket | scheme | method | raw_path | version | headers | peer | path | body_length | range + +-%% @spec get(field()) -> term() ++%% @spec get(field(), request()) -> term() + %% @doc Return the internal representation of the given field. If + %% <code>socket</code> is requested on a HTTPS connection, then + %% an ssl socket will be returned as <code>{ssl, SslSocket}</code>. + %% You can use <code>SslSocket</code> with the <code>ssl</code> + %% application, eg: <code>ssl:peercert(SslSocket)</code>. +-get(socket) -> ++get(socket, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> + Socket; +-get(scheme) -> ++get(scheme, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> + case mochiweb_socket:type(Socket) of + plain -> + http; + ssl -> + https + end; +-get(method) -> ++get(method, {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}) -> + Method; +-get(raw_path) -> ++get(raw_path, {?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) -> + RawPath; +-get(version) -> ++get(version, {?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}) -> + Version; +-get(headers) -> ++get(headers, {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}) -> + Headers; +-get(peer) -> ++get(peer, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case mochiweb_socket:peername(Socket) of + {ok, {Addr={10, _, _, _}, _Port}} -> +- case get_header_value("x-forwarded-for") of ++ case get_header_value("x-forwarded-for", THIS) of + undefined -> + inet_parse:ntoa(Addr); + Hosts -> + string:strip(lists:last(string:tokens(Hosts, ","))) + end; + {ok, {{127, 0, 0, 1}, _Port}} -> +- case get_header_value("x-forwarded-for") of ++ case get_header_value("x-forwarded-for", THIS) of + undefined -> + "127.0.0.1"; + Hosts -> +@@ -100,7 +108,7 @@ + {error, enotconn} -> + exit(normal) + end; +-get(path) -> ++get(path, {?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) -> + case erlang:get(?SAVE_PATH) of + undefined -> + {Path0, _, _} = mochiweb_util:urlsplit_path(RawPath), +@@ -110,35 +118,35 @@ + Cached -> + Cached + end; +-get(body_length) -> ++get(body_length, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case erlang:get(?SAVE_BODY_LENGTH) of + undefined -> +- BodyLength = body_length(), ++ BodyLength = body_length(THIS), + put(?SAVE_BODY_LENGTH, {cached, BodyLength}), + BodyLength; + {cached, Cached} -> + Cached + end; +-get(range) -> +- case get_header_value(range) of ++get(range, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ case get_header_value(range, THIS) of + undefined -> + undefined; + RawRange -> + mochiweb_http:parse_range_request(RawRange) + end. + +-%% @spec dump() -> {mochiweb_request, [{atom(), term()}]} ++%% @spec dump(request()) -> {mochiweb_request, [{atom(), term()}]} + %% @doc Dump the internal representation to a "human readable" set of terms + %% for debugging/inspection purposes. +-dump() -> ++dump({?MODULE, [_Socket, Method, RawPath, Version, Headers]}) -> + {?MODULE, [{method, Method}, + {version, Version}, + {raw_path, RawPath}, + {headers, mochiweb_headers:to_list(Headers)}]}. + +-%% @spec send(iodata()) -> ok ++%% @spec send(iodata(), request()) -> ok + %% @doc Send data over the socket. +-send(Data) -> ++send(Data, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> + case mochiweb_socket:send(Socket, Data) of + ok -> + ok; +@@ -146,16 +154,16 @@ + exit(normal) + end. + +-%% @spec recv(integer()) -> binary() ++%% @spec recv(integer(), request()) -> binary() + %% @doc Receive Length bytes from the client as a binary, with the default + %% idle timeout. +-recv(Length) -> +- recv(Length, ?IDLE_TIMEOUT). ++recv(Length, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ recv(Length, ?IDLE_TIMEOUT, THIS). + +-%% @spec recv(integer(), integer()) -> binary() ++%% @spec recv(integer(), integer(), request()) -> binary() + %% @doc Receive Length bytes from the client as a binary, with the given + %% Timeout in msec. +-recv(Length, Timeout) -> ++recv(Length, Timeout, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> + case mochiweb_socket:recv(Socket, Length, Timeout) of + {ok, Data} -> + put(?SAVE_RECV, true), +@@ -164,12 +172,12 @@ + exit(normal) + end. + +-%% @spec body_length() -> undefined | chunked | unknown_transfer_encoding | integer() ++%% @spec body_length(request()) -> undefined | chunked | unknown_transfer_encoding | integer() + %% @doc Infer body length from transfer-encoding and content-length headers. +-body_length() -> +- case get_header_value("transfer-encoding") of ++body_length({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ case get_header_value("transfer-encoding", THIS) of + undefined -> +- case get_header_value("content-length") of ++ case get_combined_header_value("content-length", THIS) of + undefined -> + undefined; + Length -> +@@ -182,16 +190,16 @@ + end. + + +-%% @spec recv_body() -> binary() ++%% @spec recv_body(request()) -> binary() + %% @doc Receive the body of the HTTP request (defined by Content-Length). + %% Will only receive up to the default max-body length of 1MB. +-recv_body() -> +- recv_body(?MAX_RECV_BODY). ++recv_body({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ recv_body(?MAX_RECV_BODY, THIS). + +-%% @spec recv_body(integer()) -> binary() ++%% @spec recv_body(integer(), request()) -> binary() + %% @doc Receive the body of the HTTP request (defined by Content-Length). + %% Will receive up to MaxBody bytes. +-recv_body(MaxBody) -> ++recv_body(MaxBody, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case erlang:get(?SAVE_BODY) of + undefined -> + % we could use a sane constant for max chunk size +@@ -205,17 +213,18 @@ + true -> + {NewLength, [Bin | BinAcc]} + end +- end, {0, []}, MaxBody), ++ end, {0, []}, MaxBody, THIS), + put(?SAVE_BODY, Body), + Body; + Cached -> Cached + end. + +-stream_body(MaxChunkSize, ChunkFun, FunState) -> +- stream_body(MaxChunkSize, ChunkFun, FunState, undefined). ++stream_body(MaxChunkSize, ChunkFun, FunState, {?MODULE,[_Socket,_Method,_RawPath,_Version,_Headers]}=THIS) -> ++ stream_body(MaxChunkSize, ChunkFun, FunState, undefined, THIS). + +-stream_body(MaxChunkSize, ChunkFun, FunState, MaxBodyLength) -> +- Expect = case get_header_value("expect") of ++stream_body(MaxChunkSize, ChunkFun, FunState, MaxBodyLength, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ Expect = case get_header_value("expect", THIS) of + undefined -> + undefined; + Value when is_list(Value) -> +@@ -223,11 +232,12 @@ + end, + case Expect of + "100-continue" -> +- start_raw_response({100, gb_trees:empty()}); ++ _ = start_raw_response({100, gb_trees:empty()}, THIS), ++ ok; + _Else -> + ok + end, +- case body_length() of ++ case body_length(THIS) of + undefined -> + undefined; + {unknown_transfer_encoding, Unknown} -> +@@ -236,7 +246,7 @@ + % In this case the MaxBody is actually used to + % determine the maximum allowed size of a single + % chunk. +- stream_chunked_body(MaxChunkSize, ChunkFun, FunState); ++ stream_chunked_body(MaxChunkSize, ChunkFun, FunState, THIS); + 0 -> + <<>>; + Length when is_integer(Length) -> +@@ -244,62 +254,64 @@ + MaxBodyLength when is_integer(MaxBodyLength), MaxBodyLength < Length -> + exit({body_too_large, content_length}); + _ -> +- stream_unchunked_body(Length, ChunkFun, FunState) +- end; +- Length -> +- exit({length_not_integer, Length}) ++ stream_unchunked_body(Length, ChunkFun, FunState, THIS) ++ end + end. + + +-%% @spec start_response({integer(), ioheaders()}) -> response() ++%% @spec start_response({integer(), ioheaders()}, request()) -> response() + %% @doc Start the HTTP response by sending the Code HTTP response and + %% ResponseHeaders. The server will set header defaults such as Server + %% and Date if not present in ResponseHeaders. +-start_response({Code, ResponseHeaders}) -> ++start_response({Code, ResponseHeaders}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + HResponse = mochiweb_headers:make(ResponseHeaders), + HResponse1 = mochiweb_headers:default_from_list(server_headers(), + HResponse), +- start_raw_response({Code, HResponse1}). ++ start_raw_response({Code, HResponse1}, THIS). + +-%% @spec start_raw_response({integer(), headers()}) -> response() ++%% @spec start_raw_response({integer(), headers()}, request()) -> response() + %% @doc Start the HTTP response by sending the Code HTTP response and + %% ResponseHeaders. +-start_raw_response({Code, ResponseHeaders}) -> ++start_raw_response({Code, ResponseHeaders}, {?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}=THIS) -> + F = fun ({K, V}, Acc) -> + [mochiweb_util:make_io(K), <<": ">>, V, <<"\r\n">> | Acc] + end, + End = lists:foldl(F, [<<"\r\n">>], + mochiweb_headers:to_list(ResponseHeaders)), +- send([make_version(Version), make_code(Code), <<"\r\n">> | End]), ++ send([make_version(Version), make_code(Code), <<"\r\n">> | End], THIS), + mochiweb:new_response({THIS, Code, ResponseHeaders}). + + +-%% @spec start_response_length({integer(), ioheaders(), integer()}) -> response() ++%% @spec start_response_length({integer(), ioheaders(), integer()}, request()) -> response() + %% @doc Start the HTTP response by sending the Code HTTP response and + %% ResponseHeaders including a Content-Length of Length. The server + %% will set header defaults such as Server + %% and Date if not present in ResponseHeaders. +-start_response_length({Code, ResponseHeaders, Length}) -> ++start_response_length({Code, ResponseHeaders, Length}, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + HResponse = mochiweb_headers:make(ResponseHeaders), + HResponse1 = mochiweb_headers:enter("Content-Length", Length, HResponse), +- start_response({Code, HResponse1}). ++ start_response({Code, HResponse1}, THIS). + +-%% @spec respond({integer(), ioheaders(), iodata() | chunked | {file, IoDevice}}) -> response() ++%% @spec respond({integer(), ioheaders(), iodata() | chunked | {file, IoDevice}}, request()) -> response() + %% @doc Start the HTTP response with start_response, and send Body to the + %% client (if the get(method) /= 'HEAD'). The Content-Length header + %% will be set by the Body length, and the server will insert header + %% defaults. +-respond({Code, ResponseHeaders, {file, IoDevice}}) -> ++respond({Code, ResponseHeaders, {file, IoDevice}}, ++ {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}=THIS) -> + Length = mochiweb_io:iodevice_size(IoDevice), +- Response = start_response_length({Code, ResponseHeaders, Length}), ++ Response = start_response_length({Code, ResponseHeaders, Length}, THIS), + case Method of + 'HEAD' -> + ok; + _ -> +- mochiweb_io:iodevice_stream(fun send/1, IoDevice) ++ mochiweb_io:iodevice_stream( ++ fun (Body) -> send(Body, THIS) end, ++ IoDevice) + end, + Response; +-respond({Code, ResponseHeaders, chunked}) -> ++respond({Code, ResponseHeaders, chunked}, {?MODULE, [_Socket, Method, _RawPath, Version, _Headers]}=THIS) -> + HResponse = mochiweb_headers:make(ResponseHeaders), + HResponse1 = case Method of + 'HEAD' -> +@@ -320,35 +332,35 @@ + put(?SAVE_FORCE_CLOSE, true), + HResponse + end, +- start_response({Code, HResponse1}); +-respond({Code, ResponseHeaders, Body}) -> +- Response = start_response_length({Code, ResponseHeaders, iolist_size(Body)}), ++ start_response({Code, HResponse1}, THIS); ++respond({Code, ResponseHeaders, Body}, {?MODULE, [_Socket, Method, _RawPath, _Version, _Headers]}=THIS) -> ++ Response = start_response_length({Code, ResponseHeaders, iolist_size(Body)}, THIS), + case Method of + 'HEAD' -> + ok; + _ -> +- send(Body) ++ send(Body, THIS) + end, + Response. + +-%% @spec not_found() -> response() ++%% @spec not_found(request()) -> response() + %% @doc Alias for <code>not_found([])</code>. +-not_found() -> +- not_found([]). ++not_found({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ not_found([], THIS). + +-%% @spec not_found(ExtraHeaders) -> response() ++%% @spec not_found(ExtraHeaders, request()) -> response() + %% @doc Alias for <code>respond({404, [{"Content-Type", "text/plain"} + %% | ExtraHeaders], <<"Not found.">>})</code>. +-not_found(ExtraHeaders) -> ++not_found(ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + respond({404, [{"Content-Type", "text/plain"} | ExtraHeaders], +- <<"Not found.">>}). ++ <<"Not found.">>}, THIS). + +-%% @spec ok({value(), iodata()} | {value(), ioheaders(), iodata() | {file, IoDevice}}) -> ++%% @spec ok({value(), iodata()} | {value(), ioheaders(), iodata() | {file, IoDevice}}, request()) -> + %% response() + %% @doc respond({200, [{"Content-Type", ContentType} | Headers], Body}). +-ok({ContentType, Body}) -> +- ok({ContentType, [], Body}); +-ok({ContentType, ResponseHeaders, Body}) -> ++ok({ContentType, Body}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ ok({ContentType, [], Body}, THIS); ++ok({ContentType, ResponseHeaders, Body}, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + HResponse = mochiweb_headers:make(ResponseHeaders), + case THIS:get(range) of + X when (X =:= undefined orelse X =:= fail) orelse Body =:= chunked -> +@@ -357,7 +369,7 @@ + %% full response. + HResponse1 = mochiweb_headers:enter("Content-Type", ContentType, + HResponse), +- respond({200, HResponse1, Body}); ++ respond({200, HResponse1, Body}, THIS); + Ranges -> + {PartList, Size} = range_parts(Body, Ranges), + case PartList of +@@ -366,7 +378,7 @@ + ContentType, + HResponse), + %% could be 416, for now we'll just return 200 +- respond({200, HResponse1, Body}); ++ respond({200, HResponse1, Body}, THIS); + PartList -> + {RangeHeaders, RangeBody} = + mochiweb_multipart:parts_to_body(PartList, ContentType, Size), +@@ -374,46 +386,50 @@ + [{"Accept-Ranges", "bytes"} | + RangeHeaders], + HResponse), +- respond({206, HResponse1, RangeBody}) ++ respond({206, HResponse1, RangeBody}, THIS) + end + end. + +-%% @spec should_close() -> bool() ++%% @spec should_close(request()) -> bool() + %% @doc Return true if the connection must be closed. If false, using + %% Keep-Alive should be safe. +-should_close() -> ++should_close({?MODULE, [_Socket, _Method, _RawPath, Version, _Headers]}=THIS) -> + ForceClose = erlang:get(?SAVE_FORCE_CLOSE) =/= undefined, + DidNotRecv = erlang:get(?SAVE_RECV) =:= undefined, + ForceClose orelse Version < {1, 0} + %% Connection: close +- orelse get_header_value("connection") =:= "close" ++ orelse is_close(get_header_value("connection", THIS)) + %% HTTP 1.0 requires Connection: Keep-Alive + orelse (Version =:= {1, 0} +- andalso get_header_value("connection") =/= "Keep-Alive") ++ andalso get_header_value("connection", THIS) =/= "Keep-Alive") + %% unread data left on the socket, can't safely continue + orelse (DidNotRecv +- andalso get_header_value("content-length") =/= undefined +- andalso list_to_integer(get_header_value("content-length")) > 0) ++ andalso get_combined_header_value("content-length", THIS) =/= undefined ++ andalso list_to_integer(get_combined_header_value("content-length", THIS)) > 0) + orelse (DidNotRecv +- andalso get_header_value("transfer-encoding") =:= "chunked"). ++ andalso get_header_value("transfer-encoding", THIS) =:= "chunked"). ++ ++is_close("close") -> ++ true; ++is_close(S=[_C, _L, _O, _S, _E]) -> ++ string:to_lower(S) =:= "close"; ++is_close(_) -> ++ false. + +-%% @spec cleanup() -> ok ++%% @spec cleanup(request()) -> ok + %% @doc Clean up any junk in the process dictionary, required before continuing + %% a Keep-Alive request. +-cleanup() -> +- [erase(K) || K <- [?SAVE_QS, +- ?SAVE_PATH, +- ?SAVE_RECV, +- ?SAVE_BODY, +- ?SAVE_BODY_LENGTH, +- ?SAVE_POST, +- ?SAVE_COOKIE, +- ?SAVE_FORCE_CLOSE]], ++cleanup({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}) -> ++ L = [?SAVE_QS, ?SAVE_PATH, ?SAVE_RECV, ?SAVE_BODY, ?SAVE_BODY_LENGTH, ++ ?SAVE_POST, ?SAVE_COOKIE, ?SAVE_FORCE_CLOSE], ++ lists:foreach(fun(K) -> ++ erase(K) ++ end, L), + ok. + +-%% @spec parse_qs() -> [{Key::string(), Value::string()}] ++%% @spec parse_qs(request()) -> [{Key::string(), Value::string()}] + %% @doc Parse the query string of the URL. +-parse_qs() -> ++parse_qs({?MODULE, [_Socket, _Method, RawPath, _Version, _Headers]}) -> + case erlang:get(?SAVE_QS) of + undefined -> + {_, QueryString, _} = mochiweb_util:urlsplit_path(RawPath), +@@ -424,17 +440,17 @@ + Cached + end. + +-%% @spec get_cookie_value(Key::string) -> string() | undefined ++%% @spec get_cookie_value(Key::string, request()) -> string() | undefined + %% @doc Get the value of the given cookie. +-get_cookie_value(Key) -> +- proplists:get_value(Key, parse_cookie()). ++get_cookie_value(Key, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ proplists:get_value(Key, parse_cookie(THIS)). + +-%% @spec parse_cookie() -> [{Key::string(), Value::string()}] ++%% @spec parse_cookie(request()) -> [{Key::string(), Value::string()}] + %% @doc Parse the cookie header. +-parse_cookie() -> ++parse_cookie({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case erlang:get(?SAVE_COOKIE) of + undefined -> +- Cookies = case get_header_value("cookie") of ++ Cookies = case get_header_value("cookie", THIS) of + undefined -> + []; + Value -> +@@ -446,17 +462,17 @@ + Cached + end. + +-%% @spec parse_post() -> [{Key::string(), Value::string()}] ++%% @spec parse_post(request()) -> [{Key::string(), Value::string()}] + %% @doc Parse an application/x-www-form-urlencoded form POST. This + %% has the side-effect of calling recv_body(). +-parse_post() -> ++parse_post({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case erlang:get(?SAVE_POST) of + undefined -> +- Parsed = case recv_body() of ++ Parsed = case recv_body(THIS) of + undefined -> + []; + Binary -> +- case get_primary_header_value("content-type") of ++ case get_primary_header_value("content-type",THIS) of + "application/x-www-form-urlencoded" ++ _ -> + mochiweb_util:parse_qs(Binary); + _ -> +@@ -469,41 +485,43 @@ + Cached + end. + +-%% @spec stream_chunked_body(integer(), fun(), term()) -> term() ++%% @spec stream_chunked_body(integer(), fun(), term(), request()) -> term() + %% @doc The function is called for each chunk. + %% Used internally by read_chunked_body. +-stream_chunked_body(MaxChunkSize, Fun, FunState) -> +- case read_chunk_length() of ++stream_chunked_body(MaxChunkSize, Fun, FunState, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ case read_chunk_length(THIS) of + 0 -> +- Fun({0, read_chunk(0)}, FunState); ++ Fun({0, read_chunk(0, THIS)}, FunState); + Length when Length > MaxChunkSize -> +- NewState = read_sub_chunks(Length, MaxChunkSize, Fun, FunState), +- stream_chunked_body(MaxChunkSize, Fun, NewState); ++ NewState = read_sub_chunks(Length, MaxChunkSize, Fun, FunState, THIS), ++ stream_chunked_body(MaxChunkSize, Fun, NewState, THIS); + Length -> +- NewState = Fun({Length, read_chunk(Length)}, FunState), +- stream_chunked_body(MaxChunkSize, Fun, NewState) ++ NewState = Fun({Length, read_chunk(Length, THIS)}, FunState), ++ stream_chunked_body(MaxChunkSize, Fun, NewState, THIS) + end. + +-stream_unchunked_body(0, Fun, FunState) -> ++stream_unchunked_body(0, Fun, FunState, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}) -> + Fun({0, <<>>}, FunState); +-stream_unchunked_body(Length, Fun, FunState) when Length > 0 -> ++stream_unchunked_body(Length, Fun, FunState, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) when Length > 0 -> + PktSize = case Length > ?RECBUF_SIZE of + true -> + ?RECBUF_SIZE; + false -> + Length + end, +- Bin = recv(PktSize), ++ Bin = recv(PktSize, THIS), + NewState = Fun({PktSize, Bin}, FunState), +- stream_unchunked_body(Length - PktSize, Fun, NewState). ++ stream_unchunked_body(Length - PktSize, Fun, NewState, THIS). + +-%% @spec read_chunk_length() -> integer() ++%% @spec read_chunk_length(request()) -> integer() + %% @doc Read the length of the next HTTP chunk. +-read_chunk_length() -> +- mochiweb_socket:setopts(Socket, [{packet, line}]), ++read_chunk_length({?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> ++ ok = mochiweb_socket:setopts(Socket, [{packet, line}]), + case mochiweb_socket:recv(Socket, 0, ?IDLE_TIMEOUT) of + {ok, Header} -> +- mochiweb_socket:setopts(Socket, [{packet, raw}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]), + Splitter = fun (C) -> + C =/= $\r andalso C =/= $\n andalso C =/= $ + end, +@@ -513,11 +531,11 @@ + exit(normal) + end. + +-%% @spec read_chunk(integer()) -> Chunk::binary() | [Footer::binary()] ++%% @spec read_chunk(integer(), request()) -> Chunk::binary() | [Footer::binary()] + %% @doc Read in a HTTP chunk of the given length. If Length is 0, then read the + %% HTTP footers (as a list of binaries, since they're nominal). +-read_chunk(0) -> +- mochiweb_socket:setopts(Socket, [{packet, line}]), ++read_chunk(0, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> ++ ok = mochiweb_socket:setopts(Socket, [{packet, line}]), + F = fun (F1, Acc) -> + case mochiweb_socket:recv(Socket, 0, ?IDLE_TIMEOUT) of + {ok, <<"\r\n">>} -> +@@ -529,10 +547,10 @@ + end + end, + Footers = F(F, []), +- mochiweb_socket:setopts(Socket, [{packet, raw}]), ++ ok = mochiweb_socket:setopts(Socket, [{packet, raw}]), + put(?SAVE_RECV, true), + Footers; +-read_chunk(Length) -> ++read_chunk(Length, {?MODULE, [Socket, _Method, _RawPath, _Version, _Headers]}) -> + case mochiweb_socket:recv(Socket, 2 + Length, ?IDLE_TIMEOUT) of + {ok, <<Chunk:Length/binary, "\r\n">>} -> + Chunk; +@@ -540,32 +558,34 @@ + exit(normal) + end. + +-read_sub_chunks(Length, MaxChunkSize, Fun, FunState) when Length > MaxChunkSize -> +- Bin = recv(MaxChunkSize), ++read_sub_chunks(Length, MaxChunkSize, Fun, FunState, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) when Length > MaxChunkSize -> ++ Bin = recv(MaxChunkSize, THIS), + NewState = Fun({size(Bin), Bin}, FunState), +- read_sub_chunks(Length - MaxChunkSize, MaxChunkSize, Fun, NewState); ++ read_sub_chunks(Length - MaxChunkSize, MaxChunkSize, Fun, NewState, THIS); + +-read_sub_chunks(Length, _MaxChunkSize, Fun, FunState) -> +- Fun({Length, read_chunk(Length)}, FunState). ++read_sub_chunks(Length, _MaxChunkSize, Fun, FunState, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ Fun({Length, read_chunk(Length, THIS)}, FunState). + +-%% @spec serve_file(Path, DocRoot) -> Response ++%% @spec serve_file(Path, DocRoot, request()) -> Response + %% @doc Serve a file relative to DocRoot. +-serve_file(Path, DocRoot) -> +- serve_file(Path, DocRoot, []). ++serve_file(Path, DocRoot, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ serve_file(Path, DocRoot, [], THIS). + +-%% @spec serve_file(Path, DocRoot, ExtraHeaders) -> Response ++%% @spec serve_file(Path, DocRoot, ExtraHeaders, request()) -> Response + %% @doc Serve a file relative to DocRoot. +-serve_file(Path, DocRoot, ExtraHeaders) -> ++serve_file(Path, DocRoot, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case mochiweb_util:safe_relative_path(Path) of + undefined -> +- not_found(ExtraHeaders); ++ not_found(ExtraHeaders, THIS); + RelPath -> + FullPath = filename:join([DocRoot, RelPath]), + case filelib:is_dir(FullPath) of + true -> +- maybe_redirect(RelPath, FullPath, ExtraHeaders); ++ maybe_redirect(RelPath, FullPath, ExtraHeaders, THIS); + false -> +- maybe_serve_file(FullPath, ExtraHeaders) ++ maybe_serve_file(FullPath, ExtraHeaders, THIS) + end + end. + +@@ -575,13 +595,14 @@ + directory_index(FullPath) -> + filename:join([FullPath, "index.html"]). + +-maybe_redirect([], FullPath, ExtraHeaders) -> +- maybe_serve_file(directory_index(FullPath), ExtraHeaders); ++maybe_redirect([], FullPath, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ maybe_serve_file(directory_index(FullPath), ExtraHeaders, THIS); + +-maybe_redirect(RelPath, FullPath, ExtraHeaders) -> ++maybe_redirect(RelPath, FullPath, ExtraHeaders, ++ {?MODULE, [_Socket, _Method, _RawPath, _Version, Headers]}=THIS) -> + case string:right(RelPath, 1) of + "/" -> +- maybe_serve_file(directory_index(FullPath), ExtraHeaders); ++ maybe_serve_file(directory_index(FullPath), ExtraHeaders, THIS); + _ -> + Host = mochiweb_headers:get_value("host", Headers), + Location = "http://" ++ Host ++ "/" ++ RelPath ++ "/", +@@ -596,16 +617,16 @@ + "<p>The document has moved <a href=\"">>, + Bottom = <<">here</a>.</p></body></html>\n">>, + Body = <<Top/binary, LocationBin/binary, Bottom/binary>>, +- respond({301, MoreHeaders, Body}) ++ respond({301, MoreHeaders, Body}, THIS) + end. + +-maybe_serve_file(File, ExtraHeaders) -> ++maybe_serve_file(File, ExtraHeaders, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + case file:read_file_info(File) of + {ok, FileInfo} -> + LastModified = httpd_util:rfc1123_date(FileInfo#file_info.mtime), +- case get_header_value("if-modified-since") of ++ case get_header_value("if-modified-since", THIS) of + LastModified -> +- respond({304, ExtraHeaders, ""}); ++ respond({304, ExtraHeaders, ""}, THIS); + _ -> + case file:open(File, [raw, binary]) of + {ok, IoDevice} -> +@@ -613,15 +634,15 @@ + Res = ok({ContentType, + [{"last-modified", LastModified} + | ExtraHeaders], +- {file, IoDevice}}), +- file:close(IoDevice), ++ {file, IoDevice}}, THIS), ++ ok = file:close(IoDevice), + Res; + _ -> +- not_found(ExtraHeaders) ++ not_found(ExtraHeaders, THIS) + end + end; + {error, _} -> +- not_found(ExtraHeaders) ++ not_found(ExtraHeaders, THIS) + end. + + server_headers() -> +@@ -669,7 +690,7 @@ + end, + {lists:foldr(F, [], Ranges), Size}. + +-%% @spec accepted_encodings([encoding()]) -> [encoding()] | bad_accept_encoding_value ++%% @spec accepted_encodings([encoding()], request()) -> [encoding()] | bad_accept_encoding_value + %% @type encoding() = string(). + %% + %% @doc Returns a list of encodings accepted by a request. Encodings that are +@@ -693,8 +714,8 @@ + %% accepted_encodings(["gzip", "deflate", "identity"]) -> + %% ["deflate", "gzip", "identity"] + %% +-accepted_encodings(SupportedEncodings) -> +- AcceptEncodingHeader = case get_header_value("Accept-Encoding") of ++accepted_encodings(SupportedEncodings, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ AcceptEncodingHeader = case get_header_value("Accept-Encoding", THIS) of + undefined -> + ""; + Value -> +@@ -709,7 +730,7 @@ + ) + end. + +-%% @spec accepts_content_type(string() | binary()) -> boolean() | bad_accept_header ++%% @spec accepts_content_type(string() | binary(), request()) -> boolean() | bad_accept_header + %% + %% @doc Determines whether a request accepts a given media type by analyzing its + %% "Accept" header. +@@ -731,16 +752,9 @@ + %% 5) For an "Accept" header with value "text/*; q=0.0, */*": + %% accepts_content_type("text/plain") -> false + %% +-accepts_content_type(ContentType) when is_binary(ContentType) -> +- accepts_content_type(binary_to_list(ContentType)); +-accepts_content_type(ContentType1) -> ++accepts_content_type(ContentType1, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> + ContentType = re:replace(ContentType1, "\\s", "", [global, {return, list}]), +- AcceptHeader = case get_header_value("Accept") of +- undefined -> +- "*/*"; +- Value -> +- Value +- end, ++ AcceptHeader = accept_header(THIS), + case mochiweb_util:parse_qvalues(AcceptHeader) of + invalid_qvalue_string -> + bad_accept_header; +@@ -761,9 +775,83 @@ + (not lists:member({SuperType, 0.0}, QList)) + end. + ++%% @spec accepted_content_types([string() | binary()], request()) -> [string()] | bad_accept_header ++%% ++%% @doc Filters which of the given media types this request accepts. This filtering ++%% is performed by analyzing the "Accept" header. The returned list is sorted ++%% according to the preferences specified in the "Accept" header (higher Q values ++%% first). If two or more types have the same preference (Q value), they're order ++%% in the returned list is the same as they're order in the input list. ++%% ++%% Examples ++%% ++%% 1) For a missing "Accept" header: ++%% accepted_content_types(["text/html", "application/json"]) -> ++%% ["text/html", "application/json"] ++%% ++%% 2) For an "Accept" header with value "text/html, application/*": ++%% accepted_content_types(["application/json", "text/html"]) -> ++%% ["application/json", "text/html"] ++%% ++%% 3) For an "Accept" header with value "text/html, */*; q=0.0": ++%% accepted_content_types(["text/html", "application/json"]) -> ++%% ["text/html"] ++%% ++%% 4) For an "Accept" header with value "text/html; q=0.5, */*; q=0.1": ++%% accepts_content_types(["application/json", "text/html"]) -> ++%% ["text/html", "application/json"] ++%% ++accepted_content_types(Types1, {?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ Types = lists:map( ++ fun(T) -> re:replace(T, "\\s", "", [global, {return, list}]) end, ++ Types1), ++ AcceptHeader = accept_header(THIS), ++ case mochiweb_util:parse_qvalues(AcceptHeader) of ++ invalid_qvalue_string -> ++ bad_accept_header; ++ QList -> ++ TypesQ = lists:foldr( ++ fun(T, Acc) -> ++ case proplists:get_value(T, QList) of ++ undefined -> ++ [MainType, _SubType] = string:tokens(T, "/"), ++ case proplists:get_value(MainType ++ "/*", QList) of ++ undefined -> ++ case proplists:get_value("*/*", QList) of ++ Q when is_float(Q), Q > 0.0 -> ++ [{Q, T} | Acc]; ++ _ -> ++ Acc ++ end; ++ Q when Q > 0.0 -> ++ [{Q, T} | Acc]; ++ _ -> ++ Acc ++ end; ++ Q when Q > 0.0 -> ++ [{Q, T} | Acc]; ++ _ -> ++ Acc ++ end ++ end, ++ [], Types), ++ % Note: Stable sort. If 2 types have the same Q value we leave them in the ++ % same order as in the input list. ++ SortFun = fun({Q1, _}, {Q2, _}) -> Q1 >= Q2 end, ++ [Type || {_Q, Type} <- lists:sort(SortFun, TypesQ)] ++ end. ++ ++accept_header({?MODULE, [_Socket, _Method, _RawPath, _Version, _Headers]}=THIS) -> ++ case get_header_value("Accept", THIS) of ++ undefined -> ++ "*/*"; ++ Value -> ++ Value ++ end. ++ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_request_tests.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request_tests.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_request_tests.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_request_tests.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -1,12 +1,13 @@ + -module(mochiweb_request_tests). + +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + accepts_content_type_test() -> + Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, + mochiweb_headers:make([{"Accept", "multipart/related"}])), + ?assertEqual(true, Req1:accepts_content_type("multipart/related")), ++ ?assertEqual(true, Req1:accepts_content_type(<<"multipart/related">>)), + + Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, + mochiweb_headers:make([{"Accept", "text/html"}])), +@@ -60,4 +61,122 @@ + mochiweb_headers:make([{"Accept", "text/html;level=1;q=0.1, text/html"}])), + ?assertEqual(true, Req14:accepts_content_type("text/html; level=1")). + ++accepted_encodings_test() -> ++ Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([])), ++ ?assertEqual(["identity"], ++ Req1:accepted_encodings(["gzip", "identity"])), ++ ++ Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "gzip, deflate"}])), ++ ?assertEqual(["gzip", "identity"], ++ Req2:accepted_encodings(["gzip", "identity"])), ++ ++ Req3 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "gzip;q=0.5, deflate"}])), ++ ?assertEqual(["deflate", "gzip", "identity"], ++ Req3:accepted_encodings(["gzip", "deflate", "identity"])), ++ ++ Req4 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "identity, *;q=0"}])), ++ ?assertEqual(["identity"], ++ Req4:accepted_encodings(["gzip", "deflate", "identity"])), ++ ++ Req5 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "gzip; q=0.1, *;q=0"}])), ++ ?assertEqual(["gzip"], ++ Req5:accepted_encodings(["gzip", "deflate", "identity"])), ++ ++ Req6 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "gzip; q=, *;q=0"}])), ++ ?assertEqual(bad_accept_encoding_value, ++ Req6:accepted_encodings(["gzip", "deflate", "identity"])), ++ ++ Req7 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "gzip;q=2.0, *;q=0"}])), ++ ?assertEqual(bad_accept_encoding_value, ++ Req7:accepted_encodings(["gzip", "identity"])), ++ ++ Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept-Encoding", "deflate, *;q=0.0"}])), ++ ?assertEqual([], ++ Req8:accepted_encodings(["gzip", "identity"])). ++ ++accepted_content_types_test() -> ++ Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/html"}])), ++ ?assertEqual(["text/html"], ++ Req1:accepted_content_types(["text/html", "application/json"])), ++ ++ Req2 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/html, */*;q=0"}])), ++ ?assertEqual(["text/html"], ++ Req2:accepted_content_types(["text/html", "application/json"])), ++ ++ Req3 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/*, */*;q=0"}])), ++ ?assertEqual(["text/html"], ++ Req3:accepted_content_types(["text/html", "application/json"])), ++ ++ Req4 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/*;q=0.8, */*;q=0.5"}])), ++ ?assertEqual(["text/html", "application/json"], ++ Req4:accepted_content_types(["application/json", "text/html"])), ++ ++ Req5 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/*;q=0.8, */*;q=0.5"}])), ++ ?assertEqual(["text/html", "application/json"], ++ Req5:accepted_content_types(["text/html", "application/json"])), ++ ++ Req6 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/*;q=0.5, */*;q=0.5"}])), ++ ?assertEqual(["application/json", "text/html"], ++ Req6:accepted_content_types(["application/json", "text/html"])), ++ ++ Req7 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make( ++ [{"Accept", "text/html;q=0.5, application/json;q=0.5"}])), ++ ?assertEqual(["application/json", "text/html"], ++ Req7:accepted_content_types(["application/json", "text/html"])), ++ ++ Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/html"}])), ++ ?assertEqual([], ++ Req8:accepted_content_types(["application/json"])), ++ ++ Req9 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, ++ mochiweb_headers:make([{"Accept", "text/*;q=0.9, text/html;q=0.5, */*;q=0.7"}])), ++ ?assertEqual(["application/json", "text/html"], ++ Req9:accepted_content_types(["text/html", "application/json"])). ++ ++should_close_test() -> ++ F = fun (V, H) -> ++ (mochiweb_request:new( ++ nil, 'GET', "/", V, ++ mochiweb_headers:make(H) ++ )):should_close() ++ end, ++ ?assertEqual( ++ true, ++ F({1, 1}, [{"Connection", "close"}])), ++ ?assertEqual( ++ true, ++ F({1, 0}, [{"Connection", "close"}])), ++ ?assertEqual( ++ true, ++ F({1, 1}, [{"Connection", "ClOSe"}])), ++ ?assertEqual( ++ false, ++ F({1, 1}, [{"Connection", "closer"}])), ++ ?assertEqual( ++ false, ++ F({1, 1}, [])), ++ ?assertEqual( ++ true, ++ F({1, 0}, [])), ++ ?assertEqual( ++ false, ++ F({1, 0}, [{"Connection", "Keep-Alive"}])), ++ ok. ++ + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_response.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_response.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_response.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_response.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -3,39 +3,47 @@ + + %% @doc Response abstraction. + +--module(mochiweb_response, [Request, Code, Headers]). ++-module(mochiweb_response). + -author('bob@mochimedia.com'). + + -define(QUIP, "Any of you quaids got a smint?"). + +--export([get_header_value/1, get/1, dump/0]). +--export([send/1, write_chunk/1]). ++-export([new/3, get_header_value/2, get/2, dump/1]). ++-export([send/2, write_chunk/2]). + +-%% @spec get_header_value(string() | atom() | binary()) -> string() | undefined ++%% @type response(). A mochiweb_response parameterized module instance. ++ ++%% @spec new(Request, Code, Headers) -> response() ++%% @doc Create a new mochiweb_response instance. ++new(Request, Code, Headers) -> ++ {?MODULE, [Request, Code, Headers]}. ++ ++%% @spec get_header_value(string() | atom() | binary(), response()) -> ++%% string() | undefined + %% @doc Get the value of the given response header. +-get_header_value(K) -> ++get_header_value(K, {?MODULE, [_Request, _Code, Headers]}) -> + mochiweb_headers:get_value(K, Headers). + +-%% @spec get(request | code | headers) -> term() ++%% @spec get(request | code | headers, response()) -> term() + %% @doc Return the internal representation of the given field. +-get(request) -> ++get(request, {?MODULE, [Request, _Code, _Headers]}) -> + Request; +-get(code) -> ++get(code, {?MODULE, [_Request, Code, _Headers]}) -> + Code; +-get(headers) -> ++get(headers, {?MODULE, [_Request, _Code, Headers]}) -> + Headers. + +-%% @spec dump() -> {mochiweb_request, [{atom(), term()}]} ++%% @spec dump(response()) -> {mochiweb_request, [{atom(), term()}]} + %% @doc Dump the internal representation to a "human readable" set of terms + %% for debugging/inspection purposes. +-dump() -> ++dump({?MODULE, [Request, Code, Headers]}) -> + [{request, Request:dump()}, + {code, Code}, + {headers, mochiweb_headers:to_list(Headers)}]. + +-%% @spec send(iodata()) -> ok ++%% @spec send(iodata(), response()) -> ok + %% @doc Send data over the socket if the method is not HEAD. +-send(Data) -> ++send(Data, {?MODULE, [Request, _Code, _Headers]}) -> + case Request:get(method) of + 'HEAD' -> + ok; +@@ -43,22 +51,22 @@ + Request:send(Data) + end. + +-%% @spec write_chunk(iodata()) -> ok ++%% @spec write_chunk(iodata(), response()) -> ok + %% @doc Write a chunk of a HTTP chunked response. If Data is zero length, + %% then the chunked response will be finished. +-write_chunk(Data) -> ++write_chunk(Data, {?MODULE, [Request, _Code, _Headers]}=THIS) -> + case Request:get(version) of + Version when Version >= {1, 1} -> + Length = iolist_size(Data), +- send([io_lib:format("~.16b\r\n", [Length]), Data, <<"\r\n">>]); ++ send([io_lib:format("~.16b\r\n", [Length]), Data, <<"\r\n">>], THIS); + _ -> +- send(Data) ++ send(Data, THIS) + end. + + + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_socket_server.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_socket_server.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_socket_server.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_socket_server.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -9,7 +9,7 @@ + + -include("internal.hrl"). + +--export([start/1, stop/1]). ++-export([start/1, start_link/1, stop/1]). + -export([init/1, handle_call/3, handle_cast/2, terminate/2, code_change/3, + handle_info/2]). + -export([get/2, set/3]). +@@ -33,10 +33,22 @@ + + -define(is_old_state(State), not is_record(State, mochiweb_socket_server)). + +-start(State=#mochiweb_socket_server{}) -> +- start_server(State); ++start_link(Options) -> ++ start_server(start_link, parse_options(Options)). ++ + start(Options) -> +- start(parse_options(Options)). ++ case lists:keytake(link, 1, Options) of ++ {value, {_Key, false}, Options1} -> ++ start_server(start, parse_options(Options1)); ++ _ -> ++ %% TODO: https://github.com/mochi/mochiweb/issues/58 ++ %% [X] Phase 1: Add new APIs (Sep 2011) ++ %% [_] Phase 2: Add deprecation warning ++ %% [_] Phase 3: Change default to {link, false} and ignore link ++ %% [_] Phase 4: Add deprecation warning for {link, _} option ++ %% [_] Phase 5: Remove support for {link, _} option ++ start_link(Options) ++ end. + + get(Name, Property) -> + gen_server:call(Name, {get, Property}). +@@ -61,6 +73,8 @@ + + %% Internal API + ++parse_options(State=#mochiweb_socket_server{}) -> ++ State; + parse_options(Options) -> + parse_options(Options, #mochiweb_socket_server{}). + +@@ -116,22 +130,22 @@ + parse_options(Rest, State#mochiweb_socket_server{profile_fun=ProfileFun}). + + +-start_server(State=#mochiweb_socket_server{ssl=Ssl, name=Name}) -> +- case Ssl of +- true -> +- application:start(crypto), +- application:start(public_key), +- application:start(ssl); +- false -> +- void +- end, ++start_server(F, State=#mochiweb_socket_server{ssl=Ssl, name=Name}) -> ++ ok = prep_ssl(Ssl), + case Name of + undefined -> +- gen_server:start_link(?MODULE, State, []); ++ gen_server:F(?MODULE, State, []); + _ -> +- gen_server:start_link(Name, ?MODULE, State, []) ++ gen_server:F(Name, ?MODULE, State, []) + end. + ++prep_ssl(true) -> ++ ok = mochiweb:ensure_started(crypto), ++ ok = mochiweb:ensure_started(public_key), ++ ok = mochiweb:ensure_started(ssl); ++prep_ssl(false) -> ++ ok. ++ + ensure_int(N) when is_integer(N) -> + N; + ensure_int(S) when is_list(S) -> +@@ -165,27 +179,7 @@ + {_, _, _, _, _, _, _, _} -> % IPv6 + [inet6, {ip, Ip} | BaseOpts] + end, +- case listen(Port, Opts, State) of +- {stop, eacces} -> +- case Port < 1024 of +- true -> +- case catch fdsrv:start() of +- {ok, _} -> +- case fdsrv:bind_socket(tcp, Port) of +- {ok, Fd} -> +- listen(Port, [{fd, Fd} | Opts], State); +- _ -> +- {stop, fdsrv_bind_failed} +- end; +- _ -> +- {stop, fdsrv_start_failed} +- end; +- false -> +- {stop, eacces} +- end; +- Other -> +- Other +- end. ++ listen(Port, Opts, State). + + new_acceptor_pool(Listen, + State=#mochiweb_socket_server{acceptor_pool=Pool, +@@ -271,15 +265,8 @@ + + terminate(Reason, State) when ?is_old_state(State) -> + terminate(Reason, upgrade_state(State)); +-terminate(_Reason, #mochiweb_socket_server{listen=Listen, port=Port}) -> +- mochiweb_socket:close(Listen), +- case Port < 1024 of +- true -> +- catch fdsrv:stop(), +- ok; +- false -> +- ok +- end. ++terminate(_Reason, #mochiweb_socket_server{listen=Listen}) -> ++ mochiweb_socket:close(Listen). + + code_change(_OldVsn, State, _Extra) -> + State. +@@ -337,8 +324,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + upgrade_state_test() -> + OldState = {mochiweb_socket_server, +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/mochiweb_util.erl apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_util.erl +--- apache-couchdb-1.2.1/src/mochiweb/mochiweb_util.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/mochiweb_util.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -9,7 +9,7 @@ + -export([path_split/1]). + -export([urlsplit/1, urlsplit_path/1, urlunsplit/1, urlunsplit_path/1]). + -export([guess_mime/1, parse_header/1]). +--export([shell_quote/1, cmd/1, cmd_string/1, cmd_port/2, cmd_status/1]). ++-export([shell_quote/1, cmd/1, cmd_string/1, cmd_port/2, cmd_status/1, cmd_status/2]). + -export([record_to_proplist/2, record_to_proplist/3]). + -export([safe_relative_path/1, partition/2]). + -export([parse_qvalues/1, pick_accepted_encodings/3]). +@@ -124,11 +124,17 @@ + string:join([shell_quote(X) || X <- Argv], " "). + + %% @spec cmd_status([string()]) -> {ExitStatus::integer(), Stdout::binary()} +-%% @doc Accumulate the output and exit status from the given application, will be +-%% spawned with cmd_port/2. ++%% @doc Accumulate the output and exit status from the given application, ++%% will be spawned with cmd_port/2. + cmd_status(Argv) -> ++ cmd_status(Argv, []). ++ ++%% @spec cmd_status([string()], [atom()]) -> {ExitStatus::integer(), Stdout::binary()} ++%% @doc Accumulate the output and exit status from the given application, ++%% will be spawned with cmd_port/2. ++cmd_status(Argv, Options) -> + Port = cmd_port(Argv, [exit_status, stderr_to_stdout, +- use_stdio, binary]), ++ use_stdio, binary | Options]), + try cmd_loop(Port, []) + after catch port_close(Port) + end. +@@ -578,8 +584,8 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + + make_io_test() -> + ?assertEqual( +diff -wbBur apache-couchdb-1.2.1/src/mochiweb/reloader.erl apache-couchdb-1.2.1.q/src/mochiweb/reloader.erl +--- apache-couchdb-1.2.1/src/mochiweb/reloader.erl 2012-12-21 01:24:07.000000000 +0400 ++++ apache-couchdb-1.2.1.q/src/mochiweb/reloader.erl 2013-03-22 15:26:58.000000000 +0400 +@@ -59,7 +59,7 @@ + %% @doc gen_server callback. + handle_info(doit, State) -> + Now = stamp(), +- doit(State#state.last, Now), ++ _ = doit(State#state.last, Now), + {noreply, State#state{last = Now}}; + handle_info(_Info, State) -> + {noreply, State}. +@@ -156,6 +156,6 @@ + %% + %% Tests + %% +--include_lib("eunit/include/eunit.hrl"). + -ifdef(TEST). ++-include_lib("eunit/include/eunit.hrl"). + -endif. diff --git a/community/drbd/PKGBUILD b/community/drbd/PKGBUILD index d34757355..fc79acfde 100644 --- a/community/drbd/PKGBUILD +++ b/community/drbd/PKGBUILD @@ -1,22 +1,24 @@ -# $Id: PKGBUILD 83703 2013-02-04 14:42:03Z seblu $ -# Maintainer: Sébastien Luttringer <seblu@archlinux.org> +# $Id: PKGBUILD 86842 2013-03-22 19:15:09Z seblu $ +# Maintainer: Sébastien Luttringer pkgname=drbd -pkgver=8.3.13 -pkgrel=2 +pkgver=8.4.2 +pkgrel=1 arch=('i686' 'x86_64') pkgdesc='Userland tools for Distributed Replicated Block Device' url='http://www.drbd.org' license=('GPL2') depends=('perl' 'bash') -source=("http://oss.linbit.com/drbd/8.3/$pkgname-$pkgver.tar.gz" +source=("http://oss.linbit.com/drbd/8.4/$pkgname-$pkgver.tar.gz" "$pkgname.service") backup=('etc/drbd.conf' 'etc/drbd.d/global_common.conf') -md5sums=('760a25459ef6b7262a2a3572c1561c5b' +md5sums=('b081f1046adda1d51ba351c40a8b1107' 'afbb345094db49b0a474c0b4e51c0acd') build() { cd $pkgname-$pkgver + # fix hardcoded path in udev rules + sed -i 's,/sbin/drbdadm,/usr/sbin/drbdadm,' scripts/drbd.rules ./configure \ --prefix=/usr \ --localstatedir=/var \ @@ -30,8 +32,7 @@ build() { --without-pacemaker \ --without-heartbeat \ --without-xen \ - --with-initdir=/etc/rc.d - #--with-legacy_utils \ + --without-legacy_utils make } @@ -42,8 +43,6 @@ package() { cd "$pkgdir" mv sbin/* usr/sbin rmdir sbin - # fix hardcoded path in udev rules - sed -i 's,/sbin/drbdadm,/usr/sbin/drbdadm,' etc/udev/rules.d/65-drbd.rules # move udev files mv etc/udev usr/lib # move bash completion @@ -51,6 +50,8 @@ package() { mv etc/bash_completion.d usr/share/bash-completion/completions # remove /var/lock rmdir var/lock + # remove embeded init stuff + rm -r etc/init.d # autoload module install -Dm 644 /dev/null usr/lib/modules-load.d/$pkgname.conf echo 'drbd' > usr/lib/modules-load.d/$pkgname.conf diff --git a/community/gens-gs/PKGBUILD b/community/gens-gs/PKGBUILD new file mode 100755 index 000000000..27ebfa3e6 --- /dev/null +++ b/community/gens-gs/PKGBUILD @@ -0,0 +1,62 @@ +# $Id: PKGBUILD 86824 2013-03-22 13:05:22Z alucryd $ +# Maintainer: Maxime Gauduin <alucryd@gmail.com> +# Contributor: trya <tryagainprod@gmail.com> +# Contributor: Yvan <madridista40@orange.fr> + +pkgname=gens-gs +pkgver=2.16.7 +pkgrel=2 +pkgdesc="An emulator of Sega Genesis, Sega CD and 32X, combining features from various forks of Gens" +arch=('i686' 'x86_64') +url="http://segaretro.org/Gens/GS" +license=('GPL') +if [[ $CARCH == "x86_64" ]]; then + makedepends=('gcc-multilib' 'lib32-gtk2' 'lib32-mesa-libgl' 'lib32-sdl' 'nasm') + optdepends=('lib32-alsa-plugins: Sound support for PulseAudio' + 'lib32-libpulse: Sound support for PulseAudio') +else + depends=('gtk2' 'sdl') + makedepends=('nasm') +fi +conflicts=('gens') +options=('!libtool') +source=('http://segaretro.org/images/6/6d/Gens-gs-r7.tar.gz' + 'gens-gtk.patch') +sha256sums=('6320cd7bee85472891e1e29b21731d2c8180d04db67ee21256491f3f9ad145c1' + '29b1e9755b34e00ef7d19bdc527dc4f841400a0022c81ee71c331be4a76a6c1c') + +build() { + cd "${srcdir}"/${pkgname}-r7 + +# Patch + patch -Np1 -i ../gens-gtk.patch + +# Multilib + if [[ $CARCH == "x86_64" ]]; then + export CC="gcc -m32" + export CXX="g++ -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + fi + +# Build + if [[ $CARCH == "x86_64" ]]; then + ./configure --host=i686-unknown-linux-gnu --prefix=/usr --libdir=/usr/lib32 --with-pic --disable-static + else + LIBS='-ldl -lX11' ./configure --prefix=/usr --with-pic --disable-static + fi + make +} + +package() { + cd "${srcdir}"/${pkgname}-r7 + +# Multilib + if [[ $CARCH == "x86_64" ]]; then + depends=('lib32-gtk2' 'lib32-sdl') + fi + +# Install + make DESTDIR="${pkgdir}" install +} + +# vim: ts=2 sw=2 et: diff --git a/community/gens-gs/gens-gtk.patch b/community/gens-gs/gens-gtk.patch new file mode 100755 index 000000000..0bc6fd0ee --- /dev/null +++ b/community/gens-gs/gens-gtk.patch @@ -0,0 +1,187 @@ +diff -ru gens/src/gens/ui/gtk/about/about_window.cpp gens-build/src/gens/ui/gtk/about/about_window.cpp +--- gens/src/gens/ui/gtk/about/about_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/about/about_window.cpp 2010-10-11 15:46:25.000000000 +0000 +@@ -84,7 +84,7 @@ + gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(about_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(about_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(about_window), FALSE); ++ g_object_set(GTK_DIALOG(about_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)about_window, "delete_event", +diff -ru gens/src/gens/ui/gtk/bios_misc_files/bmf_window.cpp gens-build/src/gens/ui/gtk/bios_misc_files/bmf_window.cpp +--- gens/src/gens/ui/gtk/bios_misc_files/bmf_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/bios_misc_files/bmf_window.cpp 2010-10-11 15:33:03.000000000 +0000 +@@ -84,7 +84,7 @@ + gtk_window_set_position(GTK_WINDOW(bmf_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(bmf_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(bmf_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(bmf_window), FALSE); ++ g_object_set(GTK_DIALOG(bmf_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)bmf_window, "delete_event", +diff -ru gens/src/gens/ui/gtk/directory_config/dir_window.cpp gens-build/src/gens/ui/gtk/directory_config/dir_window.cpp +--- gens/src/gens/ui/gtk/directory_config/dir_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/directory_config/dir_window.cpp 2010-10-11 15:34:21.000000000 +0000 +@@ -109,7 +109,7 @@ + gtk_window_set_position(GTK_WINDOW(dir_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(dir_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(dir_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(dir_window), FALSE); ++ g_object_set(GTK_DIALOG(dir_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)(dir_window), "delete_event", +diff -ru gens/src/gens/ui/gtk/general_options/genopt_window.cpp gens-build/src/gens/ui/gtk/general_options/genopt_window.cpp +--- gens/src/gens/ui/gtk/general_options/genopt_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/general_options/genopt_window.cpp 2010-10-11 15:36:00.000000000 +0000 +@@ -140,7 +140,7 @@ + gtk_window_set_position(GTK_WINDOW(genopt_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(genopt_window), false); + gtk_window_set_type_hint(GTK_WINDOW(genopt_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(genopt_window), false); ++ g_object_set(GTK_DIALOG(genopt_window), "has-separator", false, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)genopt_window, "delete_event", +@@ -458,11 +458,11 @@ + gtk_box_pack_start(GTK_BOX(vboxIntroEffect), lblIntroEffect, false, false, 0); + + // Dropdown for intro effect. +- cboIntroEffect = gtk_combo_box_new_text(); +- gtk_combo_box_append_text(GTK_COMBO_BOX(cboIntroEffect), "None"); +- gtk_combo_box_append_text(GTK_COMBO_BOX(cboIntroEffect), "Gens Logo Effect"); +- gtk_combo_box_append_text(GTK_COMBO_BOX(cboIntroEffect), "\"Crazy\" Effect"); +- //gtk_combo_box_append_text(GTK_COMBO_BOX(cboIntroEffect), "Genesis TMSS"); // TODO: Broken. ++ cboIntroEffect = gtk_combo_box_text_new(); ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboIntroEffect), "None"); ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboIntroEffect), "Gens Logo Effect"); ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboIntroEffect), "\"Crazy\" Effect"); ++ //gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboIntroEffect), "Genesis TMSS"); // TODO: Broken. + gtk_widget_show(cboIntroEffect); + gtk_box_pack_start(GTK_BOX(vboxIntroEffect), cboIntroEffect, false, false, 0); + g_signal_connect((gpointer)(cboIntroEffect), "changed", +diff -ru gens/src/gens/ui/gtk/gens/gens_window_callbacks.cpp gens-build/src/gens/ui/gtk/gens/gens_window_callbacks.cpp +--- gens/src/gens/ui/gtk/gens/gens_window_callbacks.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/gens/gens_window_callbacks.cpp 2010-10-11 15:21:28.000000000 +0000 +@@ -154,9 +154,9 @@ + GSFT_UNUSED_PARAMETER(y); + GSFT_UNUSED_PARAMETER(user_data); + +- if (context->targets) ++ if (gdk_drag_context_list_targets(context)) + { +- GdkAtom target_type = GDK_POINTER_TO_ATOM(g_list_nth_data(context->targets, 0)); ++ GdkAtom target_type = GDK_POINTER_TO_ATOM(g_list_nth_data(gdk_drag_context_list_targets(context), 0)); + gtk_drag_get_data(widget, context, target_type, time); + return true; + } +diff -ru gens/src/gens/ui/gtk/opengl_resolution/glres_window.cpp gens-build/src/gens/ui/gtk/opengl_resolution/glres_window.cpp +--- gens/src/gens/ui/gtk/opengl_resolution/glres_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/opengl_resolution/glres_window.cpp 2010-10-11 15:46:21.000000000 +0000 +@@ -75,7 +75,7 @@ + gtk_window_set_position(GTK_WINDOW(glres_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(glres_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(glres_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(glres_window), FALSE); ++ g_object_set(GTK_DIALOG(glres_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)(glres_window), "delete_event", +diff -ru gens/src/gens/ui/gtk/plugin_manager/pmgr_window.cpp gens-build/src/gens/ui/gtk/plugin_manager/pmgr_window.cpp +--- gens/src/gens/ui/gtk/plugin_manager/pmgr_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/plugin_manager/pmgr_window.cpp 2010-10-11 15:46:29.000000000 +0000 +@@ -80,8 +80,7 @@ + // Callbacks. + static gboolean pmgr_window_callback_close(GtkWidget *widget, GdkEvent *event, gpointer user_data); + static void pmgr_window_callback_response(GtkDialog *dialog, gint response_id, gpointer user_data); +-static void pmgr_window_callback_tabPluginList_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, +- guint page_num, gpointer user_data); ++static void pmgr_window_callback_tabPluginList_switch_page(GtkNotebook *notebook, guint page_num, gpointer user_data); + static void pmgr_window_callback_lstPluginList_cursor_changed(GtkTreeView *tree_view, gpointer user_data); + static void pmgr_window_callback_fraPluginDesc_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); + +@@ -119,7 +118,7 @@ + gtk_window_set_position(GTK_WINDOW(pmgr_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(pmgr_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(pmgr_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(pmgr_window), FALSE); ++ g_object_set(GTK_DIALOG(pmgr_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)pmgr_window, "delete_event", +@@ -559,11 +558,9 @@ + * @param page_num New notebook page index. + * @param user_data User data. + */ +-static void pmgr_window_callback_tabPluginList_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, +- guint page_num, gpointer user_data) ++static void pmgr_window_callback_tabPluginList_switch_page(GtkNotebook *notebook, guint page_num, gpointer user_data) + { + GSFT_UNUSED_PARAMETER(notebook); +- GSFT_UNUSED_PARAMETER(page); + GSFT_UNUSED_PARAMETER(user_data); + + // Activate the "cursor-changed" callback for the page. +diff -ru gens/src/gens/ui/gtk/select_cdrom/selcd_window.cpp gens-build/src/gens/ui/gtk/select_cdrom/selcd_window.cpp +--- gens/src/gens/ui/gtk/select_cdrom/selcd_window.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/gens/ui/gtk/select_cdrom/selcd_window.cpp 2010-10-11 15:46:16.000000000 +0000 +@@ -94,7 +94,7 @@ + gtk_window_set_position(GTK_WINDOW(selcd_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(selcd_window), FALSE); + gtk_window_set_type_hint(GTK_WINDOW(selcd_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(selcd_window), FALSE); ++ g_object_set(GTK_DIALOG(selcd_window), "has-separator", FALSE, NULL); + + // Callbacks for if the window is closed. + g_signal_connect((gpointer)(selcd_window), "delete_event", +@@ -128,7 +128,7 @@ + gtk_box_pack_start(GTK_BOX(hboxDeviceName), lblDeviceName, false, false, 0); + + // Create the dropdown for the CD-ROM device name. +- cboDeviceName = gtk_combo_box_entry_new_text(); ++ cboDeviceName = gtk_combo_box_text_new_with_entry(); + gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(cboDeviceName))), 63); + gtk_label_set_mnemonic_widget(GTK_LABEL(lblDeviceName), cboDeviceName); + gtk_widget_show(cboDeviceName); +@@ -156,7 +156,7 @@ + gtk_box_pack_start(GTK_BOX(hboxDriveSpeed), vboxDriveSpeedDropdown, true, true, 0); + + // Create the dropdown for the CD-ROM drive speed selection. +- cboDriveSpeed = gtk_combo_box_new_text(); ++ cboDriveSpeed = gtk_combo_box_text_new(); + char tmpSpeed[16]; + for (unsigned int i = 0; i < ((sizeof(CD_DriveSpeed) / sizeof(CD_DriveSpeed[0])) - 1); i++) + { +@@ -167,7 +167,7 @@ + else + szprintf(tmpSpeed, sizeof(tmpSpeed), "%dx", CD_DriveSpeed[i]); + +- gtk_combo_box_append_text(GTK_COMBO_BOX(cboDriveSpeed), tmpSpeed); ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboDriveSpeed), tmpSpeed); + } + gtk_widget_show(cboDriveSpeed); + gtk_box_pack_start(GTK_BOX(vboxDriveSpeedDropdown), cboDriveSpeed, true, false, 0); +@@ -252,7 +252,7 @@ + continue; + + // Add the device file. +- gtk_combo_box_append_text(GTK_COMBO_BOX(cboDeviceName), tmpDeviceName); ++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cboDeviceName), tmpDeviceName); + } + } + +diff -ru gens/src/mdp/misc/game_genie/gg_window_gtk2.cpp gens-build/src/mdp/misc/game_genie/gg_window_gtk2.cpp +--- gens/src/mdp/misc/game_genie/gg_window_gtk2.cpp 2010-10-11 16:32:29.000000000 +0000 ++++ gens-build/src/mdp/misc/game_genie/gg_window_gtk2.cpp 2010-10-11 15:52:05.000000000 +0000 +@@ -111,7 +111,7 @@ + gtk_window_set_position(GTK_WINDOW(gg_window), GTK_WIN_POS_CENTER); + gtk_window_set_resizable(GTK_WINDOW(gg_window), TRUE); + gtk_window_set_type_hint(GTK_WINDOW(gg_window), GDK_WINDOW_TYPE_HINT_DIALOG); +- gtk_dialog_set_has_separator(GTK_DIALOG(gg_window), FALSE); ++ g_object_set(GTK_DIALOG(gg_window), "has-separator", FALSE, NULL); + + // Add the window icon. + GList *icon_list = NULL; diff --git a/community/gens/PKGBUILD b/community/gens/PKGBUILD new file mode 100755 index 000000000..3b54528f0 --- /dev/null +++ b/community/gens/PKGBUILD @@ -0,0 +1,57 @@ +# $Id: PKGBUILD 86823 2013-03-22 12:51:22Z alucryd $ +# Maintainer: Maxime Gauduin <alucryd@gmail.com> +# Contributor: trya <tryagainprod@gmail.com> +# Contributor: robb_force <robb_force@holybuffalo.net> + +pkgname=gens +pkgver=2.15.5 +pkgrel=8 +pkgdesc='A Sega Genesis / Sega CD / Sega 32X emulator' +arch=('i686' 'x86_64') +url='http://gens.sourceforge.net' +license=('GPL') +if [[ $CARCH == "x86_64" ]]; then + makedepends=('gcc-multilib' 'lib32-gtk2' 'lib32-mesa-libgl' 'lib32-sdl' 'nasm') + optdepends=('lib32-alsa-plugins: Sound support for PulseAudio' + 'lib32-libpulse: Sound support for PulseAudio') +else + depends=('gtk2' 'sdl') + makedepends=('nasm') +fi +options=('!buildflags') +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'gens.desktop') +sha256sums=('51910d3056da9ffbb2c01cfec064998c9a4cad0cb379d703ec1b93c83dba305a' + '146a0e98780b909877b3937c9132c85f5aba9450ef9f748bd1374ae8c9dfb751') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver} + +# Multilib + if [[ $CARCH == "x86_64" ]]; then + export CC="gcc -m32" + export CXX="g++ -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + fi + +# Build + export LDFLAGS=-Wl,-z,noexecstack + ./configure --host=i686-unknown-linux-gnu --prefix=/usr + make +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver} + +# Multilib + if [[ $CARCH == "x86_64" ]]; then + depends=('lib32-gtk2' 'lib32-sdl') + fi + +# Install + make DESTDIR=${pkgdir} install + install -dm 755 "${pkgdir}"/usr/share/applications + install -m 644 ../gens.desktop "${pkgdir}"/usr/share/applications/gens.desktop +} + +# vim: ts=2 sw=2 et: diff --git a/community/gens/gens.desktop b/community/gens/gens.desktop new file mode 100755 index 000000000..f668f16af --- /dev/null +++ b/community/gens/gens.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Gens +Type=Application +GenericName=A Sega Genesis / Sega CD / Sega 32X emulator +Comment=A Sega Genesis / Sega CD / Sega 32X emulator +Exec=gens +Icon=/usr/share/gens/Gens2.ico +Categories=Application;Game;Emulator; diff --git a/community/mixxx/PKGBUILD b/community/mixxx/PKGBUILD index a2905b788..5f3fb3b9e 100644 --- a/community/mixxx/PKGBUILD +++ b/community/mixxx/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 85374 2013-03-01 10:35:42Z andrea $ +# $Id: PKGBUILD 86767 2013-03-22 00:23:48Z eric $ # Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> # Contributor: Ali H. Caliskan <ali.h.caliskan AT gmail DOT com> # Contributor: Ryan Coyner <rcoyner@gmail.com> @@ -19,7 +19,7 @@ md5sums=('765bc5216ec8102c2186dd3ea80187a9') build() { cd "${srcdir}/${pkgname}-${pkgver}" - scons qtdir=/usr/lib/qt4 prefix=/usr install_root="${pkgdir}/usr" + scons qtdir=/usr/lib/qt4 prefix=/usr } package() { diff --git a/community/nemo/PKGBUILD b/community/nemo/PKGBUILD index 01df50a53..778009bb6 100644 --- a/community/nemo/PKGBUILD +++ b/community/nemo/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 85617 2013-03-04 04:34:16Z bgyorgy $ +# $Id: PKGBUILD 86851 2013-03-22 21:28:54Z faidoc $ # Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com> # Contributor: Ner0 pkgname=nemo -pkgver=1.7.1 -pkgrel=2 +pkgver=1.7.2 +pkgrel=1 pkgdesc="Cinnamon file manager (Nautilus fork)" arch=('i686' 'x86_64') url="https://github.com/linuxmint/nemo" @@ -19,10 +19,8 @@ conflicts=('nemo-fm') options=('!emptydirs' '!libtool') install=nemo.install source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/nemo/tarball/$pkgver" - "gnome-autogen.sh" "use-terminal-config.patch") -md5sums=('b348b6e340e055bef3163555b99621bb' - 'a925691c9b57a6a884dcf07da057fd1f' +md5sums=('809cf58f472a9e5de628a763d441b246' '6cca080cc8fe3df7e725c0f8cd5fa485') build() { @@ -31,11 +29,6 @@ build() { # Read the default terminal app from GSettings patch -Np1 -i ../use-terminal-config.patch - cp ${srcdir}/gnome-autogen.sh . - sed -i 's/\ --warn-all\ --warn-error//' src/Makefile.am - sed -i 's/gnome-autogen.sh/.\/gnome-autogen.sh/g' autogen.sh - chmod +x gnome-autogen.sh - ./autogen.sh --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --disable-static \ --libexecdir=/usr/lib/nemo \ diff --git a/community/nemo/gnome-autogen.sh b/community/nemo/gnome-autogen.sh deleted file mode 100644 index 2467a1de2..000000000 --- a/community/nemo/gnome-autogen.sh +++ /dev/null @@ -1,538 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -#name of package -test "$PKG_NAME" || PKG_NAME=Package -test "$srcdir" || srcdir=. - -# default version requirements ... -test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53 -test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9 -test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3 -test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40 -test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0 -test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25 -test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0 -test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0 -test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0 -test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2 - -# a list of required m4 macros. Package can set an initial value -test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS= -test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS= - -# Not all echo versions allow -n, so we check what is possible. This test is -# based on the one in autoconf. -ECHO_C= -ECHO_N= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ;; - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -# some terminal codes ... -if tty < /dev/null 1>/dev/null 2>&1; then - boldface="`tput bold 2>/dev/null`" - normal="`tput sgr0 2>/dev/null`" -else - boldface= - normal= -fi -printbold() { - echo $ECHO_N "$boldface" $ECHO_C - echo "$@" - echo $ECHO_N "$normal" $ECHO_C -} -printerr() { - echo "$@" >&2 -} - -# Usage: -# compare_versions MIN_VERSION ACTUAL_VERSION -# returns true if ACTUAL_VERSION >= MIN_VERSION -compare_versions() { - ch_min_version=$1 - ch_actual_version=$2 - ch_status=0 - IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." - set $ch_actual_version - for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes - if [ -z "$ch_min" ]; then break; fi - if [ -z "$ch_cur" ]; then ch_status=1; break; fi - if [ $ch_cur -gt $ch_min ]; then break; fi - if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi - done - IFS="$ch_save_IFS" - return $ch_status -} - -# Usage: -# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE -# checks to see if the package is available -version_check() { - vc_package=$1 - vc_variable=$2 - vc_checkprogs=$3 - vc_min_version=$4 - vc_source=$5 - vc_status=1 - - vc_checkprog=`eval echo "\\$$vc_variable"` - if [ -n "$vc_checkprog" ]; then - printbold "using $vc_checkprog for $vc_package" - return 0 - fi - - if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then - vc_comparator="=" - else - vc_comparator=">=" - fi - printbold "checking for $vc_package $vc_comparator $vc_min_version..." - for vc_checkprog in $vc_checkprogs; do - echo $ECHO_N " testing $vc_checkprog... " $ECHO_C - if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then - vc_actual_version=`$vc_checkprog --version | head -n 1 | \ - sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` - if compare_versions $vc_min_version $vc_actual_version; then - echo "found $vc_actual_version" - # set variables - eval "$vc_variable=$vc_checkprog; \ - ${vc_variable}_VERSION=$vc_actual_version" - vc_status=0 - break - else - echo "too old (found version $vc_actual_version)" - fi - else - echo "not found." - fi - done - if [ "$vc_status" != 0 ]; then - printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed" - printerr " to build $PKG_NAME. Download the appropriate package for" - printerr " from your distribution or get the source tarball at" - printerr " $vc_source" - printerr - exit $vc_status - fi - return $vc_status -} - -# Usage: -# require_m4macro filename.m4 -# adds filename.m4 to the list of required macros -require_m4macro() { - case "$REQUIRED_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; - esac -} - -forbid_m4macro() { - case "$FORBIDDEN_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; - esac -} - -# Usage: -# add_to_cm_macrodirs dirname -# Adds the dir to $cm_macrodirs, if it's not there yet. -add_to_cm_macrodirs() { - case $cm_macrodirs in - "$1 "* | *" $1 "* | *" $1") ;; - *) cm_macrodirs="$cm_macrodirs $1";; - esac -} - -# Usage: -# print_m4macros_error -# Prints an error message saying that autoconf macros were misused -print_m4macros_error() { - printerr "***Error***: some autoconf macros required to build $PKG_NAME" - printerr " were not found in your aclocal path, or some forbidden" - printerr " macros were found. Perhaps you need to adjust your" - printerr " ACLOCAL_FLAGS?" - printerr -} - -# Usage: -# check_m4macros -# Checks that all the requested macro files are in the aclocal macro path -# Uses REQUIRED_M4MACROS and ACLOCAL variables. -check_m4macros() { - # construct list of macro directories - cm_macrodirs=`$ACLOCAL --print-ac-dir` - # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9 - # but it contains only Automake's own macros, so we can ignore it. - - # Read the dirlist file, supported by Automake >= 1.7. - # If AUTOMAKE was defined, no version was detected. - if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then - cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` - if [ -n "$cm_dirlist" ] ; then - for cm_dir in $cm_dirlist; do - if [ -d $cm_dir ]; then - add_to_cm_macrodirs $cm_dir - fi - done - fi - fi - - # Parse $ACLOCAL_FLAGS - set - $ACLOCAL_FLAGS - while [ $# -gt 0 ]; do - if [ "$1" = "-I" ]; then - add_to_cm_macrodirs "$2" - shift - fi - shift - done - - cm_status=0 - if [ -n "$REQUIRED_M4MACROS" ]; then - printbold "Checking for required M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $REQUIRED_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - # The macro dir in Cygwin environments may contain a file - # called dirlist containing other directories to look in. - if [ -f "$cm_dir/dirlist" ]; then - for cm_otherdir in `cat $cm_dir/dirlist`; do - if [ -f "$cm_otherdir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - fi - done - if $cm_macrofound; then - : - else - printerr " $cm_macro not found" - cm_status=1 - fi - done - fi - if [ "$cm_status" != 0 ]; then - print_m4macros_error - exit $cm_status - fi - if [ -n "$FORBIDDEN_M4MACROS" ]; then - printbold "Checking for forbidden M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $FORBIDDEN_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - if $cm_macrofound; then - printerr " $cm_macro found (should be cleared from macros dir)" - cm_status=1 - fi - done - fi - if [ "$cm_status" != 0 ]; then - print_m4macros_error - exit $cm_status - fi -} - -# try to catch the case where the macros2/ directory hasn't been cleared out. -forbid_m4macro gnome-cxx-check.m4 - -want_libtool=false -want_gettext=false -want_glib_gettext=false -want_intltool=false -want_pkg_config=false -want_gtk_doc=false -want_gnome_doc_utils=false -want_maintainer_mode=false - -find_configure_files() { - configure_ac= - if test -f "$1/configure.ac"; then - configure_ac="$1/configure.ac" - elif test -f "$1/configure.in"; then - configure_ac="$1/configure.in" - fi - if test "x$configure_ac" != x; then - echo "$configure_ac" - # TODO We have not detected the right autoconf yet! - autoconf -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do - find_configure_files "$1/$dir" - done - fi -} - -configure_files="`find_configure_files $srcdir`" - -for configure_ac in $configure_files; do - dirname=`dirname $configure_ac` - if [ -f $dirname/NO-AUTO-GEN ]; then - echo skipping $dirname -- flagged as no auto-gen - continue - fi - if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null || - grep "^LT_INIT" $configure_ac >/dev/null; then - want_libtool=true - fi - if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then - want_gettext=true - fi - if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then - want_glib_gettext=true - fi - if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null || - grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then - want_intltool=true - fi - if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then - want_pkg_config=true - fi - if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then - want_gtk_doc=true - fi - if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then - want_gnome_doc_utils=true - fi - - # check that AM_MAINTAINER_MODE is used - if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then - want_maintainer_mode=true - fi - - if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then - require_m4macro yelp.m4 - fi - - # check to make sure gnome-common macros can be found ... - if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null || - grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null || - grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then - require_m4macro gnome-common.m4 - fi - if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null || - grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then - require_m4macro gnome-compiler-flags.m4 - fi - if grep "^GNOME_CODE_COVERAGE" $configure_ac >/dev/null; then - require_m4macro gnome-code-coverage.m4 - fi -done - -#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13 -WANT_AUTOCONF_2_5=1 -export WANT_AUTOCONF_2_5 -version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ - "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" -AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` - -case $REQUIRED_AUTOMAKE_VERSION in - 1.4*) automake_progs="automake-1.4" ;; - 1.5*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;; - 1.6*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;; - 1.7*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;; - 1.8*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;; - 1.9*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;; - 1.10*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10" ;; - 1.11*) automake_progs="automake-1.13 automake-1.12 automake-1.11" ;; - 1.12*) automake_progs="automake-1.13 automake-1.12" ;; - 1.13*) automake_progs="automake-1.13" ;; -esac -version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ - "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" -ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` - -if $want_libtool; then - version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION \ - "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" - require_m4macro libtool.m4 -fi - -if $want_gettext; then - version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ - "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" - require_m4macro gettext.m4 -fi - -if $want_glib_gettext; then - version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ - "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" - require_m4macro glib-gettext.m4 -fi - -if $want_intltool; then - version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/intltool/" - require_m4macro intltool.m4 -fi - -if $want_pkg_config; then - version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ - "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" - require_m4macro pkg.m4 -fi - -if $want_gtk_doc; then - version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" - require_m4macro gtk-doc.m4 -fi - -if $want_gnome_doc_utils; then - version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" -fi - -if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - version_check gnome-common DOC_COMMON gnome-doc-common \ - $REQUIRED_DOC_COMMON_VERSION " " -fi - -check_m4macros - -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then - printerr "**Warning**: I am going to run \`configure' with no arguments." - printerr "If you wish to pass any to it, please specify them on the" - printerr \`$0\'" command line." - printerr -fi - -topdir=`pwd` -for configure_ac in $configure_files; do - dirname=`dirname $configure_ac` - basename=`basename $configure_ac` - if [ -f $dirname/NO-AUTO-GEN ]; then - echo skipping $dirname -- flagged as no auto-gen - elif [ ! -w $dirname ]; then - echo skipping $dirname -- directory is read only - else - printbold "Processing $configure_ac" - cd $dirname - - # Note that the order these tools are called should match what - # autoconf's "autoupdate" package does. See bug 138584 for - # details. - - # programs that might install new macros get run before aclocal - if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null || - grep "^LT_INIT" $basename >/dev/null; then - printbold "Running $LIBTOOLIZE..." - $LIBTOOLIZE --force --copy || exit 1 - fi - - if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then - printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 - elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then - if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then - printbold "Running autopoint..." - autopoint --force || exit 1 - else - printbold "Running $GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GETTEXTIZE --force --copy || exit 1 - fi - fi - - if grep "^AC_PROG_INTLTOOL" $basename >/dev/null || - grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then - printbold "Running $INTLTOOLIZE..." - $INTLTOOLIZE --force --copy --automake || exit 1 - fi - if grep "^GTK_DOC_CHECK" $basename >/dev/null; then - printbold "Running $GTKDOCIZE..." - $GTKDOCIZE --copy || exit 1 - fi - - if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - printbold "Running gnome-doc-common..." - gnome-doc-common --copy || exit 1 - fi - if grep "^GNOME_DOC_INIT" $basename >/dev/null; then - printbold "Running $GNOME_DOC_PREPARE..." - $GNOME_DOC_PREPARE --force --copy || exit 1 - fi - - # Now run aclocal to pull in any additional macros needed - - # if the AC_CONFIG_MACRO_DIR() macro is used, pass that - # directory to aclocal. - m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` - if [ -n "$m4dir" ]; then - m4dir="-I $m4dir" - fi - printbold "Running $ACLOCAL..." - $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1 - - if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then - printerr "*** obsolete gnome macros were used in $configure_ac" - fi - - # Now that all the macros are sorted, run autoconf and autoheader ... - printbold "Running $AUTOCONF..." - $AUTOCONF || exit 1 - if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then - printbold "Running $AUTOHEADER..." - $AUTOHEADER || exit 1 - # this prevents automake from thinking config.h.in is out of - # date, since autoheader doesn't touch the file if it doesn't - # change. - test -f config.h.in && touch config.h.in - fi - - # Finally, run automake to create the makefiles ... - printbold "Running $AUTOMAKE..." - if [ -f COPYING ]; then - cp -pf COPYING COPYING.autogen_bak - fi - if [ -f INSTALL ]; then - cp -pf INSTALL INSTALL.autogen_bak - fi - if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then - $AUTOMAKE --gnu --add-missing --copy -Wno-portability || exit 1 - else - $AUTOMAKE --gnu --add-missing --copy || exit 1 - fi - if [ -f COPYING.autogen_bak ]; then - cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING - rm -f COPYING.autogen_bak - fi - if [ -f INSTALL.autogen_bak ]; then - cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL - rm -f INSTALL.autogen_bak - fi - - cd "$topdir" - fi -done - -conf_flags="" - -if $want_maintainer_mode; then - conf_flags="--enable-maintainer-mode" -fi - -if test x$NOCONFIGURE = x; then - printbold Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/community/nginx/PKGBUILD b/community/nginx/PKGBUILD index b36b88ca2..e889eb458 100644 --- a/community/nginx/PKGBUILD +++ b/community/nginx/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 84738 2013-02-24 00:14:35Z foutrelis $ +# $Id: PKGBUILD 86846 2013-03-22 20:04:56Z foutrelis $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl> @@ -8,7 +8,7 @@ _tmpdir=/var/lib/nginx pkgname=nginx pkgver=1.2.7 -pkgrel=4 +pkgrel=5 pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server' arch=('i686' 'x86_64') depends=('pcre' 'zlib' 'openssl' 'geoip') @@ -31,7 +31,7 @@ source=(http://nginx.org/download/nginx-$pkgver.tar.gz logrotate) sha256sums=('2457a878943fb409ec4fcb46b43af222d06a584f93228e17a4f02b0e7bfc9de3' '77da8ce4d8378048606a25e09270ee187d6b226ee750b6cb4313af5549f5156a' - 'a21b564eaf83b4b4ce3a436e895bd37e000677fb314b89818f89f30caca6e6d9') + '9523a1fdd5eb61bf62f3049f6ee088b198e36d5edcce2d9b08bbeb2930aa5a16') build() { cd "$srcdir"/$pkgname-$pkgver @@ -87,9 +87,12 @@ package() { install -d "$pkgdir"/$_tmpdir install -dm700 "$pkgdir"/$_tmpdir/proxy + chmod 750 "$pkgdir"/var/log/nginx + chown http:log "$pkgdir"/var/log/nginx + install -d "$pkgdir"/usr/share/nginx mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx - + install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE diff --git a/community/nginx/logrotate b/community/nginx/logrotate index 1a5bd6441..3d082bcf8 100644 --- a/community/nginx/logrotate +++ b/community/nginx/logrotate @@ -1,6 +1,6 @@ /var/log/nginx/*log { missingok - create 640 root log + create 640 http log sharedscripts compress postrotate diff --git a/community/nginx/nginx.install b/community/nginx/nginx.install index efc155556..0daccc639 100644 --- a/community/nginx/nginx.install +++ b/community/nginx/nginx.install @@ -1,12 +1,8 @@ -post_install() { - if [[ -e var/log/nginx ]]; then +post_upgrade() { + if [[ $(vercmp $2 1.2.7-4) -le 0 ]]; then chmod 750 var/log/nginx - chown root:log var/log/nginx + chown http:log var/log/nginx fi -} - -post_upgrade() { - [[ $(vercmp $2 1.2.7-3) -le 0 ]] && post_install if [[ $(vercmp $2 1.2.1-2) -le 0 ]]; then echo " >>> Since 1.2.1-2 several changes has been made in package:" echo " - *.conf files have been moved to /etc/nginx" diff --git a/community/pypanel/PKGBUILD b/community/pypanel/PKGBUILD index 82d608970..f078a915d 100644 --- a/community/pypanel/PKGBUILD +++ b/community/pypanel/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 57834 2011-11-03 10:22:57Z lfleischer $ +# $Id: PKGBUILD 86770 2013-03-22 00:26:29Z eric $ # Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> # Contributor: Jeff Mickey <j@codemac.net> # Contributor: Mr Green @@ -15,7 +15,7 @@ depends=('python2' 'x-server' 'python-xlib' 'imlib2' 'libxft') source=("http://downloads.sourceforge.net/sourceforge/pypanel/PyPanel-${pkgver}.tar.gz") md5sums=('f1f9a2ed80be72ab36e748833618daba') -build() { +package() { cd "${srcdir}/PyPanel-${pkgver}" python2 setup.py install --root="${pkgdir}" } diff --git a/community/qtcreator/PKGBUILD b/community/qtcreator/PKGBUILD index 87ec0f2d8..4ec09ea8e 100644 --- a/community/qtcreator/PKGBUILD +++ b/community/qtcreator/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 85927 2013-03-09 00:52:24Z svenstaro $ +# $Id: PKGBUILD 86795 2013-03-22 10:46:14Z svenstaro $ # Maintainer: Imanol Celaya <ornitorrincos@archlinux-es.org> # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> @@ -7,8 +7,8 @@ # Contributor: delor <bartekpiech gmail com> pkgname=qtcreator -pkgver=2.7.0rc -_pkgver=2.7.0-rc +pkgver=2.7.0 +_pkgver=2.7.0 pkgrel=1 pkgdesc='Lightweight, cross-platform integrated development environment' arch=('i686' 'x86_64') @@ -29,7 +29,7 @@ install=qtcreator.install source=("http://releases.qt-project.org/qtcreator/${_pkgver}/qt-creator-${_pkgver}-src.tar.gz" 'qtcreator.desktop' 'fix-build.patch') -md5sums=('5c4baef738b00cfdf53739ffd1434234' +md5sums=('7bf25d211ff8babea47c2034f1b93d08' '82888d4be900e7833d768050a135cd37' '4087c00d853addf97ca329d304e9a0a5') diff --git a/community/rdiff-backup/PKGBUILD b/community/rdiff-backup/PKGBUILD index 3ffb75bad..3a25addab 100644 --- a/community/rdiff-backup/PKGBUILD +++ b/community/rdiff-backup/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 57837 2011-11-03 10:27:32Z lfleischer $ +# $Id: PKGBUILD 86773 2013-03-22 00:29:53Z eric $ # Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> # Contributor: Aaron Schaefer <aaron@elasticdog.com> # Contributor: Erwin Van de Velde <erwin.vandevelde@gmail.com> @@ -17,7 +17,7 @@ source=("http://savannah.nongnu.org/download/${pkgname}/${pkgname}-${pkgver}.tar md5sums=('1a94dc537fcf74d6a3a80bd27808e77b' '3b88b18eb43ac85bc70b8dce92e958ba') -build() { +package() { cd "${srcdir}/${pkgname}-${pkgver}" python2 setup.py install --root="${pkgdir}" -O1 diff --git a/community/tremulous/PKGBUILD b/community/tremulous/PKGBUILD index f53fbc46f..91b84c9e5 100644 --- a/community/tremulous/PKGBUILD +++ b/community/tremulous/PKGBUILD @@ -1,3 +1,4 @@ +# $Id: PKGBUILD 86782 2013-03-22 00:57:25Z eric $ #Contributor: Daenyth <Daenyth+arch [AT] gmail [dot] com> pkgname=tremulous @@ -42,31 +43,35 @@ md5sums=('e0e1b6e03e7596da00a77fe638560402' build() { local _arch=${CARCH/i686/x86} - # Build and install the server - mkdir -p $srcdir/tremded - bsdtar -x -C $srcdir/tremded -f $srcdir/mg_tremded_source_1.01.tar.gz - cd $srcdir/tremded - make || return 1 - install -D -m755 build/release-linux-$_arch/tremded.$_arch $pkgdir/opt/tremulous/tremded.$_arch - install -D -m644 $srcdir/tremdedrc $pkgdir/etc/tremdedrc - install -D -m644 $srcdir/game.qvm $pkgdir/opt/tremulous/game.qvm - install -D -m755 $srcdir/tremded.sh $pkgdir/usr/bin/tremded + # Build the server + mkdir -p "$srcdir/tremded" + bsdtar -x -C "$srcdir/tremded" -f "$srcdir/mg_tremded_source_1.01.tar.gz" + cd "$srcdir/tremded" + make +# Build the client + cd "$srcdir/Release_1.011" + patch -Np1 -i "$srcdir/fix_fs26749.patch" + make +} + +package() { + cd "$srcdir/tremded" + install -D -m755 build/release-linux-$_arch/tremded.$_arch "$pkgdir/opt/tremulous/tremded.$_arch" + install -D -m644 "$srcdir/tremdedrc" "$pkgdir/etc/tremdedrc" + install -D -m644 "$srcdir/game.qvm" "$pkgdir/opt/tremulous/game.qvm" + install -D -m755 "$srcdir/tremded.sh" "$pkgdir/usr/bin/tremded" - # Build and install the client - cd $srcdir/Release_1.011 - patch -Np1 -i $srcdir/fix_fs26749.patch || return 1 - make || return 1 - install -Dm755 build/release-linux-$_arch/tremulous.$_arch $pkgdir/opt/tremulous/tremulous.$_arch - install -D -m755 $srcdir/tremulous.sh $pkgdir/usr/bin/tremulous + cd "$srcdir/Release_1.011" + install -Dm755 build/release-linux-$_arch/tremulous.$_arch "$pkgdir/opt/tremulous/tremulous.$_arch" + install -D -m755 "$srcdir/tremulous.sh" "$pkgdir/usr/bin/tremulous" # Install the documentation - install -Dm644 $srcdir/mg-client-manual.txt $pkgdir/usr/share/tremulous/mg-client-manual.txt - install -Dm644 $srcdir/lakitu7_qvm.txt $pkgdir/usr/share/tremulous/lakitu7_qvm.txt + install -Dm644 "$srcdir/mg-client-manual.txt" "$pkgdir/usr/share/tremulous/mg-client-manual.txt" + install -Dm644 "$srcdir/lakitu7_qvm.txt" "$pkgdir/usr/share/tremulous/lakitu7_qvm.txt" # Install the .desktop and icon files - install -D -m644 $srcdir/tremulous.xpm $pkgdir/usr/share/pixmaps/tremulous.xpm - install -D -m644 $srcdir/tremulous.desktop $pkgdir/usr/share/applications/tremulous.desktop - + install -D -m644 "$srcdir/tremulous.xpm" "$pkgdir/usr/share/pixmaps/tremulous.xpm" + install -D -m644 "$srcdir/tremulous.desktop" "$pkgdir/usr/share/applications/tremulous.desktop" } # vim:set ts=2 sw=2 et: diff --git a/community/wesnoth/PKGBUILD b/community/wesnoth/PKGBUILD index 3607e4e36..71d6d9981 100644 --- a/community/wesnoth/PKGBUILD +++ b/community/wesnoth/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 83279 2013-01-28 16:50:16Z stephane $ +# $Id: PKGBUILD 86797 2013-03-22 11:00:44Z svenstaro $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: Jan de Groot <jgc@archlinux.org> # Contributor: Tobias Powalowski <tpowa@archlinux.org> @@ -6,8 +6,8 @@ # Contributor: Douglas Soares de Andrade <douglas@archlinux.org> pkgname=wesnoth -pkgver=1.10.5 -pkgrel=2 +pkgver=1.10.6 +pkgrel=1 pkgdesc="A turn-based strategy game on a fantasy world" arch=('i686' 'x86_64') license=('GPL') @@ -20,7 +20,7 @@ source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.t wesnothd.tmpfiles.conf wesnothd.rc.d wesnothd.service) -md5sums=('03d9683cd83d17c6536bdf5c4940bbc8' +md5sums=('547e3489bbfa778912b11dbee612c380' '2d2fea6b3d86dfd589f5ad35a3be1f97' '85659b47d22dfdf4e4d046556973fc3e' 'd1b6bf1d3dc05086ee6a370adff0ae4a') diff --git a/community/weston/PKGBUILD b/community/weston/PKGBUILD index b285d4a11..dfed9d1d8 100644 --- a/community/weston/PKGBUILD +++ b/community/weston/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Joel Teichroeb <joel@teichroeb.net> pkgname=weston -pkgver=1.0.5 -pkgrel=2 +pkgver=1.0.6 +pkgrel=1 pkgdesc='Reference implementation of a Wayland compositor' arch=('i686' 'x86_64') url='http://wayland.freedesktop.org' @@ -11,7 +11,7 @@ license=('MIT') options=(!libtool) depends=('libxkbcommon' 'wayland' 'mesa' 'cairo' 'poppler-glib' 'mtdev' 'libxcursor' 'glu') source=("http://wayland.freedesktop.org/releases/$pkgname-$pkgver.tar.xz") -sha1sums=('a97030613e066c05e267ea0d7888fd5f7a08eea2') +sha1sums=('d39d487317ededb9d66365bc1402ee0bc5e20dd0') build() { cd $pkgname-$pkgver diff --git a/community/wine/PKGBUILD b/community/wine/PKGBUILD deleted file mode 100644 index 30f9fa0cd..000000000 --- a/community/wine/PKGBUILD +++ /dev/null @@ -1,154 +0,0 @@ -# $Id: PKGBUILD 83833 2013-02-05 14:18:11Z svenstaro $ -# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> -# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> -# Contributor: Eduardo Romero <eduardo@archlinux.org> -# Contributor: Giovanni Scafora <giovanni@archlinux.org> - -pkgname=wine -pkgver=1.5.23 -pkgrel=2 - -_pkgbasever=${pkgver/rc/-rc} - -source=(http://prdownloads.sourceforge.net/$pkgname/$pkgname-$_pkgbasever.tar.bz2{,.sign}) -md5sums=('70228ea29efe9700a66202b495b068bc' - '8b8620cf523bb6c7e61d01480c167859') - -pkgdesc="A compatibility layer for running Windows programs" -url="http://www.winehq.com" -arch=(i686 x86_64) -license=(LGPL) -install=wine.install - -depends=( - fontconfig lib32-fontconfig - libxcursor lib32-libxcursor - libxrandr lib32-libxrandr - libxdamage lib32-libxdamage - libxi lib32-libxi - gettext lib32-gettext - glu lib32-glu - libsm lib32-libsm - gcc-libs lib32-gcc-libs - desktop-file-utils -) - -makedepends=(autoconf ncurses bison perl fontforge flex prelink - 'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2' - giflib lib32-giflib - libpng lib32-libpng - gnutls lib32-gnutls - libxinerama lib32-libxinerama - libxcomposite lib32-libxcomposite - libxmu lib32-libxmu - libxxf86vm lib32-libxxf86vm - libxml2 lib32-libxml2 - libldap lib32-libldap - lcms lib32-lcms - mpg123 lib32-mpg123 - openal lib32-openal - v4l-utils lib32-v4l-utils - alsa-lib lib32-alsa-lib - libxcomposite lib32-libxcomposite - mesa lib32-mesa - oss - samba -) - -optdepends=( - giflib lib32-giflib - libpng lib32-libpng - libldap lib32-libldap - gnutls lib32-gnutls - lcms lib32-lcms - libxml2 lib32-libxml2 - mpg123 lib32-mpg123 - openal lib32-openal - v4l-utils lib32-v4l-utils - libpulse lib32-libpulse - alsa-plugins lib32-alsa-plugins - alsa-lib lib32-alsa-lib - libjpeg-turbo lib32-libjpeg-turbo - libxcomposite lib32-libxcomposite - libxinerama lib32-libxinerama - oss cups - samba -) - -if [[ $CARCH == i686 ]]; then - # Strip lib32 etc. on i686 - depends=(${depends[@]/*32-*/}) - makedepends=(${makedepends[@]/*32-*/}) - makedepends=(${makedepends[@]/*-multilib*/}) - optdepends=(${optdepends[@]/*32-*/}) -else - provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver") - conflicts=('bin32-wine' 'wine-wow64') - replaces=('bin32-wine') -fi - -build() { - cd "$srcdir" - - # Allow ccache to work - mv $pkgname-$_pkgbasever $pkgname - - # Get rid of old build dirs - rm -rf $pkgname-{32,64}-build - mkdir $pkgname-32-build - - if [[ $CARCH == x86_64 ]]; then - msg2 "Building Wine-64..." - - mkdir $pkgname-64-build - cd "$srcdir/$pkgname-64-build" - ../$pkgname/configure \ - --prefix=/usr \ - --libdir=/usr/lib \ - --with-x \ - --without-gstreamer \ - --enable-win64 - # Gstreamer was disabled for FS#33655 - - make - - _wine32opts=( - --libdir=/usr/lib32 - --with-wine64="$srcdir/$pkgname-64-build" - ) - - export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" - fi - - msg2 "Building Wine-32..." - cd "$srcdir/$pkgname-32-build" - ../$pkgname/configure \ - --prefix=/usr \ - --with-x \ - --without-gstreamer \ - "${_wine32opts[@]}" - - # These additional flags solve FS#23277 - make CFLAGS+="-mincoming-stack-boundary=2" CXXFLAGS+="-mincoming-stack-boundary=2" -} - -package() { - msg2 "Packaging Wine-32..." - cd "$srcdir/$pkgname-32-build" - - if [[ $CARCH == i686 ]]; then - make prefix="$pkgdir/usr" install - else - make prefix="$pkgdir/usr" \ - libdir="$pkgdir/usr/lib32" \ - dlldir="$pkgdir/usr/lib32/wine" install - - msg2 "Packaging Wine-64..." - cd "$srcdir/$pkgname-64-build" - make prefix="$pkgdir/usr" \ - libdir="$pkgdir/usr/lib" \ - dlldir="$pkgdir/usr/lib/wine" install - fi -} - -# vim:set ts=8 sts=2 sw=2 et: diff --git a/community/wine/wine.install b/community/wine/wine.install deleted file mode 100644 index 0548b7ffd..000000000 --- a/community/wine/wine.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q - #echo "This wine package is wow64 enabled. This means it can run 32bit/64bit Windows apps on x86_64." - #echo "If you are on x86_64, the default WINEARCH will be win64." - #echo "This will cause a lot of Windows applications to malfunction even if they usually work in wine." - #echo "Please create your ~/.wine with 'WINEARCH=win32 winecfg' if you are unsure and on x86_64." - #echo "See the Arch wiki on wine for more information." -} - -post_remove() { - update-desktop-database -q -} diff --git a/core/libgcrypt/PKGBUILD b/core/libgcrypt/PKGBUILD index e3a887bb4..b0edba380 100644 --- a/core/libgcrypt/PKGBUILD +++ b/core/libgcrypt/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 156348 2012-04-17 15:57:54Z andyrtr $ +# $Id: PKGBUILD 180517 2013-03-22 13:51:08Z andyrtr $ # Maintainer: Andreas Radke <andyrtr@archlinux.org> pkgname=libgcrypt -pkgver=1.5.0 -pkgrel=3 +pkgver=1.5.1 +pkgrel=1 pkgdesc="a general purpose crypto library based on the code used" arch=(i686 x86_64) url="http://www.gnupg.org" @@ -14,7 +14,7 @@ install=$pkgname.install source=(ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2 #ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/libgcrypt/${pkgname}-${pkgver}.tar.bz2 ) -sha1sums=('3e776d44375dc1a710560b98ae8437d5da6e32cf') +sha1sums=(8b60a26b7eae1a727d58932d6b1efeb5716648ed'') build() { cd ${srcdir}/${pkgname}-${pkgver} diff --git a/extra/cfitsio/PKGBUILD b/extra/cfitsio/PKGBUILD index 36f354027..af14bbaa8 100644 --- a/extra/cfitsio/PKGBUILD +++ b/extra/cfitsio/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 164645 2012-08-01 17:50:06Z andrea $ +# $Id: PKGBUILD 180514 2013-03-22 13:00:52Z andrea $ # Maintainer: # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Tobias Powalowski <tpowa@archlinux.org> pkgname=cfitsio -pkgver=3.310 +pkgver=3.340 pkgrel=1 pkgdesc="A library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format" arch=('i686' 'x86_64') @@ -13,16 +13,16 @@ license=('custom') depends=('glibc') options=('!libtool') source=("ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${pkgname}${pkgver/./}.tar.gz") -md5sums=('75b6411751c7f308d45b281b7beb92d6') +md5sums=('99210838af46b7bf2d945ccbb05e3ad3') build() { - cd "${srcdir}"/${pkgname} + cd ${pkgname} ./configure --prefix=/usr make shared } check() { - cd "${srcdir}"/${pkgname} + cd ${pkgname} make testprog LD_LIBRARY_PATH=. ./testprog > testprog.lis [[ -z $(diff testprog.lis testprog.out) ]] || return 1 @@ -30,7 +30,7 @@ check() { } package() { - cd "${srcdir}"/${pkgname} + cd ${pkgname} make DESTDIR="${pkgdir}" install install -D -m644 License.txt \ "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE diff --git a/extra/fetchmail/PKGBUILD b/extra/fetchmail/PKGBUILD index 2373b5e23..83ebe7b7f 100644 --- a/extra/fetchmail/PKGBUILD +++ b/extra/fetchmail/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 173827 2012-12-24 15:21:34Z pierre $ +# $Id: PKGBUILD 180506 2013-03-22 07:41:24Z pierre $ pkgname=fetchmail -pkgver=6.3.24 +pkgver=6.3.25 pkgrel=1 pkgdesc="A remote-mail retrieval utility" arch=('i686' 'x86_64') @@ -16,13 +16,11 @@ options=('!makeflags') install='fetchmail.install' source=("http://download.berlios.de/$pkgname/${pkgname}-${pkgver}.tar.xz" "http://download.berlios.de/$pkgname/${pkgname}-${pkgver}.tar.xz.asc" - 'fetchmail.rc' 'fetchmail.conf' 'fetchmail.tmpfiles' 'fetchmail.service') -sha1sums=('8cb2aa3a85dd307ccd1899ddbb4463e011048535' - 'dff091c04ab64c25f7b6af758f93a75b969117e0' - 'fc25180f1add26df0a3bdaac03fd9d2e3473ff88' - '30401729386d6f774c6c36ab8530842166de54a8' + 'fetchmail.tmpfiles' 'fetchmail.service') +sha1sums=('a246a6a3caf90e1106448c9dde4463e87d816031' + '9a7f76c9fd9f85fc4b421e34fa8c15d2838d61fc' '199ba749c829f22286c34aabcf8b7dd5bbd7c0e6' - '11ff81fc8363a54099880da18634b0d1ecf9fa82') + '69caf3fd4d4446db3bf53144e4fa8edbdbbfcd10') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -34,8 +32,6 @@ build() { package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install - install -Dm755 "${srcdir}/fetchmail.rc" "${pkgdir}/etc/rc.d/fetchmail" - install -Dm644 "${srcdir}/fetchmail.conf" "${pkgdir}/etc/conf.d/fetchmail" install -d -o 90 -g nobody "${pkgdir}/var/lib/fetchmail" install -D -m644 ${srcdir}/fetchmail.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/fetchmail.conf install -D -m644 ${srcdir}/fetchmail.service ${pkgdir}/usr/lib/systemd/system/fetchmail.service diff --git a/extra/fetchmail/fetchmail.conf b/extra/fetchmail/fetchmail.conf deleted file mode 100644 index dcac2a067..000000000 --- a/extra/fetchmail/fetchmail.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Daemon polling interval -INTERVAL=60 - -# Config location -CONFIG=/etc/fetchmailrc diff --git a/extra/fetchmail/fetchmail.install b/extra/fetchmail/fetchmail.install index 81b374c57..5f6dc4911 100644 --- a/extra/fetchmail/fetchmail.install +++ b/extra/fetchmail/fetchmail.install @@ -5,7 +5,7 @@ post_install() { getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \ -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail if [[ ! -d run/fetchmail ]]; then - usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/fetchmail.conf + usr/bin/systemd-tmpfiles --create fetchmail.conf fi } @@ -17,7 +17,7 @@ post_upgrade() { usermod -d '/var/lib/fetchmail' -s /bin/false fetchmail fi if [[ ! -d run/fetchmail ]]; then - usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/fetchmail.conf + usr/bin/systemd-tmpfiles --create fetchmail.conf fi } diff --git a/extra/fetchmail/fetchmail.rc b/extra/fetchmail/fetchmail.rc deleted file mode 100644 index 4d8b98d40..000000000 --- a/extra/fetchmail/fetchmail.rc +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/fetchmail - -PID=`pidof -o %PPID /usr/bin/fetchmail` -case "$1" in - start) - stat_busy "Starting fetchmail" - [ -z "$PID" ] && - su -c "/usr/bin/fetchmail -d $INTERVAL -f $CONFIG" -s /bin/sh fetchmail - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon fetchmail - stat_done - fi - ;; - stop) - stat_busy "Stopping fetchmail" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon fetchmail - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/extra/fetchmail/fetchmail.service b/extra/fetchmail/fetchmail.service index 3e7da7545..4653cc587 100644 --- a/extra/fetchmail/fetchmail.service +++ b/extra/fetchmail/fetchmail.service @@ -4,8 +4,7 @@ After=network.target [Service] User=fetchmail -EnvironmentFile=/etc/conf.d/fetchmail -ExecStart=/usr/bin/fetchmail -d ${INTERVAL} -f ${CONFIG} +ExecStart=/usr/bin/fetchmail -d 900 -f /etc/fetchmailrc RestartSec=1 [Install] diff --git a/extra/gnuplot/PKGBUILD b/extra/gnuplot/PKGBUILD index 807cc09e1..ff32fa449 100644 --- a/extra/gnuplot/PKGBUILD +++ b/extra/gnuplot/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 180427 2013-03-21 20:41:25Z eric $ +# $Id: PKGBUILD 180538 2013-03-22 21:03:11Z eric $ # Maintainer: Ronald van Haren <ronald.archlinux.org> # Contributor: damir <damir@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=gnuplot pkgver=4.6.2 -pkgrel=1 +pkgrel=2 pkgdesc="Plotting package which outputs to X11, PostScript, PNG, GIF, and others" arch=('i686' 'x86_64') url="http://www.gnuplot.info" @@ -35,7 +35,7 @@ build() { --libexecdir=/usr/bin \ --with-gihdir=/usr/share/gnuplot \ --with-readline=gnu - make + make pkglibexecdir=/usr/bin } diff --git a/extra/gst-libav/PKGBUILD b/extra/gst-libav/PKGBUILD index 3506ba984..b0633edde 100644 --- a/extra/gst-libav/PKGBUILD +++ b/extra/gst-libav/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 176320 2013-01-29 20:24:29Z eric $ +# $Id: PKGBUILD 180533 2013-03-22 19:27:55Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gst-libav -pkgver=1.0.5 +pkgver=1.0.6 pkgrel=1 pkgdesc="Gstreamer libav Plugin" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ makedepends=('yasm') options=(!libtool !emptydirs) provides=("gst-ffmpeg=$pkgver-$pkgrel") source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) -sha256sums=('aef8be665096b3a4e64424fb39d7c5da57faaaf95e9fea6c1bb44295d4fb32d5') +sha256sums=('8ab222a52bf7482e913f2c9a4f490cda8f8ed1acfbc429f27451b0558b08044d') build() { cd $pkgname-$pkgver diff --git a/extra/gst-plugins-base/PKGBUILD b/extra/gst-plugins-base/PKGBUILD index f0f04ebe0..4ba806478 100644 --- a/extra/gst-plugins-base/PKGBUILD +++ b/extra/gst-plugins-base/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 174936 2013-01-09 12:40:39Z jgc $ +# $Id: PKGBUILD 180528 2013-03-22 19:20:44Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgbase=gst-plugins-base pkgname=('gst-plugins-base-libs' 'gst-plugins-base') -pkgver=1.0.5 +pkgver=1.0.6 pkgrel=1 pkgdesc="GStreamer Multimedia Framework Base Plugins" arch=('i686' 'x86_64') @@ -12,11 +12,11 @@ makedepends=('pkgconfig' 'gstreamer' 'orc' 'libxv' 'alsa-lib' 'cdparanoia' 'libv options=(!libtool !emptydirs) url="http://gstreamer.freedesktop.org/" source=(${url}/src/$pkgbase/$pkgbase-${pkgver}.tar.xz) -sha256sums=('37ce6e09b99ef3879111c861ee5090582b4fd4c764e81ab6eb2b2b4dd77d7173') +sha256sums=('85e5f99af690f720ccde5ea7e793269d35883a3ead80ca9985fa44e18bb1a4a5') build() { cd $pkgbase-$pkgver - sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac + sed -i -e '/AC_PATH_XTRA/d' configure.ac aclocal -I m4 -I common/m4 autoconf automake --add-missing diff --git a/extra/gst-plugins-good/PKGBUILD b/extra/gst-plugins-good/PKGBUILD index d48925d3c..c80dad8e1 100644 --- a/extra/gst-plugins-good/PKGBUILD +++ b/extra/gst-plugins-good/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 174938 2013-01-09 13:33:08Z jgc $ +# $Id: PKGBUILD 180529 2013-03-22 19:22:28Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gst-plugins-good -pkgver=1.0.5 +pkgver=1.0.6 pkgrel=1 pkgdesc="GStreamer Multimedia Framework Good Plugins" arch=('i686' 'x86_64') @@ -12,11 +12,11 @@ depends=('libpulse' 'jack' 'libsoup' 'gst-plugins-base-libs' 'wavpack' 'aalib' ' makedepends=('gstreamer' 'speex' 'flac' 'libraw1394') options=(!libtool !emptydirs) source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) -sha256sums=('53bd0b848e7896f1b22548ca4e8be56cf425e5100e121c472dff8272d5140bc5') +sha256sums=('67f7690a9826d9a6ab28b9af2536a6f3e833ee412bd59dd603c48fb3c6823e0d') build() { cd $pkgname-$pkgver - sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac + sed -i -e '/AC_PATH_XTRA/d' configure.ac aclocal -I m4 -I common/m4 autoconf automake --add-missing diff --git a/extra/gst-plugins-ugly/PKGBUILD b/extra/gst-plugins-ugly/PKGBUILD index b19368690..62f2cf4b0 100644 --- a/extra/gst-plugins-ugly/PKGBUILD +++ b/extra/gst-plugins-ugly/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 178130 2013-02-16 22:48:48Z ioni $ +# $Id: PKGBUILD 180531 2013-03-22 19:24:55Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gst-plugins-ugly -pkgver=1.0.5 -pkgrel=2 +pkgver=1.0.6 +pkgrel=1 pkgdesc="GStreamer Multimedia Framework Ugly Plugins" arch=('i686' 'x86_64') license=('LGPL') @@ -11,7 +11,7 @@ url="http://gstreamer.freedesktop.org/" depends=('gst-plugins-base-libs' 'libdvdread' 'lame' 'libmpeg2' 'a52dec' 'libmad' 'libsidplay' 'libcdio' 'x264' 'opencore-amr') options=(!libtool !emptydirs) source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) -sha256sums=('a62a182ea96d9b2783b493b46d531914db9d2ebb9e537e9c84668fe752791331') +sha256sums=('8655ceec7533b5d30080a5051025e26ff8d06bea8d03a6b2af56c2f839d60586') build() { cd $pkgname-$pkgver diff --git a/extra/gstreamer/PKGBUILD b/extra/gstreamer/PKGBUILD index 3676c53d6..24478f37f 100644 --- a/extra/gstreamer/PKGBUILD +++ b/extra/gstreamer/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 174933 2013-01-09 12:15:29Z jgc $ +# $Id: PKGBUILD 180527 2013-03-22 19:18:50Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gstreamer -pkgver=1.0.5 +pkgver=1.0.6 pkgrel=1 pkgdesc="GStreamer Multimedia Framework" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ optdepends=('sh: feedback script') makedepends=('intltool' 'pkgconfig' 'gtk-doc' 'gobject-introspection') options=('!libtool') source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz) -sha256sums=('26c2827567f09a46d0a3bc1e7f8696b2ae72b047306539178079abae487c5b77') +sha256sums=('50d4050cd6a23684b6bbf40a9b7c132edfb39fe9db2d81980adaa6e72f4d5826') build() { cd "${srcdir}/gstreamer-${pkgver}" diff --git a/extra/xf86-video-intel/PKGBUILD b/extra/xf86-video-intel/PKGBUILD index 3f576ae3b..9fa9d3913 100644 --- a/extra/xf86-video-intel/PKGBUILD +++ b/extra/xf86-video-intel/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 180201 2013-03-18 16:09:09Z andyrtr $ +# $Id: PKGBUILD 180518 2013-03-22 13:51:11Z andyrtr $ # Maintainer: AndyRTR <andyrtr@archlinux.org> # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=xf86-video-intel -pkgver=2.21.4 +pkgver=2.21.5 pkgrel=1 arch=(i686 x86_64) url="http://xorg.freedesktop.org/" @@ -19,7 +19,7 @@ conflicts=('xorg-server<1.14.0' 'X-ABI-VIDEODRV_VERSION<14' 'X-ABI-VIDEODRV_VERS options=('!libtool') groups=('xorg-drivers' 'xorg') source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2) -sha256sums=('2f5983627013170db5b53d5c3ca7ad5fe843f3a0fa16ea136d6a4aa684c9cb03') +sha256sums=('0fd8265039bee8f8533e8bac4df8ba8f67a65a4e78763a4982980309b05fd954') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index 5e937cbf8..bee732c0c 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 180114 2013-03-17 13:00:07Z tpowa $ +# $Id: PKGBUILD 180406 2013-03-21 07:26:50Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,8 +6,8 @@ pkgbase=linux-libre-pae # Build stock -LIBRE-PAE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -pkgver=${_basekernel}.3 -pkgrel=2 +pkgver=${_basekernel}.4 +pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -20,17 +20,13 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn # standard config files for mkinitcpio ramdisk "${pkgbase}.preset" 'boot-logo.patch' - 'change-default-console-loglevel.patch' - 'drm-i915-enable-irqs-earlier-when-resuming.patch' - 'drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch') + 'change-default-console-loglevel.patch') md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - 'a762b6f22a64473a0b4d8dc5366b25d3' + 'be610dd93dbe033cfe04018b27557c3e' '5cc106ba38bab845ea62138fc0d1bbf1' 'f302c931bd85309da9d9792b4cc96467' '04b21c79df0a952c22d681dd4f4562df' - 'f3def2cefdcbb954c21d8505d23cc83c' - '40e7b328977ad787a0b5584f193d63fe' - '8b9159931fab0c191a86dbd5a46fa328') + 'f3def2cefdcbb954c21d8505d23cc83c') _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-PAE @@ -50,11 +46,6 @@ build() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - # revert 2 patches which breaks displays - # FS 34327 - patch -Rp1 -i "${srcdir}/drm-i915-enable-irqs-earlier-when-resuming.patch" - patch -Rp1 -i "${srcdir}/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch" - cat "${srcdir}/config" > ./.config # simpler if [ "${_kernelname}" != "" ]; then diff --git a/kernels/linux-libre-pae/drm-i915-enable-irqs-earlier-when-resuming.patch b/kernels/linux-libre-pae/drm-i915-enable-irqs-earlier-when-resuming.patch deleted file mode 100644 index cb621d520..000000000 --- a/kernels/linux-libre-pae/drm-i915-enable-irqs-earlier-when-resuming.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Tue, 5 Mar 2013 09:50:58 +0100 -Subject: drm/i915: enable irqs earlier when resuming - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 upstream. - -We need it to restore the ilk rc6 context, since the gpu wait no -requires interrupts. But in general having interrupts around should -help in code sanity, since more and more stuff is interrupt driven. - -This regression has been introduced in - -commit 3e9605018ab3e333d51cc90fccfde2031886763b -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Nov 27 16:22:54 2012 +0000 - - drm/i915: Rearrange code to only have a single method for waiting upon the ring - -Like in the driver load code we need to make sure that hotplug -interrupts don't cause havoc with our modeset state, hence block them -with the existing infrastructure. Again we ignore races where we might -loose hotplug interrupts ... - -Note that the driver load part of the regression has already been -fixed in - -commit 52d7ecedac3f96fb562cb482c139015372728638 -Author: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat Dec 1 21:03:22 2012 +0100 - - drm/i915: reorder setup sequence to have irqs for output setup - -v2: Add a note to the commit message about which patch fixed the -driver load part of the regression. Stable kernels need to backport -both patches. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54691 -Cc: Chris Wilson <chris@chris-wilson.co.uk> -Cc: Mika Kuoppala <mika.kuoppala@intel.com> -Reported-and-Tested-by: Ilya Tumaykin <itumaykin@gmail.com> -Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1) -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_drv.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -486,6 +486,7 @@ static int i915_drm_freeze(struct drm_de - intel_modeset_disable(dev); - - drm_irq_uninstall(dev); -+ dev_priv->enable_hotplug_processing = false; - } - - i915_save_state(dev); -@@ -562,9 +563,19 @@ static int __i915_drm_thaw(struct drm_de - error = i915_gem_init_hw(dev); - mutex_unlock(&dev->struct_mutex); - -+ /* We need working interrupts for modeset enabling ... */ -+ drm_irq_install(dev); -+ - intel_modeset_init_hw(dev); - intel_modeset_setup_hw_state(dev, false); -- drm_irq_install(dev); -+ -+ /* -+ * ... but also need to make sure that hotplug processing -+ * doesn't cause havoc. Like in the driver load code we don't -+ * bother with the tiny race here where we might loose hotplug -+ * notifications. -+ * */ -+ dev_priv->enable_hotplug_processing = true; - } - - intel_opregion_init(dev); diff --git a/kernels/linux-libre-pae/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch b/kernels/linux-libre-pae/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch deleted file mode 100644 index 8dc354488..000000000 --- a/kernels/linux-libre-pae/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 52d7ecedac3f96fb562cb482c139015372728638 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat, 1 Dec 2012 21:03:22 +0100 -Subject: drm/i915: reorder setup sequence to have irqs for output setup - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 52d7ecedac3f96fb562cb482c139015372728638 upstream. - -Otherwise the new&shiny irq-driven gmbus and dp aux code won't work that -well. Noticed since the dp aux code doesn't have an automatic fallback -with a timeout (since the hw provides for that already). - -v2: Simple move drm_irq_install before intel_modeset_gem_init, as -suggested by Ben Widawsky. - -v3: Now that interrupts are enabled before all connectors are fully -set up, we might fall over serving a HPD interrupt while things are -still being set up. Instead of jumping through massive hoops and -complicating the code with a separate hpd irq enable step, simply -block out the hotplug work item from doing anything until things are -in place. - -v4: Actually, we can enable hotplug processing only after the fbdev is -fully set up, since we call down into the fbdev from the hotplug work -functions. So stick the hpd enabling right next to the poll helper -initialization. - -v5: We need to enable irqs before intel_modeset_init, since that -function sets up the outputs. - -v6: Fixup cleanup sequence, too. - -Reviewed-by: Imre Deak <imre.deak@intel.com> -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_dma.c | 23 ++++++++++++++--------- - drivers/gpu/drm/i915/i915_drv.h | 1 + - drivers/gpu/drm/i915/i915_irq.c | 4 ++++ - 3 files changed, 19 insertions(+), 9 deletions(-) - ---- a/drivers/gpu/drm/i915/i915_dma.c -+++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -1297,19 +1297,21 @@ static int i915_load_modeset_init(struct - if (ret) - goto cleanup_vga_switcheroo; - -+ ret = drm_irq_install(dev); -+ if (ret) -+ goto cleanup_gem_stolen; -+ -+ /* Important: The output setup functions called by modeset_init need -+ * working irqs for e.g. gmbus and dp aux transfers. */ - intel_modeset_init(dev); - - ret = i915_gem_init(dev); - if (ret) -- goto cleanup_gem_stolen; -- -- intel_modeset_gem_init(dev); -+ goto cleanup_irq; - - INIT_WORK(&dev_priv->console_resume_work, intel_console_resume); - -- ret = drm_irq_install(dev); -- if (ret) -- goto cleanup_gem; -+ intel_modeset_gem_init(dev); - - /* Always safe in the mode setting case. */ - /* FIXME: do pre/post-mode set stuff in core KMS code */ -@@ -1317,7 +1319,10 @@ static int i915_load_modeset_init(struct - - ret = intel_fbdev_init(dev); - if (ret) -- goto cleanup_irq; -+ goto cleanup_gem; -+ -+ /* Only enable hotplug handling once the fbdev is fully set up. */ -+ dev_priv->enable_hotplug_processing = true; - - drm_kms_helper_poll_init(dev); - -@@ -1326,13 +1331,13 @@ static int i915_load_modeset_init(struct - - return 0; - --cleanup_irq: -- drm_irq_uninstall(dev); - cleanup_gem: - mutex_lock(&dev->struct_mutex); - i915_gem_cleanup_ringbuffer(dev); - mutex_unlock(&dev->struct_mutex); - i915_gem_cleanup_aliasing_ppgtt(dev); -+cleanup_irq: -+ drm_irq_uninstall(dev); - cleanup_gem_stolen: - i915_gem_cleanup_stolen(dev); - cleanup_vga_switcheroo: ---- a/drivers/gpu/drm/i915/i915_drv.h -+++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -672,6 +672,7 @@ typedef struct drm_i915_private { - - u32 hotplug_supported_mask; - struct work_struct hotplug_work; -+ bool enable_hotplug_processing; - - int num_pipe; - int num_pch_pll; ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -287,6 +287,10 @@ static void i915_hotplug_work_func(struc - struct drm_mode_config *mode_config = &dev->mode_config; - struct intel_encoder *encoder; - -+ /* HPD irq before everything is fully set up. */ -+ if (!dev_priv->enable_hotplug_processing) -+ return; -+ - mutex_lock(&mode_config->mutex); - DRM_DEBUG_KMS("running encoder hotplug functions\n"); - diff --git a/kernels/linux-libre-pae/fat-3.6.x.patch b/kernels/linux-libre-pae/fat-3.6.x.patch deleted file mode 100644 index d8deeb788..000000000 --- a/kernels/linux-libre-pae/fat-3.6.x.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Dave Reisner <dreisner@archlinux.org> -Date: Thu, 29 Nov 2012 03:18:52 +0000 (+1100) -Subject: fs/fat: strip "cp" prefix from codepage in display -X-Git-Tag: next-20121130~1^2~97 -X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=f15914873184cc3f2a8d590fa4f7e32ab0a8a405 - -fs/fat: strip "cp" prefix from codepage in display - -Option parsing code expects an unsigned integer for the codepage option, -but prefixes and stores this option with "cp" before passing to -load_nls(). This makes the displayed option in /proc an invalid one. -Strip the prefix when printing so that the displayed option is valid for -reuse. - -Signed-off-by: Dave Reisner <dreisner@archlinux.org> -Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> ---- - -diff --git a/fs/fat/inode.c b/fs/fat/inode.c -index 3b733a7..3580681 100644 ---- a/fs/fat/inode.c -+++ b/fs/fat/inode.c -@@ -726,7 +726,8 @@ static int fat_show_options(struct seq_file *m, struct dentry *root) - if (opts->allow_utime) - seq_printf(m, ",allow_utime=%04o", opts->allow_utime); - if (sbi->nls_disk) -- seq_printf(m, ",codepage=%s", sbi->nls_disk->charset); -+ /* strip "cp" prefix from displayed option */ -+ seq_printf(m, ",codepage=%s", &sbi->nls_disk->charset[2]); - if (isvfat) { - if (sbi->nls_io) - seq_printf(m, ",iocharset=%s", sbi->nls_io->charset); diff --git a/kernels/linux-libre-pae/linux-libre-pae.install b/kernels/linux-libre-pae/linux-libre-pae.install index 7951e0156..5053eb190 100644 --- a/kernels/linux-libre-pae/linux-libre-pae.install +++ b/kernels/linux-libre-pae/linux-libre-pae.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-pae -KERNEL_VERSION=3.8.3-2-LIBRE-PAE +KERNEL_VERSION=3.8.4-1-LIBRE-PAE # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD index 91dc1484c..77e0ed1ff 100644 --- a/kernels/linux-libre-xen/PKGBUILD +++ b/kernels/linux-libre-xen/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 180114 2013-03-17 13:00:07Z tpowa $ +# $Id: PKGBUILD 180406 2013-03-21 07:26:50Z tpowa $ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,8 +6,8 @@ pkgbase=linux-libre-xen # Build stock -LIBRE-XEN kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -pkgver=${_basekernel}.3 -pkgrel=2 +pkgver=${_basekernel}.4 +pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -20,17 +20,13 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn # standard config files for mkinitcpio ramdisk "${pkgbase}.preset" 'boot-logo.patch' - 'change-default-console-loglevel.patch' - 'drm-i915-enable-irqs-earlier-when-resuming.patch' - 'drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch') + 'change-default-console-loglevel.patch') md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - 'a762b6f22a64473a0b4d8dc5366b25d3' + 'be610dd93dbe033cfe04018b27557c3e' 'c13961a22d8c742fb31b59a1e27a0e7b' 'b7c2805bb287a644c0a303bf7721e534' '04b21c79df0a952c22d681dd4f4562df' - 'f3def2cefdcbb954c21d8505d23cc83c' - '40e7b328977ad787a0b5584f193d63fe' - '8b9159931fab0c191a86dbd5a46fa328') + 'f3def2cefdcbb954c21d8505d23cc83c') _kernelname=${pkgbase#linux-libre} _localversionname=-LIBRE-XEN @@ -50,11 +46,6 @@ build() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - # revert 2 patches which breaks displays - # FS 34327 - patch -Rp1 -i "${srcdir}/drm-i915-enable-irqs-earlier-when-resuming.patch" - patch -Rp1 -i "${srcdir}/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch" - cat "${srcdir}/config" > ./.config # simpler if [ "${_kernelname}" != "" ]; then diff --git a/kernels/linux-libre-xen/drm-i915-enable-irqs-earlier-when-resuming.patch b/kernels/linux-libre-xen/drm-i915-enable-irqs-earlier-when-resuming.patch deleted file mode 100644 index cb621d520..000000000 --- a/kernels/linux-libre-xen/drm-i915-enable-irqs-earlier-when-resuming.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Tue, 5 Mar 2013 09:50:58 +0100 -Subject: drm/i915: enable irqs earlier when resuming - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 upstream. - -We need it to restore the ilk rc6 context, since the gpu wait no -requires interrupts. But in general having interrupts around should -help in code sanity, since more and more stuff is interrupt driven. - -This regression has been introduced in - -commit 3e9605018ab3e333d51cc90fccfde2031886763b -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Nov 27 16:22:54 2012 +0000 - - drm/i915: Rearrange code to only have a single method for waiting upon the ring - -Like in the driver load code we need to make sure that hotplug -interrupts don't cause havoc with our modeset state, hence block them -with the existing infrastructure. Again we ignore races where we might -loose hotplug interrupts ... - -Note that the driver load part of the regression has already been -fixed in - -commit 52d7ecedac3f96fb562cb482c139015372728638 -Author: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat Dec 1 21:03:22 2012 +0100 - - drm/i915: reorder setup sequence to have irqs for output setup - -v2: Add a note to the commit message about which patch fixed the -driver load part of the regression. Stable kernels need to backport -both patches. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54691 -Cc: Chris Wilson <chris@chris-wilson.co.uk> -Cc: Mika Kuoppala <mika.kuoppala@intel.com> -Reported-and-Tested-by: Ilya Tumaykin <itumaykin@gmail.com> -Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1) -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_drv.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -486,6 +486,7 @@ static int i915_drm_freeze(struct drm_de - intel_modeset_disable(dev); - - drm_irq_uninstall(dev); -+ dev_priv->enable_hotplug_processing = false; - } - - i915_save_state(dev); -@@ -562,9 +563,19 @@ static int __i915_drm_thaw(struct drm_de - error = i915_gem_init_hw(dev); - mutex_unlock(&dev->struct_mutex); - -+ /* We need working interrupts for modeset enabling ... */ -+ drm_irq_install(dev); -+ - intel_modeset_init_hw(dev); - intel_modeset_setup_hw_state(dev, false); -- drm_irq_install(dev); -+ -+ /* -+ * ... but also need to make sure that hotplug processing -+ * doesn't cause havoc. Like in the driver load code we don't -+ * bother with the tiny race here where we might loose hotplug -+ * notifications. -+ * */ -+ dev_priv->enable_hotplug_processing = true; - } - - intel_opregion_init(dev); diff --git a/kernels/linux-libre-xen/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch b/kernels/linux-libre-xen/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch deleted file mode 100644 index 8dc354488..000000000 --- a/kernels/linux-libre-xen/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 52d7ecedac3f96fb562cb482c139015372728638 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat, 1 Dec 2012 21:03:22 +0100 -Subject: drm/i915: reorder setup sequence to have irqs for output setup - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 52d7ecedac3f96fb562cb482c139015372728638 upstream. - -Otherwise the new&shiny irq-driven gmbus and dp aux code won't work that -well. Noticed since the dp aux code doesn't have an automatic fallback -with a timeout (since the hw provides for that already). - -v2: Simple move drm_irq_install before intel_modeset_gem_init, as -suggested by Ben Widawsky. - -v3: Now that interrupts are enabled before all connectors are fully -set up, we might fall over serving a HPD interrupt while things are -still being set up. Instead of jumping through massive hoops and -complicating the code with a separate hpd irq enable step, simply -block out the hotplug work item from doing anything until things are -in place. - -v4: Actually, we can enable hotplug processing only after the fbdev is -fully set up, since we call down into the fbdev from the hotplug work -functions. So stick the hpd enabling right next to the poll helper -initialization. - -v5: We need to enable irqs before intel_modeset_init, since that -function sets up the outputs. - -v6: Fixup cleanup sequence, too. - -Reviewed-by: Imre Deak <imre.deak@intel.com> -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_dma.c | 23 ++++++++++++++--------- - drivers/gpu/drm/i915/i915_drv.h | 1 + - drivers/gpu/drm/i915/i915_irq.c | 4 ++++ - 3 files changed, 19 insertions(+), 9 deletions(-) - ---- a/drivers/gpu/drm/i915/i915_dma.c -+++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -1297,19 +1297,21 @@ static int i915_load_modeset_init(struct - if (ret) - goto cleanup_vga_switcheroo; - -+ ret = drm_irq_install(dev); -+ if (ret) -+ goto cleanup_gem_stolen; -+ -+ /* Important: The output setup functions called by modeset_init need -+ * working irqs for e.g. gmbus and dp aux transfers. */ - intel_modeset_init(dev); - - ret = i915_gem_init(dev); - if (ret) -- goto cleanup_gem_stolen; -- -- intel_modeset_gem_init(dev); -+ goto cleanup_irq; - - INIT_WORK(&dev_priv->console_resume_work, intel_console_resume); - -- ret = drm_irq_install(dev); -- if (ret) -- goto cleanup_gem; -+ intel_modeset_gem_init(dev); - - /* Always safe in the mode setting case. */ - /* FIXME: do pre/post-mode set stuff in core KMS code */ -@@ -1317,7 +1319,10 @@ static int i915_load_modeset_init(struct - - ret = intel_fbdev_init(dev); - if (ret) -- goto cleanup_irq; -+ goto cleanup_gem; -+ -+ /* Only enable hotplug handling once the fbdev is fully set up. */ -+ dev_priv->enable_hotplug_processing = true; - - drm_kms_helper_poll_init(dev); - -@@ -1326,13 +1331,13 @@ static int i915_load_modeset_init(struct - - return 0; - --cleanup_irq: -- drm_irq_uninstall(dev); - cleanup_gem: - mutex_lock(&dev->struct_mutex); - i915_gem_cleanup_ringbuffer(dev); - mutex_unlock(&dev->struct_mutex); - i915_gem_cleanup_aliasing_ppgtt(dev); -+cleanup_irq: -+ drm_irq_uninstall(dev); - cleanup_gem_stolen: - i915_gem_cleanup_stolen(dev); - cleanup_vga_switcheroo: ---- a/drivers/gpu/drm/i915/i915_drv.h -+++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -672,6 +672,7 @@ typedef struct drm_i915_private { - - u32 hotplug_supported_mask; - struct work_struct hotplug_work; -+ bool enable_hotplug_processing; - - int num_pipe; - int num_pch_pll; ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -287,6 +287,10 @@ static void i915_hotplug_work_func(struc - struct drm_mode_config *mode_config = &dev->mode_config; - struct intel_encoder *encoder; - -+ /* HPD irq before everything is fully set up. */ -+ if (!dev_priv->enable_hotplug_processing) -+ return; -+ - mutex_lock(&mode_config->mutex); - DRM_DEBUG_KMS("running encoder hotplug functions\n"); - diff --git a/kernels/linux-libre-xen/fat-3.6.x.patch b/kernels/linux-libre-xen/fat-3.6.x.patch deleted file mode 100644 index d8deeb788..000000000 --- a/kernels/linux-libre-xen/fat-3.6.x.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Dave Reisner <dreisner@archlinux.org> -Date: Thu, 29 Nov 2012 03:18:52 +0000 (+1100) -Subject: fs/fat: strip "cp" prefix from codepage in display -X-Git-Tag: next-20121130~1^2~97 -X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=f15914873184cc3f2a8d590fa4f7e32ab0a8a405 - -fs/fat: strip "cp" prefix from codepage in display - -Option parsing code expects an unsigned integer for the codepage option, -but prefixes and stores this option with "cp" before passing to -load_nls(). This makes the displayed option in /proc an invalid one. -Strip the prefix when printing so that the displayed option is valid for -reuse. - -Signed-off-by: Dave Reisner <dreisner@archlinux.org> -Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> ---- - -diff --git a/fs/fat/inode.c b/fs/fat/inode.c -index 3b733a7..3580681 100644 ---- a/fs/fat/inode.c -+++ b/fs/fat/inode.c -@@ -726,7 +726,8 @@ static int fat_show_options(struct seq_file *m, struct dentry *root) - if (opts->allow_utime) - seq_printf(m, ",allow_utime=%04o", opts->allow_utime); - if (sbi->nls_disk) -- seq_printf(m, ",codepage=%s", sbi->nls_disk->charset); -+ /* strip "cp" prefix from displayed option */ -+ seq_printf(m, ",codepage=%s", &sbi->nls_disk->charset[2]); - if (isvfat) { - if (sbi->nls_io) - seq_printf(m, ",iocharset=%s", sbi->nls_io->charset); diff --git a/kernels/linux-libre-xen/linux-libre-xen.install b/kernels/linux-libre-xen/linux-libre-xen.install index d707e2ef8..0165e78f0 100644 --- a/kernels/linux-libre-xen/linux-libre-xen.install +++ b/kernels/linux-libre-xen/linux-libre-xen.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-xen -KERNEL_VERSION=3.8.3-2-LIBRE-XEN +KERNEL_VERSION=3.8.4-1-LIBRE-XEN # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/libre/gnome-desktop2/PKGBUILD b/libre/gnome-desktop2/PKGBUILD new file mode 100644 index 000000000..e8744d4a4 --- /dev/null +++ b/libre/gnome-desktop2/PKGBUILD @@ -0,0 +1,35 @@ +# $Id$ +# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Contributor: Jan de Groot <jan@archlinux.org> + +_pkgname=gnome-desktop +pkgname=${_pkgname}2 +pkgver=2.32.1 +pkgrel=2.1 +pkgdesc="Library with common API for various GNOME modules (legacy version), Parabola rebranded" +arch=(i686 x86_64 mips64el) +license=(GPL LGPL) +depends=(gconf gtk2 startup-notification) +makedepends=(gnome-doc-utils intltool) +url="http://www.gnome.org" +options=(!libtool !emptydirs) +source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2) +sha256sums=('55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d') + +build() { + cd "$srcdir/$_pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --with-gnome-distributor="Parabola GNU/Linux-libre" \ + --disable-scrollkeeper \ + --disable-gnome-about --disable-desktop-docs + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool + + make +} + +package() { + cd "$srcdir/$_pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/libre/gnome-menus/PKGBUILD b/libre/gnome-menus/PKGBUILD new file mode 100644 index 000000000..186473b5b --- /dev/null +++ b/libre/gnome-menus/PKGBUILD @@ -0,0 +1,36 @@ +# $Id$ +# Maintainer: Jan de Groot <jan@archlinux.org> + +pkgname=gnome-menus +pkgver=3.6.2 +pkgrel=1.1 +pkgdesc="GNOME menu specifications, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +depends=('glib2' 'python2-gobject') +makedepends=('intltool' 'gobject-introspection') +options=('!libtool') +license=('GPL' 'LGPL') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz + menus.patch) +sha256sums=('f6cefb25ce3ca2a0e4cb43894089cc6079bf948230e99bc0e244b380fa84bf4f' + 'de14815d63ab98f999975680a8981702dee0f70d129d4d4fcf4778d966e67435') + +build() { + cd "$pkgname-$pkgver" + + patch -Np0 -i "$srcdir/menus.patch" + + PYTHON=/usr/bin/python2 ./configure \ + --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static + make +} + +package(){ + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + sed -i "1s|#!/usr/bin/env python$|&2|" \ + "$pkgdir/usr/lib/python2.7/site-packages/GMenuSimpleEditor/config.py" +} diff --git a/libre/gnome-menus/menus.patch b/libre/gnome-menus/menus.patch new file mode 100644 index 000000000..6648e09ec --- /dev/null +++ b/libre/gnome-menus/menus.patch @@ -0,0 +1,25 @@ +--- layout/applications.menu 2005-06-28 10:16:39.000000000 +0200 ++++ layout/applications.menu 2005-09-12 23:21:20.000000000 +0200 +@@ -7,7 +7,6 @@ + <Directory>Applications.directory</Directory> + + <!-- Scan legacy dirs first, as later items take priority --> +- <KDELegacyDirs/> + <LegacyDir>/etc/X11/applnk</LegacyDir> + <LegacyDir>/usr/share/gnome/apps</LegacyDir> + +@@ -18,6 +17,14 @@ + <!-- Read in overrides and child menus from applications-merged/ --> + <DefaultMergeDirs/> + ++ <!-- Parabola submenu --> ++ <Menu> ++ <Name>Parabola</Name> ++ <Directory>Parabola.directory</Directory> ++ <Include> ++ <Category>Parabola</Category> ++ </Include> ++ </Menu> <!-- End Parabola --> + <!-- Accessories submenu --> + <Menu> + <Name>Accessories</Name> diff --git a/libre/gst-libav/PKGBUILD b/libre/gst-libav/PKGBUILD new file mode 100644 index 000000000..3d92dcd9b --- /dev/null +++ b/libre/gst-libav/PKGBUILD @@ -0,0 +1,35 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gst-libav +pkgver=1.0.6 +pkgrel=1 +pkgdesc="Gstreamer libav Plugin, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('GPL') +url="http://gstreamer.freedesktop.org/" +depends=('gst-plugins-base-libs' 'bzip2') +makedepends=('yasm') +options=(!libtool !emptydirs) +provides=("gst-ffmpeg=$pkgver-$pkgrel") +source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) +sha256sums=('8ab222a52bf7482e913f2c9a4f490cda8f8ed1acfbc429f27451b0558b08044d') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --with-libav-extra-configure="--enable-runtime-cpudetect" \ + --with-package-name="GStreamer libav Plugin (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + make +} + +check() { + cd $pkgname-$pkgver + make check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="${pkgdir}" install +} diff --git a/libre/gst-plugins-bad-libre/PKGBUILD b/libre/gst-plugins-bad-libre/PKGBUILD index 1cb133713..7a12f8ca9 100644 --- a/libre/gst-plugins-bad-libre/PKGBUILD +++ b/libre/gst-plugins-bad-libre/PKGBUILD @@ -1,12 +1,12 @@ -# $Id: PKGBUILD 178027 2013-02-13 20:38:52Z heftig $ +# $Id: PKGBUILD 180524 2013-03-22 19:07:19Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> pkgbase=gst-plugins-bad pkgname=gst-plugins-bad-libre -pkgver=1.0.5 -pkgrel=1.1 -pkgdesc='GStreamer Multimedia Framework Bad Plugins, without nonfree faac support' +pkgver=1.0.6 +pkgrel=1 +pkgdesc='GStreamer Multimedia Framework Bad Plugins, with nonfree faac support removed and Parabola rebranded' arch=( i686 x86_64 @@ -58,7 +58,7 @@ source=( "$url/src/$pkgbase/$pkgbase-$pkgver.tar.xz" ) sha256sums=( - 2e8f5b9a2fd274142d0a916b6425b9466028978b85858dc835dc80de744b276a + 92130899d0b78b71f1551cada9b10b550e91506c2d7b8b748e5cc18a620d302d ) build() { @@ -69,7 +69,7 @@ build() { automake --add-missing ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --disable-static --enable-experimental \ - --with-package-name='GStreamer Bad Plugins (Parabola)' \ + --with-package-name='GStreamer Bad Plugins (Parabola GNU/Linux-libre)' \ --with-package-origin='https://parabolagnulinux.org/' \ --with-gtk=3.0 make diff --git a/libre/gst-plugins-base/PKGBUILD b/libre/gst-plugins-base/PKGBUILD new file mode 100644 index 000000000..55ac8e72c --- /dev/null +++ b/libre/gst-plugins-base/PKGBUILD @@ -0,0 +1,52 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgbase=gst-plugins-base +pkgname=('gst-plugins-base-libs' 'gst-plugins-base') +pkgver=1.0.6 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Base Plugins, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +makedepends=('pkgconfig' 'gstreamer' 'orc' 'libxv' 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango' 'gobject-introspection') +options=(!libtool !emptydirs) +url="http://gstreamer.freedesktop.org/" +source=(${url}/src/$pkgbase/$pkgbase-${pkgver}.tar.xz) +sha256sums=('85e5f99af690f720ccde5ea7e793269d35883a3ead80ca9985fa44e18bb1a4a5') + +build() { + cd $pkgbase-$pkgver + sed -i -e '/AC_PATH_XTRA/d' configure.ac + aclocal -I m4 -I common/m4 + autoconf + automake --add-missing + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --with-package-name="GStreamer Base Plugins (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + make + sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile +} + +check() { + cd $pkgbase-$pkgver + # Testsuite fails on one test. Some refcount leak + make check +} + +package_gst-plugins-base-libs() { + pkgdesc="GStreamer Multimedia Framework Base Plugin libraries, Parabola rebranded" + depends=('gstreamer' 'orc' 'libxv') + + cd $pkgbase-$pkgver + make DESTDIR="${pkgdir}" install +} + +package_gst-plugins-base() { + depends=("gst-plugins-base-libs=$pkgver" 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango') + + cd $pkgbase-$pkgver + make -C gst-libs DESTDIR="${pkgdir}" install + make -C ext DESTDIR="${pkgdir}" install + make -C gst-libs DESTDIR="${pkgdir}" uninstall +} diff --git a/libre/gst-plugins-good/PKGBUILD b/libre/gst-plugins-good/PKGBUILD new file mode 100644 index 000000000..9101bfdba --- /dev/null +++ b/libre/gst-plugins-good/PKGBUILD @@ -0,0 +1,38 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gst-plugins-good +pkgver=1.0.6 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Good Plugins, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('libpulse' 'jack' 'libsoup' 'gst-plugins-base-libs' 'wavpack' 'aalib' 'taglib' 'libdv' 'libshout' 'libvpx' 'gdk-pixbuf2' 'libcaca' 'libavc1394' 'libiec61883' 'libxdamage' 'v4l-utils' 'cairo') +makedepends=('gstreamer' 'speex' 'flac' 'libraw1394') +options=(!libtool !emptydirs) +source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) +sha256sums=('67f7690a9826d9a6ab28b9af2536a6f3e833ee412bd59dd603c48fb3c6823e0d') + +build() { + cd $pkgname-$pkgver + sed -i -e '/AC_PATH_XTRA/d' configure.ac + aclocal -I m4 -I common/m4 + autoconf + automake --add-missing + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --with-package-name="GStreamer Good Plugins (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + make +} + +check() { + cd $pkgname-$pkgver + make check +} + +package() { + cd $pkgname-$pkgver + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install +} diff --git a/libre/gst-plugins-ugly/PKGBUILD b/libre/gst-plugins-ugly/PKGBUILD new file mode 100644 index 000000000..e0cc268ff --- /dev/null +++ b/libre/gst-plugins-ugly/PKGBUILD @@ -0,0 +1,37 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gst-plugins-ugly +pkgver=1.0.6 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Ugly Plugins, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('gst-plugins-base-libs' 'libdvdread' 'lame' 'libmpeg2' 'a52dec' 'libmad' 'libsidplay' 'libcdio' 'x264' 'opencore-amr') +options=(!libtool !emptydirs) +source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz) +sha256sums=('8655ceec7533b5d30080a5051025e26ff8d06bea8d03a6b2af56c2f839d60586') + +build() { + cd $pkgname-$pkgver + sed -i '/AC_PATH_XTRA/d' configure.ac + aclocal -I m4 -I common/m4 + autoconf + automake --add-missing + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --with-package-name="GStreamer Ugly Plugins (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + make +} + +check() { + cd $pkgname-$pkgver + make check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="${pkgdir}" install +} diff --git a/libre/gstreamer/PKGBUILD b/libre/gstreamer/PKGBUILD new file mode 100644 index 000000000..2eb34bb72 --- /dev/null +++ b/libre/gstreamer/PKGBUILD @@ -0,0 +1,35 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer +pkgver=1.0.6 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('libxml2' 'glib2') +optdepends=('sh: feedback script') +makedepends=('intltool' 'pkgconfig' 'gtk-doc' 'gobject-introspection') +options=('!libtool') +source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz) +sha256sums=('50d4050cd6a23684b6bbf40a9b7c132edfb39fe9db2d81980adaa6e72f4d5826') + +build() { + cd "${srcdir}/gstreamer-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib \ + --with-package-name="GStreamer (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" \ + --enable-gtk-doc --disable-static + make +} + +check() { + cd "${srcdir}/gstreamer-${pkgver}" + make check +} + +package() { + cd "${srcdir}/gstreamer-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/libre/gstreamer0.10-bad-libre/PKGBUILD b/libre/gstreamer0.10-bad-libre/PKGBUILD index 883a9eefb..30c475d39 100644 --- a/libre/gstreamer0.10-bad-libre/PKGBUILD +++ b/libre/gstreamer0.10-bad-libre/PKGBUILD @@ -6,8 +6,8 @@ pkgbase=gstreamer0.10-bad-libre pkgname=('gstreamer0.10-bad-libre' 'gstreamer0.10-bad-libre-plugins') pkgver=0.10.23 -pkgrel=3.1 -arch=('i686' 'x86_64') +pkgrel=3.2 +arch=('i686' 'x86_64' 'mips64el') license=('LGPL' 'GPL') makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.36' 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'soundtouch' 'libvdpau' 'schroedinger' 'libass' 'libvpx' 'gsm' 'libgme' 'rtmpdump' 'libsndfile' 'librsvg' 'wildmidi' 'opus') url="http://gstreamer.freedesktop.org/" @@ -19,7 +19,7 @@ build() { cd "${srcdir}/gst-plugins-bad-${pkgver}" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --disable-static --enable-experimental \ - --with-package-name="GStreamer Bad Plugins (Parabola)" \ + --with-package-name="GStreamer Bad Plugins (Parabola GNU/Linux-libre)" \ --with-package-origin="https://parabolagnulinux.org/" make @@ -33,7 +33,7 @@ build() { #} package_gstreamer0.10-bad-libre() { - pkgdesc="GStreamer Multimedia Framework Bad Plugin libraries (gst-plugins-bad)" + pkgdesc="GStreamer Multimedia Framework Bad Plugin libraries (gst-plugins-bad), with non free faac support removed and Parabola rebranded" depends=('gstreamer0.10-base>=0.10.34') provides=("gstreamer0.10-bad=$pkgver") conflicts=('gstreamer0.10-bad') @@ -44,7 +44,7 @@ package_gstreamer0.10-bad-libre() { } package_gstreamer0.10-bad-libre-plugins() { - pkgdesc="GStreamer Multimedia Framework Bad Plugins (gst-plugins-bad)" + pkgdesc="GStreamer Multimedia Framework Bad Plugins (gst-plugins-bad), with non free faac support removed and Parabola rebranded" depends=("gstreamer0.10-bad-libre=${pkgver}" 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'libvdpau' 'soundtouch' 'libass' 'schroedinger' 'libvpx' 'gsm' 'rtmpdump' 'libgme' 'libsndfile' 'librsvg' 'wildmidi' 'opus') groups=('gstreamer0.10-plugins') install=gstreamer0.10-bad-plugins.install diff --git a/libre/gstreamer0.10-base/PKGBUILD b/libre/gstreamer0.10-base/PKGBUILD new file mode 100644 index 000000000..620c0bd87 --- /dev/null +++ b/libre/gstreamer0.10-base/PKGBUILD @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgbase=('gstreamer0.10-base') +pkgname=('gstreamer0.10-base' 'gstreamer0.10-base-plugins') +pkgver=0.10.36 +pkgrel=1.1 +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +makedepends=('pkgconfig' 'gstreamer0.10>=0.10.35' 'orc' 'libxv' 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango' 'gobject-introspection') +options=(!libtool !emptydirs) +url="http://gstreamer.freedesktop.org/" +source=(${url}/src/gst-plugins-base/gst-plugins-base-${pkgver}.tar.xz) +sha256sums=('1fe45c3894903001d4d008b0713dab089f53726dcb5842d5b40c2595a984e64a') + +build() { + cd "${srcdir}/gst-plugins-base-${pkgver}" + sed -i '/AC_PATH_XTRA/d' configure.ac + autoreconf + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental --disable-gnome_vfs \ + --with-package-name="GStreamer Base Plugins (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + + make + sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile +} + +check() { + cd "${srcdir}/gst-plugins-base-${pkgver}" + make check +} + +package_gstreamer0.10-base() { + pkgdesc="GStreamer Multimedia Framework Base plugin libraries, Parabola rebranded" + depends=('gstreamer0.10>=0.10.35' 'orc' 'libxv') + + cd "${srcdir}/gst-plugins-base-${pkgver}" + make DESTDIR="${pkgdir}" install +} + +package_gstreamer0.10-base-plugins() { + pkgdesc="GStreamer Multimedia Framework Base Plugins (gst-plugins-base), Parabola rebranded" + depends=("gstreamer0.10-base=${pkgver}" 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango') + replaces=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-ogg') + conflicts=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-ogg') + groups=('gstreamer0.10-plugins') + + cd "${srcdir}/gst-plugins-base-${pkgver}" + make -C gst-libs DESTDIR="${pkgdir}" install + make -C ext DESTDIR="${pkgdir}" install + make -C gst-libs DESTDIR="${pkgdir}" uninstall +} diff --git a/libre/gstreamer0.10-good/PKGBUILD b/libre/gstreamer0.10-good/PKGBUILD index abe7dc0ef..4cbaddd1e 100644 --- a/libre/gstreamer0.10-good/PKGBUILD +++ b/libre/gstreamer0.10-good/PKGBUILD @@ -5,8 +5,8 @@ pkgbase=gstreamer0.10-good pkgname=('gstreamer0.10-good' 'gstreamer0.10-good-plugins') pkgver=0.10.31 -pkgrel=1.1 -arch=('i686' 'x86_64') +pkgrel=1.2 +arch=('i686' 'x86_64' 'mips64el') license=('LGPL') makedepends=('intltool' 'pkgconfig' 'gstreamer0.10-base>=0.10.34' 'libavc1394' 'libiec61883' 'aalib' 'libshout' 'libdv' 'flac' 'gconf' 'wavpack' 'taglib' 'libsoup-gnome' 'v4l-utils' 'libcaca' 'bzip2' 'gdk-pixbuf2' 'libpulse' 'jack' 'udev') url="http://gstreamer.freedesktop.org/" @@ -32,7 +32,7 @@ build() { package_gstreamer0.10-good() { depends=('gstreamer0.10-base>=0.10.34' 'bzip2') - pkgdesc="GStreamer Multimedia Framework Good plugin libraries (Parabola rebranded)" + pkgdesc="GStreamer Multimedia Framework Good plugin libraries, Parabola rebranded" cd "${srcdir}/gst-plugins-good-${pkgver}" make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install @@ -41,7 +41,7 @@ package_gstreamer0.10-good() { package_gstreamer0.10-good-plugins() { depends=("gstreamer0.10-good=${pkgver}" 'libavc1394' 'libiec61883' 'aalib' 'libshout' 'libdv' 'flac' 'gconf' 'wavpack' 'taglib' 'libsoup-gnome' 'v4l-utils' 'libcaca' 'libpng' 'libjpeg' 'jack' 'libpulse' 'udev') - pkgdesc="GStreamer Multimedia Framework Good Plugins (gst-plugins-good)" + pkgdesc="GStreamer Multimedia Framework Good Plugins (gst-plugins-good), Parabola rebranded" groups=('gstreamer0.10-plugins') replaces=('gstreamer0.10-aalib' 'gstreamer0.10-wavpack' 'gstreamer0.10-shout2' 'gstreamer0.10-taglib' 'gstreamer0.10-libcaca' 'gstreamer0.10-libpng' 'gstreamer0.10-jpeg' 'gstreamer0.10-cairo' 'gstreamer0.10-flac' 'gstreamer0.10-speex' 'gstreamer0.10-gdkpixbuf' 'gstreamer0.10-dv1394' 'gstreamer0.10-annodex' 'gstreamer0.10-gconf' 'gstreamer0.10-esd' 'gstreamer0.10-cdio' 'gstreamer0.10-dv' 'gstreamer0.10-soup' 'gstreamer0.10-pulse') conflicts=('gstreamer0.10-aalib' 'gstreamer0.10-wavpack' 'gstreamer0.10-shout2' 'gstreamer0.10-taglib' 'gstreamer0.10-libcaca' 'gstreamer0.10-libpng' 'gstreamer0.10-jpeg' 'gstreamer0.10-cairo' 'gstreamer0.10-flac' 'gstreamer0.10-speex' 'gstreamer0.10-gdkpixbuf' 'gstreamer0.10-dv1394' 'gstreamer0.10-annodex' 'gstreamer0.10-gconf' 'gstreamer0.10-esd' 'gstreamer0.10-cdio' 'gstreamer0.10-dv' 'gstreamer0.10-bad-plugins<0.10.7' 'gstreamer0.10-soup' 'gstreamer0.10-pulse') diff --git a/libre/gstreamer0.10-ugly/PKGBUILD b/libre/gstreamer0.10-ugly/PKGBUILD new file mode 100644 index 000000000..6709ab2ea --- /dev/null +++ b/libre/gstreamer0.10-ugly/PKGBUILD @@ -0,0 +1,54 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgbase=gstreamer0.10-ugly +pkgname=('gstreamer0.10-ugly' 'gstreamer0.10-ugly-plugins') +pkgver=0.10.19 +pkgrel=5.1 +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.34' 'libdvdread' 'lame' 'libmpeg2' 'a52dec' 'libmad' 'libsidplay' 'libcdio' 'x264' 'opencore-amr') +url="http://gstreamer.freedesktop.org/" +options=(!libtool) +source=(${url}/src/gst-plugins-ugly/gst-plugins-ugly-${pkgver}.tar.xz + opencore-amr.patch + cdio-cd-text-api.patch) +md5sums=('ba26045c8c8c91f0d48d327ccf53ac0c' + 'd8feb6c99bfaff8be6b2c48ea4e98e47' + '6c1c665f864387f3a77d32231fedeaab') + +build() { + cd "${srcdir}/gst-plugins-ugly-${pkgver}" + patch -Np0 -i "${srcdir}/opencore-amr.patch" + patch -Np1 -i "${srcdir}/cdio-cd-text-api.patch" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --with-package-name="GStreamer Ugly Plugins (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" + make + sed -e 's/gst-libs gst ext/gst-libs gst/' -i Makefile +} + +check() { + cd "${srcdir}/gst-plugins-ugly-${pkgver}" + make check +} + +package_gstreamer0.10-ugly() { + pkgdesc="GStreamer Multimedia Framework Ugly plugin libraries, Parabola rebranded" + depends=('gstreamer0.10-base>=0.10.34') + + cd "${srcdir}/gst-plugins-ugly-${pkgver}" + make DESTDIR="${pkgdir}" install +} + +package_gstreamer0.10-ugly-plugins() { + pkgdesc="GStreamer Multimedia Framework Ugly Plugins (gst-plugins-ugly), Parabola rebranded" + depends=("gstreamer0.10-ugly=${pkgver}" 'libdvdread' 'lame' 'libmpeg2' 'a52dec' 'libmad' 'libsidplay' 'libcdio' 'x264' 'opencore-amr') + groups=('gstreamer0.10-plugins') + replaces=('gstreamer0.10-dvdread' 'gstreamer0.10-mpeg2dec' 'gstreamer0.10-mad' 'gstreamer0.10-lame' 'gstreamer0.10-sidplay' 'gstreamer0.10-a52dec') + conflicts=('gstreamer0.10-dvdread' 'gstreamer0.10-mpeg2dec' 'gstreamer0.10-mad' 'gstreamer0.10-lame' 'gstreamer0.10-sidplay' 'gstreamer0.10-a52dec') + + cd "${srcdir}/gst-plugins-ugly-${pkgver}" + make -C ext DESTDIR="${pkgdir}" install +} diff --git a/libre/gstreamer0.10-ugly/cdio-cd-text-api.patch b/libre/gstreamer0.10-ugly/cdio-cd-text-api.patch new file mode 100644 index 000000000..cbd16b8e4 --- /dev/null +++ b/libre/gstreamer0.10-ugly/cdio-cd-text-api.patch @@ -0,0 +1,183 @@ +From 649bd92cd2600719862ad5189899212409dd0a67 Mon Sep 17 00:00:00 2001 +From: Leon Merten Lohse <leon@green-side.de> +Date: Thu, 03 May 2012 22:50:30 +0000 +Subject: cdio: compensate for libcdio's recent cd-text api changes + +https://bugzilla.gnome.org/show_bug.cgi?id=675112 + +Conflicts: + + ext/cdio/gstcdiocddasrc.c +--- +diff --git a/ext/cdio/gstcdio.c b/ext/cdio/gstcdio.c +index 2f58d18..483ebf5 100644 +--- a/ext/cdio/gstcdio.c ++++ b/ext/cdio/gstcdio.c +@@ -30,12 +30,16 @@ + GST_DEBUG_CATEGORY (gst_cdio_debug); + + void +-gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, ++gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track, + cdtext_field_t field, const gchar * gst_tag, GstTagList ** p_tags) + { + const gchar *txt; + ++#if LIBCDIO_VERSION_NUM > 83 ++ txt = cdtext_get_const (cdtext, field, track); ++#else + txt = cdtext_get_const (field, cdtext); ++#endif + if (txt == NULL || *txt == '\0') { + GST_DEBUG_OBJECT (src, "empty CD-TEXT field %u (%s)", field, gst_tag); + return; +@@ -57,6 +61,12 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, + } + + GstTagList * ++#if LIBCDIO_VERSION_NUM > 83 ++gst_cdio_get_cdtext (GstObject * src, cdtext_t * t, track_t track) ++{ ++ GstTagList *tags = NULL; ++ ++#else + gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track) + { + GstTagList *tags = NULL; +@@ -67,14 +77,22 @@ gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track) + GST_DEBUG_OBJECT (src, "no CD-TEXT for track %u", track); + return NULL; + } ++#endif + +- gst_cdio_add_cdtext_field (src, t, CDTEXT_PERFORMER, GST_TAG_ARTIST, &tags); +- gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_TITLE, &tags); ++ gst_cdio_add_cdtext_field (src, t, track, CDTEXT_FIELD_PERFORMER, ++ GST_TAG_ARTIST, &tags); ++ gst_cdio_add_cdtext_field (src, t, track, CDTEXT_FIELD_TITLE, GST_TAG_TITLE, ++ &tags); + + return tags; + } + + void ++#if LIBCDIO_VERSION_NUM > 83 ++gst_cdio_add_cdtext_album_tags (GstObject * src, cdtext_t * t, ++ GstTagList * tags) ++{ ++#else + gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags) + { + cdtext_t *t; +@@ -84,11 +102,14 @@ gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags) + GST_DEBUG_OBJECT (src, "no CD-TEXT for album"); + return; + } ++#endif + +- /* FIXME: map CDTEXT_PERFORMER to GST_TAG_ALBUM_ARTIST once we have that */ +- gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_ALBUM, &tags); +- gst_cdio_add_cdtext_field (src, t, CDTEXT_GENRE, GST_TAG_GENRE, &tags); +- ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_PERFORMER, ++ GST_TAG_ALBUM_ARTIST, &tags); ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_TITLE, GST_TAG_ALBUM, ++ &tags); ++ gst_cdio_add_cdtext_field (src, t, 0, CDTEXT_FIELD_GENRE, GST_TAG_GENRE, ++ &tags); + GST_DEBUG ("CD-TEXT album tags: %" GST_PTR_FORMAT, tags); + } + +diff --git a/ext/cdio/gstcdio.h b/ext/cdio/gstcdio.h +index ef31ed0..c6da580 100644 +--- a/ext/cdio/gstcdio.h ++++ b/ext/cdio/gstcdio.h +@@ -24,22 +24,38 @@ + #include <gst/gst.h> + #include <cdio/cdio.h> + #include <cdio/cdtext.h> ++#include <cdio/version.h> ++ ++#if LIBCDIO_VERSION_NUM <= 83 ++ #define CDTEXT_FIELD_PERFORMER CDTEXT_PERFORMER ++ #define CDTEXT_FIELD_GENRE CDTEXT_GENRE ++ #define CDTEXT_FIELD_TITLE CDTEXT_TITLE ++#endif + + GST_DEBUG_CATEGORY_EXTERN (gst_cdio_debug); + #define GST_CAT_DEFAULT gst_cdio_debug + + void gst_cdio_add_cdtext_field (GstObject * src, + cdtext_t * cdtext, ++ track_t track, + cdtext_field_t field, + const gchar * gst_tag, + GstTagList ** p_tags); + + GstTagList * gst_cdio_get_cdtext (GstObject * src, ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t * t, ++#else + CdIo * cdio, ++#endif + track_t track); + + void gst_cdio_add_cdtext_album_tags (GstObject * src, ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t * t, ++#else + CdIo * cdio, ++#endif + GstTagList * tags); + + #endif /* __GST_CDIO_H__ */ +diff --git a/ext/cdio/gstcdiocddasrc.c b/ext/cdio/gstcdiocddasrc.c +index 615a0c8..830839e 100644 +--- a/ext/cdio/gstcdiocddasrc.c ++++ b/ext/cdio/gstcdiocddasrc.c +@@ -206,6 +206,9 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + GstCdioCddaSrc *src; + discmode_t discmode; + gint first_track, num_tracks, i; ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext_t *cdtext; ++#endif + + src = GST_CDIO_CDDA_SRC (audiocdsrc); + +@@ -232,8 +235,18 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + if (src->read_speed != -1) + cdio_set_speed (src->cdio, src->read_speed); + ++#if LIBCDIO_VERSION_NUM > 83 ++ cdtext = cdio_get_cdtext (src->cdio); ++ ++ if (NULL == cdtext) ++ GST_DEBUG_OBJECT (src, "no CD-TEXT on disc"); ++ else ++ gst_cdio_add_cdtext_album_tags (GST_OBJECT_CAST (src), cdtext, ++ cddabasesrc->tags); ++#else + gst_cdio_add_cdtext_album_tags (GST_OBJECT_CAST (src), src->cdio, + cddabasesrc->tags); ++#endif + + GST_LOG_OBJECT (src, "%u tracks, first track: %d", num_tracks, first_track); + +@@ -250,8 +263,14 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device) + * the right thing here (for cddb id calculations etc. as well) */ + track.start = cdio_get_track_lsn (src->cdio, i + first_track); + track.end = track.start + len_sectors - 1; /* -1? */ ++#if LIBCDIO_VERSION_NUM > 83 ++ if (NULL != cdtext) ++ track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), cdtext, ++ i + first_track); ++#else + track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), src->cdio, + i + first_track); ++#endif + + gst_audio_cd_src_add_track (GST_AUDIO_CD_SRC (src), &track); + } +-- +cgit v0.9.0.2-2-gbebe diff --git a/libre/gstreamer0.10-ugly/opencore-amr.patch b/libre/gstreamer0.10-ugly/opencore-amr.patch new file mode 100644 index 000000000..0a350dc46 --- /dev/null +++ b/libre/gstreamer0.10-ugly/opencore-amr.patch @@ -0,0 +1,35 @@ +--- ext/amrnb/amrnbdec.h.orig 2012-03-12 16:49:14.417405139 +0000 ++++ ext/amrnb/amrnbdec.h 2012-03-12 16:49:35.393899419 +0000 +@@ -22,7 +22,7 @@ + + #include <gst/gst.h> + #include <gst/audio/gstaudiodecoder.h> +-#include <interf_dec.h> ++#include <opencore-amrnb/interf_dec.h> + + G_BEGIN_DECLS + +--- ext/amrnb/amrnbenc.h.orig 2012-03-12 16:49:23.833996062 +0000 ++++ ext/amrnb/amrnbenc.h 2012-03-12 16:49:46.597141876 +0000 +@@ -21,7 +21,7 @@ + #define __GST_AMRNBENC_H__ + + #include <gst/gst.h> +-#include <interf_enc.h> ++#include <opencore-amrnb/interf_enc.h> + #include <gst/audio/gstaudioencoder.h> + + G_BEGIN_DECLS +--- ext/amrwbdec/amrwbdec.h.orig 2012-03-12 16:47:48.658100992 +0000 ++++ ext/amrwbdec/amrwbdec.h 2012-03-12 16:48:12.177910733 +0000 +@@ -22,8 +22,8 @@ + + #include <gst/gst.h> + #include <gst/audio/gstaudiodecoder.h> +-#include <dec_if.h> +-#include <if_rom.h> ++#include <opencore-amrwb/dec_if.h> ++#include <opencore-amrwb/if_rom.h> + + G_BEGIN_DECLS + diff --git a/libre/gstreamer0.10/PKGBUILD b/libre/gstreamer0.10/PKGBUILD new file mode 100644 index 000000000..416c1cbd9 --- /dev/null +++ b/libre/gstreamer0.10/PKGBUILD @@ -0,0 +1,41 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer0.10 +pkgver=0.10.36 +pkgrel=1.1 +pkgdesc="GStreamer Multimedia Framework, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('libxml2' 'glib2') +optdepends=('sh: feedback script') +makedepends=('intltool' 'pkgconfig' 'gtk-doc' 'gobject-introspection') +options=('!libtool') +source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz) +md5sums=('15389c73e091b1dda915279c388b9cb2') + +build() { + cd "${srcdir}/gstreamer-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib \ + --with-package-name="GStreamer (Parabola GNU/Linux-libre)" \ + --with-package-origin="https://parabolagnulinux.org/" \ + --enable-gtk-doc --disable-static + make +} + +check() { + cd "${srcdir}/gstreamer-${pkgver}" + make check +} + +package() { + cd "${srcdir}/gstreamer-${pkgver}" + make DESTDIR="${pkgdir}" install + + #Remove unversioned gst-* binaries to get rid of conflicts + cd "${pkgdir}/usr/bin" + for bins in `ls *-0.10`; do + rm -f ${bins/-0.10/} + done +} diff --git a/libre/libtasn1/PKGBUILD b/libre/libtasn1/PKGBUILD new file mode 100644 index 000000000..2131a323b --- /dev/null +++ b/libre/libtasn1/PKGBUILD @@ -0,0 +1,36 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Contributor: judd <jvinet@zeroflux.org> + +pkgname=libtasn1 +pkgver=3.2 +pkgrel=1.1 +pkgdesc="The ASN.1 library used in GNUTLS, Parabola rebranded" +arch=('i686' 'x86_64' 'mips64el') +license=('GPL3' 'LGPL') +url="http://www.gnu.org/software/libtasn1/" +depends=('glibc' 'texinfo') +options=('!libtool') +install=libtasn1.install +source=(http://ftp.gnu.org/gnu/libtasn1/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('1b07629163025b9693aae9b8957842b2' + '67bdae9b78ac7bbfa2ab24c7d46bd577') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr \ + --with-packager="Parabola GNU/Linux-libre" \ + --with-packager-bug-reports="https://labs.parabola.nu/" \ + --with-packager-version=${pkgver}-${pkgrel} + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/libre/libtasn1/libtasn1.install b/libre/libtasn1/libtasn1.install new file mode 100644 index 000000000..2d1ecc09f --- /dev/null +++ b/libre/libtasn1/libtasn1.install @@ -0,0 +1,18 @@ +info_dir=/usr/share/info +info_files=(libtasn1.info) + +post_install() { + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} diff --git a/libre/linux-libre-kmod-alx/PKGBUILD b/libre/linux-libre-kmod-alx/PKGBUILD index b9860cb3f..25343fd26 100644 --- a/libre/linux-libre-kmod-alx/PKGBUILD +++ b/libre/linux-libre-kmod-alx/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: André Silva <emulatorman@lavabit.com> -_kernver=3.8.3 -_kernrel=2 +_kernver=3.8.4 +_kernrel=1 pkgname=('linux-libre-kmod-alx') _version=v3.8-rc7 _pkgver=3.8-rc7-1-u pkgver=3.8rc7.1 -pkgrel=9 +pkgrel=10 pkgdesc='Atheros alx ethernet device driver for linux-libre kernel' arch=('i686' 'x86_64') url='http://www.linuxfoundation.org/collaborate/workgroups/networking/alx' diff --git a/libre/linux-libre-lts-kmod-alx/PKGBUILD b/libre/linux-libre-lts-kmod-alx/PKGBUILD index 3a0571c9d..5e59c2fec 100644 --- a/libre/linux-libre-lts-kmod-alx/PKGBUILD +++ b/libre/linux-libre-lts-kmod-alx/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: André Silva <emulatorman@lavabit.com> -_kernver=3.0.69 +_kernver=3.0.70 _kernrel=1 pkgname=('linux-libre-lts-kmod-alx') _version=v3.8-rc7 _pkgver=3.8-rc7-1-u pkgver=3.8rc7.1 -pkgrel=7 +pkgrel=8 pkgdesc='Atheros alx ethernet device driver for linux-libre-lts kernel' arch=('i686' 'x86_64') url='http://www.linuxfoundation.org/collaborate/workgroups/networking/alx' diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index fc87dbdb6..eaa185f4f 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 180056 2013-03-15 09:48:23Z tpowa $ +# $Id: PKGBUILD 180408 2013-03-21 07:53:18Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -7,7 +7,7 @@ pkgbase=linux-libre-lts # Build stock -LIBRE-LTS kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.0 -_sublevel=69 +_sublevel=70 pkgver=${_basekernel}.${_sublevel} pkgrel=1 _lxopkgver=${_basekernel}.69 # nearly always the same as pkgver @@ -32,7 +32,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'module-init-wait-3.0.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('5f64180fe7df4e574dac5911b78f5067' - 'cf63ee4dfe973aa9f933ed552ac5c277' + '0f4930f721d1815e7e1d724775bfadd9' '99f9c408b64393aceb2482c9a3e329ee' 'fba95bf1857ce6bf863e13a1ab73f584' 'c072b17032e80debc6a8626299245d46' diff --git a/libre/linux-libre-lts/linux-libre-lts.install b/libre/linux-libre-lts/linux-libre-lts.install index f8eccd0c4..e0a21d3fa 100644 --- a/libre/linux-libre-lts/linux-libre-lts.install +++ b/libre/linux-libre-lts/linux-libre-lts.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-lts -KERNEL_VERSION=3.0.69-1-LIBRE-LTS +KERNEL_VERSION=3.0.70-1-LIBRE-LTS # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index d242c7cc8..080c8dcba 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 180114 2013-03-17 13:00:07Z tpowa $ +# $Id: PKGBUILD 180406 2013-03-21 07:26:50Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> # Maintainer (Parabola): Nicolás Reynolds <fauno@kiwwwi.com.ar> @@ -10,9 +10,9 @@ pkgbase=linux-libre # Build stock -LIBRE kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.8 -_sublevel=3 +_sublevel=4 pkgver=${_basekernel}.${_sublevel} -pkgrel=2 +pkgrel=1 _lxopkgver=${_basekernel}.3 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" @@ -29,11 +29,9 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'Kbuild.platforms' 'boot-logo.patch' 'change-default-console-loglevel.patch' - 'drm-i915-enable-irqs-earlier-when-resuming.patch' - 'drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('84c2a77910932ffc7d958744ac9cf2f5' - 'a762b6f22a64473a0b4d8dc5366b25d3' + 'be610dd93dbe033cfe04018b27557c3e' '4d73ccd0f1825a4bd474d4fead6c0d42' 'e132184c6d02ef580a504967c067e1c5' 'e49ac236dfeef709f91a3d993ea7b62c' @@ -41,8 +39,6 @@ md5sums=('84c2a77910932ffc7d958744ac9cf2f5' '8267264d9a8966e57fdacd1fa1fc65c4' '04b21c79df0a952c22d681dd4f4562df' 'f3def2cefdcbb954c21d8505d23cc83c' - '40e7b328977ad787a0b5584f193d63fe' - '8b9159931fab0c191a86dbd5a46fa328' '6dcf31e2ad8625ab2864af257e86564b') if [ "$CARCH" != "mips64el" ]; then # Don't use the Loongson-specific patches on non-mips64el arches. @@ -68,11 +64,6 @@ build() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - # revert 2 patches which breaks displays - # FS 34327 - patch -Rp1 -i "${srcdir}/drm-i915-enable-irqs-earlier-when-resuming.patch" - patch -Rp1 -i "${srcdir}/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch" - if [ "$CARCH" == "mips64el" ]; then sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ diff --git a/libre/linux-libre/drm-i915-enable-irqs-earlier-when-resuming.patch b/libre/linux-libre/drm-i915-enable-irqs-earlier-when-resuming.patch deleted file mode 100644 index cb621d520..000000000 --- a/libre/linux-libre/drm-i915-enable-irqs-earlier-when-resuming.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Tue, 5 Mar 2013 09:50:58 +0100 -Subject: drm/i915: enable irqs earlier when resuming - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 15239099d7a7a9ecdc1ccb5b187ae4cda5488ff9 upstream. - -We need it to restore the ilk rc6 context, since the gpu wait no -requires interrupts. But in general having interrupts around should -help in code sanity, since more and more stuff is interrupt driven. - -This regression has been introduced in - -commit 3e9605018ab3e333d51cc90fccfde2031886763b -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Nov 27 16:22:54 2012 +0000 - - drm/i915: Rearrange code to only have a single method for waiting upon the ring - -Like in the driver load code we need to make sure that hotplug -interrupts don't cause havoc with our modeset state, hence block them -with the existing infrastructure. Again we ignore races where we might -loose hotplug interrupts ... - -Note that the driver load part of the regression has already been -fixed in - -commit 52d7ecedac3f96fb562cb482c139015372728638 -Author: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat Dec 1 21:03:22 2012 +0100 - - drm/i915: reorder setup sequence to have irqs for output setup - -v2: Add a note to the commit message about which patch fixed the -driver load part of the regression. Stable kernels need to backport -both patches. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54691 -Cc: Chris Wilson <chris@chris-wilson.co.uk> -Cc: Mika Kuoppala <mika.kuoppala@intel.com> -Reported-and-Tested-by: Ilya Tumaykin <itumaykin@gmail.com> -Reviewed-by: Chris wilson <chris@chris-wilson.co.uk> (v1) -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_drv.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -486,6 +486,7 @@ static int i915_drm_freeze(struct drm_de - intel_modeset_disable(dev); - - drm_irq_uninstall(dev); -+ dev_priv->enable_hotplug_processing = false; - } - - i915_save_state(dev); -@@ -562,9 +563,19 @@ static int __i915_drm_thaw(struct drm_de - error = i915_gem_init_hw(dev); - mutex_unlock(&dev->struct_mutex); - -+ /* We need working interrupts for modeset enabling ... */ -+ drm_irq_install(dev); -+ - intel_modeset_init_hw(dev); - intel_modeset_setup_hw_state(dev, false); -- drm_irq_install(dev); -+ -+ /* -+ * ... but also need to make sure that hotplug processing -+ * doesn't cause havoc. Like in the driver load code we don't -+ * bother with the tiny race here where we might loose hotplug -+ * notifications. -+ * */ -+ dev_priv->enable_hotplug_processing = true; - } - - intel_opregion_init(dev); diff --git a/libre/linux-libre/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch b/libre/linux-libre/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch deleted file mode 100644 index 8dc354488..000000000 --- a/libre/linux-libre/drm-i915-reorder-setup-sequence-to-have-irqs-for-output-setup.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 52d7ecedac3f96fb562cb482c139015372728638 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter <daniel.vetter@ffwll.ch> -Date: Sat, 1 Dec 2012 21:03:22 +0100 -Subject: drm/i915: reorder setup sequence to have irqs for output setup - -From: Daniel Vetter <daniel.vetter@ffwll.ch> - -commit 52d7ecedac3f96fb562cb482c139015372728638 upstream. - -Otherwise the new&shiny irq-driven gmbus and dp aux code won't work that -well. Noticed since the dp aux code doesn't have an automatic fallback -with a timeout (since the hw provides for that already). - -v2: Simple move drm_irq_install before intel_modeset_gem_init, as -suggested by Ben Widawsky. - -v3: Now that interrupts are enabled before all connectors are fully -set up, we might fall over serving a HPD interrupt while things are -still being set up. Instead of jumping through massive hoops and -complicating the code with a separate hpd irq enable step, simply -block out the hotplug work item from doing anything until things are -in place. - -v4: Actually, we can enable hotplug processing only after the fbdev is -fully set up, since we call down into the fbdev from the hotplug work -functions. So stick the hpd enabling right next to the poll helper -initialization. - -v5: We need to enable irqs before intel_modeset_init, since that -function sets up the outputs. - -v6: Fixup cleanup sequence, too. - -Reviewed-by: Imre Deak <imre.deak@intel.com> -Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - drivers/gpu/drm/i915/i915_dma.c | 23 ++++++++++++++--------- - drivers/gpu/drm/i915/i915_drv.h | 1 + - drivers/gpu/drm/i915/i915_irq.c | 4 ++++ - 3 files changed, 19 insertions(+), 9 deletions(-) - ---- a/drivers/gpu/drm/i915/i915_dma.c -+++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -1297,19 +1297,21 @@ static int i915_load_modeset_init(struct - if (ret) - goto cleanup_vga_switcheroo; - -+ ret = drm_irq_install(dev); -+ if (ret) -+ goto cleanup_gem_stolen; -+ -+ /* Important: The output setup functions called by modeset_init need -+ * working irqs for e.g. gmbus and dp aux transfers. */ - intel_modeset_init(dev); - - ret = i915_gem_init(dev); - if (ret) -- goto cleanup_gem_stolen; -- -- intel_modeset_gem_init(dev); -+ goto cleanup_irq; - - INIT_WORK(&dev_priv->console_resume_work, intel_console_resume); - -- ret = drm_irq_install(dev); -- if (ret) -- goto cleanup_gem; -+ intel_modeset_gem_init(dev); - - /* Always safe in the mode setting case. */ - /* FIXME: do pre/post-mode set stuff in core KMS code */ -@@ -1317,7 +1319,10 @@ static int i915_load_modeset_init(struct - - ret = intel_fbdev_init(dev); - if (ret) -- goto cleanup_irq; -+ goto cleanup_gem; -+ -+ /* Only enable hotplug handling once the fbdev is fully set up. */ -+ dev_priv->enable_hotplug_processing = true; - - drm_kms_helper_poll_init(dev); - -@@ -1326,13 +1331,13 @@ static int i915_load_modeset_init(struct - - return 0; - --cleanup_irq: -- drm_irq_uninstall(dev); - cleanup_gem: - mutex_lock(&dev->struct_mutex); - i915_gem_cleanup_ringbuffer(dev); - mutex_unlock(&dev->struct_mutex); - i915_gem_cleanup_aliasing_ppgtt(dev); -+cleanup_irq: -+ drm_irq_uninstall(dev); - cleanup_gem_stolen: - i915_gem_cleanup_stolen(dev); - cleanup_vga_switcheroo: ---- a/drivers/gpu/drm/i915/i915_drv.h -+++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -672,6 +672,7 @@ typedef struct drm_i915_private { - - u32 hotplug_supported_mask; - struct work_struct hotplug_work; -+ bool enable_hotplug_processing; - - int num_pipe; - int num_pch_pll; ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -287,6 +287,10 @@ static void i915_hotplug_work_func(struc - struct drm_mode_config *mode_config = &dev->mode_config; - struct intel_encoder *encoder; - -+ /* HPD irq before everything is fully set up. */ -+ if (!dev_priv->enable_hotplug_processing) -+ return; -+ - mutex_lock(&mode_config->mutex); - DRM_DEBUG_KMS("running encoder hotplug functions\n"); - diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install index 24bb42986..6b7f58a8b 100644 --- a/libre/linux-libre/linux-libre.install +++ b/libre/linux-libre/linux-libre.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME= -KERNEL_VERSION=3.8.3-2-LIBRE +KERNEL_VERSION=3.8.4-1-LIBRE # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/libre/usermin/PKGBUILD b/libre/usermin/PKGBUILD new file mode 100644 index 000000000..7d594cdcd --- /dev/null +++ b/libre/usermin/PKGBUILD @@ -0,0 +1,134 @@ +# $Id$ +# Maintainer: Tobias Powalowski <tpowa@archlinux.org> +pkgname=usermin +pkgver=1.540 +pkgrel=1.1 +pkgdesc="a web interface that can be used to easily perform tasks like reading mail, setting up SSH or configuring mail forwarding (Parabola rebranded)" +arch=(i686 x86_64 mips64el) +license=('custom:usermin') +url="http://www.webmin.com/" +depends=('perl' 'webmin') +makedepends=('perl-net-ssleay') +backup=('etc/usermin/miniserv.conf' 'etc/usermin/miniserv.users' 'etc/usermin/config' 'etc/usermin/usermin.cats' \ +'etc/usermin/at/config' \ +'etc/usermin/man/config' \ +'etc/usermin/ssh/config' \ +'etc/usermin/chfn/config' \ +'etc/usermin/cron/config' \ +'etc/usermin/file/config' \ +'etc/usermin/plan/config' \ +'etc/usermin/proc/config' \ +'etc/usermin/spam/config' \ +'etc/usermin/htaccess/config' \ +'etc/usermin/cshrc/config' \ +'etc/usermin/gnupg/config' \ +'etc/usermin/mysql/config' \ +'etc/usermin/quota/config' \ +'etc/usermin/shell/config' \ +'etc/usermin/theme/config' \ +'etc/usermin/mailbox/config' \ +'etc/usermin/schedule/config' \ +'etc/usermin/config' \ +'etc/usermin/commands/config' \ +'etc/usermin/htaccess-htpasswd/config' \ +'etc/usermin/forward/config' \ +'etc/usermin/telnet/config' \ +'etc/usermin/tunnel/config' \ +'etc/usermin/updown/config' \ +'etc/usermin/procmail/config' \ +'etc/usermin/fetchmail/config' \ +'etc/usermin/changepass/config' \ +'etc/usermin/language/config' \ +'etc/usermin/postgresql/config' \ +'etc/usermin/usermount/config' \ +) +install=usermin.install +source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz + usermin.rc + usermin.service + ftp://ftp.archlinux.org/other/usermin/usermin-config.tar.bz2) + +package() { + cd "$srcdir"/$pkgname-$pkgver + + # remove modules we do not support + + #remove config files from other distros + rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*') + + # remove caldera theme + rm -rf caldera + + # remove init-scripts from other distros + rm usermin-init + rm usermin-daemon + + # setting perl path + (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - + + # create dirs + mkdir -p "$pkgdir"/opt/usermin + mkdir -p "$pkgdir"/var/log/usermin + mkdir -p "$pkgdir"/etc/usermin + + # install pam stuff + install -D -m 644 usermin-pam "$pkgdir"/etc/pam.d/usermin + + # remove other distros and add only Parabola GNU/Linux-libre don't change next line else it will not work! + rm os_list.txt + echo 'Parabola GNU/Linux-libre Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt + + # copy stuff to right dirs + cd "$srcdir"/$pkgname-$pkgver + cp -rp * "$pkgdir"/opt/usermin + cd "$srcdir"/usermin-config + cp -rfp * "$pkgdir"/opt/usermin + + # define parameters for setup.sh + config_dir="$pkgdir"/etc/usermin + var_dir="$pkgdir"/var/log/usermin + perl=/usr/bin/perl + autoos=1 + port=20000 + login=root + crypt="XXX" + ssl=1 + atboot=0 + nostart=1 + nochown=1 + autothird=1 + nouninstall=1 + noperlpath=1 + atbootyn=n + tempdir="$pkgdir"/tmp + export config_dir var_dir perl autoos port tempdir ssl nochown autothird nouninstall nostart noperlpath atbootyn login crypt + + # Fix setup.sh + sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/usermin/setup.sh + "$pkgdir"/opt/usermin/setup.sh + + # Fixup the config files to use their real locations + sed -i 's:^pidfile=.*$:pidfile=/var/run/usermin.pid:' "$pkgdir"/etc/usermin/miniserv.conf + find "$pkgdir"/etc/usermin -type f -exec sed -i "s:$pkgdir::g" {} \; + + # make it only accessible by localhost + echo 'allow=127.0.0.1' >> "$pkgdir"/etc/usermin/miniserv.conf + + # enable user and password login + sed -i -e '/localauth/d' "$pkgdir"/etc/usermin/miniserv.conf + + #install systemd service file + install -D -m 644 "$srcdir"/usermin.service "$pkgdir"/usr/lib/systemd/system/usermin.service + + #install rc file + install -D -m 755 "$srcdir"/usermin.rc "$pkgdir"/etc/rc.d/usermin + + # delete temp dir + rm -r "$pkgdir"/tmp + #install license + install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/usermin/LICENCE +} +md5sums=('d29c9fdebab14c168c33bde8906efe21' + 'cfef4490cd1ef9517c0b39a7bd75c968' + 'a5bd5e5ee779f8a3cf3d776ca77ee36e' + 'ec37a79f948f778224550930d2a7ca07') diff --git a/libre/usermin/usermin.install b/libre/usermin/usermin.install new file mode 100644 index 000000000..3ace10ea2 --- /dev/null +++ b/libre/usermin/usermin.install @@ -0,0 +1,34 @@ +# arg 1: the new package version +post_install() { + local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :) + crypt=${crypt//\\/\\\\} + crypt=${crypt//\//\\\/} + sed -i "s/root:XXX/root:${crypt}/" /etc/usermin/miniserv.users +cat << EOF +Note: +==> It is not allowed to install 3rd party modules, or delete existing modules. +==> Please write your own PKGBUILDS for 3rd party modules and additional themes. +Setup: +==> To make usermin start at boot time, add usermin to rc.conf daemons +==> Point your web browser to http://localhost:20000 to use usermin. +==> To change the modules setup please use webmin. + +==> The access is restricted to localhost, if you want to connect from other locations +==> change /etc/usermin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip> +==> If you want to have ssl encryption please install 'perl-net-ssleay' additional. +EOF +# fix man module + cd /opt/usermin/man + gzip -df $(find . -name '*.gz') +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +pre_remove() { + # uninstall unzipped files + rm -r /opt/usermin/man +} diff --git a/libre/usermin/usermin.rc b/libre/usermin/usermin.rc new file mode 100644 index 000000000..af365780a --- /dev/null +++ b/libre/usermin/usermin.rc @@ -0,0 +1,44 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +start=/etc/usermin/start +stop=/etc/usermin/stop +lockfile=/var/lock/usermin + +case "$1" in +'start') + stat_busy "Starting Usermin daemon" + $start >/dev/null 2>&1 </dev/null + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + touch $lockfile >/dev/null 2>&1 + stat_done + else + stat_fail +fi +;; + +'stop') + stat_busy "Stopping Usermin daemon" + $stop >/dev/null 2>&1 </dev/null + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + rm -f $lockfile + stat_done + else + stat_fail +fi +;; + +'restart') + $stop && $start + RETVAL=$? +;; +*) +echo "Usage: $0 { start | stop | restart }" +RETVAL=1 +;; +esac +exit $RETVAL
\ No newline at end of file diff --git a/libre/usermin/usermin.service b/libre/usermin/usermin.service new file mode 100644 index 000000000..e91164c63 --- /dev/null +++ b/libre/usermin/usermin.service @@ -0,0 +1,9 @@ +[Unit] +Description=Usermin + +[Service] +Type=forking +ExecStart=/opt/usermin/miniserv.pl /etc/usermin/miniserv.conf + +[Install] +WantedBy=multi-user.target diff --git a/libre/webmin/PKGBUILD b/libre/webmin/PKGBUILD new file mode 100644 index 000000000..094f14b34 --- /dev/null +++ b/libre/webmin/PKGBUILD @@ -0,0 +1,221 @@ +# $Id$ +# Maintainer: Tobias Powalowski <tpowa@archlinux.org> +pkgname=webmin +pkgver=1.620 +pkgrel=1.1 +pkgdesc="a web-based interface for system administration, Parabola rebranded" +arch=(i686 x86_64 mips64el) +license=('custom:webmin') +url="http://www.webmin.com/" +depends=('perl' 'perl-perl4-corelibs') +makedepends=('perl-net-ssleay') +backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' 'etc/webmin/webmin.cats' \ +'etc/webmin/pacman/config' \ +'etc/webmin/at/config' \ +'etc/webmin/acl/config' \ +'etc/webmin/lvm/config' \ +'etc/webmin/net/config' \ +'etc/webmin/nis/config' \ +'etc/webmin/pam/config' \ +'etc/webmin/cron/config' \ +'etc/webmin/file/config' \ +'etc/webmin/grub/config' \ +'etc/webmin/init/config' \ +'etc/webmin/ipfw/config' \ +'etc/webmin/lilo/config' \ +'etc/webmin/proc/config' \ +'etc/webmin/raid/config' \ +'etc/webmin/spam/config' \ +'etc/webmin/sshd/config' \ +'etc/webmin/time/config' \ +'etc/webmin/cluster-passwd/config' \ +'etc/webmin/software/config' \ +'etc/webmin/webminlog/config' \ +'etc/webmin/cluster-webmin/config' \ +'etc/webmin/bind8/config' \ +'etc/webmin/dhcpd/config' \ +'etc/webmin/fdisk/config' \ +'etc/webmin/mount/config' \ +'etc/webmin/mysql/config' \ +'etc/webmin/quota/config' \ +'etc/webmin/samba/config' \ +'etc/webmin/shell/config' \ +'etc/webmin/squid/config' \ +'etc/webmin/adsl-client/config' \ +'etc/webmin/servers/config' \ +'etc/webmin/cluster-shell/config' \ +'etc/webmin/bandwidth/config' \ +'etc/webmin/ppp-client/config' \ +'etc/webmin/lpadmin/config' \ +'etc/webmin/apache/config' \ +'etc/webmin/firewall/config' \ +'etc/webmin/stunnel/config' \ +'etc/webmin/burner/config' \ +'etc/webmin/exports/config' \ +'etc/webmin/backup-config/config' \ +'etc/webmin/custom/config' \ +'etc/webmin/htaccess-htpasswd/config' \ +'etc/webmin/logrotate/config' \ +'etc/webmin/format/config' \ +'etc/webmin/fsdump/config' \ +'etc/webmin/passwd/config' \ +'etc/webmin/cluster-useradmin/config' \ +'etc/webmin/cluster-software/config' \ +'etc/webmin/cluster-copy/config' \ +'etc/webmin/cluster-cron/config' \ +'etc/webmin/telnet/config' \ +'etc/webmin/status/config' \ +'etc/webmin/syslog/config' \ +'etc/webmin/updown/config' \ +'etc/webmin/usermin/config' \ +'etc/webmin/webmin/config' \ +'etc/webmin/xinetd/config' \ +'etc/webmin/openslp/config' \ +'etc/webmin/procmail/config' \ +'etc/webmin/fetchmail/config' \ +'etc/webmin/postgresql/config' \ +'etc/webmin/useradmin/config' \ +'etc/webmin/mailboxes/config' \ +'etc/webmin/inittab/config' \ +'etc/webmin/change-user/config' \ +'etc/webmin/postfix/config' \ +'etc/webmin/proftpd/config' \ +'etc/webmin/pserver/config' \ +'etc/webmin/dnsadmin/config' ) +install=webmin.install +source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz + ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2 + ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2 + webmin.rc + webmin.service) +options=(!strip) + +package() { + # NOTE: USE --asroot build option to avoid fakeroot error! + cd "$srcdir"/$pkgname-$pkgver + # add patches from webmin.com + #for i in ../*.wbm + #do tar xvf $i + #done + #for i in ../*.wbt + #do tar xvf $i + #done + # delete stuff that's not needed + rm -f mount/freebsd-mounts* + rm -f mount/openbsd-mounts* + rm -f mount/macos-mounts* + + # remove modules we do not support + rm -rf {bacula-backup,ldap-useradmin,mon,sentry,frox,jabber,majordomo,qmail,sendmail,sarg,wuftpd,webalizer,inetd,ipsec,pap,pptp-client,pptp-server,shorewall,smart-status,vgetty,heartbeat,cfengine,cpan,sgiexports,hpuxexports,qmailadmin,bsdexports,dfsadmin} + + #remove config files from other distros + rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*') + + # remove caldera theme + rm -rf caldera + + # remove init-scripts from other distros + rm webmin-gentoo-init + rm webmin-init + rm webmin-caldera-init + rm webmin-daemon + + # remove update stuff to avoid problems with updating webmin,modules and themes without pacman + rm -f webmin/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi} + rm -f usermin/{upgrade.cgi,update.cgi,update.pl,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi} + + # remove modules add because we don't want files installed without pacman control + rm -f webmin/{install_mod.cgi,delete_mod.cgi} + + # setting perl path + (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - + + # create dirs + mkdir -p "$pkgdir"/opt/webmin + mkdir -p "$pkgdir"/var/log/webmin + mkdir -p "$pkgdir"/etc/webmin + + # install pam stuff + install -D -m 644 webmin-pam "$pkgdir"/etc/pam.d/webmin + + # remove other distros and add only Parabola GNU/Linux-libre don't change next line else it will not work! + rm os_list.txt + echo 'Parabola GNU/linux-libre Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt + + # Add rc.conf support to boot and shutdown menu and lock editing of this module + cd init/ + sed -i -e 's:^local_down=.*:local_down=Parabola GNU/Linux-libre RC.CONF,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*') + sed -i -e 's:^local_script=.*:local_script=Parabola GNU/Linux-libre RC.LOCAL,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*') + sed -i -e 's:^index_downscript=.*:index_downscript=Parabola GNU/Linux-libre RC.CONF:g' lang/* + sed -i -e 's:^index_script=.*:index_script=Parabola GNU/Linux-libre RC.LOCAL:g' lang/* + sed -i -e 's:^noconfig=0:noconfig=1:g' defaultacl + + # Add pacman menu + cd "$srcdir"/$pkgname-$pkgver + cp -rf custom/ pacman + cp -rf mscstyle3/custom mscstyle3/pacman + sed -i -e 's:^noconfig=0:noconfig=1:g' -e 's:^edit=1:edit=0:g' pacman/defaultacl + sed -i -e '/desc/d' -e '/longdesc/d' pacman/module.info + sed -i -e 's:^name=Custom:name=Pacman:g' pacman/module.info + echo 'category=system' >> pacman/module.info + echo 'desc=Pacman' >> pacman/module.info + sed -i -e 's:^index_title=.*:index_title=Pacman:g' pacman/lang/* + + # copy stuff to right dirs + cd "$srcdir"/$pkgname-$pkgver + cp -rp * "$pkgdir"/opt/webmin + cd "$srcdir"/webmin-config + cp -rfp * "$pkgdir"/opt/webmin + + # define parameters for setup.sh + config_dir="$pkgdir"/etc/webmin + var_dir="$pkgdir"/var/log/webmin + perl=/usr/bin/perl + autoos=1 + port=10000 + login=root + crypt="XXX" + ssl=1 + atboot=0 + nostart=1 + nochown=1 + autothird=1 + nouninstall=1 + noperlpath=1 + atbootyn=n + tempdir="$pkgdir"/tmp + export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn + + # Fix setup.sh + sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/webmin/setup.sh + "$pkgdir"/opt/webmin/setup.sh + + # Fixup the config files to use their real locations + sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' "$pkgdir"/etc/webmin/miniserv.conf + find "$pkgdir"/etc/webmin -type f -exec sed -i "s:$pkgdir::g" {} \; + + # make it only accessible by localhost + echo 'allow=127.0.0.1' >> "$pkgdir"/etc/webmin/miniserv.conf + + # install pacman menu + cd "$srcdir"/webmin-pacman/config + cp -rfp * "$pkgdir"/etc/webmin/pacman + + #install rc file + install -D -m 755 "$srcdir"/webmin.rc "$pkgdir"/etc/rc.d/webmin + + # install systemd files + install -D -m 644 $srcdir/webmin.service $pkgdir/usr/lib/systemd/system/webmin.service + + # delete temp dir + rm -r "$pkgdir"/tmp + # change sticky bit + chmod 0644 $pkgdir/opt/webmin/man/config-generic-linux + # install license + install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE +} +md5sums=('e93bc5057a5b7d7e31ecb2bb228d7044' + 'b0b3e3fb231a12e60165b6b4d604dcfa' + 'bfebb75bb94029b48c46b7f1ba1aa811' + 'c77dfcd621b417a7826d25f56a1e60ae' + 'fc29ecb6a5cd8c278abe054e60381095') diff --git a/libre/webmin/webmin.install b/libre/webmin/webmin.install new file mode 100644 index 000000000..efdd9291d --- /dev/null +++ b/libre/webmin/webmin.install @@ -0,0 +1,35 @@ +# arg 1: the new package version +post_install() { + local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :) + crypt=${crypt//\\/\\\\} + crypt=${crypt//\//\\\/} + sed -i "s/root:XXX/root:${crypt}/" /etc/webmin/miniserv.users + +cat << EOF +Note: +==> It is not allowed to install 3rd party modules, or delete existing modules. +==> Please write your own PKGBUILDS for 3rd party modules and additional themes. +Setup: +==> To make webmin start at boot time, add webmin to rc.conf daemons +==> Point your web browser to http://localhost:10000 to use webmin. +==> The access is restricted to localhost, if you want to connect from other locations +==> change /etc/webmin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip> +==> If you want to have ssl encryption please install 'perl-net-ssleay' additional. +EOF +# fix man module + cd /opt/webmin/man + for i in $(find . -name '*.gz'); do + gzip -df $i + done +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +pre_remove() { + # uninstall unzipped files + rm -r /opt/webmin/man +} diff --git a/libre/webmin/webmin.rc b/libre/webmin/webmin.rc new file mode 100644 index 000000000..6aac8941d --- /dev/null +++ b/libre/webmin/webmin.rc @@ -0,0 +1,46 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +start=/etc/webmin/start +stop=/etc/webmin/stop +lockfile=/var/lock/webmin + +case "$1" in +'start') + stat_busy "Starting Webmin daemon" + $start >/dev/null 2>&1 </dev/null + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + touch $lockfile >/dev/null 2>&1 + add_daemon webmin + stat_done + else + stat_fail +fi +;; + +'stop') + stat_busy "Stopping Webmin daemon" + $stop >/dev/null 2>&1 </dev/null + RETVAL=$? + if [ "$RETVAL" = "0" ]; then + rm -f $lockfile + rm_daemon webmin + stat_done + else + stat_fail +fi +;; + +'restart') + $0 stop + $0 start +;; +*) +echo "Usage: $0 { start | stop | restart }" +RETVAL=1 +;; +esac +exit $RETVAL
\ No newline at end of file diff --git a/libre/webmin/webmin.service b/libre/webmin/webmin.service new file mode 100644 index 000000000..a8a384a8c --- /dev/null +++ b/libre/webmin/webmin.service @@ -0,0 +1,11 @@ +[Unit] +Description=Webmin + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/etc/webmin/start +ExecStop=/etc/webmin/stop + +[Install] +WantedBy=multi-user.target diff --git a/libre/xsp/PKGBUILD b/libre/xsp/PKGBUILD new file mode 100644 index 000000000..43b44ed69 --- /dev/null +++ b/libre/xsp/PKGBUILD @@ -0,0 +1,64 @@ +# $Id$ +# Maintainer: Daniel Isenmann <daniel@archlinux.org> +# Contributor: Tobias Kieslich <tobias@justdreams.de> + +pkgname=xsp +pkgver=2.10.2 +pkgrel=4.1 +pkgdesc="A simple webserver based on mono - provides ASP.NET support, Parabola rebranded" +arch=(i686 x86_64 mips64el) +license=('custom') +url="http://www.go-mono.com" +depends=('mono>=2.10.2' 'sqlite') +options=(!makeflags) +install=${pkgname}.install +source=(http://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2 + ${pkgname}.rc.d ${pkgname}.conf.d ${pkgname}.webapp ${pkgname}.service) + +build() { + # get rid of that .wapi errors; thanks to brice + export MONO_SHARED_DIR=${srcdir}/src/weird + mkdir -p "${MONO_SHARED_DIR}" + # import pathes + # build + cd ${srcdir}/${pkgname}-${pkgver} + #sed -i 's|/bin/sh|\0\nexport MONO_PATH=${MONO_PATH}:/opt/mono/lib/mono/1.0|' scripts/script.in + ./configure --prefix=/usr --sysconfdir=/etc + make || return 1 + # tweak the xsp shellscript to grab system dll's + for script in scripts/*2; do + sed -i 's|/usr/lib/mono/1.0|/usr/lib/mono/2.0|' $script + done + #destdir related bugfixes + sed -i 's|mkdir \$(datadir)|mkdir $(DESTDIR)$(datadir)|' test/2.0/treeview/Makefile + sed -i 's|gif \$(datadir)|gif $(DESTDIR)$(datadir)|' test/2.0/treeview/Makefile +} + +package(){ + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir}/ install + # move test files from share to arch' default html home + mkdir -p ${pkgdir}/srv/http/html + mv ${pkgdir}/usr/lib/xsp/test ${pkgdir}/srv/http/html/xsp + rm -rf ${pkgdir}/usr/share + chown -R http:http ${pkgdir}/srv/http/html/${pkgname} + + # install a deamon + install -D -m755 ${srcdir}/${pkgname}.rc.d \ + ${pkgdir}/etc/rc.d/${pkgname} + # install a deamon configurationfile + install -D -m644 ${srcdir}/$pkgname.conf.d \ + ${pkgdir}/etc/conf.d/${pkgname} + # install a xsp configuration home + install -D -m644 ${srcdir}/${pkgname}.webapp \ + ${pkgdir}/etc/${pkgname}/${pkgname}.webapp + install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING + # install systemd service file + install -D -m644 ${srcdir}/${pkgname}.service \ + ${pkgdir}/usr/lib/systemd/system/xsp.service +} +md5sums=('4fe62fc95ad5dc136d8a7f3299d523b6' + '9575bd7d6f64d51ba05bdd6370665858' + '35d921df0fefc30f47a438c95d420efc' + 'c917c07f68b945691506c29750db482f' + '9d83bd36d209f8d36a11dfbc4fa50819') diff --git a/libre/xsp/xsp.conf.d b/libre/xsp/xsp.conf.d new file mode 100644 index 000000000..b100baef1 --- /dev/null +++ b/libre/xsp/xsp.conf.d @@ -0,0 +1,10 @@ +# xsp options + + +# note that is just the helping app for mod_mono if you like production like +# quality +# xsp is for ASP testing mainly -- read the manpage for xsp to know what +# options are available. Parabola will provide xsp configured by a .webapp +# configuration file which rests in /etc/xsp + +XSP_PARAMS="--appconfigdir /etc/xsp" diff --git a/libre/xsp/xsp.install b/libre/xsp/xsp.install new file mode 100644 index 000000000..d2cc5955a --- /dev/null +++ b/libre/xsp/xsp.install @@ -0,0 +1,37 @@ +# arg 1: the new package version +post_install() { + cat << EOM + +--> xsp is just the helping app for mod_mono if you like a production like +--> server. xsp itself is for ASP testing mainly -- read the manpage for xsp +--> to know which options are available. +--> Parabola will provide xsp configured by a .webapp configuration file +--> which rests in /etc/xsp. Just put your other webapp files there to let +--> xsp pick them up. +--> xsp is commandline based configuration is done in /etc/conf.d/xsp. Set all +--> your arguments there. Don't forget that you can run xsp from the console +--> as oridinary user, which is safer and for testing absolutely sufficient!! + +--> You can run the testpages simply by starting the server and calling + http://localhost:8080 +--> from your browser's location bar + + +EOM +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +# arg 1: the old package version +pre_remove() { + /bin/true +} + +# arg 1: the old package version +post_remove() { + /bin/true +} diff --git a/libre/xsp/xsp.rc.d b/libre/xsp/xsp.rc.d new file mode 100644 index 000000000..b4fcda15c --- /dev/null +++ b/libre/xsp/xsp.rc.d @@ -0,0 +1,40 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +# source application-specific settings +[ -f /etc/conf.d/xsp ] && . /etc/conf.d/xsp + +PID=`pidof -o %PPID /usr/bin/mono` +case "$1" in + start) + stat_busy "Starting Xsp Daemon" + if [ -z "$PID" ]; then + /usr/bin/xsp $XSP_PARAMS --nonstop &> /dev/null & + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + add_daemon xsp + stat_done + fi + ;; + stop) + stat_busy "Stopping Xsp Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon xsp + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/libre/xsp/xsp.service b/libre/xsp/xsp.service new file mode 100644 index 000000000..36b802e21 --- /dev/null +++ b/libre/xsp/xsp.service @@ -0,0 +1,8 @@ +[Unit] +Description=XSP Web Server + +[Service] +ExecStart=/usr/bin/xsp --appconfigdir /etc/xsp --nonstop + +[Install] +WantedBy=multi-user.target diff --git a/libre/xsp/xsp.webapp b/libre/xsp/xsp.webapp new file mode 100644 index 000000000..a685dd171 --- /dev/null +++ b/libre/xsp/xsp.webapp @@ -0,0 +1,8 @@ +<apps> + <web-application> + <name>Root</name> + <vpath>/</vpath> + <path>/srv/http/html/xsp</path> + <vhost>localhost</vhost> + </web-application> +</apps> |