Makefile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # $OpenBSD: Makefile,v 1.51 2017/06/07 23:21:33 mlarkin Exp $
  2. # Other archs have not been tested
  3. ONLY_FOR_ARCHS = amd64
  4. USE_WXNEEDED= Yes
  5. # i386: src/emu/cpu/i386/pentops.inc: error: integer constant is too large for 'long' type
  6. MULTI_PACKAGES = -main -tools
  7. COMMENT-main = emulates a massive variety of arcades machines
  8. COMMENT-tools = tools to manipulate MAME/MESS roms and disk images
  9. V = 160
  10. DISTNAME = mame0${V}s
  11. PKGNAME-main = sdlmame-0.${V}
  12. PKGNAME-tools = sdlmame-tools-0.${V}
  13. REVISION = 3
  14. CATEGORIES = emulators games
  15. HOMEPAGE = http://mamedev.org/
  16. # MAME Distribution License, see http://mamedev.org/legal.html
  17. # history.dat : Creative Commons Attribution 3.0
  18. PERMIT_PACKAGE_CDROM = unclear license
  19. PERMIT_PACKAGE_FTP = unclear license
  20. PERMIT_DISTFILES_FTP = unclear license
  21. WANTLIB += SDL SDL_ttf X11 Xinerama c expat fontconfig freetype
  22. WANTLIB += m pthread ${LIBCXX} util z
  23. MASTER_SITES = https://github.com/mamedev/mame/releases/download/mame0${V}/
  24. MASTER_SITES1 = https://spacehopper.org/mirrors/
  25. EXTRACT_SUFX = .zip
  26. DIST_SUBDIR = mame
  27. DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
  28. history${V}.zip:1
  29. MODULES = devel/gettext \
  30. lang/python
  31. RUN_DEPENDS-main = fonts/liberation-fonts
  32. LIB_DEPENDS = devel/sdl-ttf
  33. MAKE_FLAGS = OPT_FLAGS='-DINI_PATH="\"${SYSCONFDIR}/mame;\""'
  34. MAKE_ENV = ARCH=$(ARCH) CC=$(CC) CFLAGS="$(CFLAGS)" LD="${CXX}" \
  35. TARGETOS=openbsd \
  36. NO_USE_QTDEBUG=1 \
  37. NOWERROR=1 \
  38. SDL_LIBVER=sdl
  39. .if ${MACHINE_ARCH} == "amd64"
  40. MAKE_ENV += PTR64=1
  41. .endif
  42. USE_GMAKE = Yes
  43. CONFIGURE_STYLE = none
  44. MAKE_FILE = makefile
  45. NO_TEST = Yes
  46. post-extract:
  47. @${UNZIP} -oq ${WRKDIR}/mame.zip -d ${WRKSRC}
  48. pre-patch:
  49. @sed -i 's|\r\n|\n|g' ${WRKDIST}/makefile \
  50. ${WRKDIST}/src/emu/fileio.h \
  51. ${WRKDIST}/src/emu/cpu/m68000/m68kmake.c \
  52. ${WRKDIST}/src/emu/machine/netlist.h \
  53. ${WRKDIST}/src/osd/sdl/sdl.mak
  54. @ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
  55. pre-build:
  56. ${SUBST_CMD} ${WRKDIST}/src/osd/sdl/sdl.mak
  57. do-install:
  58. ${INSTALL_PROGRAM} ${WRKSRC}/mame ${PREFIX}/bin/sdlmame
  59. .for f in chdman jedutil ldresample ldverify romcmp unidasm
  60. ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
  61. .endfor
  62. ${INSTALL_DATA_DIR} ${PREFIX}/share/sdlmame/keymaps
  63. ${INSTALL_DATA} ${WRKSRC}/src/osd/sdl/keymaps/km[-_]??.txt \
  64. ${PREFIX}/share/sdlmame/keymaps/
  65. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sdlmame
  66. .for f in config.txt hlsl.txt license.txt mame.txt newvideo.txt
  67. ${INSTALL_DATA} ${WRKSRC}/docs/${f} ${PREFIX}/share/doc/sdlmame
  68. .endfor
  69. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sdlmame
  70. ${SUBST_DATA} ${FILESDIR}/mame.ini \
  71. ${PREFIX}/share/examples/sdlmame/mame.ini
  72. ${INSTALL_DATA} ${WRKDIR}/history.dat ${PREFIX}/share/sdlmame
  73. .include <bsd.port.mk>