summaryrefslogtreecommitdiff
path: root/editors/lyx
diff options
context:
space:
mode:
authorjoerg <joerg>2013-05-09 13:56:57 +0000
committerjoerg <joerg>2013-05-09 13:56:57 +0000
commit14baadcd063f17cc51e31c37d209cc5890a80356 (patch)
treea142fdd366fe8871541f580e8c1a73c2836563cc /editors/lyx
parentafe129eb72ef90e6aec3c6d384bab41fcab74d89 (diff)
downloadpkgsrc-14baadcd063f17cc51e31c37d209cc5890a80356.tar.gz
Allow building with libc++, where std::shared_ptr overlaps with
boost::shared_ptr.
Diffstat (limited to 'editors/lyx')
-rw-r--r--editors/lyx/distinfo11
-rw-r--r--editors/lyx/patches/patch-boost_boost_detail_container__fwd.hpp14
-rw-r--r--editors/lyx/patches/patch-boost_libs_signals_src_named__slot__map.cpp22
-rw-r--r--editors/lyx/patches/patch-src_ISpell.cpp24
-rw-r--r--editors/lyx/patches/patch-src_ServerSocket.cpp42
-rw-r--r--editors/lyx/patches/patch-src_insets_InsetTabular.cpp120
-rw-r--r--editors/lyx/patches/patch-src_insets_InsetText.cpp30
-rw-r--r--editors/lyx/patches/patch-src_support_debug.h24
8 files changed, 281 insertions, 6 deletions
diff --git a/editors/lyx/distinfo b/editors/lyx/distinfo
index 2d5a5495858..b18adedfe85 100644
--- a/editors/lyx/distinfo
+++ b/editors/lyx/distinfo
@@ -1,13 +1,20 @@
-$NetBSD: distinfo,v 1.9 2012/11/23 12:32:00 joerg Exp $
+$NetBSD: distinfo,v 1.10 2013/05/09 13:56:57 joerg Exp $
SHA1 (lyx-1.6.10.tar.bz2) = 344e14897ea7d004bf181eac39355f1b08f0af83
RMD160 (lyx-1.6.10.tar.bz2) = b84409c19d320f915c3254d56d8aa0b40e61540d
Size (lyx-1.6.10.tar.bz2) = 12559454 bytes
+SHA1 (patch-boost_boost_detail_container__fwd.hpp) = 20e3b5cb7cc0ffff68f8678a2977771ff6ef92e3
+SHA1 (patch-boost_libs_signals_src_named__slot__map.cpp) = 3d73f93911eb2a9b51b0be34e3a26e85ec5b54f4
SHA1 (patch-development_MacOSX_Makefile.in) = ae9e51e3458f8986ae392b146f8684305b7fe25b
+SHA1 (patch-src_ISpell.cpp) = 6ec15efefe9f1c539f13a12a16757fd4e02b7b96
+SHA1 (patch-src_ServerSocket.cpp) = 62c9ecfe0de4516aba3ebca29b1a1e1768694551
SHA1 (patch-src_WordList.cpp) = d747efcd6ca4d7015a5c6860a8844ac79a65672a
+SHA1 (patch-src_frontends_qt4_GuiCommandBuffer.cpp) = da39a3ee5e6b4b0d3255bfef95601890afd80709
SHA1 (patch-src_insets_InsetInclude.cpp) = 94d52c40e188a2d8c083720e5b758c862e499726
-SHA1 (patch-src_insets_InsetTabular.cpp) = 9b8f9e5bf96780f17a68f95ba34724fd8b5e34c2
+SHA1 (patch-src_insets_InsetTabular.cpp) = 13e35c0a66ae87443315624d8c4bbbd11ea20cea
+SHA1 (patch-src_insets_InsetText.cpp) = 83719f8a1b6ff221ce34ef5a9b8c7da56c5fb79f
SHA1 (patch-src_mathed_InsetMath.h) = c178b1436c7a969e29b328dde1a800e9ccb7af0e
SHA1 (patch-src_mathed_MathData.h) = fcd51f36aa2aae29f75e041d7adb1d88baa370a5
+SHA1 (patch-src_support_debug.h) = fa6e4ddc0bd6fdeb00ab99e4be190be9430dced9
SHA1 (patch-src_support_strfwd.h) = 4ef82f8703fd68f8b953447f05ab1fd71958c379
SHA1 (patch-src_support_unicode.cpp) = 71bdc1b929a3c90bed84d6de5aa0734e548c67de
diff --git a/editors/lyx/patches/patch-boost_boost_detail_container__fwd.hpp b/editors/lyx/patches/patch-boost_boost_detail_container__fwd.hpp
new file mode 100644
index 00000000000..88b8f21a2ef
--- /dev/null
+++ b/editors/lyx/patches/patch-boost_boost_detail_container__fwd.hpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-boost_boost_detail_container__fwd.hpp,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- boost/boost/detail/container_fwd.hpp.orig 2013-05-09 11:28:09.000000000 +0000
++++ boost/boost/detail/container_fwd.hpp
+@@ -16,7 +16,8 @@
+ #if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \
+ || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
+ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
+- || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
++ || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \
++ || defined(_LIBCPP_VERSION)
+
+ #include <deque>
+ #include <list>
diff --git a/editors/lyx/patches/patch-boost_libs_signals_src_named__slot__map.cpp b/editors/lyx/patches/patch-boost_libs_signals_src_named__slot__map.cpp
new file mode 100644
index 00000000000..26a91dfc7b7
--- /dev/null
+++ b/editors/lyx/patches/patch-boost_libs_signals_src_named__slot__map.cpp
@@ -0,0 +1,22 @@
+$NetBSD: patch-boost_libs_signals_src_named__slot__map.cpp,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- boost/libs/signals/src/named_slot_map.cpp.orig 2013-05-09 11:30:54.000000000 +0000
++++ boost/libs/signals/src/named_slot_map.cpp
+@@ -102,7 +102,7 @@ void named_slot_map::disconnect(const st
+ i->first.disconnect();
+ i = next;
+ }
+- groups.erase(group);
++ groups.erase(const_group_iterator(group));
+ }
+ }
+
+@@ -125,7 +125,7 @@ void named_slot_map::remove_disconnected
+ }
+
+ // Clear out empty groups
+- if (empty(g)) groups.erase(g++);
++ if (empty(g)) groups.erase(const_group_iterator(g++));
+ else ++g;
+ }
+ }
diff --git a/editors/lyx/patches/patch-src_ISpell.cpp b/editors/lyx/patches/patch-src_ISpell.cpp
new file mode 100644
index 00000000000..91d3e52f5bf
--- /dev/null
+++ b/editors/lyx/patches/patch-src_ISpell.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_ISpell.cpp,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- src/ISpell.cpp.orig 2013-05-09 12:16:25.000000000 +0000
++++ src/ISpell.cpp
+@@ -34,8 +34,6 @@
+ # include <sys/time.h>
+ #endif
+
+-using boost::shared_ptr;
+-
+ using namespace std;
+ using namespace lyx::support;
+
+@@ -51,8 +49,8 @@ public:
+ int * in, int * out, int * err)
+ : params(p), lang(l), pipein(in), pipeout(out), pipeerr(err) {}
+ ///
+- virtual shared_ptr<ForkedProcess> clone() const {
+- return shared_ptr<ForkedProcess>(new LaunchIspell(*this));
++ virtual boost::shared_ptr<ForkedProcess> clone() const {
++ return boost::shared_ptr<ForkedProcess>(new LaunchIspell(*this));
+ }
+ ///
+ int start();
diff --git a/editors/lyx/patches/patch-src_ServerSocket.cpp b/editors/lyx/patches/patch-src_ServerSocket.cpp
new file mode 100644
index 00000000000..cde3fc64b8c
--- /dev/null
+++ b/editors/lyx/patches/patch-src_ServerSocket.cpp
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_ServerSocket.cpp,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- src/ServerSocket.cpp.orig 2013-05-09 12:01:41.000000000 +0000
++++ src/ServerSocket.cpp
+@@ -39,8 +39,6 @@
+ using namespace std;
+ using namespace lyx::support;
+
+-using boost::shared_ptr;
+-
+ namespace lyx {
+
+ // Address is the unix address for the socket.
+@@ -112,7 +110,7 @@ void ServerSocket::serverCallback()
+
+ // Register the new client.
+ clients[client_fd] =
+- shared_ptr<LyXDataSocket>(new LyXDataSocket(client_fd));
++ boost::shared_ptr<LyXDataSocket>(new LyXDataSocket(client_fd));
+ theApp()->registerSocketCallback(
+ client_fd,
+ boost::bind(&ServerSocket::dataCallback,
+@@ -125,7 +123,7 @@ void ServerSocket::serverCallback()
+ // if the connection has been closed
+ void ServerSocket::dataCallback(int fd)
+ {
+- shared_ptr<LyXDataSocket> client = clients[fd];
++ boost::shared_ptr<LyXDataSocket> client = clients[fd];
+
+ string line;
+ size_t pos;
+@@ -191,8 +189,8 @@ void ServerSocket::writeln(string const
+ // lyxerr << "ServerSocket debug dump.\n"
+ // << "fd = " << fd_ << ", address = " << address_.absFilename() << ".\n"
+ // << "Clients: " << clients.size() << ".\n";
+-// map<int, shared_ptr<LyXDataSocket> >::const_iterator client = clients.begin();
+-// map<int, shared_ptr<LyXDataSocket> >::const_iterator end = clients.end();
++// map<int, boost::shared_ptr<LyXDataSocket> >::const_iterator client = clients.begin();
++// map<int, boost::shared_ptr<LyXDataSocket> >::const_iterator end = clients.end();
+ // for (; client != end; ++client)
+ // lyxerr << "fd = " << client->first << '\n';
+ // }
diff --git a/editors/lyx/patches/patch-src_insets_InsetTabular.cpp b/editors/lyx/patches/patch-src_insets_InsetTabular.cpp
index 7f4cd49897c..d0783b3cd0a 100644
--- a/editors/lyx/patches/patch-src_insets_InsetTabular.cpp
+++ b/editors/lyx/patches/patch-src_insets_InsetTabular.cpp
@@ -1,8 +1,16 @@
-$NetBSD: patch-src_insets_InsetTabular.cpp,v 1.1 2012/11/23 12:32:00 joerg Exp $
+$NetBSD: patch-src_insets_InsetTabular.cpp,v 1.2 2013/05/09 13:56:58 joerg Exp $
---- src/insets/InsetTabular.cpp.orig 2012-11-22 22:03:25.000000000 +0000
+--- src/insets/InsetTabular.cpp.orig 2011-01-05 14:02:35.000000000 +0000
+++ src/insets/InsetTabular.cpp
-@@ -176,6 +176,56 @@ private:
+@@ -68,7 +68,6 @@
+ using namespace std;
+ using namespace lyx::support;
+
+-using boost::shared_ptr;
+ using boost::dynamic_pointer_cast;
+
+
+@@ -176,6 +175,56 @@ private:
};
@@ -59,7 +67,7 @@ $NetBSD: patch-src_insets_InsetTabular.cpp,v 1.1 2012/11/23 12:32:00 joerg Exp $
template <class T>
string const write_attribute(string const & name, T const & t)
{
-@@ -232,56 +282,6 @@ string const write_attribute(string cons
+@@ -232,56 +281,6 @@ string const write_attribute(string cons
}
@@ -116,3 +124,107 @@ $NetBSD: patch-src_insets_InsetTabular.cpp,v 1.1 2012/11/23 12:32:00 joerg Exp $
// I would have liked a fromstr template a lot better. (Lgb)
bool string2type(string const str, LyXAlignment & num)
{
+@@ -2203,7 +2202,7 @@ int Tabular::TeXRow(odocstream & os, row
+ OutputParams const & runparams) const
+ {
+ idx_type cell = cellIndex(i, 0);
+- shared_ptr<InsetTableCell> inset = cellInset(cell);
++ boost::shared_ptr<InsetTableCell> inset = cellInset(cell);
+ Paragraph const & par = inset->paragraphs().front();
+ string const lang = par.getParLanguage(buffer().params())->lang();
+
+@@ -2233,7 +2232,7 @@ int Tabular::TeXRow(odocstream & os, row
+ if (isPartOfMultiColumn(i, j))
+ continue;
+ ret += TeXCellPreamble(os, cell, ismulticol);
+- shared_ptr<InsetTableCell> inset = cellInset(cell);
++ boost::shared_ptr<InsetTableCell> inset = cellInset(cell);
+
+ Paragraph const & par = inset->paragraphs().front();
+ bool rtl = par.isRTL(buffer().params())
+@@ -2769,13 +2768,13 @@ void Tabular::plaintext(odocstream & os,
+ }
+
+
+-shared_ptr<InsetTableCell> Tabular::cellInset(idx_type cell) const
++boost::shared_ptr<InsetTableCell> Tabular::cellInset(idx_type cell) const
+ {
+ return cell_info[cellRow(cell)][cellColumn(cell)].inset;
+ }
+
+
+-shared_ptr<InsetTableCell> Tabular::cellInset(row_type row,
++boost::shared_ptr<InsetTableCell> Tabular::cellInset(row_type row,
+ col_type column) const
+ {
+ return cell_info[row][column].inset;
+@@ -2783,7 +2782,7 @@ shared_ptr<InsetTableCell> Tabular::cell
+
+
+ void Tabular::setCellInset(row_type row, col_type column,
+- shared_ptr<InsetTableCell> ins) const
++ boost::shared_ptr<InsetTableCell> ins) const
+ {
+ CellData & cd = cell_info[row][column];
+ cd.inset = ins;
+@@ -4154,13 +4153,13 @@ void InsetTabular::validate(LaTeXFeature
+ }
+
+
+-shared_ptr<InsetTableCell const> InsetTabular::cell(idx_type idx) const
++boost::shared_ptr<InsetTableCell const> InsetTabular::cell(idx_type idx) const
+ {
+ return tabular.cellInset(idx);
+ }
+
+
+-shared_ptr<InsetTableCell> InsetTabular::cell(idx_type idx)
++boost::shared_ptr<InsetTableCell> InsetTabular::cell(idx_type idx)
+ {
+ return tabular.cellInset(idx);
+ }
+@@ -4960,7 +4959,7 @@ bool InsetTabular::pasteClipboard(Cursor
+ --c1;
+ continue;
+ }
+- shared_ptr<InsetTableCell> inset(
++ boost::shared_ptr<InsetTableCell> inset(
+ new InsetTableCell(*paste_tabular->cellInset(r1, c1)));
+ tabular.setCellInset(r2, c2, inset);
+ // FIXME: change tracking (MG)
+@@ -4983,7 +4982,7 @@ void InsetTabular::cutSelection(Cursor &
+ getSelection(cur, rs, re, cs, ce);
+ for (row_type i = rs; i <= re; ++i) {
+ for (col_type j = cs; j <= ce; ++j) {
+- shared_ptr<InsetTableCell> t
++ boost::shared_ptr<InsetTableCell> t
+ = cell(tabular.cellIndex(i, j));
+ if (cur.buffer().params().trackChanges)
+ // FIXME: Change tracking (MG)
+@@ -5153,7 +5152,7 @@ bool InsetTabular::insertPlaintextString
+ case '\t':
+ // we can only set this if we are not too far right
+ if (cols < columns) {
+- shared_ptr<InsetTableCell> inset = loctab->cellInset(cell);
++ boost::shared_ptr<InsetTableCell> inset = loctab->cellInset(cell);
+ Font const font = bv.textMetrics(&inset->text()).
+ displayFont(0, 0);
+ inset->setText(buf.substr(op, p - op), font,
+@@ -5165,7 +5164,7 @@ bool InsetTabular::insertPlaintextString
+ case '\n':
+ // we can only set this if we are not too far right
+ if (cols < columns) {
+- shared_ptr<InsetTableCell> inset = tabular.cellInset(cell);
++ boost::shared_ptr<InsetTableCell> inset = tabular.cellInset(cell);
+ Font const font = bv.textMetrics(&inset->text()).
+ displayFont(0, 0);
+ inset->setText(buf.substr(op, p - op), font,
+@@ -5182,7 +5181,7 @@ bool InsetTabular::insertPlaintextString
+ }
+ // check for the last cell if there is no trailing '\n'
+ if (cell < cells && op < len) {
+- shared_ptr<InsetTableCell> inset = loctab->cellInset(cell);
++ boost::shared_ptr<InsetTableCell> inset = loctab->cellInset(cell);
+ Font const font = bv.textMetrics(&inset->text()).displayFont(0, 0);
+ inset->setText(buf.substr(op, len - op), font,
+ buffer().params().trackChanges);
diff --git a/editors/lyx/patches/patch-src_insets_InsetText.cpp b/editors/lyx/patches/patch-src_insets_InsetText.cpp
new file mode 100644
index 00000000000..48cda63ea0d
--- /dev/null
+++ b/editors/lyx/patches/patch-src_insets_InsetText.cpp
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_insets_InsetText.cpp,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- src/insets/InsetText.cpp.orig 2013-05-09 12:13:13.000000000 +0000
++++ src/insets/InsetText.cpp
+@@ -62,7 +62,6 @@ using namespace std;
+ using namespace lyx::support;
+
+ using boost::bind;
+-using boost::ref;
+
+ namespace lyx {
+
+@@ -353,7 +352,7 @@ int InsetText::docbook(odocstream & os,
+ void InsetText::validate(LaTeXFeatures & features) const
+ {
+ for_each(paragraphs().begin(), paragraphs().end(),
+- bind(&Paragraph::validate, _1, ref(features)));
++ bind(&Paragraph::validate, _1, boost::ref(features)));
+ }
+
+
+@@ -435,7 +434,7 @@ void InsetText::appendParagraphs(Paragra
+ distance(pl.begin(), ins) - 1);
+
+ for_each(pit, plist.end(),
+- bind(&ParagraphList::push_back, ref(pl), _1));
++ bind(&ParagraphList::push_back, boost::ref(pl), _1));
+ }
+
+
diff --git a/editors/lyx/patches/patch-src_support_debug.h b/editors/lyx/patches/patch-src_support_debug.h
new file mode 100644
index 00000000000..a292ab1991e
--- /dev/null
+++ b/editors/lyx/patches/patch-src_support_debug.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_support_debug.h,v 1.1 2013/05/09 13:56:58 joerg Exp $
+
+--- src/support/debug.h.orig 2013-05-09 11:37:52.000000000 +0000
++++ src/support/debug.h
+@@ -19,17 +19,8 @@
+ #define LYXDEBUG_H
+
+ #include "support/strfwd.h"
+-
+-
+-namespace std {
+-
+-class ios_base;
+-
+-template<typename CharT, typename Traits> class basic_streambuf;
+-typedef basic_streambuf<char, char_traits<char> > streambuf;
+-
+-}
+-
++#include <ios>
++#include <streambuf>
+
+ namespace lyx {
+