Finally fix build with clang + libc++.
This commit is contained in:
parent
3ddb8e0aa3
commit
81d5328249
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=330781
3 changed files with 98 additions and 9 deletions
|
@ -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>
|
||||
|
|
60
www/vdr-plugin-live/files/extra-patch-libcxx
Normal file
60
www/vdr-plugin-live/files/extra-patch-libcxx
Normal file
|
@ -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..
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue