Changeset View
Standalone View
multimedia/kodi-devel/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= kodi | PORTNAME= kodi | ||||
DISTVERSION= 18.0.g201801070734 | DISTVERSION= 18.0.g201801070734 | ||||
PORTREVISION= 1 | PORTREVISION= 1 | ||||
CATEGORIES= multimedia | CATEGORIES= multimedia | ||||
PKGNAMESUFFIX= -devel | PKGNAMESUFFIX= -devel | ||||
MAINTAINER= tobik@FreeBSD.org | MAINTAINER= tobik@FreeBSD.org | ||||
COMMENT= Award winning media center application | COMMENT= Award winning media center application | ||||
LICENSE= GPLv2 | LICENSE= GPLv2 | ||||
LICENSE_FILE= ${WRKSRC}/LICENSE.GPL | LICENSE_FILE= ${WRKSRC}/LICENSE.GPL | ||||
BROKEN_FreeBSD_10= does not build | BROKEN_FreeBSD_10= does not build | ||||
ONLY_FOR_ARCHS= amd64 i386 | ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 | ||||
BUILD_DEPENDS= rapidjson>=0:devel/rapidjson \ | BUILD_DEPENDS= rapidjson>=0:devel/rapidjson \ | ||||
swig3.0:devel/swig30 | swig3.0:devel/swig30 | ||||
LIB_DEPENDS= libass.so:multimedia/libass \ | LIB_DEPENDS= libass.so:multimedia/libass \ | ||||
libavcodec.so:multimedia/ffmpeg \ | libavcodec.so:multimedia/ffmpeg \ | ||||
libavfilter.so:multimedia/ffmpeg \ | libavfilter.so:multimedia/ffmpeg \ | ||||
libavformat.so:multimedia/ffmpeg \ | libavformat.so:multimedia/ffmpeg \ | ||||
libavutil.so:multimedia/ffmpeg \ | libavutil.so:multimedia/ffmpeg \ | ||||
libcdio.so:sysutils/libcdio \ | libcdio.so:sysutils/libcdio \ | ||||
libcrossguid.so:devel/libcrossguid \ | libcrossguid.so:devel/libcrossguid \ | ||||
libcurl.so:ftp/curl \ | libcurl.so:ftp/curl \ | ||||
libdrm.so:graphics/libdrm \ | |||||
libdvdnav.so:multimedia/libdvdnav \ | libdvdnav.so:multimedia/libdvdnav \ | ||||
libdvdread.so:multimedia/libdvdread \ | libdvdread.so:multimedia/libdvdread \ | ||||
libexpat.so:textproc/expat2 \ | libexpat.so:textproc/expat2 \ | ||||
libfmt.so:devel/libfmt \ | libfmt.so:devel/libfmt \ | ||||
libfreetype.so:print/freetype2 \ | libfreetype.so:print/freetype2 \ | ||||
libfribidi.so:converters/fribidi \ | libfribidi.so:converters/fribidi \ | ||||
libgif.so:graphics/giflib \ | libgif.so:graphics/giflib \ | ||||
liblcms2.so:graphics/lcms2 \ | liblcms2.so:graphics/lcms2 \ | ||||
liblzo2.so:archivers/lzo2 \ | liblzo2.so:archivers/lzo2 \ | ||||
libpcre.so:devel/pcre \ | libpcre.so:devel/pcre \ | ||||
libpcrecpp.so:devel/pcre \ | libpcrecpp.so:devel/pcre \ | ||||
libpng16.so:graphics/png \ | libpng16.so:graphics/png \ | ||||
libpostproc.so:multimedia/ffmpeg \ | libpostproc.so:multimedia/ffmpeg \ | ||||
libswresample.so:multimedia/ffmpeg \ | libswresample.so:multimedia/ffmpeg \ | ||||
libswscale.so:multimedia/ffmpeg \ | libswscale.so:multimedia/ffmpeg \ | ||||
libtag.so:audio/taglib \ | libtag.so:audio/taglib \ | ||||
libtinyxml.so:textproc/tinyxml \ | libtinyxml.so:textproc/tinyxml \ | ||||
libuuid.so:misc/e2fsprogs-libuuid | 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 | |||||
bdrewery: Ok yeah this is a problem. A port cannot depend on itself. It seems like you're trying to do a… | |||||
Not Done Inline ActionsCan you explain why? Surely a package can depend on another package regardless of how it is built or what origin it has. Let's assume I split multimedia/kodi-devel up into three ports: (1) multimedia/kodi-devel-gbm, (2) multimedia/kodi-devel-wayland, (3) multimedia/kodi-devel-x11. Then I would have no problems whatsoever to let (2) depend on (1), and (3) depend on (1). Maybe I should do that instead. tobik: Can you explain why? Surely a package can depend on another package regardless of how it is… | |||||
Not Done Inline ActionsYour reasoning makes sense but it's just not the pattern we use in Ports right now. Kodi depends on itself? bdrewery: Your reasoning makes sense but it's just not the pattern we use in Ports right now.
Let's step… | |||||
Not Done Inline ActionsLet me quote two earlier comments I wrote here:
To prevent having to add CONFLICTS_INSTALL to all flavors (like I did in the initial revision of this differential), both x11 and wayland do not install the data files, but gbm does. So I want to add a RUN_DEPENDS to get them when someone only installs kodi-devel-x11. Having conflicts between them makes Kodi annoying to test and is really unnecessary.
To get lib/kodi/kodi-{x11,wayland,gbm} I have to rebuild Kodi three times (hence the use of flavors), but I'd like to be able to install them simultaneously. So I'm really stuck between five choices: Do I
IMHO the only sensible choice here is 4 or 3. tobik: Let me quote two earlier comments I wrote here:
>>! In D13712#287023, @tobik wrote:
> Fix… | |||||
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 | # Building libcpluff.a requires autoreconf and gmake. Using ninja | ||||
# leads to dependency problems where libcpluff.a is not yet finished | # leads to dependency problems where libcpluff.a is not yet finished | ||||
# building when it's required. | # building when it's required. | ||||
USES= autoreconf:build cmake:outsource,noninja compiler:c++11-lib \ | USES= autoreconf:build cmake:outsource,noninja compiler:c++11-lib \ | ||||
gettext gmake iconv:wchar_t jpeg libtool pkgconfig python:-2.7 \ | gettext gmake iconv:wchar_t jpeg libtool pkgconfig python:-2.7 \ | ||||
ssl sqlite | ssl sqlite | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= xbmc | GH_ACCOUNT= xbmc | ||||
GH_PROJECT= xbmc | GH_PROJECT= xbmc | ||||
GH_TAGNAME= bff1759626cb44be4a3f6dc0d6ebb5fe43a55a96 | GH_TAGNAME= bff1759626cb44be4a3f6dc0d6ebb5fe43a55a96 | ||||
USE_GNOME= libxslt libxml2 | USE_GNOME= libxslt libxml2 | ||||
USE_GL= egl gl glu | |||||
USE_JAVA= yes | USE_JAVA= yes | ||||
JAVA_BUILD= yes | JAVA_BUILD= yes | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
.if ${FLAVOR:U} == x11 | |||||
USE_XORG= x11 xext xrandr | USE_XORG= x11 xext xrandr | ||||
.endif | |||||
CONFLICTS_INSTALL= kodi-[0-9]* | CONFLICTS_INSTALL= kodi-[0-9]* | ||||
CMAKE_ARGS= -DCORE_PLATFORM_NAME=X11 \ | CMAKE_ARGS= -DLIBDVD_INCLUDE_DIRS="${LOCALBASE}/include" \ | ||||
-DLIBDVD_INCLUDE_DIRS="${LOCALBASE}/include" \ | |||||
-DDVDREAD_LIBRARY="${LOCALBASE}/lib/libdvdread.so" \ | -DDVDREAD_LIBRARY="${LOCALBASE}/lib/libdvdread.so" \ | ||||
-DDVDNAV_LIBRARY="${LOCALBASE}/lib/libdvdnav.so" | -DDVDNAV_LIBRARY="${LOCALBASE}/lib/libdvdnav.so" | ||||
.if ${FLAVOR:U} == wayland | |||||
CMAKE_ARGS+= -DWAYLAND_RENDER_SYSTEM:STRING="gl" | |||||
.endif | |||||
CMAKE_OFF= ENABLE_ALSA \ | CMAKE_OFF= ENABLE_ALSA \ | ||||
ENABLE_DVDCSS \ | ENABLE_DVDCSS \ | ||||
ENABLE_INTERNAL_FFMPEG \ | ENABLE_INTERNAL_FFMPEG \ | ||||
ENABLE_INTERNAL_CROSSGUID | ENABLE_INTERNAL_CROSSGUID | ||||
CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB}" OPENSSL_CFLAGS="-I${OPENSSLINC}" | CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB}" OPENSSL_CFLAGS="-I${OPENSSLINC}" | ||||
KODIARCH_i386= x86 | KODIARCH_i386= x86 | ||||
KODIARCH_amd64= x86_64 | 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 \ | OPTIONS_DEFINE= AVAHI CEC DBUS LIBBLURAY MYSQL NFS RPI SMB SSH UPNP \ | ||||
VDPAU WEBSERVER | VAAPI VDPAU WEBSERVER | ||||
OPTIONS_DEFAULT= SNDIO SSH UPNP VAAPI VDPAU WEBSERVER | OPTIONS_DEFAULT= SNDIO SSH UPNP VAAPI VDPAU WEBSERVER | ||||
OPTIONS_EXCLUDE_amd64= RPI | |||||
OPTIONS_EXCLUDE_i386= RPI | |||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
.if ${FLAVOR:U} == native || ${FLAVOR:U} == wayland | |||||
Done Inline ActionsAt that point, FLAVOR can be undefined, so using :U is right, but gbm is the default flavor, so it is also the value that is to be used when FLAVOR is undefined. So either change this to: .if ${FLAVOR:Ugbm} == gbm || ${FLAVOR:U} == wayland Or just after the FLAVORS line, add a: FLAVOR?= ${FLAVORS:[1]} mat: At that point, FLAVOR can be undefined, so using `:U` is right, but gbm is the default flavor… | |||||
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 | # Choosing one of SNDIO or PULSEAUDIO is mandatory right now if you | ||||
# want audio output. The OSS backend is currently not hooked into | # want audio output. The OSS backend is currently not hooked into | ||||
# Kodi's audio sink factory due to recent refactorings. | # Kodi's audio sink factory due to recent refactorings. | ||||
OPTIONS_MULTI= SOUND | OPTIONS_MULTI= SOUND | ||||
OPTIONS_MULTI_SOUND= PULSEAUDIO SNDIO | OPTIONS_MULTI_SOUND= PULSEAUDIO SNDIO | ||||
CEC_DESC= CEC adapter support | CEC_DESC= CEC adapter support | ||||
RPI_DESC= Raspberry Pi support | |||||
AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app | AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app | ||||
AVAHI_CMAKE_BOOL= ENABLE_AVAHI | AVAHI_CMAKE_BOOL= ENABLE_AVAHI | ||||
CEC_LIB_DEPENDS= libcec.so:multimedia/libcec | CEC_LIB_DEPENDS= libcec.so:multimedia/libcec | ||||
CEC_CMAKE_BOOL= ENABLE_CEC | CEC_CMAKE_BOOL= ENABLE_CEC | ||||
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus | DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus | ||||
DBUS_CMAKE_BOOL= ENABLE_DBUS | DBUS_CMAKE_BOOL= ENABLE_DBUS | ||||
LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray | LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray | ||||
LIBBLURAY_CMAKE_BOOL= ENABLE_BLURAY | LIBBLURAY_CMAKE_BOOL= ENABLE_BLURAY | ||||
MYSQL_USES= mysql | MYSQL_USES= mysql | ||||
MYSQL_CMAKE_BOOL= ENABLE_MYSQLCLIENT | MYSQL_CMAKE_BOOL= ENABLE_MYSQLCLIENT | ||||
NFS_LIB_DEPENDS= libnfs.so:net/libnfs | NFS_LIB_DEPENDS= libnfs.so:net/libnfs | ||||
NFS_CMAKE_BOOL= ENABLE_NFS | NFS_CMAKE_BOOL= ENABLE_NFS | ||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio | PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio | ||||
PULSEAUDIO_CMAKE_BOOL= ENABLE_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_USES= samba:lib | ||||
SMB_CMAKE_BOOL= ENABLE_SMBCLIENT | SMB_CMAKE_BOOL= ENABLE_SMBCLIENT | ||||
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio | SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio | ||||
SNDIO_CMAKE_BOOL= ENABLE_SNDIO | SNDIO_CMAKE_BOOL= ENABLE_SNDIO | ||||
SSH_LIB_DEPENDS= libssh.so:security/libssh | SSH_LIB_DEPENDS= libssh.so:security/libssh | ||||
SSH_CMAKE_BOOL= ENABLE_SSH | SSH_CMAKE_BOOL= ENABLE_SSH | ||||
UPNP_CMAKE_BOOL= ENABLE_UPNP | 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 \ | UPNP_CXXFLAGS= -DNPT_CONFIG_HAVE_ARPA_INET_H \ | ||||
-DNPT_CONFIG_HAVE_GETADDRINFO \ | -DNPT_CONFIG_HAVE_GETADDRINFO \ | ||||
-DNPT_CONFIG_HAVE_INET_NTOP \ | -DNPT_CONFIG_HAVE_INET_NTOP \ | ||||
-DNPT_CONFIG_HAVE_INET_PTON \ | -DNPT_CONFIG_HAVE_INET_PTON \ | ||||
-DNPT_CONFIG_HAVE_NET_IF_DL_H \ | -DNPT_CONFIG_HAVE_NET_IF_DL_H \ | ||||
-DNPT_CONFIG_HAVE_SOCKADDR_DL \ | -DNPT_CONFIG_HAVE_SOCKADDR_DL \ | ||||
-DNPT_CONFIG_HAVE_SOCKADDR_IN_SIN_LEN | -DNPT_CONFIG_HAVE_SOCKADDR_IN_SIN_LEN | ||||
VAAPI_LIB_DEPENDS= libva.so:multimedia/libva | VAAPI_LIB_DEPENDS= libva.so:multimedia/libva | ||||
VAAPI_CMAKE_BOOL= ENABLE_VAAPI | VAAPI_CMAKE_BOOL= ENABLE_VAAPI | ||||
VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau | VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau | ||||
VDPAU_CMAKE_BOOL= ENABLE_VDPAU | VDPAU_CMAKE_BOOL= ENABLE_VDPAU | ||||
WEBSERVER_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd | WEBSERVER_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd | ||||
WEBSERVER_CMAKE_BOOL= ENABLE_MICROHTTPD | WEBSERVER_CMAKE_BOOL= ENABLE_MICROHTTPD | ||||
post-patch: | post-patch: | ||||
# Do not try to download dvdnav/dvdread during the build, instead | # 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 | # we'll manually point the build to the system's libdvd{nav,read}.so | ||||
# (see CMAKE_ARGS). | # (see CMAKE_ARGS). | ||||
@${REINPLACE_CMD} 's@KODI_DEPENDSBUILD@true@' \ | @${REINPLACE_CMD} 's@KODI_DEPENDSBUILD@true@' \ | ||||
${WRKSRC}/cmake/modules/FindLibDvd.cmake | ${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 | |||||
Done Inline Actionssame here, :Ugbm mat: same here, `:Ugbm` | |||||
post-install: | post-install: | ||||
${INSTALL_MAN} ${WRKSRC}/docs/manpages/kodi.bin.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 | ${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 | @cd ${STAGEDIR}${MAN1PREFIX}/man/man1 && ${LN} -sf kodi.bin.1.gz kodi.1.gz | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/TexturePacker | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/TexturePacker | ||||
@${FIND} ${STAGEDIR}${PREFIX}/lib/kodi -name '*.so' | ${XARGS} ${STRIP_CMD} | @${FIND} ${STAGEDIR}${PREFIX}/lib/kodi -name '*.so' | ${XARGS} ${STRIP_CMD} | ||||
# Nothing useful here... | # Nothing useful here... | ||||
@${RM} -rf ${STAGEDIR}${DOCSDIR} | @${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> | .include <bsd.port.mk> |
Ok yeah this is a problem. A port cannot depend on itself. It seems like you're trying to do a sub-package thing here by making kodi-devel a meta package of the 2 possible flavors?