diff options
author | bland <bland@FreeBSD.org> | 2003-11-03 02:05:48 +0800 |
---|---|---|
committer | bland <bland@FreeBSD.org> | 2003-11-03 02:05:48 +0800 |
commit | c9623a643a9d63499dd182bd6e3c31ddf99318c4 (patch) | |
tree | 2852ed8a2dcc54ebcf3c2b06d9b7dfdb882faa11 /graphics/passepartout | |
parent | 45fed346a5489fe85d15bd762866cad4d8fc6e0e (diff) | |
download | freebsd-ports-graphics-c9623a643a9d63499dd182bd6e3c31ddf99318c4.tar.gz freebsd-ports-graphics-c9623a643a9d63499dd182bd6e3c31ddf99318c4.tar.zst freebsd-ports-graphics-c9623a643a9d63499dd182bd6e3c31ddf99318c4.zip |
Fix build on 4.x systems.
Reported by: bento via kris
Diffstat (limited to 'graphics/passepartout')
7 files changed, 119 insertions, 2 deletions
diff --git a/graphics/passepartout/Makefile b/graphics/passepartout/Makefile index d852bf8153c..7bef13d5be1 100644 --- a/graphics/passepartout/Makefile +++ b/graphics/passepartout/Makefile @@ -7,7 +7,7 @@ PORTNAME= passepartout PORTVERSION= 0.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics gnome MASTER_SITES= http://www.stacken.kth.se/project/pptout/files/ @@ -30,6 +30,12 @@ USE_X_PREFIX= yes USE_GNOME= gnometarget gnomehack USE_LIBTOOL= yes +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-old_cxx +.endif + # Fix for recent libxml++ API change post-patch: @${FIND} ${WRKSRC}/src/pptout -name *.cc \ @@ -37,4 +43,4 @@ post-patch: | ${XARGS} ${REINPLACE_CMD} -e \ 's|add_attribute|set_attribute|' -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/graphics/passepartout/files/extra-patch-old_cxx b/graphics/passepartout/files/extra-patch-old_cxx new file mode 100644 index 00000000000..38bb797fadb --- /dev/null +++ b/graphics/passepartout/files/extra-patch-old_cxx @@ -0,0 +1,48 @@ +--- src/ps/pfb2pfa.cc.orig Fri Oct 31 20:57:37 2003 ++++ src/ps/pfb2pfa.cc Sun Nov 2 11:47:20 2003 +@@ -4,8 +4,8 @@ + #include "encode.h" + + void PS::pfb2pfa(std::istream &in, std::ostream &out) { +- in.exceptions(std::ios_base::eofbit); // throw exception on eof +- try { ++// in.exceptions(std::ios_base::eofbit); // throw exception on eof ++// try { + while(in) { // parse header + if (in.peek() != 128) + throw std::runtime_error("bad magic number for segment"); +@@ -40,9 +40,9 @@ + filter.end(); + } + } +- } catch (std::ios_base::failure) { +- throw std::runtime_error("unexpected end of file"); +- } ++// } catch (std::ios::failure) { ++// throw std::runtime_error("unexpected end of file"); ++// } + } + + #ifdef PFB2PFA_STANDALONE +--- src/util/filesys.h.orig Fri Oct 31 20:47:03 2003 ++++ src/util/filesys.h Fri Oct 31 20:52:19 2003 +@@ -4,7 +4,7 @@ + // Copyright (C) 2002, 2003, Fredrik Arnerup & Rasmus Kaj, See COPYING + /// + #include <string> +-#include <ios> // mode for access ++#include <iostream> // mode for access + + // Check if the specified file exists + bool exists(const std::string& filename); +--- src/pptout/docview.cc.orig Sun Nov 2 11:56:40 2003 ++++ src/pptout/docview.cc Sun Nov 2 12:04:37 2003 +@@ -467,7 +467,7 @@ + + void Document_View::on_clipboard_clear() { + // not really necessary +- clip.clear(); ++ clip.resize(0); + } + + void Document_View::cut() { diff --git a/graphics/passepartout/files/patch-src::pptout::filewatcher.h b/graphics/passepartout/files/patch-src::pptout::filewatcher.h new file mode 100644 index 00000000000..4ac0903fb64 --- /dev/null +++ b/graphics/passepartout/files/patch-src::pptout::filewatcher.h @@ -0,0 +1,10 @@ +--- src/pptout/filewatcher.h.orig Sun Nov 2 11:53:06 2003 ++++ src/pptout/filewatcher.h Sun Nov 2 11:53:23 2003 +@@ -5,6 +5,7 @@ + /// + #include <sigc++/sigc++.h> + #include <string> ++#include <sys/time.h> + + class File_Watcher: public SigC::Object { + public: diff --git a/graphics/passepartout/files/patch-src::testbed::testbed.cc b/graphics/passepartout/files/patch-src::testbed::testbed.cc new file mode 100644 index 00000000000..ebab000186d --- /dev/null +++ b/graphics/passepartout/files/patch-src::testbed::testbed.cc @@ -0,0 +1,19 @@ +--- src/testbed/testbed.cc.orig Fri Oct 31 20:36:24 2003 ++++ src/testbed/testbed.cc Fri Oct 31 20:39:09 2003 +@@ -1,6 +1,7 @@ + #include "testbed.hh" + #include "util/warning.h" + #include <glibmm/exception.h> // Stupid glib! ++#include <algorithm> + #include <functional> + /// + // Copyright (C) 2003, Fredrik Arnerup & Rasmus Kaj, See COPYING +@@ -53,7 +54,7 @@ + verbose.active = true; + verbose << "Starting test run. " << TestCase::cases.size() + << " case(s) to try." << std::endl; +- for_each(TestCase::cases.begin(), TestCase::cases.end(), ++ std::for_each(TestCase::cases.begin(), TestCase::cases.end(), + std::mem_fun(&TestCase::run)); + verbose << "Done running " << TestCase::cases.size() << " test case(s). " + << TestCase::successes << " succeded, " diff --git a/graphics/passepartout/files/patch-src::util::filesys.cc b/graphics/passepartout/files/patch-src::util::filesys.cc new file mode 100644 index 00000000000..690b5919f8c --- /dev/null +++ b/graphics/passepartout/files/patch-src::util::filesys.cc @@ -0,0 +1,12 @@ +--- src/util/filesys.cc.orig Fri Oct 31 20:53:31 2003 ++++ src/util/filesys.cc Fri Oct 31 20:55:05 2003 +@@ -5,7 +5,9 @@ + #include "stringutil.h" + #include "os.h" + #include <unistd.h> ++#include <errno.h> + #include <stdexcept> ++#include <memory> + + using std::string; + diff --git a/graphics/passepartout/files/patch-src::util::stringutil.cc b/graphics/passepartout/files/patch-src::util::stringutil.cc new file mode 100644 index 00000000000..fb227a41f0d --- /dev/null +++ b/graphics/passepartout/files/patch-src::util::stringutil.cc @@ -0,0 +1,11 @@ +--- src/util/stringutil.cc.orig Fri Oct 31 20:40:15 2003 ++++ src/util/stringutil.cc Fri Oct 31 20:44:29 2003 +@@ -17,7 +17,7 @@ + + bool whitespace(char c) + { +- return std::isspace(c); ++ return isspace(c); + } + + std::string strip_whitespace(std::string s, bool front, bool back) diff --git a/graphics/passepartout/files/patch-src::xml2ps::pagedstream.cc b/graphics/passepartout/files/patch-src::xml2ps::pagedstream.cc new file mode 100644 index 00000000000..1cf5ee41769 --- /dev/null +++ b/graphics/passepartout/files/patch-src::xml2ps::pagedstream.cc @@ -0,0 +1,11 @@ +--- src/xml2ps/pagedstream.cc.orig Sun Nov 2 11:48:29 2003 ++++ src/xml2ps/pagedstream.cc Sun Nov 2 11:49:54 2003 +@@ -3,6 +3,8 @@ + #include <fstream> + #include <sstream> + #include <iostream> ++#include <exception> ++#include <memory> + + xml2ps::PagedStream::PagedStream() + : current_part(0) |