diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2013-10-20 18:57:18 +0000 |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2013-10-20 18:57:18 +0000 |
commit | 1af68ec201d6d9a64152a46473634e2481158876 (patch) | |
tree | fa35f5754b01f7d8eb651e424be1756c34c397a8 /print | |
parent | b49223caeb1e6ae99554c0ab99a3cedf00536c3d (diff) | |
download | ports-1af68ec201d6d9a64152a46473634e2481158876.tar.gz ports-1af68ec201d6d9a64152a46473634e2481158876.zip |
Notes
Diffstat (limited to 'print')
-rw-r--r-- | print/lyx/Makefile | 63 | ||||
-rw-r--r-- | print/lyx/files/patch-config.h.in | 50 | ||||
-rw-r--r-- | print/lyx/files/patch-src__frontends__qt4__InGuiThread.h | 97 | ||||
-rw-r--r-- | print/lyx/files/patch-src__support__debug.h | 21 | ||||
-rw-r--r-- | print/lyx/files/patch-src__support__strfwd.h | 33 | ||||
-rw-r--r-- | print/lyx/pkg-plist | 7 |
6 files changed, 225 insertions, 46 deletions
diff --git a/print/lyx/Makefile b/print/lyx/Makefile index 5c0446e5c8d1..b077330f7586 100644 --- a/print/lyx/Makefile +++ b/print/lyx/Makefile @@ -16,70 +16,45 @@ COMMENT= Document processor interfaced with LaTeX (nearly WYSIWYG) LICENSE= GPLv2 -LIB_DEPENDS= boost_regex:${PORTSDIR}/devel/boost-libs \ - mythes-1.2.0:${PORTSDIR}/textproc/mythes +LIB_DEPENDS= libboost_regex.so:${PORTSDIR}/devel/boost-libs \ + libmythes-1.2.so:${PORTSDIR}/textproc/mythes CONFLICTS= lyx-1.[0-9]* MAJOR_VERSION= 2.0 MINOR_VERSION= 6 -USES= gmake iconv pkgconfig perl5 -USE_XZ= yes -USE_QT4= corelib gui moc_build uic_build rcc_build -USE_GNOME= desktopfileutils +USES= desktop-file-utils gmake iconv pkgconfig perl5 USE_PYTHON= -2.7 +USE_QT4= corelib gui moc_build uic_build rcc_build +USE_XZ= yes GNU_CONFIGURE= yes -CPPFLAGS+= ${PTHREAD_CFLAGS} -LDFLAGS+= ${PTHREAD_LIBS} CONFIGURE_ARGS= --without-included-boost \ --without-included-mythes \ ${ICONV_CONFIGURE_ARG} \ --with-extra-prefix=${LOCALBASE} -MAN1= lyx.1 lyxclient.1 tex2lyx.1 - OPTIONS_DEFINE= ASPELL ENCHANT HUNSPELL NLS OPTIONS_DEFAULT= HUNSPELL NLS +OPTIONS_SUB= yes ENCHANT_DESC= Spell checking using Enchant -NO_STAGE= yes -.include <bsd.port.options.mk> +ASPELL_CONFIGURE_OFF= --without-aspell +ASPELL_LIB_DEPENDS= libaspell.so:${PORTSDIR}/textproc/aspell +ENCHANT_CONFIGURE_OFF= --without-enchant +ENCHANT_LIB_DEPENDS= libenchant.so:${PORTSDIR}/textproc/enchant +HUNSPELL_CONFIGURE_OFF= --without-hunspell +HUNSPELL_LIB_DEPENDS= libhunspell-1.3.so:${PORTSDIR}/textproc/hunspell +NLS_CONFIGURE_OFF= --disable-nls +NLS_USES= gettext -.if ${PORT_OPTIONS:MASPELL} -LIB_DEPENDS+= aspell.16:${PORTSDIR}/textproc/aspell -.else -CONFIGURE_ARGS+= --without-aspell -.endif - -.if ${PORT_OPTIONS:MENCHANT} -LIB_DEPENDS+= enchant.1:${PORTSDIR}/textproc/enchant -.else -CONFIGURE_ARGS+= --without-enchant -.endif - -.if ${PORT_OPTIONS:MHUNSPELL} -LIB_DEPENDS+= hunspell-1.3.0:${PORTSDIR}/textproc/hunspell -.else -CONFIGURE_ARGS+= --without-hunspell -.endif - -.if empty(PORT_OPTIONS:MNLS) -CONFIGURE_ARGS+= --disable-nls -PLIST_SUB+= NLS="@comment " -.else -USES+= gettext -PLIST_SUB+= NLS="" -.endif +.include <bsd.port.options.mk> post-install: # Manually install the 48x48 icon and .desktop file. # Will not be needed in the 2.1 series, see LyX tickets 2820 and 7919. - ${MKDIR} ${PREFIX}/share/icons/hicolor/48x48/apps - ${MKDIR} ${PREFIX}/share/applications - ${INSTALL_DATA} ${WRKSRC}/lib/images/lyx.png ${PREFIX}/share/icons/hicolor/48x48/apps - ${INSTALL_DATA} ${FILESDIR}/lyx.desktop ${PREFIX}/share/applications - ${LOCALBASE}/bin/update-desktop-database --quiet - - @${CAT} ${PKGMESSAGE} + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps + ${MKDIR} ${STAGEDIR}${PREFIX}/share/applications + ${INSTALL_DATA} ${WRKSRC}/lib/images/lyx.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps + ${INSTALL_DATA} ${FILESDIR}/lyx.desktop ${STAGEDIR}${PREFIX}/share/applications .include <bsd.port.mk> diff --git a/print/lyx/files/patch-config.h.in b/print/lyx/files/patch-config.h.in new file mode 100644 index 000000000000..928e34f5abfc --- /dev/null +++ b/print/lyx/files/patch-config.h.in @@ -0,0 +1,50 @@ +The first change is required to use the C++ tr1 headers only with libstdc++, as +they are not in C++11. + +The second change is required to build with libc++, and is commit +ca7214b410d80c2108dfb43b89cf3c8fc5073882 upstream: + +commit ca7214b410d80c2108dfb43b89cf3c8fc5073882 +Author: Raphael Kubo da Costa <rakuco@FreeBSD.org> +Date: Thu Oct 17 23:39:36 2013 +0300 + + Remove FreeBSD checks when defining USE_WCHAR_T. + + The problems the comments in the build systems refer to seem to have been + fixed for years. [1] says the checks in libstdc++ have been improved, and + all supported FreeBSD versions enable wchar_t support unconditionally in + libstdc++. Additionally, this needlessly impacts FreeBSD when libc++ is used + instead of libstdc++. + + [1] http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.freebsd_wchar +--- config.h.in.orig 2013-10-20 20:37:35.000000000 +0300 ++++ config.h.in 2013-10-20 20:38:41.000000000 +0300 +@@ -633,7 +633,8 @@ + + // TR1 regex not supported in GCC <= 4.5 + #ifndef LYX_USE_TR1 +-# if __GNUC__ == 4 ++# include <ciso646> ++# if __GNUC__ == 4 && !defined(_LIBCPP_VERSION) + # define LYX_USE_TR1 + # endif + #endif +@@ -645,17 +646,7 @@ + # define BOOST_POSIX_PATH 1 + #endif + +-/* +- * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t +- * support compiled in: +- * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9 +- * And we are not interested at all what libc +- * does: What we need is a 32bit wide wchar_t, and a libstdc++ that +- * has the needed wchar_t support and uses UCS4. Whether it +- * implements this with the help of libc, or whether it has own code +- * does not matter for us, because we do not use libc directly (Georg) +-*/ +-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) ++#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 + # define USE_WCHAR_T + #endif + diff --git a/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h b/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h new file mode 100644 index 000000000000..40f01f665078 --- /dev/null +++ b/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h @@ -0,0 +1,97 @@ +From 2b0a7a5e01c71bd0c809844e0c6779f43870077b Mon Sep 17 00:00:00 2001 +From: Vincent van Ravesteijn <vfr@lyx.org> +Date: Mon, 8 Oct 2012 21:28:55 +0200 +Subject: [PATCH] Disambiguate std::bind, boost::bind, std::ref, boost::ref + +This fixes compilation with MSVC2012. +--- + src/frontends/qt4/InGuiThread.h | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/src/frontends/qt4/InGuiThread.h b/src/frontends/qt4/InGuiThread.h +index ea5d64b..0609cb0 100644 +--- src/frontends/qt4/InGuiThread.h ++++ src/frontends/qt4/InGuiThread.h +@@ -69,25 +69,25 @@ public: + template<class F, class P1> + R call(F f, P1& p1) + { +- return call(bind(f, ref(p1))); ++ return call(lyx::bind(f, lyx::ref(p1))); + } + + template<class F, class P1, class P2> + R call(F f, P1& p1, P2& p2) + { +- return call(bind(f, ref(p1), ref(p2))); ++ return call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2))); + } + + template<class F, class P1, class P2, class P3> + R call(F f, P1& p1, P2& p2, P3& p3) + { +- return call(bind(f, ref(p1), ref(p2), ref(p3))); ++ return call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3))); + } + + template<class F, class P1, class P2, class P3, class P4> + R call(F f, P1& p1, P2& p2, P3& p3, P4& p4) + { +- return call(bind(f, ref(p1), ref(p2), ref(p3), ref(p4))); ++ return call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3), lyx::ref(p4))); + } + + /* +@@ -97,7 +97,8 @@ public: + template<class F, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8> + R call(F f, P1& p1, P2& p2, P3& p3, P4& p4, P5& p5, P6& p6, P7& p7, P8& p8) + { +- return call(bind(f, ref(p1), ref(p2), ref(p3), ref(p4), ref(p5), ref(p6), ref(p7), ref(p8))); ++ return call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3), lyx::ref(p4), ++ lyx::ref(p5), lyx::ref(p6), lyx::ref(p7), lyx::ref(p8))); + } + + private: +@@ -131,25 +132,25 @@ public: + template<class F, class P1> + void call(F f, P1& p1) + { +- call(bind(f, ref(p1))); ++ call(lyx::bind(f, lyx::ref(p1))); + } + + template<class F, class P1, class P2> + void call(F f, P1& p1, P2& p2) + { +- call(bind(f, ref(p1), ref(p2))); ++ call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2))); + } + + template<class F, class P1, class P2, class P3> + void call(F f, P1& p1, P2& p2, P3& p3) + { +- call(bind(f, ref(p1), ref(p2), ref(p3))); ++ call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3))); + } + + template<class F, class P1, class P2, class P3, class P4> + void call(F f, P1& p1, P2& p2, P3& p3, P4& p4) + { +- call(bind(f, ref(p1), ref(p2), ref(p3), ref(p4))); ++ call(lyx::bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3), lyx::ref(p4))); + } + + /* +@@ -159,7 +160,8 @@ public: + template<class F, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8> + void call(F f, P1& p1, P2& p2, P3& p3, P4& p4, P5& p5, P6& p6, P7& p7, P8& p8) + { +- call(bind(f, ref(p1), ref(p2), ref(p3), ref(p4), ref(p5), ref(p6), ref(p7), ref(p8))); ++ call(bind(f, lyx::ref(p1), lyx::ref(p2), lyx::ref(p3), lyx::ref(p4), lyx::ref(p5), ++ lyx::ref(p6), lyx::ref(p7), lyx::ref(p8))); + } + + private: +-- +1.8.4.1 + diff --git a/print/lyx/files/patch-src__support__debug.h b/print/lyx/files/patch-src__support__debug.h new file mode 100644 index 000000000000..8bd53772a11a --- /dev/null +++ b/print/lyx/files/patch-src__support__debug.h @@ -0,0 +1,21 @@ +libc++/C++11 support, obtained from NetBSD. +http://mail-index.netbsd.org/pkgsrc-changes/2013/05/09/msg088857.html +--- src/support/debug.h ++++ src/support/debug.h +@@ -17,14 +17,8 @@ + + #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 { diff --git a/print/lyx/files/patch-src__support__strfwd.h b/print/lyx/files/patch-src__support__strfwd.h new file mode 100644 index 000000000000..5a6e5190f812 --- /dev/null +++ b/print/lyx/files/patch-src__support__strfwd.h @@ -0,0 +1,33 @@ +libc++/C++11 support, obtained from NetBSD. +http://mail-index.netbsd.org/pkgsrc-changes/2012/11/23/msg081094.html +--- src/support/strfwd.h ++++ src/support/strfwd.h +@@ -29,26 +29,8 @@ namespace lyx { typedef boost::uint32_t char_type; } + #endif + + +-namespace std { +- +-template<typename Alloc> class allocator; +- +-template<typename Char> struct char_traits; +-template<> struct char_traits<char>; +-#ifdef USE_WCHAR_T +-template<> struct char_traits<wchar_t>; +-#endif +- +-template<typename Char, typename Traits, typename Alloc> class basic_string; +-typedef basic_string<char, char_traits<char>, allocator<char> > string; +- +-template<class Char, class Traits> class basic_istream; +-template<class Char, class Traits> class basic_ostream; +- +-typedef basic_istream<char, char_traits<char> > istream; +-typedef basic_ostream<char, char_traits<char> > ostream; +- +-} // namepace std ++#include <iostream> ++#include <string> + + + namespace lyx { diff --git a/print/lyx/pkg-plist b/print/lyx/pkg-plist index b54ea2b26535..0e3130af5a1f 100644 --- a/print/lyx/pkg-plist +++ b/print/lyx/pkg-plist @@ -1,6 +1,9 @@ bin/lyx bin/lyxclient bin/tex2lyx +man/man1/lyx.1.gz +man/man1/lyxclient.1.gz +man/man1/tex2lyx.1.gz %%NLS%%share/locale/ar/LC_MESSAGES/lyx.mo %%NLS%%share/locale/ca/LC_MESSAGES/lyx.mo %%NLS%%share/locale/cs/LC_MESSAGES/lyx.mo @@ -1829,10 +1832,10 @@ share/icons/hicolor/48x48/apps/lyx.png @dirrm %%DATADIR%%/bind/de @dirrm %%DATADIR%%/bind @dirrm %%DATADIR%% +%%NLS%%@dirrmtry share/locale/ia/LC_MESSAGES +%%NLS%%@dirrmtry share/locale/ia @dirrmtry share/icons/hicolor/48x48/apps @dirrmtry share/icons/hicolor/48x48 @dirrmtry share/icons/hicolor @dirrmtry share/icons @dirrmtry share/applications -%%NLS%%@dirrmtry share/locale/ia/LC_MESSAGES/ -%%NLS%%@dirrmtry share/locale/ia |