r7146 - in packages/trunk/sdlbasic/debian: . patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Wed May 21 21:06:47 UTC 2008
Author: pdewacht-guest
Date: 2008-05-21 21:06:47 +0000 (Wed, 21 May 2008)
New Revision: 7146
Added:
packages/trunk/sdlbasic/debian/patches/64bit.patch
Modified:
packages/trunk/sdlbasic/debian/control
packages/trunk/sdlbasic/debian/patches/series
packages/trunk/sdlbasic/debian/rules
Log:
64-bit arch support for sdlbasic
Modified: packages/trunk/sdlbasic/debian/control
===================================================================
--- packages/trunk/sdlbasic/debian/control 2008-05-21 20:15:50 UTC (rev 7145)
+++ packages/trunk/sdlbasic/debian/control 2008-05-21 21:06:47 UTC (rev 7146)
@@ -3,7 +3,7 @@
Priority: extra
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Uploaders: Miriam Ruiz <little_miry at yahoo.es>
-Build-Depends: debhelper (>= 5), quilt,
+Build-Depends: debhelper (>= 5), quilt, bison,
libsdl1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev,
libsdl-net1.2-dev, libsdl-image1.2-dev,
libsmpeg-dev, libgtk2.0-dev, libglib2.0-dev, libasound2-dev
Added: packages/trunk/sdlbasic/debian/patches/64bit.patch
===================================================================
--- packages/trunk/sdlbasic/debian/patches/64bit.patch (rev 0)
+++ packages/trunk/sdlbasic/debian/patches/64bit.patch 2008-05-21 21:06:47 UTC (rev 7146)
@@ -0,0 +1,256 @@
+--- a/src/sdlBasic/src/sdlBasic/gtk/SciTEGTK.cxx
++++ b/src/sdlBasic/src/sdlBasic/gtk/SciTEGTK.cxx
+@@ -2217,7 +2217,7 @@
+ }
+
+ void SciTEGTK::ButtonSignal(GtkWidget *, gpointer data) {
+- instance->Command((guint)data);
++ instance->Command((long)data);
+ }
+
+ void SciTEGTK::MenuSignal(SciTEGTK *scitew, guint action, GtkWidget *) {
+--- a/src/sdlBasic/src/sdlBasic/src/Exporters.cxx
++++ b/src/sdlBasic/src/sdlBasic/src/Exporters.cxx
+@@ -941,7 +941,7 @@
+ // PDF1.4Ref(p38) EOL marker preceding endstream not counted
+ char *textObj = new char[pageData.length() + 100];
+ // concatenate stream within the text object
+- sprintf(textObj, "<</Length %d>>\nstream\n%s"
++ sprintf(textObj, "<</Length %zd>>\nstream\n%s"
+ "ET\nendstream\n",
+ pageData.length() - 1 + 3,
+ pageData.c_str());
+--- a/src/sdlBasic/src/sdlBrt/BASengine/file.c
++++ b/src/sdlBasic/src/sdlBrt/BASengine/file.c
+@@ -82,7 +82,7 @@
+ ePrintf( Runtime, "fileOpen: unknown file mode" );
+ }
+
+- if ((int)(fileHandles[handle-1] ) == EOF) {
++ if (!fileHandles[handle-1]) {
+ ePrintf( Runtime, "fileOpen: Error opening file #%d", handle );
+ }
+ }
+--- a/src/sdlBasic/src/sdlBrt/error.c
++++ b/src/sdlBasic/src/sdlBrt/error.c
+@@ -157,7 +157,7 @@
+ }
+
+ /* set values */
+- link->start = (int)p;
++ link->start = (intptr_t)p;
+ link->end = link->start+(n-1);
+ link->next = lastMemLink;
+ lastMemLink = link;
+@@ -176,7 +176,7 @@
+
+ prev = NULL;
+ for ( link = lastMemLink; link != NULL; link = link->next ) {
+- if (link->start == (int)address) {
++ if (link->start == (intptr_t)address) {
+
+ if (prev == NULL) {
+ lastMemLink = link->next;
+@@ -196,7 +196,7 @@
+ MemLink *link = lastMemLink;
+
+ for ( ; link != NULL; link = link->next ) {
+- if ((int)p >= link->start && (int)p <= link->end) {
++ if ((intptr_t)p >= link->start && (intptr_t)p <= link->end) {
+ return link;
+ }
+ }
+@@ -439,7 +439,7 @@
+ strncpy(indexvar,&binputvar[ba],a-ba);
+ indexvar[a-ba]='\0';
+ }
+- printf("indexvar:%s - a:%d - ba:%d - i:%d -len:%d \n",indexvar,a,ba,i,strlen(binputvar));
++ printf("indexvar:%s - a:%d - ba:%d - i:%d -len:%zd \n",indexvar,a,ba,i,strlen(binputvar));
+ strcpy(stackstring[i],indexvar);
+ }
+ i++;
+--- a/src/sdlBasic/src/sdlBrt/error.h
++++ b/src/sdlBasic/src/sdlBrt/error.h
+@@ -6,13 +6,14 @@
+ The Practice of Programming
+ */
+
++#include <stdint.h>
+
+ typedef struct MemLink MemLink;
+
+
+ struct MemLink {
+- int start; /* start of allocated block */
+- int end; /* end of allocated block */
++ intptr_t start; /* start of allocated block */
++ intptr_t end; /* end of allocated block */
+ MemLink *next; /* in list */
+ };
+
+--- a/src/sdlBasic/src/sdlBrt/sdlBrt_tab.y
++++ b/src/sdlBasic/src/sdlBrt/sdlBrt_tab.y
+@@ -438,7 +438,7 @@
+ { if (currentScope == NULL) {
+ ePrintf( Syntax, "Shared illegal outside Sub or Function");
+ }
+- pushStack(blockStack, (int)currentScope );
++ pushStack(blockStack, (intptr_t)currentScope );
+ currentScope = NULL; }
+ sharedList sep
+ { currentScope = (Symbol *)popStack(blockStack);
+@@ -824,7 +824,7 @@
+ { if (currentScope == NULL) {
+ ePrintf( Syntax, "Shared illegal outside Sub or Function");
+ }
+- pushStack(blockStack, (int)currentScope );
++ pushStack(blockStack, (intptr_t)currentScope );
+ currentScope = NULL; }
+ sharedList sep
+ { currentScope = (Symbol *)popStack(blockStack);
+@@ -1521,11 +1521,11 @@
+ { if ($1->scope != NULL) {
+ ePrintf( Syntax, "Can't share local variable %s", $1->name );
+
+- } else if (inStack(sharedStack,(int)$1)) {
++ } else if (inStack(sharedStack,(intptr_t)$1)) {
+ ePrintf( Syntax, "Variable %s is already shared", $1->name );
+
+ } else {
+- pushStack( sharedStack, (int)$1 );
++ pushStack( sharedStack, (intptr_t)$1 );
+
+ } }
+
+@@ -1534,11 +1534,11 @@
+ { if ($1->scope != NULL) {
+ ePrintf( Syntax, "Can't share local array %s", $1->name );
+
+- } else if (inStack(sharedStack,(int)$1)) {
++ } else if (inStack(sharedStack,(intptr_t)$1)) {
+ ePrintf( Syntax, "Array %s is already shared", $1->name );
+
+ } else {
+- pushStack( sharedStack, (int)$1 );
++ pushStack( sharedStack, (intptr_t)$1 );
+
+ } }
+
+--- a/src/sdlBasic/src/sdlBrt/stack.c
++++ b/src/sdlBasic/src/sdlBrt/stack.c
+@@ -13,7 +13,7 @@
+
+ /* allocate stack */
+ stack = (Stack *)eMalloc( sizeof( Stack ) +
+- (sizeof(int) * (size)) );
++ (sizeof(intptr_t) * (size)) );
+
+ stack->tos = -1;
+ stack->size = size;
+@@ -21,7 +21,7 @@
+ }
+
+ /* push an item on the stack */
+-void pushStack( Stack *stack, int value )
++void pushStack( Stack *stack, intptr_t value )
+ {
+ if (stack->tos == stack->size) {
+ ePrintf( Runtime, "pushStack: stack overflow");
+@@ -31,13 +31,13 @@
+ }
+
+ /* incrStack: increment the value on the stack */
+-void incrStack( Stack *stack, int value )
++void incrStack( Stack *stack, intptr_t value )
+ {
+ stack->data[stack->tos] += value;
+ }
+
+ /* decrStack: decrement the value on the stack */
+-void decrStack( Stack *stack, int value )
++void decrStack( Stack *stack, intptr_t value )
+ {
+ stack->data[stack->tos] -= value;
+ }
+@@ -46,7 +46,7 @@
+ /* swapStack: swap top two stack items */
+ void swapStack( Stack *stack )
+ {
+- int tmp;
++ intptr_t tmp;
+
+ if (stack->tos < 1) {
+ ePrintf( Runtime, "swapStack: stack underflow");
+@@ -71,7 +71,7 @@
+
+
+ /* return copy of top stack item */
+-int peekStack( Stack *stack )
++intptr_t peekStack( Stack *stack )
+ {
+ if (stack->tos < 0) {
+ ePrintf( Runtime, "peekStack: underflow" );
+@@ -81,7 +81,7 @@
+
+
+ /* pop an item off the stack */
+-int popStack( Stack *stack )
++intptr_t popStack( Stack *stack )
+ {
+ if (stack->tos < 0) {
+ ePrintf( Runtime, "popStack: underflow" );
+@@ -98,7 +98,7 @@
+ }
+
+ /* inStack: return true if item is in the stack */
+-int inStack( Stack *stack, int val )
++int inStack( Stack *stack, intptr_t val )
+ {
+ int i;
+ for ( i = stack->tos; i > -1; i-- ) {
+--- a/src/sdlBasic/src/sdlBrt/stack.h
++++ b/src/sdlBasic/src/sdlBrt/stack.h
+@@ -6,21 +6,23 @@
+ Licence: LGPL
+ */
+
++#include <stdint.h>
++
+ struct Stack {
+- int tos; /* top of stack */
+- int size; /* size of stack */
+- int data[1]; /* stack data */
++ int tos; /* top of stack */
++ int size; /* size of stack */
++ intptr_t data[1]; /* stack data */
+ };
+
+ Stack *newStack( int size );
+-void pushStack( Stack *stack, int value );
+-void incrStack( Stack *stack, int value );
+-void decrStack( Stack *stack, int value );
++void pushStack( Stack *stack, intptr_t value );
++void incrStack( Stack *stack, intptr_t value );
++void decrStack( Stack *stack, intptr_t value );
+ void swapStack( Stack *stack );
+ void dupStack( Stack *stack );
+-int peekStack( Stack *stack );
+-int popStack( Stack *stack );
++intptr_t peekStack( Stack *stack );
++intptr_t popStack( Stack *stack );
+ int isEmptyStack( Stack *stack );
+-int inStack( Stack *stack, int val );
++int inStack( Stack *stack, intptr_t val );
+ void clearStack( Stack *stack );
+ void freeStack( Stack *stack );
+--- a/src/sdlBasic/src/sdlBrt/symbol.c
++++ b/src/sdlBasic/src/sdlBrt/symbol.c
+@@ -28,7 +28,7 @@
+ }
+
+ /* visible if not shared */
+- if (inStack(sharedStack, (int)s )) {
++ if (inStack(sharedStack, (intptr_t)s )) {
+ return s;
+ }
+ }
Modified: packages/trunk/sdlbasic/debian/patches/series
===================================================================
--- packages/trunk/sdlbasic/debian/patches/series 2008-05-21 20:15:50 UTC (rev 7145)
+++ packages/trunk/sdlbasic/debian/patches/series 2008-05-21 21:06:47 UTC (rev 7146)
@@ -1,2 +1,3 @@
makefiles.patch
fonts.patch
+64bit.patch
Modified: packages/trunk/sdlbasic/debian/rules
===================================================================
--- packages/trunk/sdlbasic/debian/rules 2008-05-21 20:15:50 UTC (rev 7145)
+++ packages/trunk/sdlbasic/debian/rules 2008-05-21 21:06:47 UTC (rev 7146)
@@ -39,6 +39,7 @@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
+ cd "$(ORIGSRC)/sdlBrt/" && sh bison_build.sh
$(MAKE) -C "$(ORIGSRC)/sdlBasic/scintilla/gtk" $(XFLAGS)
$(MAKE) -C "$(ORIGSRC)/sdlBasic/gtk" $(XFLAGS)
$(MAKE) -C "$(ORIGSRC)/sdlBrt/unzip" $(XFLAGS) CFLAGS="$(CFLAGS)"
@@ -52,6 +53,7 @@
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
+ rm -f "$(ORIGSRC)/sdlBrt/y_tab.c"
$(MAKE) -C "$(ORIGSRC)/sdlBasic/scintilla/gtk" $(XFLAGS) clean
$(MAKE) -C "$(ORIGSRC)/sdlBasic/gtk" $(XFLAGS) clean
$(MAKE) -C "$(ORIGSRC)/sdlBrt" $(XFLAGS) clean RM="$(RM) -f"
More information about the Pkg-games-commits
mailing list