summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2013-04-13 19:08:27 +0000
committerdholland <dholland@pkgsrc.org>2013-04-13 19:08:27 +0000
commit6408ad602ada99a74d72ead90326f4ed8d96c04a (patch)
tree5c566b6419955423d472e24932edf05c4cb40fe0 /emulators
parent3b3c1304d936038c88617876011c1fdf318c0754 (diff)
downloadpkgsrc-6408ad602ada99a74d72ead90326f4ed8d96c04a.tar.gz
Lift i386-only restriction.
Does not actually require nasm. Reduce pkglint. PKGREVISION -> 6.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/Cygne-SDL/Makefile14
-rw-r--r--emulators/Cygne-SDL/distinfo11
-rw-r--r--emulators/Cygne-SDL/patches/patch-ac57
-rw-r--r--emulators/Cygne-SDL/patches/patch-src_mainsdl.cpp31
4 files changed, 95 insertions, 18 deletions
diff --git a/emulators/Cygne-SDL/Makefile b/emulators/Cygne-SDL/Makefile
index 62370fc998b..f84eaa28711 100644
--- a/emulators/Cygne-SDL/Makefile
+++ b/emulators/Cygne-SDL/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.18 2012/10/03 12:55:08 asau Exp $
+# $NetBSD: Makefile,v 1.19 2013/04/13 19:08:27 dholland Exp $
#
DISTNAME= Cygne-SDL-0.1-src
PKGNAME= ${DISTNAME:S/-src//}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= emulators
MASTER_SITES= http://sdlemu.ngemu.com/OpenProjects/
@@ -11,7 +11,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://icculus.org/Cygne-SDL/
COMMENT= Bandai Wonderswan Color handheld emulator
-BUILD_DEPENDS+= nasm>=0.98:../../devel/nasm
+# The makefile mentions nasm but does not actually use it.
+#BUILD_DEPENDS+= nasm>=0.98:../../devel/nasm
WRKSRC= ${WRKDIR}/Cygne-SDL-0.1
MAKE_FILE= Makefiles/Makefile.unix
@@ -20,10 +21,7 @@ BUILD_DIRS= src
USE_LANGUAGES= c c++
USE_TOOLS+= zip
-# Uses i386 assembly code
-ONLY_FOR_PLATFORM= *-*-i386
-
-INSTALLATION_DIRS= bin
+INSTALLATION_DIRS= bin share/Cygne-SDL share/doc/Cygne-SDL
post-build:
cd ${WRKSRC}/WonderSnake && \
@@ -31,9 +29,7 @@ post-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/cygne ${DESTDIR}${PREFIX}/bin/Cygne-SDL
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/Cygne-SDL
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/Cygne-SDL
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/Cygne-SDL
${INSTALL_DATA} ${WRKSRC}/WonderSnake/Wondersnake.txt \
${DESTDIR}${PREFIX}/share/Cygne-SDL
${INSTALL_DATA} ${WRKSRC}/WonderSnake/Wondersnake.zip \
diff --git a/emulators/Cygne-SDL/distinfo b/emulators/Cygne-SDL/distinfo
index 36555c8c667..802f8eaf8a1 100644
--- a/emulators/Cygne-SDL/distinfo
+++ b/emulators/Cygne-SDL/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.4 2005/11/03 21:38:04 rillig Exp $
+$NetBSD: distinfo,v 1.5 2013/04/13 19:08:27 dholland Exp $
SHA1 (Cygne-SDL-0.1-src.tar.gz) = f9c50702d1911d0ff1728e5aa089e67cfdfd0030
RMD160 (Cygne-SDL-0.1-src.tar.gz) = 6d9fd7195a936f17fc3984a66722272c7e30991a
Size (Cygne-SDL-0.1-src.tar.gz) = 106448 bytes
-SHA1 (patch-aa) = ee9dd0b364d278a45f2ac8d038b43aaf8f0c5c96
-SHA1 (patch-ab) = faff74d577fb243635a3aed7e6c17132bc43fe07
-SHA1 (patch-ac) = b8037825c79bd36aa65bf18745a3b09470b34ec0
-SHA1 (patch-ad) = 1bf79e577e70d13fb3032d331235dcd6e2d611f2
+SHA1 (patch-aa) = 65f8a9b50150dbbb65f20999e457ef31ff196c9b
+SHA1 (patch-ab) = 775f303626193bec32d2964ad7c63e528bc831b3
+SHA1 (patch-ac) = 5d73fc40a43a83aff312a86e077f28b1d52955c9
+SHA1 (patch-ad) = 0869496464d90d3b6db932d0279e4ac1328a3332
+SHA1 (patch-src_mainsdl.cpp) = 53cceb4a6b2b9c36b64414e8be621b0baa9470d1
diff --git a/emulators/Cygne-SDL/patches/patch-ac b/emulators/Cygne-SDL/patches/patch-ac
index 45d66b45ef5..1f714005879 100644
--- a/emulators/Cygne-SDL/patches/patch-ac
+++ b/emulators/Cygne-SDL/patches/patch-ac
@@ -1,20 +1,39 @@
-$NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
+$NetBSD: patch-ac,v 1.3 2013/04/13 19:08:27 dholland Exp $
---- src/ddrawsdl.cpp.orig 2002-03-26 16:02:25.000000000 +0100
+- Fix C syntax (string constants continued onto the next line must
+have a backslash)
+
+- Use the asm blocks only on platforms where they're understood.
+Disable the more elaborate blitter modes on other platforms
+until/unless someone wants to write non-asm equivalents.
+
+--- src/ddrawsdl.cpp.orig 2002-03-26 15:02:25.000000000 +0000
+++ src/ddrawsdl.cpp
-@@ -174,66 +174,66 @@ void UpdateFrame_h()
+@@ -12,6 +12,7 @@
+ */
+
+ #include <SDL.h>
++#include <assert.h>
+ #include "globals.h"
+ #include "gfx.h"
+
+@@ -174,69 +175,83 @@ void UpdateFrame_h()
{
switch(fBlitterMode) {
case 1:
- __asm__ __volatile__(".align 32
- cld
- rep
++#if defined(__i386__) || defined(__x86_64__)
+ __asm__ __volatile__(".align 32\n\
+ cld\n\
+ rep\n\
movsw"
:
:"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
++#else
++ memcpy(g_pDDSPrimary->pixels, dx_buffer, g_pDDSPrimary->h * g_pDDSPrimary->pitch);
++#endif
break;
case 2:
- __asm__ __volatile__("pusha
@@ -40,6 +59,7 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
- leal (%1, %2, 4), %1
- jnz sum
- emms
++#if defined(__i386__)
+ __asm__ __volatile__("pusha\n\
+ xorl %%eax, %%eax\n\
+ movl $448, %%ebx \n\
@@ -66,6 +86,10 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
popa"
:
: "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
++#else
++ /* If you put real code here, enable the corresponding option in main() */
++ assert(0);
++#endif
break;
case 3:
@@ -92,6 +116,7 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
- leal (%1, %2, 4), %1
- jnz sum3
- emms
++#if defined(__i386__)
+ __asm__ __volatile__("pusha\n\
+ xorl %%eax, %%eax\n\
+ movl $896, %%ebx \n\
@@ -118,19 +143,30 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
popa"
:
: "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(144));
-@@ -418,65 +418,65 @@ void UpdateFrame_v()
++#else
++ /* If you put real code here, enable the corresponding option in main() */
++ assert(0);
++#endif
+ break;
+ }
+ //Niels(adjust to suit) use the asm below, or use standard memcpy/fast_memcpy etc, updateframe_v is not implemented
+@@ -418,68 +433,82 @@ void UpdateFrame_v()
{
switch(fBlitterMode) {
case 1:
- __asm__ __volatile__(".align 32
- cld
- rep
++#if defined(__i386__) || defined(__x86_64__)
+ __asm__ __volatile__(".align 32\n\
+ cld\n\
+ rep\n\
movsw"
:
:"S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"((g_pDDSPrimary->h * g_pDDSPrimary->pitch)>>1));
++#else
++ memcpy(g_pDDSPrimary->pixels, dx_buffer, g_pDDSPrimary->h * g_pDDSPrimary->pitch);
++#endif
break;
case 2: // double scanlines
- __asm__ __volatile__("pusha
@@ -156,6 +192,7 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
- leal (%1, %2, 4), %1
- jnz sumb
- emms
++#if defined(__i386__)
+ __asm__ __volatile__("pusha\n\
+ xorl %%eax, %%eax\n\
+ movl $288, %%ebx \n\
@@ -182,6 +219,10 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
popa"
:
: "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
++#else
++ /* If you put real code here, enable the corresponding option in main() */
++ assert(0);
++#endif
break;
case 3: // double stretch mode
- __asm__ __volatile__("pusha
@@ -207,6 +248,7 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
- leal (%1, %2, 4), %1
- jnz sumc
- emms
++#if defined(__i386__)
+ __asm__ __volatile__("pusha\n\
+ xorl %%eax, %%eax\n\
+ movl $576, %%ebx \n\
@@ -233,3 +275,10 @@ $NetBSD: patch-ac,v 1.2 2005/11/03 21:38:04 rillig Exp $
popa"
:
: "S"(dx_buffer), "D"(g_pDDSPrimary->pixels), "c"(g_pDDSPrimary->pitch>>1), "d"(224));
++#else
++ /* If you put real code here, enable the corresponding option in main() */
++ assert(0);
++#endif
+ break;
+ }
+ SDL_Flip(g_pDDSPrimary);
diff --git a/emulators/Cygne-SDL/patches/patch-src_mainsdl.cpp b/emulators/Cygne-SDL/patches/patch-src_mainsdl.cpp
new file mode 100644
index 00000000000..9990b53243c
--- /dev/null
+++ b/emulators/Cygne-SDL/patches/patch-src_mainsdl.cpp
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_mainsdl.cpp,v 1.1 2013/04/13 19:08:27 dholland Exp $
+
+Disable blitter modes 2 and 3 on non-i386 unless/until someone provides
+non-asm code for them (see ddrawsdl.cpp / patch-ac)
+
+--- src/mainsdl.cpp~ 2002-03-26 16:12:36.000000000 +0000
++++ src/mainsdl.cpp
+@@ -322,13 +322,23 @@ int main(int argc, char *argv[])
+ for (i=0; (i < argc || argv[i] != NULL); i++) {
+
+ if(strcmp(argv[i], "-double") == 0) {
++#if defined(__i386__)
+ fScreenSize = 2;
+ fBlitterMode = 3;
++#else
++ fprintf(stderr, "-double is not supported on this platform\n");
++ exit(1);
++#endif
+ }
+
+ if(strcmp(argv[i], "-scanline") == 0) {
++#if defined(__i386__)
+ fScreenSize = 2;
+ fBlitterMode = 2;
++#else
++ fprintf(stderr, "-scanline is not supported on this platform\n");
++ exit(1);
++#endif
+ }
+
+ if (strncmp(argv[i], "-h", 2) == 0) {