USES+= dos2unix DOS2UNIX_GLOB= *.c *.cpp *.h *.H *.ini *.conf DISTNAME= ${PORTNAME}-bundle-src-${PORTVERSION} PATCHDIR= ${.CURDIR}/files BUILD_WRKSRC?= ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/projects/unix WRKSRC?= ${WRKDIR}/${DISTNAME} EXTRACT_AFTER_ARGS?= "${DISTNAME}/source/${PORTNAME}-core/*" \ "${DISTNAME}/source/${PORTNAME}${PKGNAMESUFFIX}/*" .if ${PKGNAMESUFFIX} == "-core" LIB_DEPENDS+= libfreetype.so:print/freetype2 \ libpng.so:graphics/png \ libminizip.so:archivers/minizip .else PLIST= ${WRKDIR}/pkg-plist .endif .if ${PKGNAMESUFFIX} == "-video-rice" LIB_DEPENDS+= libpng.so:graphics/png .endif .if ${PKGNAMESUFFIX} == "-video-glide64mk" LIB_DEPENDS+= libboost_thread.so:devel/boost-libs .endif .if ${PKGNAMESUFFIX} != "-core" post-patch: @cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} -e 's|gcc|${CC}|g' -e \ 's|g++|${CXX}|g' -e 's|sdl-config|${SDL2_CONFIG}|g' Makefile . if ${PKGNAMESUFFIX} == "-video-glide64mk2" @cd ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/src && \ ${REINPLACE_CMD} -e 's|#include ||g' \ GlideHQ/TxQuantize.cpp GlideHQ/TxFilter.cpp . endif . if ${PKGNAMESUFFIX} == "-video-glide64" @cd ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}/src && \ ${REINPLACE_CMD} -e 's|__builtin_ia32_loadups|_mm_loadu_ps|g' -e \ 's|__builtin_ia32_storeups|_mm_storeu_ps|g' \ 3dmath.cpp . endif pre-install: @${RM} -f ${PLIST} . if ${PKGNAMESUFFIX} == "-video-rice" @${ECHO_CMD} "%%DATADIR%%/RiceVideoLinux.ini" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-video-glide64" @${ECHO_CMD} "%%DATADIR%%/Glide64.ini" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-video-glide64mk2" @${ECHO_CMD} "%%DATADIR%%/Glide64mk2.ini" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-input-sdl" @${ECHO_CMD} "%%DATADIR%%/InputAutoCfg.ini" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-ui-console" @${ECHO_CMD} "man/man6/mupen64plus.6.gz" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} != "-ui-console" @${ECHO_CMD} "lib/${PORTNAME}/${PORTNAME}${PKGNAMESUFFIX}.so" >> ${PLIST} . else @${ECHO_CMD} "bin/${PORTNAME}" >> ${PLIST} . endif @${ECHO_CMD} "@dir %%DATADIR%%" >> ${PLIST} .else post-patch: @cd ${BUILD_WRKSRC} && ${REINPLACE_CMD} -e 's|gcc|${CC}|g' -e \ 's|g++|${CXX}|g' Makefile .endif do-install: @${MKDIR} ${STAGEDIR}${DATADIR} .if ${PKGNAMESUFFIX} == "-core" ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/libmupen64plus.so.2.0.0 \ ${STAGEDIR}${PREFIX}/lib/libmupen64plus.so.2.0.0 ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/* \ ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/src/api/m64p_*.h \ ${STAGEDIR}${PREFIX}/include/${PORTNAME} ${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 .else . if ${PKGNAMESUFFIX} == "-ui-console" ${INSTALL_MAN} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/doc/mupen64plus.6 ${STAGEDIR}${PREFIX}/man/man6/ . endif . if ${PKGNAMESUFFIX} == "-video-rice" ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/RiceVideoLinux.ini ${STAGEDIR}${DATADIR} . endif . if ${PKGNAMESUFFIX} == "-video-glide64" ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}/data/Glide64.ini ${STAGEDIR}${DATADIR} . endif . if ${PKGNAMESUFFIX} == "-video-glide64mk2" ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/Glide64mk2.ini ${STAGEDIR}${DATADIR} . endif . if ${PKGNAMESUFFIX} == "-input-sdl" ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/InputAutoCfg.ini ${STAGEDIR}${DATADIR} . endif . if ${PKGNAMESUFFIX} != "-ui-console" @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}.so ${STAGEDIR}${PREFIX}/lib/${PORTNAME} . else ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin . endif .endif