summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-04-09 00:01:09 +0000
committerroot <root@rshg054.dnsready.net>2012-04-09 00:01:09 +0000
commit4de1f7cfdca3531b7324f72b2f109384b2a3a856 (patch)
tree7fe243e8ad2bfcbaa4027aca963474964800c387 /testing
parent5eb91336815b8ce54fbdb828555166b348738c49 (diff)
Mon Apr 9 00:01:09 UTC 2012
Diffstat (limited to 'testing')
-rw-r--r--testing/cairo/PKGBUILD12
-rw-r--r--testing/cairo/git_fixes.patch574
-rw-r--r--testing/python/PKGBUILD91
-rw-r--r--testing/python/distutils-egg-utf8.patch43
-rw-r--r--testing/python/gdbm-magic-values.patch13
-rw-r--r--testing/python/pycache-bytecompilation.patch146
-rw-r--r--testing/subversion/PKGBUILD80
-rw-r--r--testing/subversion/subversion.rpath.fix.patch10
-rw-r--r--testing/subversion/svn11
-rwxr-xr-xtesting/subversion/svnserve42
-rw-r--r--testing/subversion/svnserve.conf7
11 files changed, 1025 insertions, 4 deletions
diff --git a/testing/cairo/PKGBUILD b/testing/cairo/PKGBUILD
index 2346fdfac..4e49a4a9e 100644
--- a/testing/cairo/PKGBUILD
+++ b/testing/cairo/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 155307 2012-04-01 15:13:03Z andyrtr $
+# $Id: PKGBUILD 155823 2012-04-07 06:26:52Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Brice Carpentier <brice@daknet.org>
pkgname=cairo
pkgver=1.12.0
-pkgrel=2
+pkgrel=3
pkgdesc="Cairo vector graphics library"
arch=(i686 x86_64)
license=('LGPL' 'MPL')
@@ -16,13 +16,17 @@ provides=('cairo-xcb')
replaces=('cairo-xcb')
options=('!libtool')
source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.gz
- cairo-1.10.0-buggy_gradients.patch)
+ cairo-1.10.0-buggy_gradients.patch
+ git_fixes.patch )
md5sums=('e6c85575ba7094f88b637bdfd835a751'
- '9b323790dab003e228c6955633cb888e')
+ '9b323790dab003e228c6955633cb888e'
+ '31aff4a4d8943ed81dce398f6421487d')
build() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np1 -i "${srcdir}/cairo-1.10.0-buggy_gradients.patch"
+ # status is 2012-04-07 last commit: fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
+ patch -Np1 -i ${srcdir}/git_fixes.patch
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
diff --git a/testing/cairo/git_fixes.patch b/testing/cairo/git_fixes.patch
new file mode 100644
index 000000000..84ee0ba17
--- /dev/null
+++ b/testing/cairo/git_fixes.patch
@@ -0,0 +1,574 @@
+From ede11b2954db19e3ca9d31cef7d04a7bf0e42ddc Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Sun, 25 Mar 2012 18:37:14 +0000
+Subject: Fix math in comments
+
+---
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index dc07fee..6977e88 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -139,7 +139,7 @@ _arc_segments_needed (double angle,
+
+ From that paper, a very practical value of h is:
+
+- h = 4/3 * tan(angle/4)
++ h = 4/3 * R * tan(angle/4)
+
+ This value does not give the spline with minimal error, but it does
+ provide a very good approximation, (6th-order convergence), and the
+--
+cgit v0.9.0.2-2-gbebe
+From fba21ef2a4c4eb343668267fda713aedbb6af2a4 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Tue, 27 Mar 2012 21:25:37 +0000
+Subject: gl: use font's antialias option to check whether it needs mask
+
+There is need to loop over number of glyphs to check wether the glyph
+image is a ARGB32 as the font's antialias option can be used for checking.
+If antialias is SUBPIXEL or BEST, the glyph surface will be ARGB32,
+otherwise it will be A8 format. Therefore we will only be using
+component-alpha at SUBPIXEL (or better) font quality and only then need
+a mask for multiple pass glyph composition.
+---
+diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
+index 832956f..9756ea4 100644
+--- a/src/cairo-gl-glyphs.c
++++ b/src/cairo-gl-glyphs.c
+@@ -427,23 +427,15 @@ _cairo_gl_composite_glyphs (void *_dst,
+
+ TRACE ((stderr, "%s\n", __FUNCTION__));
+
+- /* If any of the glyphs are component alpha, we have to go through a mask,
+- * since only _cairo_gl_surface_composite() currently supports component
+- * alpha.
++ /* If any of the glyphs require component alpha, we have to go through
++ * a mask, since only _cairo_gl_surface_composite() currently supports
++ * component alpha.
+ */
+- if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER) {
+- for (i = 0; i < info->num_glyphs; i++) {
+- cairo_scaled_glyph_t *scaled_glyph;
+-
+- if (_cairo_scaled_glyph_lookup (info->font, info->glyphs[i].index,
+- CAIRO_SCALED_GLYPH_INFO_SURFACE,
+- &scaled_glyph) == CAIRO_INT_STATUS_SUCCESS &&
+- scaled_glyph->surface->format == CAIRO_FORMAT_ARGB32)
+- {
+- info->use_mask = TRUE;
+- break;
+- }
+- }
++ if (!dst->base.is_clear && ! info->use_mask && op != CAIRO_OPERATOR_OVER &&
++ (info->font->options.antialias == CAIRO_ANTIALIAS_SUBPIXEL ||
++ info->font->options.antialias == CAIRO_ANTIALIAS_BEST))
++ {
++ info->use_mask = TRUE;
+ }
+
+ if (info->use_mask) {
+--
+cgit v0.9.0.2-2-gbebe
+From d304f0e57be8036719c3709e2419487326369105 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 28 Mar 2012 23:32:36 +0000
+Subject: composite-rectangles: Trim extents for SOURCE and CLEAR to the mask
+
+The SOURCE and CLEAR are the odd pair in Cairo's range of operators that
+are bound by the shape/mask, but are unbound by the source. This
+regularly leads to bugs as only track the bound/unbound rectangles and
+confuse the meaning when bound only by the mask.
+
+What is required is that the unbound extents in this case is only
+trimmed by the mask (the bounded extents are still the intersection of
+all).
+
+Fixes bug-source-cu
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
+index 106571e..8c5cd5a 100644
+--- a/src/cairo-composite-rectangles.c
++++ b/src/cairo-composite-rectangles.c
+@@ -147,8 +147,12 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents,
+ if (! ret && extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK)
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+ if (_cairo_clip_is_all_clipped (extents->clip))
+@@ -199,8 +203,12 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles
+ rect.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+@@ -253,8 +261,12 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t
+ mask.height == extents->bounded.height)
+ return CAIRO_INT_STATUS_SUCCESS;
+
+- if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE))
++ if (extents->is_bounded == (CAIRO_OPERATOR_BOUND_BY_MASK | CAIRO_OPERATOR_BOUND_BY_SOURCE)) {
+ extents->unbounded = extents->bounded;
++ } else if (extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) {
++ if (!_cairo_rectangle_intersect (&extents->unbounded, &extents->mask))
++ return CAIRO_INT_STATUS_NOTHING_TO_DO;
++ }
+
+ clip = extents->clip;
+ extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
+--
+cgit v0.9.0.2-2-gbebe
+From af6e084dd78fcbb8ecce46c57f655f5e24343b8c Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 29 Mar 2012 13:48:24 +0000
+Subject: cairoint: Mark PDF surface as requiring the deflate stream output
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairoint.h b/src/cairoint.h
+index 9a8003e..9f20d51 100644
+--- a/src/cairoint.h
++++ b/src/cairoint.h
+@@ -73,7 +73,10 @@
+ #include "cairo-compiler-private.h"
+ #include "cairo-error-private.h"
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_SCRIPT_SURFACE || CAIRO_HAS_XML_SURFACE
++#if CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_SCRIPT_SURFACE || \
++ CAIRO_HAS_XML_SURFACE
+ #define CAIRO_HAS_DEFLATE_STREAM 1
+ #endif
+
+@@ -84,7 +87,9 @@
+ #define CAIRO_HAS_FONT_SUBSET 1
+ #endif
+
+-#if CAIRO_HAS_PS_SURFACE || CAIRO_HAS_PDF_SURFACE || CAIRO_HAS_FONT_SUBSET
++#if CAIRO_HAS_PS_SURFACE || \
++ CAIRO_HAS_PDF_SURFACE || \
++ CAIRO_HAS_FONT_SUBSET
+ #define CAIRO_HAS_PDF_OPERATORS 1
+ #endif
+
+--
+cgit v0.9.0.2-2-gbebe
+From a965b0f95fdeb567f7ccb51f7c8c47735a61e2d9 Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Thu, 29 Mar 2012 01:08:51 +0000
+Subject: gl: fix y-axis origin when map_to_image() for non texture GL surface
+
+We need to fix y-axis origin when map a GL surface to image surface for
+non-texture GL surface.
+
+Test cases: extended-blend-alpha-mask, extended-blend-mask.
+Although the image outputs is not right, but the image on the first grid
+(upper-left corner) is correct comparing to image output.
+---
+diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
+index 8bbf939..32ecf63 100644
+--- a/src/cairo-gl-surface.c
++++ b/src/cairo-gl-surface.c
+@@ -985,6 +985,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ unsigned int cpp;
+ cairo_bool_t invert;
+ cairo_status_t status;
++ int y;
+
+ /* Want to use a switch statement here but the compiler gets whiny. */
+ if (surface->base.content == CAIRO_CONTENT_COLOR_ALPHA) {
+@@ -1065,7 +1066,12 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
+ glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp);
+ if (invert)
+ glPixelStorei (GL_PACK_INVERT_MESA, 1);
+- glReadPixels (extents->x, extents->y,
++
++ y = extents->y;
++ if (! _cairo_gl_surface_is_texture (surface))
++ y = surface->height - extents->y - extents->height;
++
++ glReadPixels (extents->x, y,
+ extents->width, extents->height,
+ format, type, image->data);
+ if (invert)
+--
+cgit v0.9.0.2-2-gbebe
+From c77112c5464d7ff21052527f82f4d729cc509291 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Mon, 02 Apr 2012 18:43:00 +0000
+Subject: xcb: Fix SHM in _get_image()
+
+Commit 2283ab9 introduced a logic error. Instead of falling back to the non-SHM
+path when getting the image via SHM failed, we now did the fallback when getting
+the image via SHM worked (which means that the SHM operation was a waste of
+time).
+
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
+index fff4f52..6bedbda 100644
+--- a/src/cairo-xcb-surface.c
++++ b/src/cairo-xcb-surface.c
+@@ -367,7 +367,7 @@ _get_image (cairo_xcb_surface_t *surface,
+ if (use_shm) {
+ image = _get_shm_image (surface, x, y, width, height);
+ if (image) {
+- if (image->status) {
++ if (image->status == CAIRO_STATUS_SUCCESS) {
+ _cairo_xcb_connection_release (connection);
+ return image;
+ }
+--
+cgit v0.9.0.2-2-gbebe
+From cc247c346b75353f16ab40ac74c54cdd9663d16b Mon Sep 17 00:00:00 2001
+From: Henry (Yu) Song <hsong@sisa.samsung.com>
+Date: Mon, 02 Apr 2012 21:29:47 +0000
+Subject: gl: Remove an unused variable
+
+---
+diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
+index b364b92..ce7c0dd 100644
+--- a/src/cairo-gl-gradient.c
++++ b/src/cairo-gl-gradient.c
+@@ -207,7 +207,6 @@ _cairo_gl_gradient_create (cairo_gl_context_t *ctx,
+ cairo_status_t status;
+ int tex_width;
+ void *data;
+- cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
+
+ if ((unsigned int) ctx->max_texture_size / 2 <= n_stops)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+--
+cgit v0.9.0.2-2-gbebe
+From 7a262fd398c8a1f3c9052e8d9ec459e27ff91b4d Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Wed, 04 Apr 2012 10:23:09 +0000
+Subject: fix bug in _cairo_image_analyze_color
+
+---
+diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
+index 8208a15..e860e1b 100644
+--- a/src/cairo-image-surface.c
++++ b/src/cairo-image-surface.c
+@@ -1130,9 +1130,12 @@ _cairo_image_analyze_color (cairo_image_surface_t *image)
+ if (image->color != CAIRO_IMAGE_UNKNOWN_COLOR)
+ return image->color;
+
+- if (image->format == CAIRO_FORMAT_A1 || image->format == CAIRO_FORMAT_A8)
++ if (image->format == CAIRO_FORMAT_A1)
+ return image->color = CAIRO_IMAGE_IS_MONOCHROME;
+
++ if (image->format == CAIRO_FORMAT_A8)
++ return image->color = CAIRO_IMAGE_IS_GRAYSCALE;
++
+ if (image->format == CAIRO_FORMAT_ARGB32) {
+ image->color = CAIRO_IMAGE_IS_MONOCHROME;
+ for (y = 0; y < image->height; y++) {
+--
+cgit v0.9.0.2-2-gbebe
+From 70b2856ed3d31b41e69b3d82fb9c5c11c2b3d3d4 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:43:35 +0000
+Subject: type1-subset: use fallback font if glyph widths are calculated
+
+Bug 48349 has a pdf file with a Type 1 font where the glyph widths are
+of the form:
+
+34 9302 19 div hsbw
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index 607ac8e..ba1008a 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -751,6 +751,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ command = *p++;
+ switch (command) {
+ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+@@ -797,6 +800,9 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ break;
+
+ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
+ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+--
+cgit v0.9.0.2-2-gbebe
+From a6d955fcc46ae2da8d6f3b2cadeae64c03066461 Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 05 Apr 2012 23:53:50 +0000
+Subject: fix indentation in cairo_type1_font_subset_parse_charstring
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ba1008a..ddef8ae 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -1,3 +1,4 @@
++/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
+ /* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2006 Red Hat, Inc
+@@ -750,86 +751,79 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ if (*p < 32) {
+ command = *p++;
+ switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_HSBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
++ case TYPE1_CHARSTRING_COMMAND_HSBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
++ if (font->subset_subrs &&
++ last_op_was_integer &&
++ font->build_stack.top_value >= 0 &&
++ font->build_stack.top_value < font->num_subrs)
++ {
++ subr_num = font->build_stack.top_value;
++ font->subrs[subr_num].used = TRUE;
++ last_op_was_integer = FALSE;
++ status = cairo_type1_font_subset_parse_charstring (font,
++ glyph,
++ font->subrs[subr_num].subr_string,
++ font->subrs[subr_num].subr_length);
++ } else {
++ font->subset_subrs = FALSE;
++ }
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_ESCAPE:
++ command = command << 8 | *p++;
++ switch (command) {
++ case TYPE1_CHARSTRING_COMMAND_SEAC:
++ /* The seac command takes five integer arguments. The
++ * last two are glyph indices into the PS standard
++ * encoding give the names of the glyphs that this
++ * glyph is composed from. All we need to do is to
++ * make sure those glyphs are present in the subset
++ * under their standard names. */
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
++ if (unlikely (status))
++ return status;
++
++ status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
++ if (unlikely (status))
++ return status;
+
+- font->glyphs[glyph].width = font->build_stack.stack[1]/font->base.units_per_em;
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_CALLSUBR:
+- if (font->subset_subrs &&
+- last_op_was_integer &&
+- font->build_stack.top_value >= 0 &&
+- font->build_stack.top_value < font->num_subrs)
+- {
+- subr_num = font->build_stack.top_value;
+- font->subrs[subr_num].used = TRUE;
+- last_op_was_integer = FALSE;
+- status = cairo_type1_font_subset_parse_charstring (font,
+- glyph,
+- font->subrs[subr_num].subr_string,
+- font->subrs[subr_num].subr_length);
+- } else {
+- font->subset_subrs = FALSE;
+- }
++ case TYPE1_CHARSTRING_COMMAND_SBW:
++ if (! last_op_was_integer)
++ return CAIRO_INT_STATUS_UNSUPPORTED;
++
++ font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
+ break;
+
+- case TYPE1_CHARSTRING_COMMAND_ESCAPE:
+- command = command << 8 | *p++;
+- switch (command) {
+- case TYPE1_CHARSTRING_COMMAND_SEAC:
+- /* The seac command takes five integer arguments. The
+- * last two are glyph indices into the PS standard
+- * encoding give the names of the glyphs that this
+- * glyph is composed from. All we need to do is to
+- * make sure those glyphs are present in the subset
+- * under their standard names. */
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[3]);
+- if (unlikely (status))
+- return status;
+-
+- status = use_standard_encoding_glyph (font, font->build_stack.stack[4]);
+- if (unlikely (status))
+- return status;
+-
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_SBW:
+- if (! last_op_was_integer)
+- return CAIRO_INT_STATUS_UNSUPPORTED;
+-
+- font->glyphs[glyph].width = font->build_stack.stack[2]/font->base.units_per_em;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
+- for (i = 0; i < font->build_stack.sp; i++)
+- font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
+- font->ps_stack.num_other_subr_args = font->build_stack.sp;
+- font->ps_stack.cur_other_subr_arg = 0;
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
+-
+- case TYPE1_CHARSTRING_COMMAND_POP:
+- if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
+- font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
+- last_op_was_integer = TRUE;
+- } else {
+- font->subset_subrs = FALSE;
+- }
+- break;
+-
+- default:
+- font->build_stack.sp = 0;
+- last_op_was_integer = FALSE;
+- break;
++ case TYPE1_CHARSTRING_COMMAND_CALLOTHERSUBR:
++ for (i = 0; i < font->build_stack.sp; i++)
++ font->ps_stack.other_subr_args[i] = font->build_stack.stack[i];
++ font->ps_stack.num_other_subr_args = font->build_stack.sp;
++ font->ps_stack.cur_other_subr_arg = 0;
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
++
++ case TYPE1_CHARSTRING_COMMAND_POP:
++ if (font->ps_stack.num_other_subr_args > font->ps_stack.cur_other_subr_arg) {
++ font->build_stack.top_value = font->ps_stack.other_subr_args[font->ps_stack.cur_other_subr_arg++];
++ last_op_was_integer = TRUE;
++ } else {
++ font->subset_subrs = FALSE;
+ }
+ break;
+
+@@ -837,6 +831,13 @@ cairo_type1_font_subset_parse_charstring (cairo_type1_font_subset_t *font,
+ font->build_stack.sp = 0;
+ last_op_was_integer = FALSE;
+ break;
++ }
++ break;
++
++ default:
++ font->build_stack.sp = 0;
++ last_op_was_integer = FALSE;
++ break;
+ }
+ } else {
+ /* integer argument */
+--
+cgit v0.9.0.2-2-gbebe
+From 8886220b5027296f5b3b95e9c2f93509108d3b9e Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 00:13:53 +0000
+Subject: type1-subset: if font name is prefixed with a subset tag, strip it off
+
+---
+diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
+index ddef8ae..e507abe 100644
+--- a/src/cairo-type1-subset.c
++++ b/src/cairo-type1-subset.c
+@@ -381,6 +381,7 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ {
+ const char *start, *end, *segment_end;
+ char *s;
++ int i;
+
+ segment_end = font->header_segment + font->header_segment_size;
+ start = find_token (font->header_segment, segment_end, "/FontName");
+@@ -406,6 +407,16 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+ }
+
++ /* If font name is prefixed with a subset tag, strip it off. */
++ if (strlen(start) > 7 && start[6] == '+') {
++ for (i = 0; i < 6; i++) {
++ if (start[i] < 'A' || start[i] > 'Z')
++ break;
++ }
++ if (i == 6)
++ start += 7;
++ }
++
+ font->base.base_font = strdup (start);
+ free (s);
+ if (unlikely (font->base.base_font == NULL))
+--
+cgit v0.9.0.2-2-gbebe
+From 8657ca10e34b0034602680b4304d47ecf90ccbfd Mon Sep 17 00:00:00 2001
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Fri, 06 Apr 2012 11:50:40 +0000
+Subject: fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
+
+It had caused pdf bbox sizes to regress to page size bboxes.
+---
+diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
+index 27ba004..5b3e177 100644
+--- a/src/cairo-pattern.c
++++ b/src/cairo-pattern.c
+@@ -37,6 +37,7 @@
+ #include "cairo-path-private.h"
+ #include "cairo-pattern-private.h"
+ #include "cairo-recording-surface-private.h"
++#include "cairo-surface-snapshot-private.h"
+
+ #include <float.h>
+
+@@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern,
+ (const cairo_surface_pattern_t *) pattern;
+ cairo_surface_t *surface = surface_pattern->surface;
+
++ if (_cairo_surface_is_snapshot (surface))
++ surface = _cairo_surface_snapshot_get_target (surface);
++
+ if (_cairo_surface_is_recording (surface)) {
+ cairo_matrix_t imatrix;
+ cairo_box_t box;
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/testing/python/PKGBUILD b/testing/python/PKGBUILD
new file mode 100644
index 000000000..688aaf428
--- /dev/null
+++ b/testing/python/PKGBUILD
@@ -0,0 +1,91 @@
+# $Id: PKGBUILD 155851 2012-04-07 16:56:17Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+
+pkgname=python
+pkgver=3.2.2
+pkgrel=3
+_pybasever=3.2
+pkgdesc="Next generation of the python high-level scripting language"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://www.python.org/"
+depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
+makedepends=('tk' 'sqlite' 'valgrind')
+optdepends=('tk: for tkinter' 'sqlite')
+provides=('python3')
+replaces=('python3')
+options=('!makeflags')
+source=(http://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
+ distutils-egg-utf8.patch
+ gdbm-magic-values.patch
+ pycache-bytecompilation.patch)
+sha1sums=('5e654dbd48476193ccdef4d604ed4f45b48c6769'
+ '4697d7d737101ad3f1d9c4a0c6ff848fd7114823'
+ '43bfbe3e23360f412b95cb284ff29b2cbe338be9'
+ '3561a7278dd83a8f5f3b213169f16c3187724fba')
+
+build() {
+ cd "${srcdir}/Python-${pkgver}"
+
+ # FS#23997
+ sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
+
+ # gdbm has new magic that whichdb does not recognize
+ # http://bugs.python.org/issue13007
+ patch -Np1 -i ../gdbm-magic-values.patch
+
+ # Distutils now reads and writes egg-info files using UTF-8 (Upstream issue #9561)
+ patch -Np1 -i ../distutils-egg-utf8.patch
+
+ # Distutils doesn't byte-compile .py files to __pycache__ during installation (Upstream issue #11254)
+ patch -Np1 -i ../pycache-bytecompilation.patch
+
+ # Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
+ # rather than copies shipped in the tarball
+ rm -r Modules/expat
+ rm -r Modules/zlib
+ rm -r Modules/_ctypes/{darwin,libffi}*
+
+ ./configure --prefix=/usr \
+ --enable-shared \
+ --with-threads \
+ --with-computed-gotos \
+ --enable-ipv6 \
+ --with-valgrind \
+ --with-wide-unicode \
+ --with-system-expat \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-system-ffi
+
+ make
+}
+
+check() {
+ cd "${srcdir}/Python-${pkgver}"
+ LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \
+ "${srcdir}/Python-${pkgver}/python" -m test.regrtest -x test_distutils test_site test_uuid
+}
+
+package() {
+ cd "${srcdir}/Python-${pkgver}"
+ make DESTDIR="${pkgdir}" install maninstall
+
+ # Why are these not done by default...
+ ln -sf python3 "${pkgdir}/usr/bin/python"
+ ln -sf python3-config "${pkgdir}/usr/bin/python-config"
+ ln -sf idle3 "${pkgdir}/usr/bin/idle"
+ ln -sf pydoc3 "${pkgdir}/usr/bin/pydoc"
+ ln -sf python${_pybasever}.1 "${pkgdir}/usr/share/man/man1/python3.1"
+
+ # Fix FS#22552
+ ln -sf ../../libpython${_pybasever}mu.so \
+ "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}mu/libpython${_pybasever}mu.so"
+
+ # Clean-up reference to build directory
+ sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}mu/Makefile"
+
+ # License
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/python/distutils-egg-utf8.patch b/testing/python/distutils-egg-utf8.patch
new file mode 100644
index 000000000..d3213f39e
--- /dev/null
+++ b/testing/python/distutils-egg-utf8.patch
@@ -0,0 +1,43 @@
+
+# HG changeset patch
+# User Victor Stinner <victor.stinner@haypocalc.com>
+# Date 1315259096 -7200
+# Node ID fb4d2e6d393e96baac13c4efc216e361bf12c293
+# Parent cb47cf5138a4567718a25d69a79d1c62d13f187c
+Issue #9561: distutils now reads and writes egg-info files using UTF-8
+
+instead of the locale encoding.
+
+diff --git a/Lib/distutils/command/install_egg_info.py b/Lib/distutils/command/install_egg_info.py
+--- a/Lib/distutils/command/install_egg_info.py
++++ b/Lib/distutils/command/install_egg_info.py
+@@ -40,9 +40,8 @@ class install_egg_info(Command):
+ "Creating "+self.install_dir)
+ log.info("Writing %s", target)
+ if not self.dry_run:
+- f = open(target, 'w')
+- self.distribution.metadata.write_pkg_file(f)
+- f.close()
++ with open(target, 'w', encoding='UTF-8') as f:
++ self.distribution.metadata.write_pkg_file(f)
+
+ def get_outputs(self):
+ return self.outputs
+diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
+--- a/Lib/distutils/dist.py
++++ b/Lib/distutils/dist.py
+@@ -1010,11 +1010,9 @@ class DistributionMetadata:
+ def write_pkg_info(self, base_dir):
+ """Write the PKG-INFO file into the release tree.
+ """
+- pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w')
+- try:
++ with open(os.path.join(base_dir, 'PKG-INFO'), 'w',
++ encoding='UTF-8') as pkg_info:
+ self.write_pkg_file(pkg_info)
+- finally:
+- pkg_info.close()
+
+ def write_pkg_file(self, file):
+ """Write the PKG-INFO format data to a file object.
+
diff --git a/testing/python/gdbm-magic-values.patch b/testing/python/gdbm-magic-values.patch
new file mode 100644
index 000000000..e8ce828cf
--- /dev/null
+++ b/testing/python/gdbm-magic-values.patch
@@ -0,0 +1,13 @@
+diff -up Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic Python-3.2.2/Lib/dbm/__init__.py
+--- Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic 2011-09-03 12:16:40.000000000 -0400
++++ Python-3.2.2/Lib/dbm/__init__.py 2011-09-30 15:47:27.488863694 -0400
+@@ -166,7 +166,7 @@ def whichdb(filename):
+ return ""
+
+ # Check for GNU dbm
+- if magic == 0x13579ace:
++ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
+ return "dbm.gnu"
+
+ # Later versions of Berkeley db hash file have a 12-byte pad in
+diff -up Python-3.2.2/Misc/NEWS.gdbm-1.9-magic Python-3.2.2/Misc/NEWS
diff --git a/testing/python/pycache-bytecompilation.patch b/testing/python/pycache-bytecompilation.patch
new file mode 100644
index 000000000..d3651b0ce
--- /dev/null
+++ b/testing/python/pycache-bytecompilation.patch
@@ -0,0 +1,146 @@
+diff -up Python-3.2.2/Doc/distutils/apiref.rst.issue11254 Python-3.2.2/Doc/distutils/apiref.rst
+--- Python-3.2.2/Doc/distutils/apiref.rst.issue11254 2011-09-03 12:16:38.000000000 -0400
++++ Python-3.2.2/Doc/distutils/apiref.rst 2011-10-10 17:01:23.167196855 -0400
+@@ -1204,9 +1204,9 @@ other utility module.
+ .. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None])
+
+ Byte-compile a collection of Python source files to either :file:`.pyc` or
+- :file:`.pyo` files in the same directory. *py_files* is a list of files to
+- compile; any files that don't end in :file:`.py` are silently skipped.
+- *optimize* must be one of the following:
++ :file:`.pyo` files in a :file:`__pycache__` subdirectory (see :pep:`3147`).
++ *py_files* is a list of files to compile; any files that don't end in
++ :file:`.py` are silently skipped. *optimize* must be one of the following:
+
+ * ``0`` - don't optimize (generate :file:`.pyc`)
+ * ``1`` - normal optimization (like ``python -O``)
+@@ -1231,6 +1231,11 @@ other utility module.
+ is used by the script generated in indirect mode; unless you know what you're
+ doing, leave it set to ``None``.
+
++ .. versionchanged:: 3.2.3
++ Create ``.pyc`` or ``.pyo`` files with an :func:`import magic tag
++ <imp.get_tag>` in their name, in a :file:`__pycache__` subdirectory
++ instead of files without tag in the current directory.
++
+
+ .. function:: rfc822_escape(header)
+
+diff -up Python-3.2.2/Lib/distutils/tests/test_build_py.py.issue11254 Python-3.2.2/Lib/distutils/tests/test_build_py.py
+--- Python-3.2.2/Lib/distutils/tests/test_build_py.py.issue11254 2011-09-03 12:16:40.000000000 -0400
++++ Python-3.2.2/Lib/distutils/tests/test_build_py.py 2011-10-10 17:01:23.167196855 -0400
+@@ -3,6 +3,7 @@
+ import os
+ import sys
+ import io
++import imp
+ import unittest
+
+ from distutils.command.build_py import build_py
+@@ -57,13 +58,15 @@ class BuildPyTestCase(support.TempdirMan
+ self.assertEqual(len(cmd.get_outputs()), 3)
+ pkgdest = os.path.join(destination, "pkg")
+ files = os.listdir(pkgdest)
++ pycache_dir = os.path.join(pkgdest, "__pycache__")
+ self.assertIn("__init__.py", files)
+ self.assertIn("README.txt", files)
+- # XXX even with -O, distutils writes pyc, not pyo; bug?
+ if sys.dont_write_bytecode:
+- self.assertNotIn("__init__.pyc", files)
++ self.assertFalse(os.path.exists(pycache_dir))
+ else:
+- self.assertIn("__init__.pyc", files)
++ # XXX even with -O, distutils writes pyc, not pyo; bug?
++ pyc_files = os.listdir(pycache_dir)
++ self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files)
+
+ def test_empty_package_dir(self):
+ # See SF 1668596/1720897.
+diff -up Python-3.2.2/Lib/distutils/tests/test_install_lib.py.issue11254 Python-3.2.2/Lib/distutils/tests/test_install_lib.py
+--- Python-3.2.2/Lib/distutils/tests/test_install_lib.py.issue11254 2011-09-03 12:16:40.000000000 -0400
++++ Python-3.2.2/Lib/distutils/tests/test_install_lib.py 2011-10-10 17:01:23.167196855 -0400
+@@ -1,6 +1,7 @@
+ """Tests for distutils.command.install_data."""
+ import sys
+ import os
++import imp
+ import unittest
+
+ from distutils.command.install_lib import install_lib
+@@ -32,18 +33,20 @@ class InstallLibTestCase(support.Tempdir
+ cmd.finalize_options()
+ self.assertEqual(cmd.optimize, 2)
+
+- @unittest.skipUnless(not sys.dont_write_bytecode,
+- 'byte-compile not supported')
++ @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled')
+ def test_byte_compile(self):
+ pkg_dir, dist = self.create_dist()
++ os.chdir(pkg_dir)
+ cmd = install_lib(dist)
+ cmd.compile = cmd.optimize = 1
+
+ f = os.path.join(pkg_dir, 'foo.py')
+ self.write_file(f, '# python file')
+ cmd.byte_compile([f])
+- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
+- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
++ pyc_file = imp.cache_from_source('foo.py')
++ pyo_file = imp.cache_from_source('foo.py', debug_override=False)
++ self.assertTrue(os.path.exists(pyc_file))
++ self.assertTrue(os.path.exists(pyo_file))
+
+ def test_get_outputs(self):
+ pkg_dir, dist = self.create_dist()
+diff -up Python-3.2.2/Lib/distutils/util.py.issue11254 Python-3.2.2/Lib/distutils/util.py
+--- Python-3.2.2/Lib/distutils/util.py.issue11254 2011-09-03 12:16:40.000000000 -0400
++++ Python-3.2.2/Lib/distutils/util.py 2011-10-10 17:01:23.172196793 -0400
+@@ -4,7 +4,11 @@ Miscellaneous utility functions -- anyth
+ one of the other *util.py modules.
+ """
+
+-import sys, os, string, re
++import os
++import re
++import imp
++import sys
++import string
+ from distutils.errors import DistutilsPlatformError
+ from distutils.dep_util import newer
+ from distutils.spawn import spawn
+@@ -415,9 +419,9 @@ def byte_compile (py_files,
+ verbose=1, dry_run=0,
+ direct=None):
+ """Byte-compile a collection of Python source files to either .pyc
+- or .pyo files in the same directory. 'py_files' is a list of files
+- to compile; any files that don't end in ".py" are silently skipped.
+- 'optimize' must be one of the following:
++ or .pyo files in a __pycache__ subdirectory. 'py_files' is a list
++ of files to compile; any files that don't end in ".py" are silently
++ skipped. 'optimize' must be one of the following:
+ 0 - don't optimize (generate .pyc)
+ 1 - normal optimization (like "python -O")
+ 2 - extra optimization (like "python -OO")
+@@ -529,7 +533,10 @@ byte_compile(files, optimize=%r, force=%
+ # Terminology from the py_compile module:
+ # cfile - byte-compiled file
+ # dfile - purported source filename (same as 'file' by default)
+- cfile = file + (__debug__ and "c" or "o")
++ if optimize >= 0:
++ cfile = imp.cache_from_source(file, debug_override=not optimize)
++ else:
++ cfile = imp.cache_from_source(file)
+ dfile = file
+ if prefix:
+ if file[:len(prefix)] != prefix:
+diff -up Python-3.2.2/Misc/ACKS.issue11254 Python-3.2.2/Misc/ACKS
+--- Python-3.2.2/Misc/ACKS.issue11254 2011-09-03 12:16:45.000000000 -0400
++++ Python-3.2.2/Misc/ACKS 2011-10-10 17:01:23.168196842 -0400
+@@ -715,6 +715,7 @@ Pierre Quentel
+ Brian Quinlan
+ Anders Qvist
+ Burton Radons
++Jeff Ramnani
+ Brodie Rao
+ Antti Rasinen
+ Sridhar Ratnakumar
diff --git a/testing/subversion/PKGBUILD b/testing/subversion/PKGBUILD
new file mode 100644
index 000000000..161926344
--- /dev/null
+++ b/testing/subversion/PKGBUILD
@@ -0,0 +1,80 @@
+# $Id: PKGBUILD 155856 2012-04-07 19:25:11Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Paul Mattal <paul@archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+
+pkgname=subversion
+pkgver=1.7.4
+pkgrel=3
+pkgdesc="A Modern Concurrent Version Control System"
+arch=('i686' 'x86_64')
+license=('APACHE')
+depends=('neon' 'apr-util' 'sqlite' 'file')
+optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion' \
+ 'python2: for some hook scripts' 'ruby: for some hook scripts' 'java-environment')
+makedepends=('krb5' 'apache' 'python2' 'perl' 'swig' 'java-runtime' 'java-environment'
+ 'autoconf' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs')
+backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
+url="http://subversion.apache.org/"
+provides=('svn')
+options=('!makeflags' '!libtool' '!emptydirs')
+source=(http://apache.mirror.rafal.ca/subversion/$pkgname-$pkgver.tar.bz2{,.asc}
+ svnserve svn svnserve.conf subversion.rpath.fix.patch)
+sha1sums=('57a3cd351c1dbedddd020e7a1952df6cd2674527'
+ 'eebe0be6d539bf7dc37cf01b3c738072f1d9197b'
+ '64ba3e6ebafc08ac62f59d788f7a825fdce69573'
+ '73b36c046c09cec2093354911c89e3ba8056af6c'
+ 'ad117bf3b2a838a9a678a93fd8db1a066ad46c41'
+ '3d1e28408a9abb42af2e531adc0d01ce21acfad6')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ export PYTHON=/usr/bin/python2
+
+ patch -p0 -i ../subversion.rpath.fix.patch
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/hook-scripts/{,mailer/{,tests/}}*.py
+
+ ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \
+ --with-zlib=/usr --with-neon=/usr --with-apxs \
+ --with-sqlite=/usr --with-berkeley-db=:/usr/include/:/usr/lib:db-5.3 \
+ --enable-javahl --with-gnome-keyring --with-kwallet
+
+ make external-all
+ make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all
+ make swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
+ swig_pydir_extra=/usr/lib/python2.7/site-packages/svn swig-py swig-pl javahl # swig-rb
+}
+
+#check() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# export LANG=C LC_ALL=C
+# make check check-swig-pl check-swig-py check-javahl CLEANUP=yes # check-swig-rb
+#}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export LD_LIBRARY_PATH="${pkgdir}"/usr/lib:${LD_LIBRARY_PATH}
+ make DESTDIR="${pkgdir}" INSTALLDIRS=vendor \
+ swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
+ swig_pydir_extra=/usr/lib/python2.7/site-packages/svn \
+ install install-swig-py install-swig-pl install-javahl # install-swig-rb
+
+ install -d "${pkgdir}"/usr/share/subversion
+ cp -a tools/hook-scripts "${pkgdir}"/usr/share/subversion/
+ rm -f "${pkgdir}"/usr/share/subversion/hook-scripts/*.in
+
+ rm -f "${pkgdir}"/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
+ rm -rf "${pkgdir}"/usr/lib/perl5/core_perl
+
+ install -D -m 755 "${srcdir}"/svnserve "${pkgdir}"/etc/rc.d/svnserve
+ install -D -m 644 "${srcdir}"/svn "${pkgdir}"/etc/xinetd.d/svn
+ install -D -m 644 "${srcdir}"/svnserve.conf "${pkgdir}"/etc/conf.d/svnserve
+
+ install -Dm 644 tools/client-side/bash_completion \
+ "${pkgdir}"/usr/share/bash-completion/completions/subversion
+ for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do
+ ln -sf subversion "${pkgdir}"/usr/share/bash-completion/completions/${i}
+ done
+
+}
diff --git a/testing/subversion/subversion.rpath.fix.patch b/testing/subversion/subversion.rpath.fix.patch
new file mode 100644
index 000000000..ba6ee9e4e
--- /dev/null
+++ b/testing/subversion/subversion.rpath.fix.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig 2009-02-16 14:10:48.000000000 -0200
++++ Makefile.in 2009-06-04 00:56:29.000000000 -0300
+@@ -678,6 +678,7 @@
+
+ $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
+ cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
++ cd $(SWIG_PL_DIR)/native; sed -i 's|LD_RUN_PATH|DIE_RPATH_DIE|g' Makefile{,.{client,delta,fs,ra,repos,wc}}
+
+ swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
+ $(SWIG_PL_DIR)/native/Makefile
diff --git a/testing/subversion/svn b/testing/subversion/svn
new file mode 100644
index 000000000..8988aaf63
--- /dev/null
+++ b/testing/subversion/svn
@@ -0,0 +1,11 @@
+service svn
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/svnserve
+ server_args = -i
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/subversion/svnserve b/testing/subversion/svnserve
new file mode 100755
index 000000000..670fee742
--- /dev/null
+++ b/testing/subversion/svnserve
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/svnserve
+
+PID=`pidof -o %PPID /usr/bin/svnserve`
+case "$1" in
+ start)
+ stat_busy "Starting svnserve"
+ if [ -z "$PID" ]; then
+ if [ -n "$SVNSERVE_USER" ]; then
+ su -s '/bin/sh' $SVNSERVE_USER -c "/usr/bin/svnserve -d $SVNSERVE_ARGS" &
+ else
+ /usr/bin/svnserve -d $SVNSERVE_ARGS &
+ fi
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon svnserve
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping svnserve"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon svnserve
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/subversion/svnserve.conf b/testing/subversion/svnserve.conf
new file mode 100644
index 000000000..37fb7ea10
--- /dev/null
+++ b/testing/subversion/svnserve.conf
@@ -0,0 +1,7 @@
+#
+# Parameters to be passed to svnserve
+#
+#SVNSERVE_ARGS="-r /path/to/some/repos"
+SVNSERVE_ARGS=""
+
+#SVNSERVE_USER="svn"