svn commit: r331054 - in head/print/lyx: . files

Raphael Kubo da Costa rakuco at FreeBSD.org
Sun Oct 20 18:57:20 UTC 2013


Author: rakuco
Date: Sun Oct 20 18:57:18 2013
New Revision: 331054
URL: http://svnweb.freebsd.org/changeset/ports/331054

Log:
  Fix the build with libc++, and a lot more.
  
  - Support staging.
  - Remove outdated pthread-related variables in Makefile.
  - Sort plist.
  - Sort the USES lines.
  - Switch away from the deprecated USE_GNOME=desktopfileutils.
  - Use the new library format for libraries in LIB_DEPENDS.
  - Use the new syntax for configuration options.

Added:
  head/print/lyx/files/patch-config.h.in   (contents, props changed)
  head/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h   (contents, props changed)
  head/print/lyx/files/patch-src__support__debug.h   (contents, props changed)
  head/print/lyx/files/patch-src__support__strfwd.h   (contents, props changed)
Modified:
  head/print/lyx/Makefile
  head/print/lyx/pkg-plist

Modified: head/print/lyx/Makefile
==============================================================================
--- head/print/lyx/Makefile	Sun Oct 20 18:53:04 2013	(r331053)
+++ head/print/lyx/Makefile	Sun Oct 20 18:57:18 2013	(r331054)
@@ -16,70 +16,45 @@ COMMENT=	Document processor interfaced w
 
 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>

Added: head/print/lyx/files/patch-config.h.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/lyx/files/patch-config.h.in	Sun Oct 20 18:57:18 2013	(r331054)
@@ -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 at 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
+ 

Added: head/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/lyx/files/patch-src__frontends__qt4__InGuiThread.h	Sun Oct 20 18:57:18 2013	(r331054)
@@ -0,0 +1,97 @@
+From 2b0a7a5e01c71bd0c809844e0c6779f43870077b Mon Sep 17 00:00:00 2001
+From: Vincent van Ravesteijn <vfr at 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
+

Added: head/print/lyx/files/patch-src__support__debug.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/lyx/files/patch-src__support__debug.h	Sun Oct 20 18:57:18 2013	(r331054)
@@ -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 {

Added: head/print/lyx/files/patch-src__support__strfwd.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/lyx/files/patch-src__support__strfwd.h	Sun Oct 20 18:57:18 2013	(r331054)
@@ -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 {

Modified: head/print/lyx/pkg-plist
==============================================================================
--- head/print/lyx/pkg-plist	Sun Oct 20 18:53:04 2013	(r331053)
+++ head/print/lyx/pkg-plist	Sun Oct 20 18:57:18 2013	(r331054)
@@ -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


More information about the svn-ports-head mailing list