summaryrefslogtreecommitdiff
path: root/graphics/impress
diff options
context:
space:
mode:
authorjoerg <joerg>2011-11-25 21:57:36 +0000
committerjoerg <joerg>2011-11-25 21:57:36 +0000
commitec23aba3f5d5b00b5da06d25942aac7089363ce8 (patch)
tree084996869902551e726da43233fc6742cb199130 /graphics/impress
parent49d4f563d8f96afbf7154e8d8de5f7086b0c8faf (diff)
downloadpkgsrc-ec23aba3f5d5b00b5da06d25942aac7089363ce8.tar.gz
Fix build with modern GCC versions
Diffstat (limited to 'graphics/impress')
-rw-r--r--graphics/impress/distinfo15
-rw-r--r--graphics/impress/patches/patch-ac13
-rw-r--r--graphics/impress/patches/patch-ad15
-rw-r--r--graphics/impress/patches/patch-font3d_build.h15
-rw-r--r--graphics/impress/patches/patch-font3d_font3d.cc15
-rw-r--r--graphics/impress/patches/patch-font3d_font3d.h14
-rw-r--r--graphics/impress/patches/patch-font3d_geometry.cc13
-rw-r--r--graphics/impress/patches/patch-font3d_geometry.h14
-rw-r--r--graphics/impress/patches/patch-font3d_vector.h15
-rw-r--r--graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.cpp157
-rw-r--r--graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.h13
-rw-r--r--graphics/impress/patches/patch-src_drvtk.cpp13
12 files changed, 302 insertions, 10 deletions
diff --git a/graphics/impress/distinfo b/graphics/impress/distinfo
index 727c4847bd2..94b912fca06 100644
--- a/graphics/impress/distinfo
+++ b/graphics/impress/distinfo
@@ -1,9 +1,18 @@
-$NetBSD: distinfo,v 1.6 2007/08/08 19:41:49 joerg Exp $
+$NetBSD: distinfo,v 1.7 2011/11/25 21:57:36 joerg Exp $
SHA1 (imp1.1b9.tar.gz) = 73d3ce69d2d31af0b8e6bfb3825ebcd2f519024c
RMD160 (imp1.1b9.tar.gz) = 2f0d49d90baa1c92edf564bf163147679c4cbaf4
Size (imp1.1b9.tar.gz) = 1334533 bytes
SHA1 (patch-aa) = a872102d3b3205b6e8e4d44839b150e94aa6fd8a
SHA1 (patch-ab) = f6e71dbd213cfdc447535bc25325c9417a99c498
-SHA1 (patch-ac) = bedff4ed0d84f482fe765b775a2c2ac58eacdba3
-SHA1 (patch-ad) = e929f3994e292d508a665d3c25d34b4f21c5fd60
+SHA1 (patch-ac) = ea5784b8da9276076aa76f98bc61445d70fafb54
+SHA1 (patch-ad) = c9c1e3533423efa3484543ca16aca80362134373
+SHA1 (patch-font3d_build.h) = b0ea326fad30e5b96eb2b9e0d376969cec5de90f
+SHA1 (patch-font3d_font3d.cc) = 99b0a41b0347e3ed94ecdcc3519c987ff8d5ea6a
+SHA1 (patch-font3d_font3d.h) = 42f74e7bb4c67de08f67b3f8bd37a732f23f7ad4
+SHA1 (patch-font3d_geometry.cc) = a4449a16aa3f4175c0460aedde60c152458c264b
+SHA1 (patch-font3d_geometry.h) = 09d0c66e0e568fc4f33d37c54d30cdc376e7acb5
+SHA1 (patch-font3d_vector.h) = 2be02ddcf448a6a5fcad69a3a7d70c5da629fc6d
+SHA1 (patch-pstoedit__3.21_src_drvtk.cpp) = 7d6b3ffea8fab4bc35a8561f42545d944669a3a1
+SHA1 (patch-pstoedit__3.21_src_drvtk.h) = 39395b97d9ced63930732ae6912692d1243a34b9
+SHA1 (patch-src_drvtk.cpp) = 24bc80930f3870930ff06ffbed68eaab086faa9b
diff --git a/graphics/impress/patches/patch-ac b/graphics/impress/patches/patch-ac
index 04409c73e6a..d734829413b 100644
--- a/graphics/impress/patches/patch-ac
+++ b/graphics/impress/patches/patch-ac
@@ -1,7 +1,16 @@
-$NetBSD: patch-ac,v 1.1 2006/04/22 17:45:38 joerg Exp $
+$NetBSD: patch-ac,v 1.2 2011/11/25 21:57:36 joerg Exp $
---- font3d/build.cc.orig 2006-04-22 17:41:01.000000000 +0000
+--- font3d/build.cc.orig 2000-07-16 02:37:31.000000000 +0000
+++ font3d/build.cc
+@@ -29,7 +29,7 @@
+ //==============================================================================================
+
+ #include <stdlib.h>
+-#include <fstream.h>
++#include <fstream>
+
+ #include "vector.h"
+ #include "truetype.h"
@@ -367,7 +367,7 @@ void PolygonizeContour(TTFont& font,
}
}
diff --git a/graphics/impress/patches/patch-ad b/graphics/impress/patches/patch-ad
index dcf40339f99..7d125aa3a7d 100644
--- a/graphics/impress/patches/patch-ad
+++ b/graphics/impress/patches/patch-ad
@@ -1,12 +1,17 @@
-$NetBSD: patch-ad,v 1.1 2007/08/08 19:41:49 joerg Exp $
+$NetBSD: patch-ad,v 1.2 2011/11/25 21:57:36 joerg Exp $
---- font3d/truetype.cc.orig 2007-08-08 19:20:34.000000000 +0000
+--- font3d/truetype.cc.orig 2000-07-16 02:37:31.000000000 +0000
+++ font3d/truetype.cc
-@@ -29,7 +29,6 @@
+@@ -29,10 +29,9 @@
//==============================================================================================
#include <stdlib.h>
-#include <malloc.h>
#include <stdio.h>
- #include <iostream.h>
- #include <iomanip.h>
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include <ctype.h>
+
+ #include "truetype.h"
diff --git a/graphics/impress/patches/patch-font3d_build.h b/graphics/impress/patches/patch-font3d_build.h
new file mode 100644
index 00000000000..b80029606af
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_build.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-font3d_build.h,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/build.h.orig 2011-11-25 18:27:44.000000000 +0000
++++ font3d/build.h
+@@ -31,7 +31,9 @@
+ #ifndef __BUILD_H__
+ #define __BUILD_H__
+
+-#include <iostream.h>
++#include <iostream>
++
++using namespace std;
+
+ #include "truetype.h"
+ #include "geometry.h"
diff --git a/graphics/impress/patches/patch-font3d_font3d.cc b/graphics/impress/patches/patch-font3d_font3d.cc
new file mode 100644
index 00000000000..f30e9dc7026
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_font3d.cc
@@ -0,0 +1,15 @@
+$NetBSD: patch-font3d_font3d.cc,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/font3d.cc.orig 2011-11-25 18:27:38.000000000 +0000
++++ font3d/font3d.cc
+@@ -30,8 +30,8 @@
+
+ #include <math.h>
+ #include <stdlib.h>
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include <stdio.h>
+ #include <string.h>
+
diff --git a/graphics/impress/patches/patch-font3d_font3d.h b/graphics/impress/patches/patch-font3d_font3d.h
new file mode 100644
index 00000000000..a96e9efbda8
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_font3d.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-font3d_font3d.h,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/font3d.h.orig 2011-11-25 18:28:29.000000000 +0000
++++ font3d/font3d.h
+@@ -31,7 +31,8 @@
+ #ifndef __FONT3D_H__
+ #define __FONT3D_H__
+
+-#include <fstream.h>
++#include <fstream>
++#include <cstring>
+ #include <stddef.h>
+
+ #define RIGHT_HANDED 0
diff --git a/graphics/impress/patches/patch-font3d_geometry.cc b/graphics/impress/patches/patch-font3d_geometry.cc
new file mode 100644
index 00000000000..cda261a4505
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_geometry.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-font3d_geometry.cc,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/geometry.cc.orig 2011-11-25 18:27:42.000000000 +0000
++++ font3d/geometry.cc
+@@ -31,7 +31,7 @@
+ #include <math.h>
+ #include <stddef.h>
+ #include <stdio.h>
+-#include <iostream.h>
++#include <iostream>
+
+ #include "vector.h"
+ #include "geometry.h"
diff --git a/graphics/impress/patches/patch-font3d_geometry.h b/graphics/impress/patches/patch-font3d_geometry.h
new file mode 100644
index 00000000000..0f7a9d4a078
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_geometry.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-font3d_geometry.h,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/geometry.h.orig 2011-11-25 18:27:25.000000000 +0000
++++ font3d/geometry.h
+@@ -31,7 +31,8 @@
+ #ifndef __GEOMETRY_H__
+ #define __GEOMETRY_H__
+
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+
+ #include "vector.h"
+
diff --git a/graphics/impress/patches/patch-font3d_vector.h b/graphics/impress/patches/patch-font3d_vector.h
new file mode 100644
index 00000000000..9ed7fb6112b
--- /dev/null
+++ b/graphics/impress/patches/patch-font3d_vector.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-font3d_vector.h,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- font3d/vector.h.orig 2011-11-25 18:27:15.000000000 +0000
++++ font3d/vector.h
+@@ -73,7 +73,9 @@
+ #define __VECTOR_H__
+
+ #include <math.h>
+-#include <iostream.h>
++#include <iostream>
++
++using namespace std;
+
+ class vector
+ {
diff --git a/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.cpp b/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.cpp
new file mode 100644
index 00000000000..fc5d155736a
--- /dev/null
+++ b/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.cpp
@@ -0,0 +1,157 @@
+$NetBSD: patch-pstoedit__3.21_src_drvtk.cpp,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- pstoedit_3.21/src/drvtk.cpp.orig 2000-10-03 20:00:50.000000000 +0000
++++ pstoedit_3.21/src/drvtk.cpp
+@@ -26,17 +26,21 @@
+ */
+
+ #include "drvtk.h"
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include <string.h>
+
+ // for sin and cos
+ #include <math.h>
+
++#include "version.h"
++
+
+ static const char * tagNames = "";
+ static int swapHW = 0;
+ static int noImPress = 0;
++static int doImages = 0;
++static char* PNGoutFullFileName = new char [2048];
+
+ static const char * colorstring(float r, float g, float b)
+ {
+@@ -70,10 +74,12 @@ void drvTK::outputEscapedText(const char
+ drvTK::derivedConstructor(drvTK):
+ constructBase,
+ buffer(tempFile.asOutput()),
+- objectId (1)
++ objectId (1),
++ imgcount(0)
+ {
+ // const RSString & l_pagesize = getPageSize();
+
++ cerr << "pstoedit: Backend for Tk (ImPress 1.1b9)\n";
+ // set tk specific values
+ scale = 1.0; /* tk default internal scale factor */
+
+@@ -92,6 +98,8 @@ drvTK::derivedConstructor(drvTK):
+ swapHW = 1;
+ } else if (!strcmp(d_argv[i], "-I")) {
+ noImPress = 1;
++ } else if (!strcmp(d_argv[i], "-i")) {
++ doImages = 1;
+ }
+ }
+ strcpy(pwidth, "8.5i");
+@@ -460,6 +468,9 @@ void drvTK::canvasCreate()
+ << "set Global(Circulate) 1" << endl
+ << "set Global(SlideScale) 0" << endl;
+ }
++ if (doImages) {
++ outf << "package require Img" << endl;
++ }
+ }
+
+ drvTK::~drvTK()
+@@ -478,6 +489,9 @@ void drvTK::print_coords()
+ float pc_x;
+ float pc_y;
+ for (unsigned int n = 0; n < numberOfElementsInPath(); n++) {
++ if (pathElement(n).getType() == closepath) {
++ break;
++ }
+ const Point & p = pathElement(n).getPoint(0);
+ pc_x = (p.x_ + x_offset) * scale;
+ pc_y = (currentDeviceHeight - p.y_ + y_offset) * scale;
+@@ -591,12 +605,10 @@ void drvTK::show_path()
+ } else {
+ buffer << " -fill \"\"";
+ }
+- buffer << " -outline \""
+- << colorstring(currentR(),currentG(),currentB())
+- << "\""
++ // Outline is always nothing in postscript polygons
++ buffer << " -outline \"\""
+ << " -width "
+ << (currentLineWidth()?currentLineWidth():1)
+- << "p"
+ << " -tags \""
+ << tagNames
+ << "\" ]"
+@@ -608,12 +620,10 @@ void drvTK::show_path()
+ buffer << " -fill \""
+ << colorstring(currentR(),currentG(),currentB())
+ << "\"";
+- buffer << " -outline \""
+- << colorstring(currentR(),currentG(),currentB())
+- << "\""
++ // Outline is always nothing in postscript polygons
++ buffer << " -outline \"\""
+ << " -width "
+ << (currentLineWidth()?currentLineWidth():1)
+- << "p"
+ << " -tags \""
+ << tagNames
+ << "\" ]"
+@@ -626,7 +636,6 @@ void drvTK::show_path()
+ << "\""
+ << " -width "
+ << (currentLineWidth()?currentLineWidth():1)
+- << "p"
+ << " -tags \""
+ << tagNames
+ << "\" ]"
+@@ -650,9 +659,38 @@ void drvTK::show_rectangle(const float l
+ show_path();
+ }
+
++void drvTK::show_image(const Image & imageinfo)
++{
++ if (doImages) {
++ Point lowerleft, upperright;
++ imageinfo.getBoundingBox(lowerleft, upperright);
++
++ sprintf(PNGoutFullFileName, "%s%s%02d.png", outDirName, outBaseName, imgcount++);
++
++ char * title = new char [strlen(inFileName.value())+100];
++ sprintf(title,"raster image number %d from input file %s",imgcount,inFileName.value());
++ char generator[100];
++ sprintf(generator,"pstoedit version: %s",version);
++ imageinfo.writePNGImage(PNGoutFullFileName,inFileName.value(),title,generator);
++
++ delete[] title;
++
++ buffer << "image create photo {" << PNGoutFullFileName << "} -file {" << PNGoutFullFileName << "}" << endl;
++ buffer << "set i [$Global(CurrentCanvas) create image "
++ << ((lowerleft.x_ + x_offset) * scale) << " "
++ << ((currentDeviceHeight - lowerleft.y_ + y_offset) * scale)
++ << " -image {" << PNGoutFullFileName << "}"
++ << " -anchor sw"
++ << " -tags \""
++ << tagNames
++ << "\" ]"
++ << endl;
++ }
++}
++
+ static DriverDescriptionT<drvTK> D_tk(
+ "tk","tk and/or tk applet source code","tk",
+- false, // backend supports subpathes
++ true, // backend supports subpathes
+ // if subpathes are supported, the backend must deal with
+ // sequences of the following form
+ // moveto (start of subpath)
+@@ -669,7 +707,7 @@ static DriverDescriptionT<drvTK> D_tk(
+ false, // backend supports curves
+ false, // backend supports elements which are filled and have edges
+ true, // backend supports text
+- false, // backend supports Images
++ true, // backend supports Images
+ DriverDescription::normalopen,
+ true); // backend support multiple pages
+
diff --git a/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.h b/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.h
new file mode 100644
index 00000000000..1070f52beb9
--- /dev/null
+++ b/graphics/impress/patches/patch-pstoedit__3.21_src_drvtk.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-pstoedit__3.21_src_drvtk.h,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- pstoedit_3.21/src/drvtk.h.orig 2000-10-03 20:00:50.000000000 +0000
++++ pstoedit_3.21/src/drvtk.h
+@@ -48,6 +48,8 @@ private:
+ void outputEscapedText(const char* string);
+ #include "drvfuncs.h"
+
++ virtual void show_image(const Image & imageinfo);
++ int imgcount;
+ };
+ #endif
+
diff --git a/graphics/impress/patches/patch-src_drvtk.cpp b/graphics/impress/patches/patch-src_drvtk.cpp
new file mode 100644
index 00000000000..8970a25d512
--- /dev/null
+++ b/graphics/impress/patches/patch-src_drvtk.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_drvtk.cpp,v 1.1 2011/11/25 21:57:36 joerg Exp $
+
+--- src/drvtk.cpp.orig 2011-11-25 18:27:54.000000000 +0000
++++ src/drvtk.cpp
+@@ -26,7 +26,7 @@
+ */
+
+ #include "drvtk.h"
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include <string.h>
+