aboutsummaryrefslogtreecommitdiff
path: root/emulators/mupen64plus-core/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/mupen64plus-core/Makefile.common')
-rw-r--r--emulators/mupen64plus-core/Makefile.common222
1 files changed, 47 insertions, 175 deletions
diff --git a/emulators/mupen64plus-core/Makefile.common b/emulators/mupen64plus-core/Makefile.common
index 3f0b8f52489f..240aea7e1fdb 100644
--- a/emulators/mupen64plus-core/Makefile.common
+++ b/emulators/mupen64plus-core/Makefile.common
@@ -1,215 +1,87 @@
USE_DOS2UNIX= *.c *.cpp *.h *.H *.ini *.conf
-DISTNAME= ${PORTNAME:S/m/M/:S/pl/Pl/}-${PORTVERSION:S/./-/g}-src
+DISTNAME= ${PORTNAME}-bundle-src-${PORTVERSION}
PATCHDIR= ${.CURDIR}/files
+BUILD_WRKSRC= ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/projects/unix
WRKSRC?= ${WRKDIR}/${DISTNAME}
-EXTRACT_AFTER_ARGS= | ${TAR} -xf - "${DISTNAME}/Makefile" "${DISTNAME}/mupen64plus.desktop.in" \
- "${DISTNAME}/pre.mk" "${DISTNAME}/release.mk" "${DISTNAME}/config/*" \
- "${DISTNAME}/main/*" "${DISTNAME}/plugins/*" "${DISTNAME}/opengl/*"
+EXTRACT_AFTER_ARGS= | ${TAR} -xf - "${DISTNAME}/source/${PORTNAME}-core/*" \
+ "${DISTNAME}/source/${PORTNAME}${PKGNAMESUFFIX}/*"
-.if ${PKGNAMESUFFIX} == "-base"
-USE_GL= yes
-USE_SDL= sdl
+.if ${PKGNAMESUFFIX} == "-core"
+USE_SDL= sdl
-LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
-. if defined(WITH_NOGUI)
-USE_GNOME= #
-
-MAKE_ENV+= GUI= NONE
-. endif
-.if defined(WITH_QT4)
-USE_GNOME= #
-USE_QT_VER= 4
-
-BUILD_DEPENDS+= lrelease-qt4:${PORTSDIR}/devel/qt4-linguist
-
-MAKE_ENV+= GUI= QT4
-HAVE_QT4= yes
-
-PLIST_SUB+= TRANSLATIONS=""
+LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 \
+ png.6:${PORTSDIR}/graphics/png
.else
-PLIST_SUB+= TRANSLATIONS="@comment "
-.endif
-
-ALL_TARGET= mupen64plus
-EXTRACT_AFTER_ARGS+= "${DISTNAME}/RELEASE" "${DISTNAME}/README" "${DISTNAME}/doc/*" "${DISTNAME}/lang/*" \
- "${DISTNAME}/icons/*" "${DISTNAME}/memory/*" "${DISTNAME}/r4300/*" "${DISTNAME}/debugger/*" \
- "${DISTNAME}/translations/*" "${DISTNAME}/fonts/*"
-
-MAN1= mupen64plus.1
-.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} == "-dummyinput"
-ALL_TARGET= plugins/dummyinput.so
-EXTRACT_AFTER_ARGS+= "${DISTNAME}/dummy_input/*"
-.endif
-
-.if ${PKGNAMESUFFIX} == "-dummyvideo"
-ALL_TARGET= plugins/dummyvideo.so
-EXTRACT_AFTER_ARGS+= "${DISTNAME}/dummy_video/*"
-.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/*"
+.if ${PKGNAMESUFFIX} == "-ui-console"
+MAN6= mupen64plus.6
.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
-
-post-configure:
-.for f in ${FIXFILES}
- @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/${f}
-.endfor
-
+.if ${PKGNAMESUFFIX} != "-core"
post-extract:
-.if ${PKGNAMESUFFIX} == "-base"
- ${GUNZIP_CMD} ${WRKSRC}/doc/${MAN1}.gz
-.endif
+. if ${PKGNAMESUFFIX} == "-ui-console"
+ @${GUNZIP_CMD} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/doc/${MAN6}.gz
+. endif
-.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}
+. if ${PKGNAMESUFFIX} == "-video-rice"
+ @${ECHO_CMD} "%%DATADIR%%/RiceVideoLinux.ini" >> ${PLIST}
. endif
-. if ${PKGNAMESUFFIX} == "-sdlaudio"
- @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST}
- @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. if ${PKGNAMESUFFIX} == "-input-sdl"
+ @${ECHO_CMD} "%%DATADIR%%/InputAutoCfg.ini" >> ${PLIST}
. endif
-. if ${PKGNAMESUFFIX} == "-sdlinput"
- @${ECHO_CMD} "%%DATADIR%%/config/${PLUGIN_NAME}.conf" >> ${PLIST}
- @${ECHO_CMD} "@dirrmtry %%DATADIR%%/config" >> ${PLIST}
+. if ${PKGNAMESUFFIX} != "-ui-console"
+ @${ECHO_CMD} "lib/${PORTNAME}${PKGNAMESUFFIX}.so" >> ${PLIST}
+ @${ECHO_CMD} "@dirrmtry %%DATADIR%%" >> ${PLIST}
+. else
+ @${ECHO_CMD} "bin/${PORTNAME}" >> ${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.conf ${DATADIR}/config/
-
- @${MKDIR} ${DATADIR}/fonts
- ${INSTALL_DATA} ${WRKSRC}/fonts/font.ttf ${DATADIR}/fonts/
-
- @${MKDIR} ${DATADIR}/lang
- ${INSTALL_DATA} ${WRKSRC}/lang/* ${DATADIR}/lang/
+.if ${PKGNAMESUFFIX} == "-core"
- @${MKDIR} ${DATADIR}/icons
- @cd ${WRKSRC}/icons && \
- ${FIND} * -type d -exec ${MKDIR} "${DATADIR}/icons/{}" \; && \
- ${FIND} * -type f -exec ${INSTALL_DATA} "${WRKSRC}/icons/{}" "${DATADIR}/icons/{}" \;
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/libmupen64plus.so.2.0.0 \
+ ${PREFIX}/lib/libmupen64plus.so.2.0.0
- @${MKDIR} ${DESKTOPDIR}
- ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${DESKTOPDIR}
-
- ${INSTALL_MAN} ${WRKSRC}/doc/${MAN1} ${PREFIX}/man/man1/
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/* \
+ ${DATADIR}
-. if defined(HAVE_QT4)
- @${MKDIR} ${DATADIR}/translations
- ${INSTALL_DATA} ${WRKSRC}/translations/*.qm ${DATADIR}/translations
-. endif
+ @${MKDIR} ${PREFIX}/include/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/src/api/m64p_*.h \
+ ${PREFIX}/include/${PORTNAME}
. if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/RELEASE ${DOCSDIR}/RELEASE
+ ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/RELEASE \
+ ${DOCSDIR}/RELEASE
. endif
+ ${LN} -sf ${PREFIX}/lib/libmupen64plus.so.2.0.0 ${PREFIX}/lib/libmupen64plus.so.2
.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/
+. if ${PKGNAMESUFFIX} == "-ui-console"
+ ${INSTALL_MAN} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/doc/${MAN6} ${PREFIX}/man/man6/
. endif
-
-. if ${PKGNAMESUFFIX} == "-glN64"
- @${MKDIR} ${DATADIR}/config
- ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. if ${PKGNAMESUFFIX} == "-video-rice"
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/RiceVideoLinux.ini ${DATADIR}
. endif
-. if ${PKGNAMESUFFIX} == "-sdlaudio"
- @${MKDIR} ${DATADIR}/config
- ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. if ${PKGNAMESUFFIX} == "-input-sdl"
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/source/${PORTNAME}${PKGNAMESUFFIX}/data/InputAutoCfg.ini ${DATADIR}
. endif
-. if ${PKGNAMESUFFIX} == "-sdlinput"
- @${MKDIR} ${DATADIR}/config
- ${INSTALL_DATA} ${WRKSRC}/config/${PLUGIN_NAME}.conf ${DATADIR}/config/
+. if ${PKGNAMESUFFIX} != "-ui-console"
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}.so ${PREFIX}/lib
+. else
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${PREFIX}/bin
. endif
-
- ${INSTALL_PROGRAM} ${WRKSRC}/plugins/${PLUGIN_NAME}.so ${DATADIR}/plugins/
.endif