2004-07-26 20:40:06 +02:00
|
|
|
# $NetBSD: Makefile,v 1.56 2004/07/26 18:45:09 dillo Exp $
|
2001-09-03 01:04:23 +02:00
|
|
|
#
|
|
|
|
|
2004-07-19 01:37:55 +02:00
|
|
|
DISTNAME= xmame-0.84.1
|
|
|
|
PKGNAME= xmess-0.84.1
|
2004-07-26 20:40:06 +02:00
|
|
|
PKGREVISION= 1
|
2001-09-03 01:04:23 +02:00
|
|
|
CATEGORIES= emulators games x11
|
2004-05-16 02:28:23 +02:00
|
|
|
MASTER_SITES= http://x.mame.net/download/
|
2001-09-03 01:04:23 +02:00
|
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
|
2003-07-17 23:31:04 +02:00
|
|
|
MAINTAINER= kristerw@NetBSD.org
|
2001-09-03 01:04:23 +02:00
|
|
|
HOMEPAGE= http://x.mame.net/
|
|
|
|
COMMENT= X11 emulator for old computers and console machines
|
|
|
|
|
|
|
|
RESTRICTED= "selling is not allowed"
|
|
|
|
NO_SRC_ON_CDROM= ${RESTRICTED}
|
|
|
|
NO_BIN_ON_CDROM= ${RESTRICTED}
|
|
|
|
|
2004-04-02 20:47:39 +02:00
|
|
|
USE_BUILDLINK3= YES
|
2003-01-28 23:03:00 +01:00
|
|
|
USE_PKGINSTALL= YES
|
2004-01-28 16:41:07 +01:00
|
|
|
USE_X11= YES
|
2004-01-22 09:36:03 +01:00
|
|
|
USE_GNU_TOOLS+= make
|
2001-09-03 01:04:23 +02:00
|
|
|
MAKEFILE= makefile.unix
|
2002-01-03 01:19:01 +01:00
|
|
|
TARGET= ${PKGBASE}
|
2002-01-05 19:05:19 +01:00
|
|
|
UNLIMIT_RESOURCES= datasize
|
2002-01-03 01:19:01 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2004-04-02 20:47:39 +02:00
|
|
|
BUILD_DEFS+= USE_ESOUND
|
|
|
|
|
2002-01-03 01:19:01 +01:00
|
|
|
ROMPATH= ${PREFIX}/share/${TARGET}
|
2004-07-20 06:38:43 +02:00
|
|
|
SPOOLDIR= ${VARBASE}/games/${TARGET}
|
2002-01-03 01:19:01 +01:00
|
|
|
|
|
|
|
MAKE_FLAGS+= TARGET="${TARGET:S/x//}"
|
|
|
|
MAKE_FLAGS+= LIBS="${LDFLAGS} ${LIBS}"
|
|
|
|
MAKE_FLAGS+= CFLAGS="${CFLAGS}"
|
|
|
|
MAKE_FLAGS+= X11INC= X11LIB=
|
2004-07-19 01:37:55 +02:00
|
|
|
MAKE_FLAGS+= XMAME_NET=1
|
2004-03-31 06:39:16 +02:00
|
|
|
|
|
|
|
.if !empty(USE_ESOUND:M[Yy][Ee][Ss])
|
2002-12-21 22:35:17 +01:00
|
|
|
MAKE_FLAGS+= SOUND_ESOUND=1
|
2004-03-31 06:39:16 +02:00
|
|
|
.include "../../audio/esound/buildlink3.mk"
|
|
|
|
.endif
|
2002-01-03 01:19:01 +01:00
|
|
|
|
|
|
|
MAME_DISP_METHOD?= x11
|
|
|
|
|
|
|
|
# Determine which CPU-specific code to use.
|
2004-04-02 20:47:39 +02:00
|
|
|
.for MARCH in alpha m68k i386 ia64 mips
|
2002-01-03 01:19:01 +01:00
|
|
|
MAME_CPU.${MARCH}?= ${MARCH}
|
|
|
|
.endfor
|
2004-04-02 20:47:39 +02:00
|
|
|
MAME_CPU.x86_64?= amd64
|
2002-01-03 01:19:01 +01:00
|
|
|
.if !defined(MAME_CPU.${MACHINE_ARCH})
|
2002-04-22 04:49:27 +02:00
|
|
|
. include "../../mk/endian.mk"
|
2002-01-03 01:19:01 +01:00
|
|
|
_MAME_CPU.big-endian= risc
|
|
|
|
_MAME_CPU.little-endian= risc_lsb
|
2002-04-22 04:49:27 +02:00
|
|
|
_MAME_CPU.unknown-endian= risc # assume unknown == big
|
2002-01-03 01:19:01 +01:00
|
|
|
MAME_CPU.${MACHINE_ARCH}?= ${_MAME_CPU.${MACHINE_ENDIAN}-endian}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Determine which operating system defaults to use.
|
|
|
|
MAME_ARCH.NetBSD?= netbsd
|
|
|
|
MAME_ARCH.Linux?= linux
|
|
|
|
MAME_ARCH.SunOS?= solaris
|
|
|
|
.if !defined(MAME_ARCH.${OPSYS})
|
|
|
|
MAME_ARCH.${OPSYS}?= generic
|
|
|
|
.endif
|
|
|
|
|
|
|
|
MAKE_FLAGS+= DISPLAY_METHOD="${MAME_DISP_METHOD}"
|
|
|
|
MAKE_FLAGS+= MY_CPU="${MAME_CPU.${MACHINE_ARCH}}"
|
|
|
|
MAKE_FLAGS+= ARCH="${MAME_ARCH.${OPSYS}}"
|
|
|
|
|
2002-03-07 00:03:33 +01:00
|
|
|
.if exists(${X11BASE}/include/X11/extensions/xf86dga.h)
|
2002-01-03 01:19:01 +01:00
|
|
|
MAKE_FLAGS+= X11_DGA=1
|
2001-09-03 01:04:23 +02:00
|
|
|
.endif
|
2002-12-21 22:35:17 +01:00
|
|
|
.if exists(${X11BASE}/include/X11/extensions/Xv.h)
|
|
|
|
MAKE_FLAGS+= X11_XV=1
|
|
|
|
.endif
|
2002-01-03 01:19:01 +01:00
|
|
|
|
|
|
|
# If supported, add appropriate definitions to build joystick drivers.
|
|
|
|
.if exists(/usr/include/machine/joystick.h) || \
|
|
|
|
exists(/usr/include/linux/joystick.h)
|
|
|
|
MAKE_FLAGS+= JOY_I386=1
|
|
|
|
.endif
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
2002-01-12 23:53:16 +01:00
|
|
|
. if exists(/usr/lib/libusb.a) || exists(/usr/lib/libusbhid.a)
|
2002-01-03 01:19:01 +01:00
|
|
|
MAKE_FLAGS+= JOY_USB=1
|
|
|
|
. endif
|
2001-09-03 01:04:23 +02:00
|
|
|
.endif
|
|
|
|
|
2004-02-18 14:33:40 +01:00
|
|
|
.include "../../mk/compiler.mk"
|
2003-12-03 01:18:13 +01:00
|
|
|
.if !empty(CC_VERSION:Mgcc-2*)
|
|
|
|
# Prevent memory explosion for gcc 2.95 and older.
|
|
|
|
MAKE_FLAGS+= LOW_MEM=1
|
|
|
|
.endif
|
|
|
|
|
2002-01-03 01:19:01 +01:00
|
|
|
OWN_DIRS= ${SPOOLDIR}
|
|
|
|
|
|
|
|
post-configure:
|
|
|
|
cd ${WRKSRC}/doc; \
|
|
|
|
${SED} -e "s|@ROMPATH@|${ROMPATH}|g" \
|
|
|
|
-e "s|@SPOOLDIR@|${SPOOLDIR}|g" \
|
2002-12-14 16:14:26 +01:00
|
|
|
${TARGET}rc.dist > ${TARGET}rc
|
2002-09-21 15:07:03 +02:00
|
|
|
.if !empty(MAKE_FLAGS:M*USB*)
|
2002-01-03 01:19:01 +01:00
|
|
|
${LN} -fs /usr/include/usb.h ${BUILDLINK_DIR}/include
|
|
|
|
for FILE in /usr/lib/libusb*; do \
|
2002-09-21 15:07:03 +02:00
|
|
|
${LN} -fs $$FILE ${BUILDLINK_DIR}/lib; \
|
2002-01-03 01:19:01 +01:00
|
|
|
done
|
|
|
|
.endif
|
2001-09-03 01:04:23 +02:00
|
|
|
|
|
|
|
do-install:
|
2002-01-03 01:19:01 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${TARGET}.${MAME_DISP_METHOD} \
|
|
|
|
${PREFIX}/bin/${TARGET}
|
2004-05-16 02:28:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/imgtool ${PREFIX}/bin/imgtool
|
2003-07-19 23:02:07 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/${TARGET}.6 \
|
2002-01-03 01:19:01 +01:00
|
|
|
${PREFIX}/man/man6/${TARGET}.6
|
2001-09-03 01:04:23 +02:00
|
|
|
${INSTALL_DATA_DIR} ${ROMPATH}
|
2002-01-03 01:19:01 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${TARGET}rc ${ROMPATH}/${TARGET}rc
|
2001-09-03 01:04:23 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|