View | Details | Raw Unified | Return to bug 257172 | Differences between
and this patch

Collapse All | Expand All

(-)b/emulators/libretro-mame/Makefile (+70 lines)
Added Link Here
1
# Created by: Timothy Beyer <beyert@cs.ucr.edu>
2
3
PORTNAME=	libretro-mame
4
PORTVERSION=	20220124
5
CATEGORIES=	emulators games
6
7
MAINTAINER=	beyert@cs.ucr.edu
8
COMMENT=	MAME-current for libretro
9
10
LICENSE=	GPLv2 BSD2CLAUSE
11
LICENSE_COMB=	multi
12
13
USES=		compiler:c++11-lib gl gmake python:3.7,build pkgconfig
14
USE_LDCONFIG=	yes
15
16
USE_GL=	gl
17
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	libretro
20
GH_PROJECT=	mame
21
GH_TAGNAME=	ec47e94
22
23
MAKEFILE=	${WRKSRC}/Makefile.libretro
24
25
MAKE_ENV=	LD="${CXX}" PYTHON="${PYTHON_CMD}" OPT_FLAGS="${CXXFLAGS}" \
26
	CXX="${CXX}" PYTHON_EXECUTABLE="${PYTHON_CMD}"
27
28
GENIE=		${WRKSRC}/3rdparty/genie
29
30
MAKE_JOBS_UNSAFE=	yes
31
32
PLIST_FILES=	lib/libretro/mame_libretro.so
33
34
post-patch:
35
	@${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/dirent.h
36
	@${RM} ${WRKSRC}/3rdparty/bx/include/compat/freebsd/signal.h
37
	@${ECHO_CMD} ${MV} ${GENIE}/build/gmake.freebsd ${GENIE}/build/gmake.bsd
38
	@${REINPLACE_CMD} -e \
39
		's|^\(CC \)|#\1| ; \
40
		s|^\(CXX \)|#\1| ; \
41
		s|^\(CXX:\)|#\1| ; \
42
		s|^\(LD \)|#\1| ; \
43
		s|^\(PYTHON \)|#\1| ; \
44
		s| .(ARCH)|| ; \
45
		s|FreeBSD|${OPSYS}|g' \
46
		${WRKSRC}/makefile \
47
		${GENIE}/build/gmake.freebsd/genie.make
48
	@${REINPLACE_CMD} -e 's|gcc|${CC}|; s|g++|${CXX}|' \
49
		${GENIE}/src/tools/gcc.lua \
50
		${GENIE}/src/tools/snc.lua \
51
		${GENIE}/tests/test_gmake_cpp.lua
52
	@${REINPLACE_CMD} -e 's|= \"gcc|= \"${CC}|; s|= \"${CXX}|= \"c++|' \
53
		-e "s|'CXX =|'#CXX =|; s|'CC  =|'#CC  =|; s| .(ARCH)| |g" \
54
		${GENIE}/src/host/scripts.c
55
	# we can't fix two types of python shebangs, so do these manually
56
	@${REINPLACE_CMD} -i "" -e "s|/usr/bin/env python|${PYTHON_CMD}|" \
57
		${WRKSRC}/scripts/build/png*.py
58
	@${REINPLACE_CMD} -e 's|"python"|"${PYTHON_CMD}"|' \
59
		${WRKSRC}/scripts/genie.lua
60
	@${GREP} -rl '"png.h"' ${WRKSRC}/src | ${XARGS} ${REINPLACE_CMD} \
61
		-e 's|"png.h"|"localpng.h"|'
62
	@${REINPLACE_CMD} -e 's|"util/png.h"|"util/localpng.h"|' \
63
		${WRKSRC}/src/frontend/mame/ui/icorender.cpp
64
	@${MV} ${WRKSRC}/src/lib/util/png.h ${WRKSRC}/src/lib/util/localpng.h
65
66
do-install:
67
	${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
68
	${INSTALL_LIB} ${WRKSRC}/mame_libretro.so ${STAGEDIR}/${PREFIX}/lib/libretro;
69
70
.include <bsd.port.mk>
(-)b/emulators/libretro-mame/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1644819807
2
SHA256 (libretro-mame-20220124-ec47e94_GH0.tar.gz) = 36593def33266b9a6171338941743b6ef01865bc3b8f38e7ad0c6b84d971ed1b
3
SIZE (libretro-mame-20220124-ec47e94_GH0.tar.gz) = 183780588
(-)b/emulators/libretro-mame/files/patch-makefile (+20 lines)
Added Link Here
1
--- makefile.orig	2021-04-12 15:53:19 UTC
2
+++ makefile
3
@@ -199,7 +199,7 @@ GENIEOS := solaris
4
 endif
5
 ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
6
 OS := freebsd
7
-GENIEOS := bsd
8
+GENIEOS := freebsd
9
 endif
10
 ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
11
 OS := freebsd
12
@@ -1083,7 +1083,7 @@ ifeq ($(NEW_GIT_VERSION),)
13
 NEW_GIT_VERSION := unknown
14
 endif
15
 
16
-GENIE := 3rdparty/genie/bin/$(GENIEOS)/genie$(EXE)
17
+GENIE := 3rdparty/genie/bin/bsd/genie$(EXE)
18
 
19
 ifeq ($(TARGET),$(SUBTARGET_FULL))
20
 FULLTARGET := $(TARGET)
(-)b/emulators/libretro-mame/pkg-descr (+3 lines)
Added Link Here
1
MAME -current for libretro
2
3
WWW: https://github.com/libretro/mame

Return to bug 257172