blob: 4ffcb2c7b9f1ef68248490e4e74eec81af6f4643 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
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 <thread>||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
|