tag 424091 patch
thanks

I've created a patch for bug 424091 (agg: FTBFS if built twice in a
row) Basically, the problem was that clean was run *after* unpatching
the source. As this changed the timestamp of configure.in and other
files, the autotools were automatically re-run, leading to a Makefile
that wanted to clean the gpc dir, and failing.

I split the patch in three parts:

1. Rearanging the clean rule to run *before* unpatching, and removing
autotools-generated files that make distclean misses:

2. A reference to gpc that was missed in 01_no_gpc.dpatch

3. A new dpatch, to use AM_MAINTAINER_MODE in configure.in, thus preventing
this kind of problems.

-------------------------[Patch 1]------------------------------------
diff -r d8eb41ec1d3f -r 778a06854ac0 debian/rules
--- a/debian/rules      Sat Jul 21 18:02:00 2007 -0500
+++ b/debian/rules      Sat Jul 21 20:06:28 2007 -0500
@@ -38,14 +38,25 @@ build-stamp: patch-stamp
                $(CURDIR)/debian/libagg-dev/usr/lib/libagg_pic.a
        touch build-stamp
 
-clean: unpatch
+clean: patch-stamp clean-patched unpatch
+clean-patched:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
 
        -$(MAKE) distclean
 
-       dh_clean 
+       # Remove all autotools-created files
+       dh_clean Makefile.in aclocal.m4 config.guess config.sub configure \
+        install-sh ltmain.sh missing \
+        examples/Makefile.in font_freetype/Makefile.in \
+        font_win32_tt/Makefile.in include/Makefile.in include/config.h.in \
+        include/ctrl/Makefile.in include/platform/Makefile.in \
+        include/util/Makefile.in src/Makefile.in src/ctrl/Makefile.in \
+        src/platform/AmigaOS/Makefile.in src/platform/BeOS/Makefile.in \
+        src/platform/Makefile.in src/platform/X11/Makefile.in \
+        src/platform/mac/Makefile.in src/platform/sdl/Makefile.in \
+        src/platform/win32/Makefile.in
 
 binary-indep: build
 
-------------------------[/Patch 1]-----------------------------------


-------------------------[Patch 2]------------------------------------
diff -r d8eb41ec1d3f -r 778a06854ac0 debian/patches/01_no_gpc.dpatch
--- a/debian/patches/01_no_gpc.dpatch   Sat Jul 21 18:02:00 2007 -0500
+++ b/debian/patches/01_no_gpc.dpatch   Sat Jul 21 20:06:28 2007 -0500
@@ -5,18 +5,18 @@
 ## DP: No description.
 
 @DPATCH@
-diff -urNad agg-2.4+20060719~/Makefile.am agg-2.4+20060719/Makefile.am
---- agg-2.4+20060719~/Makefile.am      2006-02-13 06:26:29.000000000 +0100
-+++ agg-2.4+20060719/Makefile.am       2006-10-20 01:12:24.000000000 +0200
+diff -urNad agg-2.5+dfsg~/Makefile.am agg-2.5+dfsg/Makefile.am
+--- agg-2.5+dfsg~/Makefile.am  2007-07-21 19:10:55.000000000 -0500
++++ agg-2.5+dfsg/Makefile.am   2007-07-21 19:17:23.009293246 -0500
 @@ -1,4 +1,4 @@
 -SUBDIRS = gpc src font_freetype font_win32_tt include examples
 +SUBDIRS = src font_freetype font_win32_tt include examples
  
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = libagg.pc
-diff -urNad agg-2.4+20060719~/configure.in agg-2.4+20060719/configure.in
---- agg-2.4+20060719~/configure.in     2006-02-13 06:26:29.000000000 +0100
-+++ agg-2.4+20060719/configure.in      2006-10-20 01:11:59.000000000 +0200
+diff -urNad agg-2.5+dfsg~/configure.in agg-2.5+dfsg/configure.in
+--- agg-2.5+dfsg~/configure.in 2007-07-21 19:10:55.000000000 -0500
++++ agg-2.5+dfsg/configure.in  2007-07-21 19:17:23.009293246 -0500
 @@ -83,16 +83,6 @@
  dnl ###############################################
  
@@ -42,9 +42,9 @@ diff -urNad agg-2.4+20060719~/configure.
     font_freetype/Makefile
     font_win32_tt/Makefile
     src/Makefile
-diff -urNad agg-2.4+20060719~/examples/Makefile.am 
agg-2.4+20060719/examples/Makefile.am
---- agg-2.4+20060719~/examples/Makefile.am     2005-10-19 20:11:35.000000000 
+0200
-+++ agg-2.4+20060719/examples/Makefile.am      2006-10-20 01:12:16.000000000 
+0200
+diff -urNad agg-2.5+dfsg~/examples/Makefile.am 
agg-2.5+dfsg/examples/Makefile.am
+--- agg-2.5+dfsg~/examples/Makefile.am 2007-07-21 19:10:55.000000000 -0500
++++ agg-2.5+dfsg/examples/Makefile.am  2007-07-21 19:17:23.009293246 -0500
 @@ -10,10 +10,6 @@
  FTP=freetype_test   ### these dont work : trans_curve2_ft trans_curve1_ft
  endif
@@ -56,9 +56,9 @@ diff -urNad agg-2.4+20060719~/examples/M
  INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/font_freetype/ 
-I$(top_srcdir)/gpc -I$(top_srcdir)/font_win32_tt
  
  noinst_LTLIBRARIES=libexamples.la
-diff -urNad agg-2.4+20060719~/src/Makefile.am agg-2.4+20060719/src/Makefile.am
---- agg-2.4+20060719~/src/Makefile.am  2005-10-18 12:45:40.000000000 +0200
-+++ agg-2.4+20060719/src/Makefile.am   2006-10-20 01:12:08.000000000 +0200
+diff -urNad agg-2.5+dfsg~/src/Makefile.am agg-2.5+dfsg/src/Makefile.am
+--- agg-2.5+dfsg~/src/Makefile.am      2007-07-21 19:10:55.000000000 -0500
++++ agg-2.5+dfsg/src/Makefile.am       2007-07-21 19:17:23.009293246 -0500
 @@ -31,12 +31,6 @@
                                                                                
 agg_vpgen_clip_polyline.cpp \
                                                                                
 agg_vpgen_segmentator.cpp
@@ -72,3 +72,14 @@ diff -urNad agg-2.4+20060719~/src/Makefi
  if ENABLE_CTRL
  CTRLLD=$(top_builddir)/src/ctrl/libaggctrl.la 
  else
+diff -urNad agg-2.5+dfsg~/src/configure.in agg-2.5+dfsg/src/configure.in
+--- agg-2.5+dfsg~/src/configure.in     2007-07-16 11:04:22.000000000 -0500
++++ agg-2.5+dfsg/src/configure.in      2007-07-21 19:22:33.164676749 -0500
+@@ -9,7 +9,6 @@
+ 
+ AC_OUTPUT(
+    Makefile 
+-   gpc/Makefile
+    src/Makefile
+    src/ctrl/Makefile
+ ) 
-------------------------[/Patch 2]-----------------------------------

-------------------------[Patch 3]------------------------------------
diff -r 778a06854ac0 -r 4a0ee5afb033 debian/patches/00list
--- a/debian/patches/00list     Sat Jul 21 20:06:28 2007 -0500
+++ b/debian/patches/00list     Sat Jul 21 20:07:37 2007 -0500
@@ -1,3 +1,4 @@ 01_no_gpc
 01_no_gpc
+02_maintainer_mode.dpatch
 03_pkg_config_pic.dpatch
 04_no_rpath
diff -r 778a06854ac0 -r 4a0ee5afb033 debian/patches/02_maintainer_mode.dpatch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/02_maintainer_mode.dpatch  Sat Jul 21 20:07:37 2007 -0500
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_maintainer_mode.dpatch by  <[EMAIL PROTECTED]>
+##
+## DP: Use AM_MAINTAINER_MODE, to avoid re-running autotools
+## DP: except when explicitely called in debian/rules
+
[EMAIL PROTECTED]@
+diff -urNad agg-2.5+dfsg~/configure.in agg-2.5+dfsg/configure.in
+--- agg-2.5+dfsg~/configure.in 2007-07-21 19:58:06.966030999 -0500
++++ agg-2.5+dfsg/configure.in  2007-07-21 19:58:33.595695250 -0500
+@@ -2,7 +2,7 @@
+ AC_CANONICAL_TARGET
+ AC_CONFIG_HEADERS(include/config.h)
+ AM_INIT_AUTOMAKE(agg, 2.5.0)
+-
++AM_MAINTAINER_MODE
+ 
+ dnl Checks for programs.
+ AC_PROG_CC
-------------------------[/Patch 3]-----------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to