2014-05-26 08:55:07 +02:00
|
|
|
USES+= dos2unix
|
|
|
|
DOS2UNIX_GLOB= *.c *.cpp *.h *.H *.ini *.conf
|
2008-05-20 20:36:41 +02:00
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
DISTNAME= ${PORTNAME}-bundle-src-${PORTVERSION}
|
2008-05-20 20:36:41 +02:00
|
|
|
PATCHDIR= ${.CURDIR}/files
|
2011-12-21 00:43:18 +01:00
|
|
|
BUILD_WRKSRC?= ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/projects/unix
|
2008-05-20 20:36:41 +02:00
|
|
|
WRKSRC?= ${WRKDIR}/${DISTNAME}
|
|
|
|
|
2013-04-29 10:57:12 +02:00
|
|
|
EXTRACT_AFTER_ARGS?= "${DISTNAME}/source/${PORTNAME}-core/*" \
|
2010-12-13 08:54:28 +01:00
|
|
|
"${DISTNAME}/source/${PORTNAME}${PKGNAMESUFFIX}/*"
|
2008-05-20 20:36:41 +02:00
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
.if ${PKGNAMESUFFIX} == "-core"
|
2016-04-01 16:00:51 +02:00
|
|
|
LIB_DEPENDS+= libfreetype.so:print/freetype2 \
|
|
|
|
libpng.so:graphics/png \
|
|
|
|
libminizip.so:archivers/minizip
|
2009-01-14 03:03:05 +01:00
|
|
|
.else
|
2008-05-20 20:36:41 +02:00
|
|
|
PLIST= ${WRKDIR}/pkg-plist
|
|
|
|
.endif
|
|
|
|
|
2010-12-13 21:39:23 +01:00
|
|
|
.if ${PKGNAMESUFFIX} == "-video-rice"
|
2016-04-01 16:00:51 +02:00
|
|
|
LIB_DEPENDS+= libpng.so:graphics/png
|
2010-12-13 21:39:23 +01:00
|
|
|
.endif
|
|
|
|
|
2013-10-04 19:18:44 +02:00
|
|
|
.if ${PKGNAMESUFFIX} == "-video-glide64mk"
|
2016-04-01 16:00:51 +02:00
|
|
|
LIB_DEPENDS+= libboost_thread.so:devel/boost-libs
|
2013-10-04 19:18:44 +02:00
|
|
|
.endif
|
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
.if ${PKGNAMESUFFIX} != "-core"
|
2013-10-04 19:18:44 +02:00
|
|
|
post-patch:
|
2014-03-24 01:03:39 +01:00
|
|
|
@cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} -e 's|gcc|${CC}|g' -e \
|
2015-06-15 05:27:50 +02:00
|
|
|
's|g++|${CXX}|g' -e 's|sdl-config|${SDL2_CONFIG}|g' Makefile
|
2013-10-04 19:18:44 +02:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64mk2"
|
|
|
|
@cd ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/src && \
|
|
|
|
${REINPLACE_CMD} -e 's|#include <thread>||g' \
|
2018-08-27 04:27:00 +02:00
|
|
|
GlideHQ/TxQuantize.cpp GlideHQ/TxFilter.cpp && \
|
|
|
|
${REINPLACE_CMD} -e 's|(FxU32)NULL|(uintptr_t)NULL|g' \
|
|
|
|
Glide64/Main.cpp
|
2010-12-13 08:54:28 +01:00
|
|
|
. endif
|
2014-03-24 01:03:39 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64"
|
2014-03-24 05:49:02 +01:00
|
|
|
@cd ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}/src && \
|
|
|
|
${REINPLACE_CMD} -e 's|__builtin_ia32_loadups|_mm_loadu_ps|g' -e \
|
2014-03-24 01:03:39 +01:00
|
|
|
's|__builtin_ia32_storeups|_mm_storeu_ps|g' \
|
2018-08-27 04:27:00 +02:00
|
|
|
3dmath.cpp && \
|
|
|
|
${REINPLACE_CMD} -e 's|\"G64_VERSION|\" G64_VERSION|g' -e \
|
|
|
|
's|FxU32|uintptr_t|g' \
|
|
|
|
Main.cpp
|
2014-03-24 01:03:39 +01:00
|
|
|
. endif
|
2009-01-06 22:54:58 +01:00
|
|
|
|
2008-05-20 20:36:41 +02:00
|
|
|
pre-install:
|
2016-10-21 14:51:40 +02:00
|
|
|
@${RM} ${PLIST}
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-rice"
|
|
|
|
@${ECHO_CMD} "%%DATADIR%%/RiceVideoLinux.ini" >> ${PLIST}
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
|
|
|
|
2011-12-21 00:43:18 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64"
|
|
|
|
@${ECHO_CMD} "%%DATADIR%%/Glide64.ini" >> ${PLIST}
|
|
|
|
. endif
|
|
|
|
|
2013-10-04 19:18:44 +02:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64mk2"
|
|
|
|
@${ECHO_CMD} "%%DATADIR%%/Glide64mk2.ini" >> ${PLIST}
|
|
|
|
. endif
|
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-input-sdl"
|
|
|
|
@${ECHO_CMD} "%%DATADIR%%/InputAutoCfg.ini" >> ${PLIST}
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
|
|
|
|
2014-08-15 00:05:53 +02:00
|
|
|
. if ${PKGNAMESUFFIX} == "-ui-console"
|
|
|
|
@${ECHO_CMD} "man/man6/mupen64plus.6.gz" >> ${PLIST}
|
|
|
|
. endif
|
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} != "-ui-console"
|
2010-12-17 06:47:55 +01:00
|
|
|
@${ECHO_CMD} "lib/${PORTNAME}/${PORTNAME}${PKGNAMESUFFIX}.so" >> ${PLIST}
|
2010-12-13 08:54:28 +01:00
|
|
|
. else
|
|
|
|
@${ECHO_CMD} "bin/${PORTNAME}" >> ${PLIST}
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
2014-11-13 15:32:39 +01:00
|
|
|
@${ECHO_CMD} "@dir %%DATADIR%%" >> ${PLIST}
|
2014-03-24 01:03:39 +01:00
|
|
|
.else
|
2014-03-24 01:22:02 +01:00
|
|
|
post-patch:
|
2014-03-24 01:03:39 +01:00
|
|
|
@cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} -e 's|gcc|${CC}|g' -e \
|
|
|
|
's|g++|${CXX}|g' Makefile
|
2008-05-20 20:36:41 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
do-install:
|
2014-08-15 00:05:53 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}
|
2010-12-13 08:54:28 +01:00
|
|
|
.if ${PKGNAMESUFFIX} == "-core"
|
2008-05-20 20:36:41 +02:00
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/libmupen64plus.so.2.0.0 \
|
2014-08-15 00:05:53 +02:00
|
|
|
${STAGEDIR}${PREFIX}/lib/libmupen64plus.so.2.0.0
|
2008-05-20 20:36:41 +02:00
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/* \
|
2014-08-15 00:05:53 +02:00
|
|
|
${STAGEDIR}${DATADIR}
|
2009-01-06 22:54:58 +01:00
|
|
|
|
2014-08-15 00:05:53 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
|
2010-12-13 08:54:28 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/src/api/m64p_*.h \
|
2014-08-15 00:05:53 +02:00
|
|
|
${STAGEDIR}${PREFIX}/include/${PORTNAME}
|
2009-01-06 22:54:58 +01:00
|
|
|
|
2014-08-15 00:05:53 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/RELEASE \
|
|
|
|
${STAGEDIR}${DOCSDIR}/RELEASE
|
|
|
|
${LN} -sf ${PREFIX}/lib/libmupen64plus.so.2.0.0 ${STAGEDIR}${PREFIX}/lib/libmupen64plus.so.2
|
2008-05-20 20:36:41 +02:00
|
|
|
.else
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-ui-console"
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/doc/mupen64plus.6 ${STAGEDIR}${PREFIX}/man/man6/
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
2011-12-21 00:43:18 +01:00
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-rice"
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/RiceVideoLinux.ini ${STAGEDIR}${DATADIR}
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
|
|
|
|
2011-12-21 00:43:18 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64"
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}/data/Glide64.ini ${STAGEDIR}${DATADIR}
|
2011-12-21 00:43:18 +01:00
|
|
|
. endif
|
|
|
|
|
2013-10-04 19:18:44 +02:00
|
|
|
. if ${PKGNAMESUFFIX} == "-video-glide64mk2"
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/Glide64mk2.ini ${STAGEDIR}${DATADIR}
|
2013-10-04 19:18:44 +02:00
|
|
|
. endif
|
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} == "-input-sdl"
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/InputAutoCfg.ini ${STAGEDIR}${DATADIR}
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
|
|
|
|
2010-12-13 08:54:28 +01:00
|
|
|
. if ${PKGNAMESUFFIX} != "-ui-console"
|
2014-08-15 00:05:53 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
|
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
|
2010-12-13 08:54:28 +01:00
|
|
|
. else
|
2014-08-15 00:05:53 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
2008-05-20 20:36:41 +02:00
|
|
|
. endif
|
|
|
|
.endif
|