USE_DOS2UNIX= *.c *.cpp *.h *.H *.ini *.conf DISTNAME= ${PORTNAME:S/m/M/:S/pl/Pl/}-${PORTVERSION:S/./-/}-src PATCHDIR= ${.CURDIR}/files WRKSRC?= ${WRKDIR}/${DISTNAME} EXTRACT_AFTER_ARGS= "${DISTNAME}/Makefile" ${DISTNAME}/pre.mk ${DISTNAME}/release.mk \ "${DISTNAME}/config/*" "${DISTNAME}/main/*" "${DISTNAME}/plugins/*" .if ${PKGNAMESUFFIX} == "-base" USE_GL= yes USE_SDL= sdl . if defined(HAVE_VCR) LIB_DEPENDS= aviplay.0:${PORTSDIR}/multimedia/avifile MAKE_ENV+= VCR=1 . endif . if defined(HAVE_NOGUI) USE_GNOME= # MAKE_ENV+= NOGUI_ONLY=1 . endif ALL_TARGET= mupen64plus EXTRACT_AFTER_ARGS+= "${DISTNAME}/RELEASE" "${DISTNAME}/README.vcr" "${DISTNAME}/doc/*" "${DISTNAME}/lang/*" \ "${DISTNAME}/icons/*" "${DISTNAME}/memory/*" "${DISTNAME}/r4300/*" "${DISTNAME}/debugger/*" .else EXTRA_PATCHES?= ${.CURDIR}/../mupen64plus-base/files/patch-Makefile \ ${.CURDIR}/../mupen64plus-base/files/patch-pre.mk PLIST= ${WRKDIR}/pkg-plist .endif .if ${PKGNAMESUFFIX} == "-dummyaudio" ALL_TARGET= plugins/dummyaudio.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/dummy_audio/*" .endif .if ${PKGNAMESUFFIX} == "-sdlinput" ALL_TARGET= plugins/blight_input.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/blight_input/*" .endif .if ${PKGNAMESUFFIX} == "-gln64" ALL_TARGET= plugins/glN64.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/glN64/*" .endif .if ${PKGNAMESUFFIX} == "-sdlaudio" ALL_TARGET= plugins/jttl_audio.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/jttl_audio/*" .endif .if ${PKGNAMESUFFIX} == "-sound" ALL_TARGET= plugins/mupen64_audio.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/mupen64_audio/*" .endif .if ${PKGNAMESUFFIX} == "-input" ALL_TARGET= plugins/mupen64_input.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/mupen64_input/*" .endif .if ${PKGNAMESUFFIX} == "-rsp" ALL_TARGET= plugins/mupen64_hle_rsp_azimer.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/rsp_hle/*" .endif .if ${PKGNAMESUFFIX} == "-glide" . if !defined(WITHOUT_YASM) BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm MAKE_ENV+= ASM="${LOCALBASE}/bin/yasm" . else BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm MAKE_ENV+= ASM="${LOCALBASE}/bin/nasm" . endif ALL_TARGET= plugins/glide64.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/glide64/*" .endif .if ${PKGNAMESUFFIX} == "-rice" ALL_TARGET= plugins/ricevideo.so EXTRACT_AFTER_ARGS+= "${DISTNAME}/rice_video/*" .endif EXTRACT_AFTER_ARGS+= -d ${WRKDIR} post-configure: .for f in ${FIXFILES} @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/${f} .endfor .if ${PKGNAMESUFFIX} != "-base" pre-install: @${RM} -f ${PLIST} . if ${PKGNAMESUFFIX} == "-glide" @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/g/G/}.ini" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-rice" @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/r/R/:S/v/V/}.cfg" >> ${PLIST} @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME:S/r/R/:S/v/V/}Linux.ini" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-glN64" @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-sdlaudio" @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST} . endif . if ${PKGNAMESUFFIX} == "-sdlinput" @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST} . endif @${ECHO_CMD} "%%DATADIR%%/plugins/${PLUGIN_NAME}.so" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%/plugins" >> ${PLIST} @${ECHO_CMD} "@dirrmtry %%DATADIR%%" >> ${PLIST} .endif do-install: .if ${PKGNAMESUFFIX} == "-base" ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/mupen64plus.ini ${DATADIR}/config/ ${INSTALL_DATA} ${WRKSRC}/config/mupen64plus.conf ${DATADIR}/config/ @${MKDIR} ${DATADIR}/lang ${INSTALL_DATA} ${WRKSRC}/lang/* ${DATADIR}/lang/ @${MKDIR} ${DATADIR}/icons ${INSTALL_DATA} ${WRKSRC}/icons/* ${DATADIR}/icons/ . if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/RELEASE ${DOCSDIR}/RELEASE ${INSTALL_DATA} ${WRKSRC}/README.vcr ${DOCSDIR}/README.vcr ${INSTALL_DATA} ${WRKSRC}/doc/readme.pdf ${DOCSDIR}/readme.pdf . endif .else @${MKDIR} ${DATADIR}/plugins . if ${PKGNAMESUFFIX} == "-glide" @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/g/G/}.ini ${DATADIR}/config/ . endif . if ${PKGNAMESUFFIX} == "-rice" @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/r/R/:S/v/V/}.cfg ${DATADIR}/config/ ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME:S/r/R/:S/v/V/}Linux.ini ${DATADIR}/config/ . endif . if ${PKGNAMESUFFIX} == "-glN64" @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/ . endif . if ${PKGNAMESUFFIX} == "-sdlaudio" @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/ . endif . if ${PKGNAMESUFFIX} == "-sdlinput" @${MKDIR} ${DATADIR}/config ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/ . endif ${INSTALL_PROGRAM} ${WRKSRC}/plugins/${PLUGIN_NAME}.so ${DATADIR}/plugins/ .endif