freebsd-ports/emulators/pearpc/Makefile
Alexey Dokuchaev 0614d355ab - Convert port to use OPTIONS
- Unmute INSTALL_DATA statements
- Expand COMMENT to match that on official site
- Kill needless PKGMESSAGE assignment (it is done automagically)
- Remove no-op inplace patching commands
- Remove whitespace from `files/pkg-message.in' and do padding within
  post-install target; this makes message output identical between port vs.
  package installation
- Adjust `video.x' location in sample configuration file
- Simplify target CPU determination code
- Canonicalize header and do some Makefile cleanup
- Remove bogus hack that prevented clock_settime(2) detection; instead, use
  CLOCK_THREAD_CPUTIME_ID instead of CLOCK_PROCESS_CPUTIME_ID as the latter
  is undefined on FreeBSD.  Under Linux, thread clock is essentially just a
  process clock with CPUCLOCK_PERTHREAD_MASK bit applied, so it should work
  in this case.

Approved by:	novel (maintainer; timeout since May 31)
2010-06-14 06:17:21 +00:00

86 lines
2 KiB
Makefile

# New ports collection makefile for: PearPC
# Date created: 22 May 2004
# Whom: Roman Bogorodskiy <novel@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= pearpc
PORTVERSION= 0.4
PORTREVISION= 4
CATEGORIES= emulators
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}.0
MAINTAINER= novel@FreeBSD.org
COMMENT= PowerPC architecture emulator
GNU_CONFIGURE= yes
USE_XORG= x11
MAN1= ppc.1
SUB_FILES= pkg-message
PLIST_FILES= bin/ppc etc/ppccfg.example %%DATADIR%%/video.x
PLIST_DIRS= %%DATADIR%%
OPTIONS= SDL "Use SDL for user interface" off \
OPTIMIZED_CFLAGS "Make an optimized build" off \
DEBUG "Make debug+profiled build" off \
JITC "Enable JITC support (x86 only)" off
.include <bsd.port.pre.mk>
.if ${ARCH} == "ia64"
BROKEN= Internal compiler error on ia64
.endif
# GTK and QT interfaces are broken in this version
#
#.if defined(WITH_QT)
#CONFIGURE_ARGS+= --enable-ui=qt
#USE_QT_VER= 3
#QTDIR?= ${QT_PREFIX}
#CONFIGURE_ENV+= QTDIR="${QTDIR}"
#.else
#CONFIGURE_ARGS+= --enable-ui=nogui
#.endif
.if defined(WITH_SDL)
CONFIGURE_ARGS+= --enable-ui=sdl
USE_SDL= sdl
.else
CONFIGURE_ARGS+= --enable-ui=x11
.endif
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O3 -ffast-math
.else
CONFIGURE_ARGS+= --disable-fpo
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-profiling # implies --enable-debug
.endif
.if defined(WITH_JITC) && ${ARCH} == "i386"
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
CONFIGURE_ARGS+= --enable-cpu=jitc_x86
.else
CONFIGURE_ARGS+= --enable-cpu=generic
.endif
post-extract:
@${REINPLACE_CMD} -e 's|-g -O2||;s|-O2||' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|PROCESS_CPUTIME|THREAD_CPUTIME|' \
${WRKSRC}/src/system/osapi/posix/systimer.cc
@${REINPLACE_CMD} -e 's|video\.x"|${DATADIR}/&|' \
${WRKSRC}/ppccfg.example
post-install:
@${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/video.x ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${PREFIX}/etc
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
.include <bsd.port.post.mk>