--- kxstitch-0.8/debian/changelog 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/changelog 2009-06-20 11:23:26.000000000 +0400 @@ -1,3 +1,59 @@ +kxstitch (0.8.3.1-1ubuntu1) karmic; urgency=low + + * Merge from Debian unstable (LP: #389803), remaining changes: + - Add --without-arts to ./configure params + - Add dh_icons + * Dropped Ubuntu changes: + - debian/control: Replace build-depends on libmagick++9-dev with + graphicsmagick-libmagick-dev-compat + (upstream code now compiles with libmagick++-dev) + - Add --with-extra-includes=/usr/include/GraphicsMagick to ./configure + (Debian package adds /usr/include/ImageMagick) + - debian/patches/gcc_minmax.patch: Fix FTBFS when building with gcc 4.2 + (fixed upstream) + - Add quilt support, build-depend on quilt + (added in Debian package) + + -- Ilya Barygin Sat, 20 Jun 2009 10:58:28 +0400 + +kxstitch (0.8.3.1-1) unstable; urgency=low + + * New Upstream Version + * Chnage build-dep to work with new libmagick++-dev (Closes: 485893) + + -- Mike O'Connor Sun, 15 Mar 2009 09:07:18 -0400 + +kxstitch (0.8.1-2) experimental; urgency=low + + * Build-depend strictly on libmagick++9-dev and not on + libmagick++-dev as source changes to upstream will be necessary before + source will build with libmagick++-dev + + -- Mike O'Connor Wed, 22 Oct 2008 03:24:35 -0400 + +kxstitch (0.8.1-1) experimental; urgency=low + + * New Maintainer + * New upstream version + - no longer uses latin1 function for pathnames (Closes: 349423) + * Moved url from description to Homepage: entry in debian/control + * Updated Standards-Version to 3.8.0.0 + - move menu entry from Apps to Applications + * No longer ignoring errors on make distclean + * removing rpath with chrpath + - added Build-Depends: on chrpath + * Moved 'watch' to 'debian/watch' + - updated to version=3 + * Moved changes to upstream files in .diff.gz to quilt (Closes: 482749) + * Prepared for ImageMagick++ transition (Closes: 485893) + - Use Magick++-config to generate LDADD/CFLAGS + - change Build-Depends: from libmagick++9-dev to libmagick++-dev to + * Removed no-op preinst/prerm scripts + * Updated debian/copyright with additional copyright years + * Stop installing README since it only contains build instructions + + -- Mike O'Connor Mon, 13 Oct 2008 06:34:12 -0400 + kxstitch (0.8-0ubuntu5) jaunty; urgency=low * No-change rebuild to fix lpia shared library dependencies. @@ -39,6 +95,15 @@ -- Richard A. Johnson Fri, 15 Sep 2006 18:51:39 -0500 +kxstitch (0.7-2.1) unstable; urgency=low + + * Non-maintainer upload to fix RC bug. + * Fix to allow build with GCC 4.2. (Closes: #385520) + Patch by Mike O'Connor + * Add build-dep on quilt and modified debian/rules to apply patch. + + -- Ana Beatriz Guerrero Lopez Mon, 22 Oct 2007 05:23:03 +0200 + kxstitch (0.7-2ubuntu1) dapper; urgency=low * Add dh_iconcache --- kxstitch-0.8/debian/compat 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/compat 2009-06-20 11:23:26.000000000 +0400 @@ -1 +1 @@ -5 +4 --- kxstitch-0.8/debian/control 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/control 2009-06-20 11:23:26.000000000 +0400 @@ -1,10 +1,11 @@ Source: kxstitch Section: kde Priority: optional -Maintainer: Ubuntu MOTU Developers -XSBC-Original-Maintainer: eric pareja -Build-Depends: debhelper (>= 5.0.0), kdelibs4-dev, graphicsmagick-libmagick-dev-compat, libqt3-mt-dev, libltdl3-dev, quilt -Standards-Version: 3.7.2 +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Mike O'Connor +Build-Depends: debhelper (>= 4.0.0), kdelibs4-dev, libmagick++9-dev | libmagick++-dev, libqt3-mt-dev, libltdl3-dev, quilt, chrpath +Standards-Version: 3.8.0.0 +Homepage: http://kxstitch.sourceforge.net Package: kxstitch Architecture: any @@ -15,5 +16,4 @@ various floss palletes (DMC, Anchor, Madeira). User can create custom palletes and colors. Uses standard stitches. Free use of backstitching. Imports from various picture formats. Prints patterns and floss keys. - . - Homepage: http://kxstitch.sourceforge.net + --- kxstitch-0.8/debian/copyright 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/copyright 2009-06-20 11:23:26.000000000 +0400 @@ -3,7 +3,7 @@ It was downloaded from http://prdownloads.sourceforge.net/kxstitch -Copyright: 2004 (C) Stephen Allewell +Copyright: 2003,2004,2006 (C) Stephen Allewell Upstream Author: Stephen Allewell --- kxstitch-0.8/debian/docs 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/docs 2009-06-20 11:23:26.000000000 +0400 @@ -1,4 +1,2 @@ -README TODO -ChangeLog --- kxstitch-0.8/debian/menu 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/menu 2009-06-20 11:23:26.000000000 +0400 @@ -1,2 +1,2 @@ -?package(kxstitch):needs="X11" section="Apps/Graphics"\ +?package(kxstitch):needs="X11" section="Applications/Graphics"\ title="KXstitch" command="/usr/bin/kxstitch" --- kxstitch-0.8/debian/patches/gcc_minmax.patch 2009-06-20 11:23:26.000000000 +0400 +++ kxstitch-0.8.3.1/debian/patches/gcc_minmax.patch 1970-01-01 03:00:00.000000000 +0300 @@ -1,221 +0,0 @@ -Index: kxstitch-0.8/kxstitch/editview.cpp -=================================================================== ---- kxstitch-0.8.orig/kxstitch/editview.cpp 2008-02-28 23:45:52.000000000 +0100 -+++ kxstitch-0.8/kxstitch/editview.cpp 2008-02-28 23:46:50.000000000 +0100 -@@ -844,13 +844,13 @@ - QRect EditView::selectionArea() - { - int left = m_selectedArea.left(); -- left = left>?0; -+ left = MAX(left,0); - int top = m_selectedArea.top(); -- top = top>?0; -+ top = MAX(top,0); - int right = m_selectedArea.right(); -- right = rightfillRect(b,QBrush(Qt::black)); - painter->fillRect(r,QBrush(Qt::white)); - painter->drawRect(r); -- QRect currentPage(r.left()+(50*x/patternHeight),r.top()+(50*y/patternHeight),(50*pageCellsWide/patternHeight)fillRect(currentPage,QBrush(Qt::lightGray)); - painter->drawRect(currentPage); - } -- printContents(printer, painter, x, y, printable, pageCellsWidedrawText(0,height+dy,width,dy,Qt::AlignHCenter,QString(i18n("Page %1")).arg(++pages)); - if (--totalPages) -@@ -1860,7 +1860,7 @@ - m_end = snapToContents(bs->end); - // found a backstitch that starts and ends where indicated - m_doc->deleteBackstitch(bs); // this should also update the iterator -- updateContents(QRect(QPoint((m_start.x()?m_end.x())+2,(m_start.y()>?m_end.y())+2))); -+ updateContents(QRect(QPoint(MIN(m_start.x(),m_end.x())-2,MIN(m_start.y(),m_end.y())-2),QPoint(MAX(m_start.x(),m_end.x())+2,MAX(m_start.y(),m_end.y())+2))); - break; - } - } -@@ -1912,7 +1912,7 @@ - drawBoundingRect(m_start, m_end); - painter.begin(&dm); - painter.setPen(QPen(black,1)); -- painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); -+ painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); - painter.end(); - m_doc->addStitches(processPixmap(dm),m_currentStitchType); - emit locationOrSize(QPoint(-1,-1)); -@@ -1923,7 +1923,7 @@ - painter.begin(&dm); - painter.setPen(QPen(black,1)); - painter.setBrush(black); -- painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); -+ painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); - painter.end(); - m_doc->addStitches(processPixmap(dm),m_currentStitchType); - emit locationOrSize(QPoint(-1,-1)); -@@ -1933,7 +1933,7 @@ - drawBoundingEllipse(m_start, m_end); - painter.begin(&dm); - painter.setPen(QPen(black,1)); -- painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); -+ painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); - painter.end(); - m_doc->addStitches(processPixmap(dm),m_currentStitchType); - emit locationOrSize(QPoint(-1,-1)); -@@ -1944,7 +1944,7 @@ - painter.begin(&dm); - painter.setPen(QPen(black,1)); - painter.setBrush(black); -- painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y()))); -+ painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y())))); - painter.end(); - m_doc->addStitches(processPixmap(dm),m_currentStitchType); - emit locationOrSize(QPoint(-1,-1)); -@@ -2067,7 +2067,7 @@ - int height=m_doc->canvas()->patternHeight(); - QPoint tl = contentsToCell(QPoint(contentsX(), contentsY())); - QPoint br = contentsToCell(QPoint(contentsX()+visibleWidth(), contentsY()+visibleHeight())); -- cells.setCoords(tl.x(), tl.y(), br.x()canvas()->patternWidth())canvas()->patternHeight()); -+ m_cellSize = MIN((visibleWidth()/m_doc->canvas()->patternWidth()),(visibleHeight()/m_doc->canvas()->patternHeight())); - resizeGrid(); - } - -Index: kxstitch-0.8/kxstitch/importimagedlg.cpp -=================================================================== ---- kxstitch-0.8.orig/kxstitch/importimagedlg.cpp 2008-02-28 23:45:53.000000000 +0100 -+++ kxstitch-0.8/kxstitch/importimagedlg.cpp 2008-02-28 23:46:50.000000000 +0100 -@@ -47,7 +47,7 @@ - m_preferredSize = QSize(KXSConfig().NewPattern_Width,KXSConfig().NewPattern_Height); - int sw = m_preferredSize.width()*100/m_originalSize.width(); - int sh = m_preferredSize.height()*100/m_originalSize.height(); -- int s = sw insertStringList(((KXStitchApplication*)kapp)->schemes()); - Configuration::setComboBoxItem(Import_FlossScheme,KXSConfig().NewPattern_FlossScheme); -@@ -211,4 +211,4 @@ - { - killTimers(); - renderPixmap(); --} -\ No newline at end of file -+} -Index: kxstitch-0.8/kxstitch/kxstitchdoc.cpp -=================================================================== ---- kxstitch-0.8.orig/kxstitch/kxstitchdoc.cpp 2008-02-28 23:45:52.000000000 +0100 -+++ kxstitch-0.8/kxstitch/kxstitchdoc.cpp 2008-02-28 23:46:50.000000000 +0100 -@@ -241,12 +241,12 @@ - requestedSize.setHeight(currentRect.height()); - if (requestedSize.width() > currentRect.width()) - { -- l = (requestedSize.width()-currentRect.width()) currentRect.height()) - { -- t = (requestedSize.height()-currentRect.height())slotStateChanged("palette_empty"); - } -- f.setPixelSize(m_cellWidthsetFont(f); - for (int i = 0 ; i < palette->colors() ; i++) - { -Index: kxstitch-0.8/kxstitch/patterncanvas.cpp -=================================================================== ---- kxstitch-0.8.orig/kxstitch/patterncanvas.cpp 2008-02-28 23:45:53.000000000 +0100 -+++ kxstitch-0.8/kxstitch/patterncanvas.cpp 2008-02-28 23:48:16.000000000 +0100 -@@ -143,10 +143,10 @@ - int y2 = 0; - for (Knot *k = m_pKnot->first() ; k ; k = m_pKnot->next()) - { -- x1 = x1 pos.x(); -- y1 = y1 pos.y(); -- x2 = x2 >? k->pos.x(); -- y2 = y2 >? k->pos.y(); -+ x1 = MIN(x1, k->pos.x()); -+ y1 = MIN(y1, k->pos.y()); -+ x2 = MAX(x2, k->pos.x()); -+ y2 = MAX(y2, k->pos.y()); - } - stitchesRect|=QRect(x1/2,y1/2,(x2-x1)/2,(y2-y1)/2); - } -@@ -159,10 +159,10 @@ - QPoint s = bs->start; - QPoint e = bs->end; - int x1,y1,x2,y2; -- x1 = s.x() ? e.x(); -- y1 = s.y() ? e.y(); -+ x1 = MIN(s.x(), e.x()); -+ x2 = MAX(s.x(), e.x()); -+ y1 = MIN(s.y(), e.y()); -+ y2 = MAX(s.y(), e.y()); - if (x1 == x2 || y1 == y2) - { - // special case as a QRect would show as zero m_width or m_height (ie invalid) -Index: kxstitch-0.8/kxstitch/palettemanagerdialog.cpp -=================================================================== ---- kxstitch-0.8.orig/kxstitch/palettemanagerdialog.cpp 2008-02-28 23:45:52.000000000 +0100 -+++ kxstitch-0.8/kxstitch/palettemanagerdialog.cpp 2008-02-28 23:46:50.000000000 +0100 -@@ -123,7 +123,7 @@ - } - else - { -- ColorList->setSelected(icount()-1,true); -+ ColorList->setSelected(MIN(i,ColorList->count()-1),true); - } - insertFlossListBoxItem(CurrentList,item); - CurrentList->setCurrentItem(item); -@@ -158,7 +158,7 @@ - } - else - { -- CurrentList->setSelected(icount()-1,true); -+ CurrentList->setSelected(MIN(i,CurrentList->count()-1),true); - } - i = index(item->floss); - m_flosses.remove(i); -Index: kxstitch-0.8/kxstitch/stitch.h -=================================================================== ---- kxstitch-0.8.orig/kxstitch/stitch.h 2008-02-28 23:48:56.000000000 +0100 -+++ kxstitch-0.8/kxstitch/stitch.h 2008-02-28 23:49:01.000000000 +0100 -@@ -14,6 +14,9 @@ - #include - #include - -+#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) -+#define MAX(X,Y) ((X) < (Y) ? (Y) : (X)) -+ - /** Store information about individual stitches. - @author Stephen P. Allewell -
--- kxstitch-0.8/debian/patches/html-doc-dir	1970-01-01 03:00:00.000000000 +0300
+++ kxstitch-0.8.3.1/debian/patches/html-doc-dir	2009-06-20 11:23:26.000000000 +0400
@@ -0,0 +1,11 @@
+--- kxstitch-0.8.1.orig/configure
++++ kxstitch-0.8.1/configure
+@@ -34074,7 +34074,7 @@
+ if test "$ac_use_path_checking" = "default"; then
+ 
+   if test -z "$kde_htmldir"; then
+-    kde_htmldir='\${datadir}/doc/HTML'
++    kde_htmldir='\${datadir}/doc/kde/HTML'
+   fi
+   if test -z "$kde_appsdir"; then
+     kde_appsdir='\${datadir}/applnk'
--- kxstitch-0.8/debian/patches/kxstitch.gcc-4.2.diff	1970-01-01 03:00:00.000000000 +0300
+++ kxstitch-0.8.3.1/debian/patches/kxstitch.gcc-4.2.diff	2009-06-20 11:23:26.000000000 +0400
@@ -0,0 +1,238 @@
+diff -ru kxstitch-0.7.orig/kxstitch/editview.cpp kxstitch-0.7/kxstitch/editview.cpp
+--- kxstitch-0.7.orig/kxstitch/editview.cpp	2005-07-03 06:54:14.000000000 -0400
++++ kxstitch-0.7/kxstitch/editview.cpp	2007-09-27 21:37:25.000000000 -0400
+@@ -47,6 +47,9 @@
+ 
+ extern "C" double round(double x);
+ 
++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X))
++
+ #define TIMERSPEED 50
+ 
+ EditView::EditView(KXStitchDoc* doc,QWidget* parent)
+@@ -800,13 +803,13 @@
+ QRect EditView::selectionArea()
+ {
+   int left = m_selectedArea.left();
+-  left = left>?0;
++  left = MAX(left,0);
+   int top = m_selectedArea.top();
+-  top = top>?0;
++  top = MAX(top,0);
+   int right = m_selectedArea.right();
+-  right = rightfillRect(b,QBrush(Qt::black));
+         painter->fillRect(r,QBrush(Qt::white));
+         painter->drawRect(r);
+-        QRect currentPage(r.left()+(50*x/patternHeight),r.top()+(50*y/patternHeight),(50*pageCellsWide/patternHeight)fillRect(currentPage,QBrush(Qt::lightGray));
+         painter->drawRect(currentPage);
+       }
+-      printContents(printer, painter, x, y, printable, pageCellsWidedrawText(0,height+dy,width,dy,Qt::AlignHCenter,QString(i18n("Page %1")).arg(++pages));
+       if (--totalPages)
+@@ -1758,7 +1761,7 @@
+                 m_end = snapToContents(bs->end);
+                 // found a backstitch that starts and ends where indicated
+                 m_doc->deleteBackstitch(bs); // this should also update the iterator
+-                updateContents(QRect(QPoint((m_start.x()?m_end.x())+2,(m_start.y()>?m_end.y())+2)));
++                updateContents(QRect(QPoint(MIN(m_start.x(),m_end.x())-2,MIN(m_start.y(),m_end.y())-2),QPoint(MAX(m_start.x(),m_end.x())+2,MAX(m_start.y(),m_end.y())+2)));
+                 break;
+               }
+             }
+@@ -1810,7 +1813,7 @@
+           drawBoundingRect(m_start, m_end);
+           painter.begin(&dm);
+           painter.setPen(QPen(black,1));
+-          painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y())));
++          painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y()))));
+           painter.end();
+           m_doc->addStitches(processPixmap(dm),m_currentStitchType);
+           emit locationOrSize(QPoint(-1,-1));
+@@ -1821,7 +1824,7 @@
+           painter.begin(&dm);
+           painter.setPen(QPen(black,1));
+           painter.setBrush(black);
+-          painter.drawRect(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y())));
++          painter.drawRect(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y()))));
+           painter.end();
+           m_doc->addStitches(processPixmap(dm),m_currentStitchType);
+           emit locationOrSize(QPoint(-1,-1));
+@@ -1831,7 +1834,7 @@
+           drawBoundingEllipse(m_start, m_end);
+           painter.begin(&dm);
+           painter.setPen(QPen(black,1));
+-          painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y())));
++          painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y()))));
+           painter.end();
+           m_doc->addStitches(processPixmap(dm),m_currentStitchType);
+           emit locationOrSize(QPoint(-1,-1));
+@@ -1842,7 +1845,7 @@
+           painter.begin(&dm);
+           painter.setPen(QPen(black,1));
+           painter.setBrush(black);
+-          painter.drawEllipse(QRect(QPoint(m_start.x()?m_end.x(),m_start.y()>?m_end.y())));
++          painter.drawEllipse(QRect(QPoint(MIN(m_start.x(),m_end.x()),MIN(m_start.y(),m_end.y())),QPoint(MAX(m_start.x(),m_end.x()),MAX(m_start.y(),m_end.y()))));
+           painter.end();
+           m_doc->addStitches(processPixmap(dm),m_currentStitchType);
+           emit locationOrSize(QPoint(-1,-1));
+@@ -1971,7 +1974,7 @@
+   int height=m_doc->canvas()->patternHeight();
+   QPoint tl = contentsToCell(QPoint(contentsX(), contentsY()));
+   QPoint br = contentsToCell(QPoint(contentsX()+visibleWidth(), contentsY()+visibleHeight()));
+-  cells.setCoords(tl.x(), tl.y(), br.x()canvas()->patternWidth())canvas()->patternHeight());
++  m_cellSize = MIN((visibleWidth()/m_doc->canvas()->patternWidth()),(visibleHeight()/m_doc->canvas()->patternHeight()));
+   resizeGrid();
+ }
+ 
+Only in kxstitch-0.7.orig/kxstitch: extendpattern.cpp
+Only in kxstitch-0.7.orig/kxstitch: extendpattern.h
+Only in kxstitch-0.7.orig/kxstitch: importimage.cpp
+diff -ru kxstitch-0.7.orig/kxstitch/importimagedlg.cpp kxstitch-0.7/kxstitch/importimagedlg.cpp
+--- kxstitch-0.7.orig/kxstitch/importimagedlg.cpp	2005-06-23 17:03:18.000000000 -0400
++++ kxstitch-0.7/kxstitch/importimagedlg.cpp	2007-09-27 21:37:25.000000000 -0400
+@@ -28,6 +28,9 @@
+ #include "flossscheme.h"
+ #include "floss.h"
+ 
++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X))
++
+ ImportImageDlg::ImportImageDlg(const Magick::Image& image, QWidget *parent, const char *name, bool modal)
+   : ImportImage(parent,name,modal),
+     m_pixmap(new QPixmap),
+@@ -47,7 +50,7 @@
+   m_preferredSize = QSize(KXSConfig().NewPattern_Width,KXSConfig().NewPattern_Height);
+   int sw = m_preferredSize.width()*100/m_originalSize.width();
+   int sh = m_preferredSize.height()*100/m_originalSize.height();
+-  int s = sw insertStringList(((KXStitchApplication*)kapp)->schemes());
+   Configuration::setComboBoxItem(Import_FlossScheme,KXSConfig().NewPattern_FlossScheme);
+@@ -211,4 +214,4 @@
+ {
+   killTimers();
+   renderPixmap();
+-}
+\ No newline at end of file
++}
+Only in kxstitch-0.7.orig/kxstitch: importimage.h
+diff -ru kxstitch-0.7.orig/kxstitch/kxstitchdoc.cpp kxstitch-0.7/kxstitch/kxstitchdoc.cpp
+--- kxstitch-0.7.orig/kxstitch/kxstitchdoc.cpp	2005-06-30 18:30:14.000000000 -0400
++++ kxstitch-0.7/kxstitch/kxstitchdoc.cpp	2007-09-27 21:37:24.000000000 -0400
+@@ -45,6 +45,9 @@
+ #include "importimagedlg.h"
+ #include "configuration.h"
+ 
++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X))
++
+ #define FILE_FORMAT_VERSION 5
+ 
+ QPtrList *KXStitchDoc::viewList = 0L;
+@@ -241,12 +244,12 @@
+           requestedSize.setHeight(currentRect.height());
+         if (requestedSize.width() > currentRect.width())
+         {
+-          l = (requestedSize.width()-currentRect.width()) currentRect.height())
+         {
+-          t = (requestedSize.height()-currentRect.height())slotStateChanged("palette_empty");
+   }
+-  f.setPixelSize(m_cellWidthsetFont(f);
+   for (int i = 0 ; i < palette->colors() ; i++)
+   {
+diff -ru kxstitch-0.7.orig/kxstitch/patterncanvas.cpp kxstitch-0.7/kxstitch/patterncanvas.cpp
+--- kxstitch-0.7.orig/kxstitch/patterncanvas.cpp	2005-06-20 12:55:39.000000000 -0400
++++ kxstitch-0.7/kxstitch/patterncanvas.cpp	2007-09-27 21:37:24.000000000 -0400
+@@ -13,6 +13,9 @@
+ #include "patterncanvas.h"
+ #include "stitch.h"
+ 
++#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
++#define MAX(X,Y) ((X) < (Y) ? (Y) : (X))
++
+ PatternCanvas::PatternCanvas()
+   : m_width(0),
+     m_height(0),
+@@ -143,10 +146,10 @@
+     int y2 = 0;
+     for (Knot *k = m_pKnot->first() ; k ; k = m_pKnot->next())
+     {
+-      x1 = x1 pos.x();
+-      y1 = y1 pos.y();
+-      x2 = x2 >? k->pos.x();
+-      y2 = y2 >? k->pos.y();
++      x1 = MIN(x1, k->pos.x());
++      y1 = MIN(y1, k->pos.y());
++      x2 = MAX(x2, k->pos.x());
++      y2 = MAX(y2, k->pos.y());
+     }
+     stitchesRect|=QRect(x1/2,y1/2,(x2-x1)/2,(y2-y1)/2);
+   }
+@@ -159,10 +162,10 @@
+       QPoint s = bs->start;
+       QPoint e = bs->end;
+       int x1,y1,x2,y2;
+-      x1 = s.x() ? e.x();
+-      y1 = s.y() ? e.y();
++      x1 = MIN(s.x(), e.x());
++      x2 = MAX(s.x(), e.x());
++      y1 = MIN(s.y(), e.y());
++      y2 = MAX(s.y(), e.y());
+       if (x1 == x2 || y1 == y2)
+       {
+         // special case as a QRect would show as zero m_width or m_height (ie invalid)
--- kxstitch-0.8/debian/patches/series	2009-06-20 11:23:26.000000000 +0400
+++ kxstitch-0.8.3.1/debian/patches/series	2009-06-20 11:23:26.000000000 +0400
@@ -1 +1 @@
-gcc_minmax.patch
+html-doc-dir
--- kxstitch-0.8/debian/preinst	2009-06-20 11:23:26.000000000 +0400
+++ kxstitch-0.8.3.1/debian/preinst	1970-01-01 03:00:00.000000000 +0300
@@ -1,44 +0,0 @@
-#! /bin/sh
-# preinst script for kxstitch
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        *  `install'
-#        *  `install' 
-#        *  `upgrade' 
-#        *  `abort-upgrade' 
-#
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    install|upgrade)
-#        if [ "$1" = "upgrade" ]
-#        then
-#            start-stop-daemon --stop --quiet --oknodo  \
-#                --pidfile /var/run/kxstitch.pid  \
-#                --exec /usr/sbin/kxstitch 2>/dev/null || true
-#        fi
-    ;;
-
-    abort-upgrade)
-    ;;
-
-    *)
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
--- kxstitch-0.8/debian/prerm	2009-06-20 11:23:26.000000000 +0400
+++ kxstitch-0.8.3.1/debian/prerm	1970-01-01 03:00:00.000000000 +0300
@@ -1,39 +0,0 @@
-#! /bin/sh
-# prerm script for kxstitch
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        *  `remove'
-#        *  `upgrade' 
-#        *  `failed-upgrade' 
-#        *  `remove' `in-favour'  
-#        *  `deconfigure' `in-favour'
-#            `removing'
-#           
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|deconfigure)
-#       install-info --quiet --remove /usr/info/kxstitch.info.gz
-        ;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
--- kxstitch-0.8/debian/rules	2009-06-20 11:23:26.000000000 +0400
+++ kxstitch-0.8.3.1/debian/rules	2009-06-20 11:23:26.000000000 +0400
@@ -14,6 +14,7 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+include /usr/share/quilt/quilt.make
 
 CFLAGS = -Wall -g
 
@@ -25,30 +26,22 @@
 
 config.status: configure
 	dh_testdir
-	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-qt-includes=/usr/include/qt3 --disable-rpath --with-extra-includes=/usr/include/GraphicsMagick --without-arts
-
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-qt-includes=/usr/include/qt3 --with-extra-includes=/usr/include/ImageMagick --disable-rpath --without-arts
 
 build: build-stamp
 
-build-stamp:  config.status
+build-stamp:  patch config.status
 	dh_testdir
-	$(MAKE) -f /usr/share/quilt/quilt.make patch
+	$(MAKE)
+	chrpath -d kxstitch/kxstitch
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
-	$(MAKE) -f /usr/share/quilt/quilt.make unpatch
 	rm -f build-stamp 
 
-	-$(MAKE) distclean
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	cp -f /usr/share/misc/config.guess config.guess
-endif
-
+	[ ! -f Makefile ] || $(MAKE) distclean
 
 	dh_clean 
 
@@ -59,6 +52,8 @@
 	dh_installdirs
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/kxstitch
 
+	rm debian/kxstitch/usr/share/man/man1/kxstitch.1.gz
+	sed -i '/MiniIcon/d' debian/kxstitch/usr/share/applnk/Graphics/kxstitch.desktop
 
 # Build architecture-independent files here.
 binary-indep: build install
--- kxstitch-0.8/debian/watch	1970-01-01 03:00:00.000000000 +0300
+++ kxstitch-0.8.3.1/debian/watch	2009-06-20 11:23:26.000000000 +0400
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/kxstitch/kxstitch-(.+)\.tar\.gz debian uupdate