rpms/ipe/F-9 ipe-6.0pre30-pdftex1.40.patch, NONE, 1.1 ipe.spec, 1.18, 1.19

Laurent Rineau (rineau) fedora-extras-commits at redhat.com
Wed May 28 19:17:19 UTC 2008


Author: rineau

Update of /cvs/pkgs/rpms/ipe/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16233/F-9

Modified Files:
	ipe.spec 
Added Files:
	ipe-6.0pre30-pdftex1.40.patch 
Log Message:
* Wed May 28 2008 Laurent Rineau <laurent.rineau__fedora at normalesup.org> - 6.0-0.27.pre30%{?dist}
- Add an upstream patch (Patch2), that should fix the incompatibility with
  pdfTeX-1.40 (TeXLive 2007), which is in Fedora 9.


ipe-6.0pre30-pdftex1.40.patch:

--- NEW FILE ipe-6.0pre30-pdftex1.40.patch ---
diff -u -r ipe-6.0pre30/src/ipecanvas/ipecanvaspainter.cpp ipe-6.0pre31/src/ipecanvas/ipecanvaspainter.cpp
--- ipe-6.0pre30/src/ipecanvas/ipecanvaspainter.cpp	2006-12-24 00:05:08.000000000 +0900
+++ ipe-6.0pre31/src/ipecanvas/ipecanvaspainter.cpp	2007-12-15 00:00:27.000000000 +0900
@@ -386,6 +386,10 @@
       parser.GetToken();
       if (op == "cm")
 	Opcm();
+      else if (op == "q")
+	Opq();
+      else if (op == "Q")
+	OpQ();
       else if (op == "Tf")
 	OpTf();
       else if (op == "Td")
@@ -485,6 +489,20 @@
 
 }
 
+void IpeCanvasPainter::Opq()
+{
+  if (iArgs.size() != 0)
+    return;
+  Push();
+}
+
+void IpeCanvasPainter::OpQ()
+{
+  if (iArgs.size() != 0)
+    return;
+  Pop();
+}
+
 void IpeCanvasPainter::Opm()
 {
   if (iArgs.size() != 2 || !iArgs[0]->Number() || !iArgs[1]->Number())
@@ -509,7 +527,7 @@
 void IpeCanvasPainter::OpBT()
 {
   iFont = 0;
-  iTextPos = IpeVector::Zero;
+  iTextPos = iTextLinePos = IpeVector::Zero;
 }
 
 void IpeCanvasPainter::OpTf()
@@ -531,27 +549,24 @@
   if (iArgs.size() != 2 || !iArgs[0]->Number() || !iArgs[1]->Number())
     return;
   IpeVector t(iArgs[0]->Number()->Value(), iArgs[1]->Number()->Value());
-  iTextPos = iTextPos + t;
+  iTextPos = iTextLinePos = iTextLinePos + t;
 }
 
 void IpeCanvasPainter::OpTJ()
 {
   if (!iFont || iArgs.size() != 1 || !iArgs[0]->Array())
     return;
-  // flush painted data
-  // iPainter->end();
-  IpeVector pos = iTextPos;
   for (int i = 0; i < iArgs[0]->Array()->Count(); ++i) {
     const IpePdfObj *obj = iArgs[0]->Array()->Obj(i, 0);
     if (obj->Number()) {
-      pos.iX -= 0.001 * iFontSize * obj->Number()->Value();
+      iTextPos.iX -= 0.001 * iFontSize * obj->Number()->Value();
     } else if (obj->String()) {
       IpeString s = obj->String()->Value();
       for (int j = 0; j < s.size(); ++j) {
 	uchar ch = s[j];
-	IpeVector pt = Matrix() * pos;
+	IpeVector pt = Matrix() * iTextPos;
 	DrawChar(ch, iFillRgb, int(pt.iX + 0.5), int(pt.iY + 0.5));
-	pos.iX += 0.001 * iFontSize * iFont->Face()->Width(ch);
+	iTextPos.iX += 0.001 * iFontSize * iFont->Face()->Width(ch);
       }
     }
   }
diff -u -r ipe-6.0pre30/src/ipecanvas/ipecanvaspainter.h ipe-6.0pre31/src/ipecanvas/ipecanvaspainter.h
--- ipe-6.0pre30/src/ipecanvas/ipecanvaspainter.h	2006-12-24 00:05:08.000000000 +0900
+++ ipe-6.0pre31/src/ipecanvas/ipecanvaspainter.h	2007-12-14 23:57:10.000000000 +0900
@@ -85,6 +85,8 @@
   void Opw();
   void Opm();
   void Opl();
+  void Opq();
+  void OpQ();
 
 private:
   IpeCanvasFonts *iFonts;
@@ -113,6 +115,7 @@
   // text state
   IpeFaceSize *iFont;  // not owned
   double iFontSize;
+  IpeVector iTextLinePos;
   IpeVector iTextPos;
 };
 
diff -u -r ipe-6.0pre30/src/ipecanvas/ipefonts.cpp ipe-6.0pre31/src/ipecanvas/ipefonts.cpp
--- ipe-6.0pre30/src/ipecanvas/ipefonts.cpp	2007-11-27 01:06:56.000000000 +0900
+++ ipe-6.0pre31/src/ipecanvas/ipefonts.cpp	2007-12-06 09:25:10.000000000 +0900
@@ -233,6 +233,12 @@
 	  FT_Get_Name_Index(iFace,
 			    const_cast<char *>(font.iEncoding[i].CString()));
     } else {
+      for (int k = 0; k < iFace->num_charmaps; ++k) {
+	if (iFace->charmaps[k]->encoding == FT_ENCODING_ADOBE_CUSTOM) {
+	  FT_Set_Charmap(iFace, iFace->charmaps[k]);
+	  break;
+	}
+      }
       for (int i = 0; i < 0x100; ++i)
 	iGlyphIndex[i] = FT_Get_Char_Index(iFace, i);
     }
diff -u -r ipe-6.0pre30/src/ipelib/ipepdfparser.cpp ipe-6.0pre31/src/ipelib/ipepdfparser.cpp
--- ipe-6.0pre30/src/ipelib/ipepdfparser.cpp	2006-12-24 00:05:08.000000000 +0900
+++ ipe-6.0pre31/src/ipelib/ipepdfparser.cpp	2007-12-14 23:51:33.000000000 +0900
@@ -187,7 +187,8 @@
 
 void IpePdfArray::Write(IpeStream &stream) const
 {
-  IpeString sep = "[";
+  stream << "[";
+  IpeString sep = "";
   for (int i = 0; i < Count(); ++i) {
     stream << sep;
     sep = " ";


Index: ipe.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ipe/F-9/ipe.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ipe.spec	4 Mar 2008 20:12:06 -0000	1.18
+++ ipe.spec	28 May 2008 19:16:30 -0000	1.19
@@ -2,7 +2,7 @@
 
 Name:           ipe
 Version:        6.0
-Release:        0.25.pre%{preversion}%{?dist}
+Release:        0.26.pre%{preversion}%{?dist}
 Summary:        The Ipe extensible drawing editor
 
 Group:          Applications/Publishing
@@ -12,8 +12,17 @@
 #
 URL:            http://tclab.kaist.ac.kr/ipe/
 Source0:        http://luaforge.net/frs/download.php/2727/ipe-6.0pre30-src.tar.gz
+
 Patch1:         ipe-6.0pre30-gcc43.patch
+
+# Upstream patch. http://http.theano.de/cgi-bin/bugzilla/show_bug.cgi?id=253
+Patch2:         ipe-6.0pre30-pdftex1.40.patch
+
+# Fedora specific patch. It removes the runtime test of the Freetype
+# library version. Freetype is supposed to bump its soname if the ABI is
+# incompatible.
 Patch10:        ipe-6.0pre28-no-freetype-version-check.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  qt4-devel
@@ -58,7 +67,8 @@
 %prep
 %setup -n %{name}-%{version}pre%{preversion} -q
 %patch1 -p1 -b '.gcc43'
-%patch10 -p1 -b .no-freetype-check
+%patch2 -p1 -b '.pdf140'
+%patch10 -p1 -b '.no-freetype-check'
 
 %build
 export QTDIR=%{qtdir}
@@ -171,6 +181,10 @@
 %{_datadir}/ipe/%{version}/doc
 
 %changelog
+* Wed May 28 2008 Laurent Rineau <laurent.rineau__fedora at normalesup.org> - 6.0-0.26.pre30%{?dist}
+- Add an upstream patch, that should fix the incompatibility with
+  pdfTeX-1.40 (TeXLive 2007).
+
 * Tue Mar  4 2008 Laurent Rineau <laurent.rineau__fedora at normalesup.org> - 6.0-0.25.pre30%{?dist}
 - Fix the URL: tag. (rebuild needed)
 




More information about the scm-commits mailing list