1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/Mk/Uses/kodi.mk
Tobias C. Berner aa25396790 framework: cleanup conditional-indentations in Mk/
Run Tools/scripts/indent_make_if.pl on all of Mk.

These white space changes contribute greatly to the readability of those files.
As we have a version control system, finding out the reasons for the changes
prior to these white space changes is still easily possible

Differential Revision:	https://reviews.freebsd.org/D35024
Reviewed by:		portmgr (rene, bapt)
2022-04-24 12:00:20 +02:00

45 lines
1.3 KiB
Makefile

# Support Kodi Home Theater Addons
#
# Feature: kodi
# Usage: USES=kodi[:noautoplist]
# Valid args: noautoplist Don't generate the plist automatically
#
# MAINTAINER: decke@FreeBSD.org
.if !defined(_INCLUDE_USES_KODI_MK)
_INCLUDE_USES_KODI_MK= yes
_valid_ARGS= noautoplist
# Sanity check
. for arg in ${kodi_ARGS}
. if empty(_valid_ARGS:M${arg})
IGNORE= Incorrect 'USES+= kodi:${kodi_ARGS}' usage: argument [${arg}] is not recognized
. endif
. endfor
BUILD_DEPENDS+= ${LOCALBASE}/include/kodi/AddonBase.h:multimedia/kodi
LIB_DEPENDS+= libp8-platform.so:devel/p8-platform \
libkodiplatform.so:devel/kodi-platform
RUN_DEPENDS+= kodi:multimedia/kodi
PKGNAMEPREFIX?= kodi-addon-
KODI_ADDON?= ${PORTNAME}
PLIST_SUB+= DISTVERSION="${DISTVERSION}"
. if empty(kodi_ARGS:Mnoautoplist)
_USES_install+= 820:kodi-autoplist
kodi-autoplist:
@${FIND} -ds ${STAGEDIR}${PREFIX}/lib/kodi/addons/${KODI_ADDON} \( -type f -or -type l \) -print | ${SED} -E -e \
's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}
@if [ -d ${STAGEDIR}${PREFIX}/share/kodi/addons/${KODI_ADDON} ]; then \
${FIND} -ds ${STAGEDIR}${PREFIX}/share/kodi/addons/${KODI_ADDON} -type f -print | ${SED} -E -e \
's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \
fi
. endif
.endif # !defined(_INCLUDE_USES_KODI_MK)