Index: head/multimedia/kodi-devel/Makefile =================================================================== --- head/multimedia/kodi-devel/Makefile (revision 465524) +++ head/multimedia/kodi-devel/Makefile (revision 465525) @@ -1,196 +1,194 @@ # $FreeBSD$ PORTNAME= kodi DISTVERSION= 18.0.g201803211302 +PORTREVISION= 1 CATEGORIES= multimedia PKGNAMESUFFIX?= -devel MAINTAINER= tobik@FreeBSD.org COMMENT= Award winning media center application LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE.GPL BROKEN_FreeBSD_10= does not build ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 BUILD_DEPENDS= rapidjson>=0:devel/rapidjson \ swig3.0:devel/swig30 LIB_DEPENDS= libass.so:multimedia/libass \ libavcodec.so:multimedia/ffmpeg \ libavfilter.so:multimedia/ffmpeg \ libavformat.so:multimedia/ffmpeg \ libavutil.so:multimedia/ffmpeg \ libcdio.so:sysutils/libcdio \ libcrossguid.so:devel/libcrossguid \ libcurl.so:ftp/curl \ libdvdnav.so:multimedia/libdvdnav \ libdvdread.so:multimedia/libdvdread \ libexpat.so:textproc/expat2 \ libfmt.so:devel/libfmt \ libfreetype.so:print/freetype2 \ libfribidi.so:converters/fribidi \ libgif.so:graphics/giflib \ libgnutls.so:security/gnutls \ liblcms2.so:graphics/lcms2 \ liblzo2.so:archivers/lzo2 \ libpcre.so:devel/pcre \ libpcrecpp.so:devel/pcre \ libpng.so:graphics/png \ libpostproc.so:multimedia/ffmpeg \ libswresample.so:multimedia/ffmpeg \ libswscale.so:multimedia/ffmpeg \ libtag.so:audio/taglib \ libtinyxml.so:textproc/tinyxml \ libuuid.so:misc/e2fsprogs-libuuid # 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. USES= autoreconf:build cmake:outsource,noninja compiler:c++11-lib \ gettext gmake iconv:wchar_t jpeg libtool pkgconfig python:-2.7 \ ssl sqlite USE_GITHUB= yes GH_ACCOUNT= xbmc GH_PROJECT= xbmc GH_TAGNAME= d571386e6f848db993ac7f855fc911abc23e308a USE_GNOME= libxslt libxml2 USE_JAVA= yes JAVA_BUILD= yes USE_LDCONFIG= yes CONFLICTS_INSTALL= kodi-[0-9]* CMAKE_ARGS= -DLIBDVD_INCLUDE_DIRS="${LOCALBASE}/include" \ -DDVDREAD_LIBRARY="${LOCALBASE}/lib/libdvdread.so" \ -DDVDNAV_LIBRARY="${LOCALBASE}/lib/libdvdnav.so" 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}:U${ARCH}} OPSYS=${OPSYS:tl} \ - WAYLAND="@comment " +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_DEFAULT= LIBBLURAY SNDIO SSH UPNP VAAPI VDPAU WEBSERVER X11 OPTIONS_SINGLE= PLATFORM -OPTIONS_SINGLE_PLATFORM= GBM RPI X11 +OPTIONS_SINGLE_PLATFORM= GBM RPI WAYLAND X11 OPTIONS_EXCLUDE_amd64= RPI OPTIONS_EXCLUDE_i386= RPI OPTIONS_SUB= yes # 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. OPTIONS_MULTI= SOUND OPTIONS_MULTI_SOUND= PULSEAUDIO SNDIO CEC_DESC= CEC adapter support GBM_DESC= GBM support (requires a kernel with evdev support) PLATFORM_DESC= Platform RPI_DESC= Raspberry Pi support -WAYLAND_DESC= Wayland support (broken) AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app AVAHI_CMAKE_BOOL= ENABLE_AVAHI CEC_LIB_DEPENDS= libcec.so:multimedia/libcec CEC_CMAKE_BOOL= ENABLE_CEC DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CMAKE_BOOL= ENABLE_DBUS GBM_CMAKE_ON= -DCORE_PLATFORM_NAME:STRING="gbm" LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray LIBBLURAY_CMAKE_BOOL= ENABLE_BLURAY MYSQL_USES= mysql MYSQL_CMAKE_BOOL= ENABLE_MYSQLCLIENT NFS_LIB_DEPENDS= libnfs.so:net/libnfs NFS_CMAKE_BOOL= ENABLE_NFS 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_ON= -DCORE_PLATFORM_NAME:STRING="rbpi" RPI_LIB_DEPENDS= libbrcmEGL.so:misc/raspberrypi-userland RPI_LIB_DEPENDS_OFF= libdrm.so:graphics/libdrm RPI_PREVENTS= VAAPI VDPAU RPI_USE_OFF= GL=egl,gl,glu SMB_USES= samba:lib SMB_CMAKE_BOOL= ENABLE_SMBCLIENT SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CMAKE_BOOL= ENABLE_SNDIO SSH_LIB_DEPENDS= libssh.so:security/libssh SSH_CMAKE_BOOL= ENABLE_SSH UPNP_CMAKE_BOOL= ENABLE_UPNP # XXX: Upstream is https://github.com/plutinosoft/Neptune UPNP_CXXFLAGS= -DNPT_CONFIG_HAVE_ARPA_INET_H \ -DNPT_CONFIG_HAVE_GETADDRINFO \ -DNPT_CONFIG_HAVE_INET_NTOP \ -DNPT_CONFIG_HAVE_INET_PTON \ -DNPT_CONFIG_HAVE_NET_IF_DL_H \ -DNPT_CONFIG_HAVE_SOCKADDR_DL \ -DNPT_CONFIG_HAVE_SOCKADDR_IN_SIN_LEN VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_CMAKE_BOOL= ENABLE_VAAPI VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau VDPAU_CMAKE_BOOL= ENABLE_VDPAU -# Not enabled: Requires default WAYLAND in graphics/mesa-libs and missing graphics/waylandpp port WAYLAND_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols WAYLAND_CMAKE_ON= -DCORE_PLATFORM_NAME:STRING="wayland" \ -DWAYLAND_RENDER_SYSTEM:STRING="gl" WAYLAND_LIB_DEPENDS= libwayland-client++.so:graphics/waylandpp \ libxkbcommon.so:x11/libxkbcommon WEBSERVER_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd WEBSERVER_CMAKE_BOOL= ENABLE_MICROHTTPD X11_CMAKE_ON= -DCORE_PLATFORM_NAME:STRING="x11" X11_USE= XORG=x11,xext,xrandr .include .if ${SLAVE_PORT} == no PORTDATA= * .endif post-patch: # Do not try to download dvdnav/dvdread during the build, instead # we'll manually point the build to the system's libdvd{nav,read}.so # (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 ${SLAVE_PORT} == no 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 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/TexturePacker @${FIND} ${STAGEDIR}${PREFIX}/lib/kodi -name '*.so' | ${XARGS} ${STRIP_CMD} # Nothing useful here... @${RM} -rf ${STAGEDIR}${DOCSDIR} .endif .include Index: head/multimedia/kodi-devel/files/patch-rbpi =================================================================== --- head/multimedia/kodi-devel/files/patch-rbpi (revision 465524) +++ head/multimedia/kodi-devel/files/patch-rbpi (revision 465525) @@ -1,92 +1,83 @@ --- 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/windowing/rpi/WinSystemRpi.cpp.orig 2018-02-09 09:50:14 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 "powermanagement/linux/LinuxPowerSyscall.h" #include @@ -55,7 +62,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 + } CLinuxPowerSyscall::Register(); } Index: head/multimedia/kodi-devel/files/patch-wayland =================================================================== --- head/multimedia/kodi-devel/files/patch-wayland (revision 465524) +++ head/multimedia/kodi-devel/files/patch-wayland (revision 465525) @@ -1,31 +1,52 @@ +--- cmake/modules/FindWaylandpp.cmake.orig 2018-03-21 13:02:45 UTC ++++ cmake/modules/FindWaylandpp.cmake +@@ -10,7 +10,7 @@ + # WAYLANDPP_DEFINITIONS - the waylandpp definitions + # WAYLANDPP_SCANNER - path to wayland-scanner++ + +-pkg_check_modules(WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++) ++pkg_check_modules(WAYLANDPP wayland-client++ wayland-client-extra++ wayland-egl++ wayland-cursor++) + pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++) + if(WAYLANDPP_FOUND) + pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir) +--- cmake/treedata/freebsd/subdirs.txt.orig 2018-03-21 13:02:45 UTC ++++ cmake/treedata/freebsd/subdirs.txt +@@ -9,4 +9,7 @@ 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/windowing/linux windowing/linux --- xbmc/windowing/wayland/ShellSurfaceXdgShell.h.orig 2018-03-21 13:02:45 UTC +++ xbmc/windowing/wayland/ShellSurfaceXdgShell.h -@@ -22,6 +22,7 @@ - #include "Connection.h" +@@ -23,6 +23,7 @@ #include "ShellSurface.h" -+#include #include ++#include namespace KODI + { --- xbmc/windowing/wayland/WinSystemWayland.cpp.orig 2018-03-21 13:02:45 UTC +++ xbmc/windowing/wayland/WinSystemWayland.cpp @@ -1331,7 +1331,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 ((static_cast(tvSecHi) << 32) + tvSecLo), .tv_nsec = tvNsec }; + timespec tv = { .tv_sec = static_cast ((static_cast(tvSecHi) << 32) + tvSecLo), .tv_nsec = static_cast(tvNsec) }; std::int64_t latency{KODI::LINUX::TimespecDifference(iter->submissionTime, tv)}; std::uint64_t msc{(static_cast(seqHi) << 32) + seqLo}; m_presentationFeedbackHandlers.Invoke(tv, refresh, m_syncOutputID, m_syncOutputRefreshRate, msc); --- xbmc/windowing/wayland/WinSystemWayland.h.orig 2018-03-21 13:02:45 UTC +++ xbmc/windowing/wayland/WinSystemWayland.h -@@ -28,6 +28,7 @@ - #include - +@@ -30,6 +30,7 @@ #include -+#include #include #include ++#include + #include "Connection.h" + #include "Output.h"