Page MenuHomeFreeBSD

D13712.id37552.diff
No OneTemporary

D13712.id37552.diff

Index: multimedia/kodi-devel/Makefile
===================================================================
--- multimedia/kodi-devel/Makefile
+++ multimedia/kodi-devel/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= kodi
-DISTVERSION= 18.0.g20171213
-PORTREVISION= 1
+DISTVERSION= 18.0.g201712171210
CATEGORIES= multimedia
PKGNAMESUFFIX= -devel
@@ -13,7 +12,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 +24,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 +43,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.
@@ -54,36 +69,54 @@
USE_GITHUB= yes
GH_ACCOUNT= xbmc
GH_PROJECT= xbmc
-GH_TAGNAME= 5853600d6655ff888bd6bd9e89fb58883080b6d2
+GH_TAGNAME= 66c8caca3122f0c0f4b2797b2517a2462ac56f06
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 \
- -DENABLE_ALSA=no \
- -DENABLE_INTERNAL_FFMPEG=no \
- -DENABLE_INTERNAL_CROSSGUID=no \
- -DENABLE_DVDCSS=no \
- -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+= -DCORE_PLATFORM_NAME:STRING="Wayland" \
+ -DWAYLAND_RENDER_SYSTEM:STRING="gl"
+.elif ${FLAVOR:U} == x11
+CMAKE_ARGS+= -DCORE_PLATFORM_NAME:STRING="X11"
+.endif
+CMAKE_OFF= ENABLE_ALSA \
+ ENABLE_DVDCSS \
+ ENABLE_INTERNAL_FFMPEG \
+ ENABLE_INTERNAL_CROSSGUID
CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB}" OPENSSL_CFLAGS="-I${OPENSSLINC}"
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 VAAPI VDPAU \
- WEBSERVER
+OPTIONS_DEFINE= AVAHI CEC DBUS LIBBLURAY MYSQL NFS RPI SMB SSH VAAPI \
+ VDPAU WEBSERVER
OPTIONS_DEFAULT= SNDIO SSH VAAPI VDPAU WEBSERVER
+OPTIONS_EXCLUDE_armv6= VAAPI VDPAU
+OPTIONS_EXCLUDE_armv7= VAAPI VDPAU
+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
+
# 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.
@@ -113,6 +146,17 @@
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="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=gbm
+RPI_USE_OFF= GL=egl,gl,glu
+
SMB_USES= samba:lib
SMB_CMAKE_BOOL= ENABLE_SMBCLIENT
@@ -137,7 +181,11 @@
# (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/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
@@ -145,5 +193,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 = 1513165213
-SHA256 (xbmc-xbmc-18.0.g20171213-5853600d6655ff888bd6bd9e89fb58883080b6d2_GH0.tar.gz) = 450bf6504a4d0e5d4d75f4cbba44c82bee3893be4fb55c7c02426da6368ffa8f
-SIZE (xbmc-xbmc-18.0.g20171213-5853600d6655ff888bd6bd9e89fb58883080b6d2_GH0.tar.gz) = 56826821
+TIMESTAMP = 1513533429
+SHA256 (xbmc-xbmc-18.0.g201712171210-66c8caca3122f0c0f4b2797b2517a2462ac56f06_GH0.tar.gz) = d60a67dc48a587c0efb23dfa46a774673168bc540d3ca63e2a3e6752063ccb7b
+SIZE (xbmc-xbmc-18.0.g201712171210-66c8caca3122f0c0f4b2797b2517a2462ac56f06_GH0.tar.gz) = 56828777
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/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
Thu, May 28, 4:39 AM (18 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33577563
Default Alt Text
D13712.id37552.diff (13 KB)

Event Timeline