Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2013 22:30:17 +0000 (UTC)
From:      Juergen Lock <nox@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r330781 - in head/www/vdr-plugin-live: . files
Message-ID:  <201310182230.r9IMUHGJ058516@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nox
Date: Fri Oct 18 22:30:17 2013
New Revision: 330781
URL: http://svnweb.freebsd.org/changeset/ports/330781

Log:
  Finally fix build with clang + libc++.

Added:
  head/www/vdr-plugin-live/files/extra-patch-libcxx   (contents, props changed)
Modified:
  head/www/vdr-plugin-live/Makefile
  head/www/vdr-plugin-live/files/patch-libcxx

Modified: head/www/vdr-plugin-live/Makefile
==============================================================================
--- head/www/vdr-plugin-live/Makefile	Fri Oct 18 22:18:20 2013	(r330780)
+++ head/www/vdr-plugin-live/Makefile	Fri Oct 18 22:30:17 2013	(r330781)
@@ -22,13 +22,26 @@ PORTDOCS=	COPYING README HISTORY
 WRKSRC=		${WRKDIR}/vdr-plugin-${PLUGIN}
 VDR_PLUGIN_MAKEFILES=	${WRKSRC}/httpd/Makefile ${WRKSRC}/pages/Makefile
 MAKE_ARGS+=	INCLUDES="-I$(LOCALBASE)/include -I${WRKSRC}"
+MAKE_ARGS+=	PREFIX="${PREFIX}"
+USES=		compiler:features
 
 NO_STAGE=	yes
+
 .include	"${.CURDIR}/../../multimedia/vdr/Makefile.plugins"
 
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_FEATURES:Mlibc++}
+EXTRA_PATCHES+=		${FILESDIR}/extra-patch-libcxx
+EXTRA_PATCH_STRIP=	-p1
+.endif
+
 post-patch: post-patch-plugin
 	${CP} ${FILESDIR}/gen_version_suffix.h ${WRKSRC}
 
+pre-install:
+	${MKDIR} ${PREFIX}/lib/vdr
+
 post-install: post-install-pluginlocales
 	(cd ${WRKSRC}/${PLUGIN} && \
 		${COPYTREE_SHARE} \* ${PREFIX}/etc/vdr/plugins/${PLUGIN} )
@@ -38,4 +51,4 @@ post-install: post-install-pluginlocales
 	(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Added: head/www/vdr-plugin-live/files/extra-patch-libcxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/vdr-plugin-live/files/extra-patch-libcxx	Fri Oct 18 22:30:17 2013	(r330781)
@@ -0,0 +1,60 @@
+--- a/Makefile
++++ b/Makefile
+@@ -42,6 +42,9 @@ TMPDIR	 ?= /tmp
+ 
+ -include $(VDRDIR)/Make.config
+ 
++# libc++
++CXXFLAGS+=	-std=c++11
++
+ ### The version number of VDR's plugin API (taken from VDR's "config.h"):
+ 
+ APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+--- a/css/Makefile
++++ b/css/Makefile
+@@ -27,6 +27,9 @@ VDRDIR   ?= ../../../..
+ 
+ -include $(VDRDIR)/Make.config
+ 
++# libc++
++CXXFLAGS+=	-std=c++11
++
+ ### Includes and Defines (add further entries here):
+ 
+ INCLUDES += -I$(VDRDIR)/include -I..
+--- a/httpd/Makefile
++++ b/httpd/Makefile
+@@ -5,6 +5,9 @@ CXXFLAGS ?= -O2 -Woverloaded-virtual -Wa
+ 
+ CXXFLAGS += `tntnet-config --cxxflags`
+ 
++# libc++
++CXXFLAGS+=	-std=c++11
++
+ ### Includes and Defines (add further entries here):
+ 
+ INCLUDES += -I.
+--- a/javascript/Makefile
++++ b/javascript/Makefile
+@@ -27,6 +27,9 @@ VDRDIR   ?= ../../../..
+ 
+ -include $(VDRDIR)/Make.config
+ 
++# libc++
++CXXFLAGS+=	-std=c++11
++
+ ### Includes and Defines (add further entries here):
+ 
+ INCLUDES += -I$(VDRDIR)/include -I..
+--- a/pages/Makefile
++++ b/pages/Makefile
+@@ -27,6 +27,9 @@ VDRDIR   = /usr/local/include/vdr
+ 
+ -include $(VDRDIR)/Make.config
+ 
++# libc++
++CXXFLAGS+=	-std=c++11
++
+ ### Includes and Defines (add further entries here):
+ 
+ INCLUDES += -I$(VDRDIR)/include -I..

Modified: head/www/vdr-plugin-live/files/patch-libcxx
==============================================================================
--- head/www/vdr-plugin-live/files/patch-libcxx	Fri Oct 18 22:18:20 2013	(r330780)
+++ head/www/vdr-plugin-live/files/patch-libcxx	Fri Oct 18 22:30:17 2013	(r330781)
@@ -42,7 +42,15 @@
  using namespace vdrlive;
 --- a/recman.h
 +++ b/recman.h
-@@ -12,7 +12,11 @@ namespace vdrlive {
+@@ -5,6 +5,7 @@
+ #include <map>
+ #include <vector>
+ #include <list>
++#include <string>
+ #include <vdr/recording.h>
+ #include "stdext.h"
+ 
+@@ -12,7 +13,11 @@ namespace vdrlive {
  
  	// Forward declations from epg_events.h
  	class EpgInfo;
@@ -54,7 +62,7 @@
  
  	/**
  	 *  Some forward declarations
-@@ -26,9 +30,15 @@ namespace vdrlive {
+@@ -26,9 +31,15 @@ namespace vdrlive {
  	class DirectoryListPtr;
  	class RecordingsItem;
  
@@ -70,7 +78,7 @@
  	typedef std::multimap< std::string, RecordingsItemPtr > RecordingsMap;
  
  
-@@ -121,10 +131,17 @@ namespace vdrlive {
+@@ -121,10 +132,17 @@ namespace vdrlive {
  
  			static RecordingsManagerPtr EnsureValidData();
  
@@ -88,7 +96,7 @@
  			static int m_recordingsState;
  
  			cThreadLock m_recordingsLock;
-@@ -257,12 +274,20 @@ namespace vdrlive {
+@@ -257,12 +275,20 @@ namespace vdrlive {
  	 *  A smart pointer to a recordings tree. As long as an instance of this
  	 *  exists the recordings are locked in the vdr.
  	 */
@@ -109,7 +117,7 @@
  
  		public:
  			RecordingsTreePtr();
-@@ -286,8 +311,13 @@ namespace vdrlive {
+@@ -286,8 +312,13 @@ namespace vdrlive {
  
  		private:
  			RecordingsList(RecordingsTreePtr recTree);
@@ -123,7 +131,7 @@
  
  		public:
  			typedef std::vector< RecordingsItemPtr > RecVecType;
-@@ -333,12 +363,20 @@ namespace vdrlive {
+@@ -333,12 +364,20 @@ namespace vdrlive {
  	 *  A smart pointer to a recordings list. As long as an instance of this
  	 *  exists the recordings are locked in the vdr.
  	 */
@@ -144,7 +152,7 @@
  
  		public:
  			virtual ~RecordingsListPtr();
-@@ -378,12 +416,20 @@ namespace vdrlive {
+@@ -378,12 +417,20 @@ namespace vdrlive {
  	 *  A smart pointer to a directory list. As long as an instance of this
  	 *  exists the recordings are locked in the vdr.
  	 */
@@ -205,13 +213,21 @@
  class GrabImageTask;
 --- a/tasks.cpp
 +++ a/tasks.cpp
-@@ -14,8 +14,10 @@
+@@ -1,4 +1,5 @@
+ #include <algorithm>
++#include <functional>
+ #include <vdr/channels.h>
+ #include <vdr/i18n.h>
+ #include <vdr/menu.h>
+@@ -14,8 +14,12 @@
  namespace vdrlive {
  
  using namespace std;
 +#if !defined(_LIBCPP_VERSION) && __cplusplus < 201103L
  using namespace std::tr1;
  using namespace std::tr1::placeholders;
++#else
++using namespace std::placeholders;
 +#endif
  
  const char* NowReplaying()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310182230.r9IMUHGJ058516>