Makefile 2.6 KB

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