View | Details | Raw Unified | Return to bug 254417
Collapse All | Expand All

(-)b/games/kodi-addon-game.libretro.beetle-psx/Makefile (-24 / +25 lines)
Lines 11-41 COMMENT= Kodi game addon for Sony - PlayStation (Beetle PSX) Link Here
11
11
12
LICENSE=	GPLv2+
12
LICENSE=	GPLv2+
13
13
14
LIB_DEPENDS=	libtinyxml.so:textproc/tinyxml
14
LIBRETRO_PORT=	libretro-beetle_psx
15
RUN_DEPENDS=	kodi-addon-game.libretro>=0:games/kodi-addon-game.libretro
16
15
17
USES=		cmake:noninja gmake kodi localbase
16
RUN_DEPENDS=	kodi-addon-game.libretro>=0:games/kodi-addon-game.libretro \
17
		${LIBRETRO_PORT}>=0:games/${LIBRETRO_PORT}
18
19
NO_ARCH=	yes
20
21
USES=		kodi
18
USE_GITHUB=	yes
22
USE_GITHUB=	yes
19
GH_ACCOUNT=	kodi-game \
23
GH_ACCOUNT=	kodi-game
20
		libretro:beetle_psx
24
21
GH_PROJECT=	beetle-psx-libretro:beetle_psx
25
do-build:
22
# Keep in sync with: depends/common/beetle-psx/beetle-psx.txt
26
	@${MKDIR} ${WRKSRC}/lib
23
GH_TAGNAME=	e1836bde1b250d41c6f91c2b6f06444d989f1138:beetle_psx
27
	@LIBRARY_FILENAME_FULL=`${MAKE} -C ../${LIBRETRO_PORT} -V PLIST_FILES | ${SED} 's| .*||g'` && \
24
28
	LIBRARY_FILENAME=`basename "$${LIBRARY_FILENAME_FULL}"` && \
25
CMAKE_ARGS=	-DBUILD_SHARED_LIBS=1 \
29
	${LN} -sf "${LOCALBASE}/$${LIBRARY_FILENAME_FULL}" ${WRKSRC}/lib/ && \
26
		-DADDONS_TO_BUILD=${PORTNAME} \
30
	${REINPLACE_CMD} -e 's|@PLATFORM@|freebsd|g' \
27
		-DBEETLE-PSX_LIB=depends/common/beetle-psx/mednafen_psx_libretro.so
31
		-e "s|@LIBRARY_FILENAME@|$${LIBRARY_FILENAME}|g" \
28
32
		${WRKSRC}/${PORTNAME}/addon.xml.in
29
post-extract:
33
	@${MV} ${WRKSRC}/${PORTNAME}/addon.xml.in ${WRKSRC}/${PORTNAME}/addon.xml
30
	@${MV} ${WRKSRC_beetle_psx}/* ${WRKSRC}/depends/common/beetle-psx/
34
	@${RM} -f ${WRKSRC}/${PORTNAME}/addon.xml.in.bak
31
35
32
post-patch:
36
do-install:
33
	@${REINPLACE_CMD} -e 's|find_library(BEETLE-PSX_LIB.*|add_subdirectory(depends/common/beetle-psx)|g' \
37
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/kodi/addons/${PORTNAME} \
34
		${WRKSRC}/CMakeLists.txt
38
		${STAGEDIR}${PREFIX}/share/kodi/addons
35
	@${REINPLACE_CMD} -e 's|defined(BSD)|!defined(CLOCK_REALTIME)|g' \
39
	@(cd ${WRKSRC}/lib/ && ${COPYTREE_SHARE} * ${STAGEDIR}${PREFIX}/lib/kodi/addons/${PORTNAME})
36
		${WRKSRC}/depends/common/beetle-psx/libretro-common/rthreads/rthreads.c
40
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${PREFIX}/share/kodi/addons)
37
38
post-install:
39
	${RM} -rf ${STAGEDIR}${PREFIX}/lib/libretro
40
41
41
.include <bsd.port.mk>
42
.include <bsd.port.mk>

Return to bug 254417