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 @@ -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= gbm 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@gbm + +x11_PKGNAMESUFFIX= -devel-x11 +x11_PLIST= ${.CURDIR}/pkg-plist-x11 +x11_RUN_DEPENDS= kodi-devel>=0:multimedia/kodi-devel@gbm + # 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,24 +70,33 @@ 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} == gbm +CMAKE_ARGS+= -DCORE_PLATFORM_NAME:STRING="GBM" +.elif ${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 @@ -84,6 +109,10 @@ OPTIONS_DEFAULT= SNDIO SSH VAAPI VDPAU WEBSERVER OPTIONS_SUB= yes +.if ${FLAVOR:U} == gbm || ${FLAVOR:U} == wayland +OPTIONS_EXCLUDE= VDPAU +.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. @@ -137,7 +166,9 @@ # (see CMAKE_ARGS). @${REINPLACE_CMD} 's@KODI_DEPENDSBUILD@true@' \ ${WRKSRC}/cmake/modules/FindLibDvd.cmake + @${CP} ${WRKSRC}/cmake/platform/linux/gbm.cmake ${WRKSRC}/cmake/platform/freebsd +.if ${FLAVOR:U} == gbm 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 +176,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 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-wayland =================================================================== --- /dev/null +++ multimedia/kodi-devel/files/patch-wayland @@ -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 ++#else + #include + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +@@ -38,6 +41,7 @@ typedef unsigned long kernel_ulong_t; + #endif + + #include ++#endif + + #if defined(HAVE_LIBUDEV) + #include +@@ -77,8 +81,10 @@ typedef unsigned long kernel_ulong_t; + #define XBMC_BUTTON_WHEELDOWN 5 + #endif + ++#ifndef TARGET_FREEBSD + #include + #include ++#endif + + #include + #include +@@ -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 + ++#ifdef TARGET_FREEBSD ++#include ++#else + #include ++#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 + #include + ++#ifdef TARGET_FREEBSD ++#include ++#else + #include ++#endif + + #include "threads/SingleLock.h" + #include "utils/EndianSwap.h" 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-gbm 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