aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2010-06-14 14:17:21 +0800
committerdanfe <danfe@FreeBSD.org>2010-06-14 14:17:21 +0800
commit01b9d65bf5fdffaa782b2eaa6f10aa98004b6a76 (patch)
treee2d591663a9106dfde3b76e0cfc52579f0136d4a /emulators
parenta2bbbae8cb2bac6f220fcd062950b9bbcf1ddb63 (diff)
downloadfreebsd-ports-gnome-01b9d65bf5fdffaa782b2eaa6f10aa98004b6a76.tar.gz
freebsd-ports-gnome-01b9d65bf5fdffaa782b2eaa6f10aa98004b6a76.tar.zst
freebsd-ports-gnome-01b9d65bf5fdffaa782b2eaa6f10aa98004b6a76.zip
- 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)
Diffstat (limited to 'emulators')
-rw-r--r--emulators/pearpc/Makefile73
-rw-r--r--emulators/pearpc/files/pkg-message.in4
2 files changed, 30 insertions, 47 deletions
diff --git a/emulators/pearpc/Makefile b/emulators/pearpc/Makefile
index 07d4ed412259..5b6aa4158683 100644
--- a/emulators/pearpc/Makefile
+++ b/emulators/pearpc/Makefile
@@ -1,6 +1,6 @@
-# New ports collection makefile for: pearpc
+# New ports collection makefile for: PearPC
# Date created: 22 May 2004
-# Whom: Roman Bogorodskiy
+# Whom: Roman Bogorodskiy <novel@FreeBSD.org>
#
# $FreeBSD$
#
@@ -12,26 +12,28 @@ CATEGORIES= emulators
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}.0
MAINTAINER= novel@FreeBSD.org
-COMMENT= PowerPC emulator
+COMMENT= PowerPC architecture emulator
GNU_CONFIGURE= yes
-PKGMESSAGE= ${WRKDIR}/pkg-message
-
USE_XORG= x11
MAN1= ppc.1
+SUB_FILES= pkg-message
PLIST_FILES= bin/ppc etc/ppccfg.example %%DATADIR%%/video.x
PLIST_DIRS= %%DATADIR%%
-.if defined(WITH_OPTIMIZED_CFLAGS)
-CFLAGS+= -O3 -ffast-math
-.else
-CONFIGURE_ARGS+= --disable-fpo
-.endif
+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
-SUB_FILES= pkg-message
+.include <bsd.port.pre.mk>
-# GTK and QT ui are broken in this version
+.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
@@ -49,53 +51,36 @@ USE_SDL= sdl
CONFIGURE_ARGS+= --enable-ui=x11
.endif
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CFLAGS+= -O3 -ffast-math
.else
-CONFIGURE_ARGS+= --disable-debug
+CONFIGURE_ARGS+= --disable-fpo
.endif
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "ia64"
-BROKEN= Internal compiler error on ia64
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+= --enable-profiling # implies --enable-debug
.endif
-# jitc_x86 is avaible only on x86
-.if ${ARCH} == "i386"
-BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
-.if !defined(WITH_JITC)
-CONFIGURE_ARGS+= --enable-cpu=generic
-.else
+.if defined(WITH_JITC) && ${ARCH} == "i386"
+BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
CONFIGURE_ARGS+= --enable-cpu=jitc_x86
-.endif # WITH_JITC
.else
CONFIGURE_ARGS+= --enable-cpu=generic
.endif
-pre-everything::
-.if !defined(WITH_OPTIMIZED_CFLAGS)
- @${ECHO_MSG} ""
- @${ECHO_MSG} "You can do optimized build defining WITH_OPTIMIZED_CFLAGS=yes."
- @${ECHO_MSG} ""
-.endif
-
post-extract:
@${REINPLACE_CMD} -e 's|-g -O2||;s|-O2||' ${WRKSRC}/configure
-
-pre-configure:
-.if ${OSVERSION} > 700000
- @${REINPLACE_CMD} -e 's|clock_settime\ ()|foobar()|' ${WRKSRC}/configure
-.endif
-
-post-configure:
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/src/Makefile
+ @${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}/video.x
+ ${INSTALL_DATA} ${WRKSRC}/video.x ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${PREFIX}/etc
+ @${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
- @${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${PREFIX}/etc/ppccfg.example
+ @${ECHO_CMD}
.include <bsd.port.post.mk>
diff --git a/emulators/pearpc/files/pkg-message.in b/emulators/pearpc/files/pkg-message.in
index 289c514d67ae..858e210434af 100644
--- a/emulators/pearpc/files/pkg-message.in
+++ b/emulators/pearpc/files/pkg-message.in
@@ -1,3 +1 @@
-
-Sample config file can be found at %%PREFIX%%/etc/ppccfg.example
-
+Sample configuration file is installed as %%PREFIX%%/etc/ppccfg.example