diff options
author | John Marino <marino@FreeBSD.org> | 2014-07-30 23:02:15 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-07-30 23:02:15 +0000 |
commit | 9a3418c225e84204adb92b4be325841f5aee6fc9 (patch) | |
tree | 19e5fa2e5d28eef77ea542634db717066485aba2 /emulators/pearpc | |
parent | 39eb07a714b8089a350f52fb618403f38492db6f (diff) | |
download | ports-9a3418c225e84204adb92b4be325841f5aee6fc9.tar.gz ports-9a3418c225e84204adb92b4be325841f5aee6fc9.zip |
Notes
Diffstat (limited to 'emulators/pearpc')
-rw-r--r-- | emulators/pearpc/Makefile | 80 | ||||
-rw-r--r-- | emulators/pearpc/distinfo | 4 | ||||
-rw-r--r-- | emulators/pearpc/files/mbrtowc.c | 79 | ||||
-rw-r--r-- | emulators/pearpc/files/patch-src__cpu__mem.h | 11 | ||||
-rw-r--r-- | emulators/pearpc/files/patch-src__io__prom__fs__hfsplus__unicode.c | 19 | ||||
-rw-r--r-- | emulators/pearpc/files/pkg-message.in | 1 | ||||
-rw-r--r-- | emulators/pearpc/files/wcrtomb.c | 57 |
7 files changed, 47 insertions, 204 deletions
diff --git a/emulators/pearpc/Makefile b/emulators/pearpc/Makefile index 3211fd20a5cc..8c3c96752f42 100644 --- a/emulators/pearpc/Makefile +++ b/emulators/pearpc/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= pearpc -PORTVERSION= 0.4 -PORTREVISION= 5 +PORTVERSION= 0.5 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}.0 @@ -12,61 +11,50 @@ COMMENT= PowerPC architecture emulator LICENSE= GPLv2 -GNU_CONFIGURE= yes +USES= tar:bzip2 USE_XORG= x11 -MAN1= ppc.1 -SUB_FILES= pkg-message +GNU_CONFIGURE= yes -PLIST_FILES= bin/ppc etc/ppccfg.example %%DATADIR%%/video.x +BROKEN_ia64= Internal compiler error on ia64 + +PORTEXAMPLES= ppccfg.example +PLIST_FILES= bin/ppc man/man1/ppc.1.gz %%DATADIR%%/video.x PLIST_DIRS= %%DATADIR%% -OPTIONS_DEFINE= SDL OPTIMIZED_CFLAGS DEBUG -SDL_DESC= Use SDL for user interface +OPTIONS_DEFINE= DEBUG EXAMPLES OPTIMIZED_CFLAGS SDL -NO_STAGE= yes -.include <bsd.port.pre.mk> +DEBUG_CONFIGURE_ENABLE= debug +OPTIMIZED_CFLAGS_CFLAGS= -O3 -ffast-math +OPTIMIZED_CFLAGS_CONFIGURE_ENABLE= fpo +SDL_USE= sdl=sdl +SDL_CONFIGURE_ON= --enable-ui=sdl +SDL_CONFIGURE_OFF= --enable-ui=x11 -.if ${ARCH} == "ia64" -BROKEN= Internal compiler error on ia64 -.endif - -.if ${PORT_OPTIONS:MSDL} -CONFIGURE_ARGS+= --enable-ui=sdl -USE_SDL= sdl -.else -CONFIGURE_ARGS+= --enable-ui=x11 -.endif +.include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -CFLAGS+= -O3 -ffast-math -.else -CONFIGURE_ARGS+= --disable-fpo -.endif - -.if ${PORT_OPTIONS:MDEBUG} -CONFIGURE_ARGS+= --enable-profiling # implies --enable-debug -.endif - -.if ${ARCH} == "i386" -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm -CONFIGURE_ARGS+= --enable-cpu=jitc_x86 +.if ${ARCH} == "amd64" || ${ARCH} == "i386" +USE_GCC= yes .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|' \ +post-patch: + @${REINPLACE_CMD} -e \ + 's|-O3|| ; \ + s|^\(x86_64\)|amd64\* \| \1| ; \ + s|-g -O2||' ${WRKSRC}/configure + @${REINPLACE_CMD} -e \ + 's|video\.x"|${DATADIR}/&|' ${WRKSRC}/ppccfg.example + @${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> + @${MKDIR} ${STAGEDIR}${DATADIR} + (cd ${WRKSRC} && ${INSTALL_DATA} video.x \ + ${STAGEDIR}${DATADIR}) + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} ppccfg.example \ + ${STAGEDIR}${EXAMPLESDIR}) + +.include <bsd.port.mk> diff --git a/emulators/pearpc/distinfo b/emulators/pearpc/distinfo index 8cb16cb0c960..c2d4116643e1 100644 --- a/emulators/pearpc/distinfo +++ b/emulators/pearpc/distinfo @@ -1,2 +1,2 @@ -SHA256 (pearpc-0.4.tar.gz) = cf9501dc95b418dc9632e57c75d59e78ec5204db0ed6b41abced2cea30021cce -SIZE (pearpc-0.4.tar.gz) = 910621 +SHA256 (pearpc-0.5.tar.bz2) = 4b5ac6b111ba55640c2b2d1de9c4f68cb211aadc472474a564ad9ce6a645fbd3 +SIZE (pearpc-0.5.tar.bz2) = 800380 diff --git a/emulators/pearpc/files/mbrtowc.c b/emulators/pearpc/files/mbrtowc.c deleted file mode 100644 index 00689d484dba..000000000000 --- a/emulators/pearpc/files/mbrtowc.c +++ /dev/null @@ -1,79 +0,0 @@ -/*- - * Copyright (c) 2002, 2003 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <errno.h> -#include <rune.h> -#include <stdlib.h> -#include <wchar.h> - -/* - * Emulate the ISO C mbrtowc() function in terms of the deprecated - * 4.4BSD sgetrune() function. - */ -size_t -mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, - size_t n, mbstate_t * __restrict ps __unused) -{ - const char *e; - rune_t r; - - if (s == NULL) { - pwc = NULL; - s = ""; - n = 1; - } - - if ((r = sgetrune(s, n, &e)) == _INVALID_RUNE) { - /* - * The design of sgetrune() doesn't give us any way to tell - * between incomplete and invalid multibyte sequences. - */ - - if (n >= (size_t)MB_CUR_MAX) { - /* - * If we have been supplied with at least MB_CUR_MAX - * bytes and still cannot find a valid character, the - * data must be invalid. - */ - errno = EILSEQ; - return ((size_t)-1); - } - - /* - * .. otherwise, it's an incomplete character or an invalid - * character we cannot detect yet. - */ - return ((size_t)-2); - } - - if (pwc != NULL) - *pwc = (wchar_t)r; - - return (r != 0 ? (size_t)(e - s) : 0); -} diff --git a/emulators/pearpc/files/patch-src__cpu__mem.h b/emulators/pearpc/files/patch-src__cpu__mem.h new file mode 100644 index 000000000000..3625d0c2ec41 --- /dev/null +++ b/emulators/pearpc/files/patch-src__cpu__mem.h @@ -0,0 +1,11 @@ +--- src/cpu/mem.h.orig ++++ src/cpu/mem.h +@@ -23,7 +23,7 @@ + + #include "system/types.h" + +-bool ppc_init_physical_memory(uint size); ++bool FASTCALL ppc_init_physical_memory(uint size); + + uint32 ppc_get_memory_size(); + diff --git a/emulators/pearpc/files/patch-src__io__prom__fs__hfsplus__unicode.c b/emulators/pearpc/files/patch-src__io__prom__fs__hfsplus__unicode.c deleted file mode 100644 index 0034da8ce6cd..000000000000 --- a/emulators/pearpc/files/patch-src__io__prom__fs__hfsplus__unicode.c +++ /dev/null @@ -1,19 +0,0 @@ ---- src/io/prom/fs/hfsplus/unicode.c.DIST Thu May 6 10:45:32 2004 -+++ src/io/prom/fs/hfsplus/unicode.c Tue May 25 10:06:24 2004 -@@ -28,6 +28,16 @@ - - #include "unicode.h" - -+#ifdef FREEBSD_MB_SUPPORT -+size_t mbrtowc __P((wchar_t * __restrict, const char * __restrict, size_t, -+ mbstate_t * __restrict)); -+size_t wcrtomb __P((char * __restrict, wchar_t, mbstate_t * __restrict)); -+ -+#include "mbrtowc.c" -+#include "wcrtomb.c" -+#endif /* FREEBSD_MB_SUPPORT */ -+ -+ - /* convert the asci string astr into a unicode string given by ustr. - * - * ToDo: Think about better error handling ? diff --git a/emulators/pearpc/files/pkg-message.in b/emulators/pearpc/files/pkg-message.in deleted file mode 100644 index 858e210434af..000000000000 --- a/emulators/pearpc/files/pkg-message.in +++ /dev/null @@ -1 +0,0 @@ -Sample configuration file is installed as %%PREFIX%%/etc/ppccfg.example diff --git a/emulators/pearpc/files/wcrtomb.c b/emulators/pearpc/files/wcrtomb.c deleted file mode 100644 index c0cb44a23b3d..000000000000 --- a/emulators/pearpc/files/wcrtomb.c +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * Copyright (c) 2002, 2003 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <errno.h> -#include <limits.h> -#include <rune.h> -#include <stdlib.h> -#include <wchar.h> - -/* - * Emulate the ISO C wcrtomb() function in terms of the deprecated - * 4.4BSD sputrune() function. - */ -size_t -wcrtomb(char * __restrict s, wchar_t wc, - mbstate_t * __restrict ps __unused) -{ - char *e; - char buf[MB_LEN_MAX]; - - if (s == NULL) { - s = buf; - wc = L'\0'; - } - sputrune(wc, s, MB_CUR_MAX, &e); - if (e == NULL) { - errno = EILSEQ; - return ((size_t)-1); - } - return ((size_t)(e - s)); -} |