Page MenuHomeFreeBSD

D13712.diff
No OneTemporary

D13712.diff

Index: multimedia/kodi-devel/Makefile
===================================================================
--- multimedia/kodi-devel/Makefile
+++ multimedia/kodi-devel/Makefile
@@ -13,7 +13,7 @@
LICENSE_FILE= ${WRKSRC}/LICENSE.GPL
BROKEN_FreeBSD_10= does not build
-ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
BUILD_DEPENDS= rapidjson>=0:devel/rapidjson \
swig3.0:devel/swig30
@@ -25,7 +25,6 @@
libcdio.so:sysutils/libcdio \
libcrossguid.so:devel/libcrossguid \
libcurl.so:ftp/curl \
- libdrm.so:graphics/libdrm \
libdvdnav.so:multimedia/libdvdnav \
libdvdread.so:multimedia/libdvdread \
libexpat.so:textproc/expat2 \
@@ -45,6 +44,23 @@
libtinyxml.so:textproc/tinyxml \
libuuid.so:misc/e2fsprogs-libuuid
+# The wayland flavor is missing here until we can add a port of
+# waylandpp (C++ binding for wayland) which requires libwayland-egl.so
+# which graphics/mesa-libs only provides with default WAYLAND.
+FLAVORS= native x11
+FLAVOR?= ${FLAVORS:[1]}
+
+wayland_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols
+wayland_LIB_DEPENDS= libwayland-client++.so:graphics/waylandpp \
+ libxkbcommon.so:x11/libxkbcommon
+wayland_PKGNAMESUFFIX= -devel-wayland
+wayland_PLIST= ${.CURDIR}/pkg-plist-wayland
+#wayland_RUN_DEPENDS= kodi-devel>=0:multimedia/kodi-devel@native
+
+x11_PKGNAMESUFFIX= -devel-x11
+x11_PLIST= ${.CURDIR}/pkg-plist-x11
+#x11_RUN_DEPENDS= kodi-devel>=0:multimedia/kodi-devel@native
+
# Building libcpluff.a requires autoreconf and gmake. Using ninja
# leads to dependency problems where libcpluff.a is not yet finished
# building when it's required.
@@ -56,18 +72,21 @@
GH_PROJECT= xbmc
GH_TAGNAME= bff1759626cb44be4a3f6dc0d6ebb5fe43a55a96
USE_GNOME= libxslt libxml2
-USE_GL= egl gl glu
USE_JAVA= yes
JAVA_BUILD= yes
USE_LDCONFIG= yes
+.if ${FLAVOR:U} == x11
USE_XORG= x11 xext xrandr
+.endif
CONFLICTS_INSTALL= kodi-[0-9]*
-CMAKE_ARGS= -DCORE_PLATFORM_NAME=X11 \
- -DLIBDVD_INCLUDE_DIRS="${LOCALBASE}/include" \
+CMAKE_ARGS= -DLIBDVD_INCLUDE_DIRS="${LOCALBASE}/include" \
-DDVDREAD_LIBRARY="${LOCALBASE}/lib/libdvdread.so" \
-DDVDNAV_LIBRARY="${LOCALBASE}/lib/libdvdnav.so"
+.if ${FLAVOR:U} == wayland
+CMAKE_ARGS+= -DWAYLAND_RENDER_SYSTEM:STRING="gl"
+.endif
CMAKE_OFF= ENABLE_ALSA \
ENABLE_DVDCSS \
ENABLE_INTERNAL_FFMPEG \
@@ -77,13 +96,26 @@
KODIARCH_i386= x86
KODIARCH_amd64= x86_64
-PLIST_SUB= ARCH=${KODIARCH_${ARCH}} OPSYS=${OPSYS:tl}
+PLIST_SUB= ARCH=${KODIARCH_${ARCH}:U${ARCH}} \
+ OPSYS=${OPSYS:tl}
-OPTIONS_DEFINE= AVAHI CEC DBUS LIBBLURAY MYSQL NFS SMB SSH UPNP VAAPI \
- VDPAU WEBSERVER
+OPTIONS_DEFINE= AVAHI CEC DBUS LIBBLURAY MYSQL NFS RPI SMB SSH UPNP \
+ VAAPI VDPAU WEBSERVER
OPTIONS_DEFAULT= SNDIO SSH UPNP VAAPI VDPAU WEBSERVER
+OPTIONS_EXCLUDE_amd64= RPI
+OPTIONS_EXCLUDE_i386= RPI
OPTIONS_SUB= yes
+.if ${FLAVOR:U} == native || ${FLAVOR:U} == wayland
+OPTIONS_EXCLUDE+= VDPAU
+.endif
+.if ${FLAVOR:U} == wayland || ${FLAVOR:U} == x11
+OPTIONS_EXCLUDE+= RPI
+.endif
+.if ${FLAVOR:U} == wayland
+OPTIONS_SLAVE= VAAPI
+.endif
+
# Choosing one of SNDIO or PULSEAUDIO is mandatory right now if you
# want audio output. The OSS backend is currently not hooked into
# Kodi's audio sink factory due to recent refactorings.
@@ -91,6 +123,7 @@
OPTIONS_MULTI_SOUND= PULSEAUDIO SNDIO
CEC_DESC= CEC adapter support
+RPI_DESC= Raspberry Pi support
AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app
AVAHI_CMAKE_BOOL= ENABLE_AVAHI
@@ -113,6 +146,18 @@
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_BOOL= ENABLE_PULSEAUDIO
+# For RPI, disable VAAPI in multimedia/ffmpeg too, so that mesa-libs
+# is *not* installed via libva in the build environment. Both
+# mesa-libs and raspberrypi-userland conflict with each other.
+RPI_CMAKE_OFF= -DCORE_PLATFORM_NAME:STRING="${FLAVOR:Ugbm:S/native/gbm/}"
+RPI_CMAKE_ON= -DCORE_PLATFORM_NAME:STRING="rbpi"
+RPI_LIB_DEPENDS= libbrcmEGL.so:misc/raspberrypi-userland
+RPI_LIB_DEPENDS_OFF= libdrm.so:graphics/libdrm
+RPI_PLIST_SUB= PLATFORM_NAME=rbpi
+RPI_PLIST_SUB_OFF= PLATFORM_NAME=${FLAVOR:Ugbm:S/native/gbm/}
+RPI_PREVENTS= VAAPI VDPAU
+RPI_USE_OFF= GL=egl,gl,glu
+
SMB_USES= samba:lib
SMB_CMAKE_BOOL= ENABLE_SMBCLIENT
@@ -123,7 +168,7 @@
SSH_CMAKE_BOOL= ENABLE_SSH
UPNP_CMAKE_BOOL= ENABLE_UPNP
-# XXX: Upstream is https://github.com/plutinosoft/Neptune
+# XXX: Send to https://github.com/plutinosoft/Neptune
UPNP_CXXFLAGS= -DNPT_CONFIG_HAVE_ARPA_INET_H \
-DNPT_CONFIG_HAVE_GETADDRINFO \
-DNPT_CONFIG_HAVE_INET_NTOP \
@@ -147,7 +192,12 @@
# (see CMAKE_ARGS).
@${REINPLACE_CMD} 's@KODI_DEPENDSBUILD@true@' \
${WRKSRC}/cmake/modules/FindLibDvd.cmake
+ @${CP} ${WRKSRC}/cmake/platform/linux/gbm.cmake \
+ ${WRKSRC}/cmake/platform/linux/rbpi.cmake \
+ ${WRKSRC}/cmake/platform/linux/wayland.cmake \
+ ${WRKSRC}/cmake/platform/freebsd
+.if ${FLAVOR:U} == native
post-install:
${INSTALL_MAN} ${WRKSRC}/docs/manpages/kodi.bin.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
@cd ${STAGEDIR}${MAN1PREFIX}/man/man1 && ${LN} -sf kodi.bin.1.gz kodi.1.gz
@@ -155,5 +205,10 @@
@${FIND} ${STAGEDIR}${PREFIX}/lib/kodi -name '*.so' | ${XARGS} ${STRIP_CMD}
# Nothing useful here...
@${RM} -rf ${STAGEDIR}${DOCSDIR}
+.elif ${FLAVOR:U} == x11 || ${FLAVOR:U} == wayland
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/kodi
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/kodi-* ${STAGEDIR}${PREFIX}/lib/kodi
+.endif
.include <bsd.port.mk>
Index: multimedia/kodi-devel/distinfo
===================================================================
--- multimedia/kodi-devel/distinfo
+++ multimedia/kodi-devel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1515317641
+TIMESTAMP = 1515318340
SHA256 (xbmc-xbmc-18.0.g201801070734-bff1759626cb44be4a3f6dc0d6ebb5fe43a55a96_GH0.tar.gz) = b25f3b3b557502abf1f51f7d45ec00ea31628d41576c1f7c26c440a334790815
SIZE (xbmc-xbmc-18.0.g201801070734-bff1759626cb44be4a3f6dc0d6ebb5fe43a55a96_GH0.tar.gz) = 40671280
Index: multimedia/kodi-devel/files/patch-evdev
===================================================================
--- /dev/null
+++ multimedia/kodi-devel/files/patch-evdev
@@ -0,0 +1,111 @@
+--- xbmc/platform/linux/input/LinuxInputDevices.cpp.orig 2017-12-17 12:10:14 UTC
++++ xbmc/platform/linux/input/LinuxInputDevices.cpp
+@@ -30,6 +30,9 @@
+ #include "system.h"
+ #if defined(HAS_LINUX_EVENTS)
+
++#ifdef TARGET_FREEBSD
++#include <dev/evdev/input.h>
++#else
+ #include <linux/version.h>
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+@@ -38,6 +41,7 @@ typedef unsigned long kernel_ulong_t;
+ #endif
+
+ #include <linux/input.h>
++#endif
+
+ #if defined(HAVE_LIBUDEV)
+ #include <libudev.h>
+@@ -77,8 +81,10 @@ typedef unsigned long kernel_ulong_t;
+ #define XBMC_BUTTON_WHEELDOWN 5
+ #endif
+
++#ifndef TARGET_FREEBSD
+ #include <linux/keyboard.h>
+ #include <linux/kd.h>
++#endif
+
+ #include <string.h>
+ #include <unistd.h>
+@@ -352,6 +358,7 @@ XBMCKey CLinuxInputDevice::TranslateKey(unsigned short
+
+ int CLinuxInputDevice::KeyboardGetSymbol(unsigned short value)
+ {
++#ifndef TARGET_FREEBSD
+ unsigned char type = KTYP(value);
+ unsigned char index = KVAL(value);
+
+@@ -409,12 +416,16 @@ int CLinuxInputDevice::KeyboardGetSymbol(unsigned shor
+ break;
+ */
+ }
+-
++#else
+ return XBMCK_UNKNOWN;
++#endif
+ }
+
+ unsigned short CLinuxInputDevice::KeyboardReadValue(unsigned char table, unsigned char index)
+ {
++#ifdef TARGET_FREEBSD
++ return 0;
++#else
+ struct kbentry entry;
+
+ entry.kb_table = table;
+@@ -429,6 +440,7 @@ unsigned short CLinuxInputDevice::KeyboardReadValue(un
+ }
+
+ return entry.kb_value;
++#endif
+ }
+
+ XBMCMod CLinuxInputDevice::UpdateModifiers(XBMC_Event& devt)
+@@ -1371,6 +1383,9 @@ driver_open_device_error:
+ */
+ bool CLinuxInputDevice::GetKeymapEntry(KeymapEntry& entry)
+ {
++#ifdef TARGET_FREEBSD
++ return false;
++#else
+ int code = entry.code;
+ unsigned short value;
+ //DFBInputDeviceKeyIdentifier identifier;
+@@ -1421,6 +1436,7 @@ bool CLinuxInputDevice::GetKeymapEntry(KeymapEntry& en
+ entry.altShift = value; //KeyboardGetSymbol(code, value, LI_KEYLEVEL_ALT_SHIFT);
+
+ return true;
++#endif
+ }
+
+ /*
+--- xbmc/windowing/wayland/InputProcessorPointer.cpp.orig 2017-12-17 12:10:14 UTC
++++ xbmc/windowing/wayland/InputProcessorPointer.cpp
+@@ -22,7 +22,11 @@
+
+ #include <cmath>
+
++#ifdef TARGET_FREEBSD
++#include <dev/evdev/input-event-codes.h>
++#else
+ #include <linux/input-event-codes.h>
++#endif
+
+ #include "input/MouseStat.h"
+
+--- xbmc/windowing/wayland/WindowDecorator.cpp.orig 2017-12-17 12:10:14 UTC
++++ xbmc/windowing/wayland/WindowDecorator.cpp
+@@ -25,7 +25,11 @@
+ #include <cmath>
+ #include <vector>
+
++#ifdef TARGET_FREEBSD
++#include <dev/evdev/input-event-codes.h>
++#else
+ #include <linux/input-event-codes.h>
++#endif
+
+ #include "threads/SingleLock.h"
+ #include "utils/EndianSwap.h"
Index: multimedia/kodi-devel/files/patch-rbpi
===================================================================
--- /dev/null
+++ multimedia/kodi-devel/files/patch-rbpi
@@ -0,0 +1,102 @@
+--- cmake/scripts/freebsd/ArchSetup.cmake.orig 2017-12-17 12:10:14 UTC
++++ cmake/scripts/freebsd/ArchSetup.cmake
+@@ -1,4 +1,7 @@
+ set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_FREEBSD)
++if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
++ list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI)
++endif()
+ set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE
+ -D_FILE_OFFSET_BITS=64)
+ set(PLATFORM_DIR platform/linux)
+@@ -10,6 +13,15 @@ else()
+ set(ARCH x86_64-freebsd)
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i.86")
+ set(ARCH x86-freebsd)
++ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv6)
++ set(ARCH armv6-freebsd)
++ set(NEON True)
++ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7)
++ set(ARCH armv7-freebsd)
++ set(NEON True)
++ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
++ set(ARCH aarch64-freebsd)
++ set(NEON True)
+ else()
+ message(WARNING "unknown CPU: ${CPU}")
+ endif()
+--- cmake/treedata/freebsd/subdirs.txt.orig 2018-01-05 00:21:32 UTC
++++ cmake/treedata/freebsd/subdirs.txt
+@@ -9,4 +9,6 @@ xbmc/storage/linux storage/linux
+ xbmc/filesystem/posix filesystem/posix
+ xbmc/utils/posix utils_posix
+ xbmc/platform/posix posix
++xbmc/cores/RetroPlayer/process/rbpi cores/RetroPlayer/process/rbpi
++xbmc/cores/VideoPlayer/Process/rbpi cores/VideoPlayer/Process/rbpi
+ xbmc/freebsd freebsdsupport
+--- xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h.orig 2018-01-04 22:35:33 UTC
++++ xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/MMALRenderer.h
+@@ -31,6 +31,7 @@
+ #include "cores/VideoSettings.h"
+ #include "cores/VideoPlayer/DVDStreamInfo.h"
+ #include "guilib/Geometry.h"
++#include "platform/linux/RBP.h"
+ #include "threads/Thread.h"
+
+ // worst case number of buffers. 12 for decoder. 8 for multi-threading in ffmpeg. NUM_BUFFERS for renderer.
+--- xbmc/windowing/rpi/WinSystemRpi.cpp.orig 2018-01-05 07:10:41 UTC
++++ xbmc/windowing/rpi/WinSystemRpi.cpp
+@@ -32,9 +32,16 @@
+ #include "settings/DisplaySettings.h"
+ #include "guilib/DispResource.h"
+ #include "utils/log.h"
++#include "utils/StringUtils.h"
+ #include "../WinEventsLinux.h"
+ #include "cores/AudioEngine/AESinkFactory.h"
+ #include "cores/AudioEngine/Sinks/AESinkPi.h"
++#ifdef HAS_PULSEAUDIO
++#include "cores/AudioEngine/Sinks/AESinkPULSE.h"
++#endif
++#ifdef HAS_SNDIO
++#include "cores/AudioEngine/Sinks/AESinkSNDIO.h"
++#endif
+
+ #include <EGL/egl.h>
+ #include <EGL/eglplatform.h>
+@@ -54,7 +61,36 @@ CWinSystemRpi::CWinSystemRpi()
+
+ m_winEvents.reset(new CWinEventsLinux());
+ AE::CAESinkFactory::ClearSinks();
+- CAESinkPi::Register();
++
++ std::string envSink;
++ if (getenv("AE_SINK"))
++ envSink = getenv("AE_SINK");
++ if (StringUtils::EqualsNoCase(envSink, "PULSE"))
++ {
++#ifdef HAS_PULSEAUDIO
++ CAESinkPulseaudio::Register();
++#endif
++ }
++ else if (StringUtils::EqualsNoCase(envSink, "SNDIO"))
++ {
++#ifdef HAS_SNDIO
++ CAESinkSNDIO::Register();
++#endif
++ }
++ else if (StringUtils::EqualsNoCase(envSink, "PI"))
++ {
++ CAESinkPi::Register();
++ }
++ else
++ {
++#if defined(HAS_PULSEAUDIO)
++ CAESinkPulseaudio::Register();
++#elif defined(HAS_SNDIO)
++ CAESinkSNDIO::Register();
++#else
++ CAESinkPi::Register();
++#endif
++ }
+ }
+
+ CWinSystemRpi::~CWinSystemRpi()
Index: multimedia/kodi-devel/files/patch-wayland
===================================================================
--- /dev/null
+++ multimedia/kodi-devel/files/patch-wayland
@@ -0,0 +1,11 @@
+--- xbmc/windowing/wayland/WinSystemWayland.cpp.orig 2018-01-05 12:46:19 UTC
++++ xbmc/windowing/wayland/WinSystemWayland.cpp
+@@ -1308,7 +1308,7 @@ void CWinSystemWayland::PrepareFramePresentation()
+ };
+ feedback.on_presented() = [this,iter](std::uint32_t tvSecHi, std::uint32_t tvSecLo, std::uint32_t tvNsec, std::uint32_t refresh, std::uint32_t seqHi, std::uint32_t seqLo, wayland::presentation_feedback_kind flags)
+ {
+- timespec tv = { .tv_sec = static_cast<std::time_t> ((static_cast<std::uint64_t>(tvSecHi) << 32) + tvSecLo), .tv_nsec = tvNsec };
++ timespec tv = { .tv_sec = static_cast<std::time_t> ((static_cast<std::uint64_t>(tvSecHi) << 32) + tvSecLo), .tv_nsec = static_cast<long>(tvNsec) };
+ std::int64_t latency{KODI::LINUX::TimespecDifference(iter->submissionTime, tv)};
+ std::uint64_t msc{(static_cast<std::uint64_t>(seqHi) << 32) + seqLo};
+ m_presentationFeedbackHandlers.Invoke(tv, refresh, m_syncOutputID, m_syncOutputRefreshRate, msc);
Index: multimedia/kodi-devel/pkg-plist
===================================================================
--- multimedia/kodi-devel/pkg-plist
+++ multimedia/kodi-devel/pkg-plist
@@ -66,8 +66,7 @@
include/kodi/xbmc_epg_types.h
include/kodi/xbmc_pvr_dll.h
include/kodi/xbmc_pvr_types.h
-lib/kodi/kodi-x11
-lib/kodi/kodi-xrandr
+lib/kodi/kodi-%%PLATFORM_NAME%%
lib/kodi/system/libcpluff-%%ARCH%%-%%OPSYS%%.so
lib/kodi/system/players/VideoPlayer/libdvdnav-%%ARCH%%-%%OPSYS%%.so
man/man1/kodi.1.gz
Index: multimedia/kodi-devel/pkg-plist-wayland
===================================================================
--- /dev/null
+++ multimedia/kodi-devel/pkg-plist-wayland
@@ -0,0 +1 @@
+lib/kodi/kodi-wayland
Index: multimedia/kodi-devel/pkg-plist-x11
===================================================================
--- /dev/null
+++ multimedia/kodi-devel/pkg-plist-x11
@@ -0,0 +1,2 @@
+lib/kodi/kodi-x11
+lib/kodi/kodi-xrandr

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 12, 2:29 AM (5 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26885950
Default Alt Text
D13712.diff (14 KB)

Event Timeline