aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authornox <nox@FreeBSD.org>2013-10-19 06:30:17 +0800
committernox <nox@FreeBSD.org>2013-10-19 06:30:17 +0800
commit15baf0e4d681847daa7e1345d30150f841d07645 (patch)
tree46be221e4e9ceee8b46b53f775e89b25bf624b5d /www
parent1a75d6f0f835f04867a1bcea8697eec80fc06fd7 (diff)
downloadfreebsd-ports-gnome-15baf0e4d681847daa7e1345d30150f841d07645.tar.gz
freebsd-ports-gnome-15baf0e4d681847daa7e1345d30150f841d07645.tar.zst
freebsd-ports-gnome-15baf0e4d681847daa7e1345d30150f841d07645.zip
Finally fix build with clang + libc++.
Diffstat (limited to 'www')
-rw-r--r--www/vdr-plugin-live/Makefile15
-rw-r--r--www/vdr-plugin-live/files/extra-patch-libcxx60
-rw-r--r--www/vdr-plugin-live/files/patch-libcxx32
3 files changed, 98 insertions, 9 deletions
diff --git a/www/vdr-plugin-live/Makefile b/www/vdr-plugin-live/Makefile
index d2f9366ea63f..ab30c82c483c 100644
--- a/www/vdr-plugin-live/Makefile
+++ b/www/vdr-plugin-live/Makefile
@@ -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>
diff --git a/www/vdr-plugin-live/files/extra-patch-libcxx b/www/vdr-plugin-live/files/extra-patch-libcxx
new file mode 100644
index 000000000000..00dd2d788b50
--- /dev/null
+++ b/www/vdr-plugin-live/files/extra-patch-libcxx
@@ -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..
diff --git a/www/vdr-plugin-live/files/patch-libcxx b/www/vdr-plugin-live/files/patch-libcxx
index c49fea5da9ad..1149559bbbac 100644
--- a/www/vdr-plugin-live/files/patch-libcxx
+++ b/www/vdr-plugin-live/files/patch-libcxx
@@ -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()