svn commit: r329481 - head/www/vdr-plugin-live/files
Juergen Lock
nox at FreeBSD.org
Sat Oct 5 17:38:10 UTC 2013
Author: nox
Date: Sat Oct 5 17:38:09 2013
New Revision: 329481
URL: http://svnweb.freebsd.org/changeset/ports/329481
Log:
(Attempt to) fix build with clang+libc++.
Submitted by: beefy2 via pkg-fallout
Added:
head/www/vdr-plugin-live/files/patch-libcxx (contents, props changed)
Added: head/www/vdr-plugin-live/files/patch-libcxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/vdr-plugin-live/files/patch-libcxx Sat Oct 5 17:38:09 2013 (r329481)
@@ -0,0 +1,232 @@
+--- a/cache.h
++++ b/cache.h
+@@ -25,7 +25,11 @@ class cache
+ public:
+ typedef TKey key_type;
+ typedef TValue mapped_type;
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr< mapped_type > ptr_type;
++#else
+ typedef std::tr1::shared_ptr< mapped_type > ptr_type;
++#endif
+
+ private:
+ /*struct Value
+--- a/epg_events.h
++++ b/epg_events.h
+@@ -18,7 +18,11 @@ namespace vdrlive
+
+ class EpgInfo;
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr<EpgInfo> EpgInfoPtr;
++#else
+ typedef std::tr1::shared_ptr<EpgInfo> EpgInfoPtr;
++#endif
+
+ // -------------------------------------------------------------------------
+
+--- a/pages/epginfo.ecpp
++++ b/pages/epginfo.ecpp
+@@ -23,7 +23,11 @@ namespace vdrlive {
+ cSchedulesLock m_schedulesLock;
+ };
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr<SchedulesLock> SchedulesLockPtr;
++#else
+ typedef std::tr1::shared_ptr<SchedulesLock> SchedulesLockPtr;
++#endif
+ }
+
+ using namespace vdrlive;
+--- a/recman.h
++++ b/recman.h
+@@ -12,7 +12,11 @@ namespace vdrlive {
+
+ // Forward declations from epg_events.h
+ class EpgInfo;
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr<EpgInfo> EpgInfoPtr;
++#else
+ typedef std::tr1::shared_ptr<EpgInfo> EpgInfoPtr;
++#endif
+
+ /**
+ * Some forward declarations
+@@ -26,9 +30,15 @@ namespace vdrlive {
+ class DirectoryListPtr;
+ class RecordingsItem;
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr< RecordingsManager > RecordingsManagerPtr;
++ typedef std::shared_ptr< RecordingsItem > RecordingsItemPtr;
++ typedef std::weak_ptr< RecordingsItem > RecordingsItemWeakPtr;
++#else
+ typedef std::tr1::shared_ptr< RecordingsManager > RecordingsManagerPtr;
+ typedef std::tr1::shared_ptr< RecordingsItem > RecordingsItemPtr;
+ typedef std::tr1::weak_ptr< RecordingsItem > RecordingsItemWeakPtr;
++#endif
+ typedef std::multimap< std::string, RecordingsItemPtr > RecordingsMap;
+
+
+@@ -121,10 +131,17 @@ namespace vdrlive {
+
+ static RecordingsManagerPtr EnsureValidData();
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ static std::weak_ptr< RecordingsManager > m_recMan;
++ static std::shared_ptr< RecordingsTree > m_recTree;
++ static std::shared_ptr< RecordingsList > m_recList;
++ static std::shared_ptr< DirectoryList > m_recDirs;
++#else
+ static std::tr1::weak_ptr< RecordingsManager > m_recMan;
+ static std::tr1::shared_ptr< RecordingsTree > m_recTree;
+ static std::tr1::shared_ptr< RecordingsList > m_recList;
+ static std::tr1::shared_ptr< DirectoryList > m_recDirs;
++#endif
+ static int m_recordingsState;
+
+ cThreadLock m_recordingsLock;
+@@ -257,12 +274,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.
+ */
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ class RecordingsTreePtr : public std::shared_ptr< RecordingsTree >
++#else
+ class RecordingsTreePtr : public std::tr1::shared_ptr< RecordingsTree >
++#endif
+ {
+ friend class RecordingsManager;
+
+ private:
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::shared_ptr< RecordingsTree > recTree);
++#else
+ RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsTree > recTree);
++#endif
+
+ public:
+ RecordingsTreePtr();
+@@ -286,8 +311,13 @@ namespace vdrlive {
+
+ private:
+ RecordingsList(RecordingsTreePtr recTree);
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ RecordingsList(std::shared_ptr< RecordingsList > recList, bool ascending);
++ RecordingsList(std::shared_ptr< RecordingsList > recList, time_t begin, time_t end, bool ascending);
++#else
+ RecordingsList(std::tr1::shared_ptr< RecordingsList > recList, bool ascending);
+ RecordingsList(std::tr1::shared_ptr< RecordingsList > recList, time_t begin, time_t end, bool ascending);
++#endif
+
+ public:
+ typedef std::vector< RecordingsItemPtr > RecVecType;
+@@ -333,12 +363,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.
+ */
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ class RecordingsListPtr : public std::shared_ptr< RecordingsList >
++#else
+ class RecordingsListPtr : public std::tr1::shared_ptr< RecordingsList >
++#endif
+ {
+ friend class RecordingsManager;
+
+ private:
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ RecordingsListPtr(RecordingsManagerPtr recManPtr, std::shared_ptr< RecordingsList > recList);
++#else
+ RecordingsListPtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsList > recList);
++#endif
+
+ public:
+ virtual ~RecordingsListPtr();
+@@ -378,12 +416,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.
+ */
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ class DirectoryListPtr : public std::shared_ptr< DirectoryList >
++#else
+ class DirectoryListPtr : public std::tr1::shared_ptr< DirectoryList >
++#endif
+ {
+ friend class RecordingsManager;
+
+ private:
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ DirectoryListPtr(RecordingsManagerPtr recManPtr, std::shared_ptr< DirectoryList > recDirs);
++#else
+ DirectoryListPtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< DirectoryList > recDirs);
++#endif
+
+ public:
+ virtual ~DirectoryListPtr();
+--- a/recman.cpp
++++ b/recman.cpp
+@@ -14,7 +14,9 @@
+ #define INDEXFILESUFFIX "/index.vdr"
+ #define LENGTHFILESUFFIX "/length.vdr"
+
++#if !defined(_LIBCPP_VERSION) && __cplusplus < 201103L
+ using namespace std::tr1;
++#endif
+ using namespace std;
+
+ namespace vdrlive {
+@@ -548,7 +550,11 @@ namespace vdrlive {
+ {
+ }
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ RecordingsTreePtr::RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::shared_ptr< RecordingsTree > recTree) :
++#else
+ RecordingsTreePtr::RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsTree > recTree) :
++#endif
+ shared_ptr<RecordingsTree>(recTree),
+ m_recManPtr(recManPtr)
+ {
+--- a/grab.h
++++ b/grab.h
+@@ -6,7 +6,11 @@
+
+ namespace vdrlive {
+
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++typedef std::shared_ptr< char > GrabImagePtr;
++#else
+ typedef std::tr1::shared_ptr< char > GrabImagePtr;
++#endif
+ typedef std::pair< GrabImagePtr, int > GrabImageInfo;
+
+ class GrabImageTask;
+--- a/tasks.cpp
++++ a/tasks.cpp
+@@ -14,8 +14,10 @@
+ namespace vdrlive {
+
+ using namespace std;
++#if !defined(_LIBCPP_VERSION) && __cplusplus < 201103L
+ using namespace std::tr1;
+ using namespace std::tr1::placeholders;
++#endif
+
+ const char* NowReplaying()
+ {
+--- a/timerconflict.h
++++ b/timerconflict.h
+@@ -65,7 +65,11 @@ namespace vdrlive {
+ class TimerConflictNotifier
+ {
+ public:
++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
++ typedef std::shared_ptr<TimerConflicts> TimerConflictsPtr;
++#else
+ typedef std::tr1::shared_ptr<TimerConflicts> TimerConflictsPtr;
++#endif
+
+ TimerConflictNotifier();
+ virtual ~TimerConflictNotifier();
More information about the svn-ports-head
mailing list