Browse files

x86 patch

  • Loading branch information...
1 parent f13f818 commit 97e8a07d44072cd3bcaa11c1f9693c69d935760f Gary Birkett committed Aug 15, 2010
Showing with 18 additions and 9 deletions.
  1. +1 −1 debian/control
  2. +12 −4 src/Makefile
  3. +2 −1 src/liqapp.c
  4. +3 −3 src/liqx11info.c
View
2 debian/control
@@ -1,7 +1,7 @@
Source: libliqbase
Priority: extra
Maintainer: Gary liquid <liquid@gmail.com>
-Build-Depends: debhelper (>= 5), x11proto-xext-dev, libgstreamer0.10-dev, libpng12-dev, libjpeg62-dev, libosso-dev, libfreetype6-dev, libxv-dev, libc6-dev, libsqlite3-dev, libcurl3-dev
+Build-Depends: debhelper (>= 5), x11proto-xext-dev, libgstreamer0.10-dev, libpng12-dev, libjpeg62-dev, libosso-dev [!i386], libfreetype6-dev, libxv-dev, libc6-dev, libsqlite3-dev, libcurl3-dev
Standards-Version: 3.7.2
Section: libs
View
16 src/Makefile
@@ -6,12 +6,17 @@ LD = g++
OPT_FLAGS = -O3
-USE_OSSO = 1
USE_GST = 1
-LIBRARIES = libpng12 sqlite3
+UNAMEISARM := $(shell uname -m | grep arm)
+ifeq ($(UNAMEISARM),arm)
+ USE_OSSO = 1
+endif
+
+
+LIBRARIES = libpng12
ifdef USE_OSSO
LIBRARIES += libosso
@@ -20,8 +25,11 @@ ifdef USE_GST
LIBRARIES += gstreamer-0.10
endif
-
-CFLAGS = -DUSE_MAEMO -fPIC -Wall `freetype-config --cflags` `pkg-config --cflags $(LIBRARIES)` -I../include
+MAEMO =
+ifdef USE_OSSO
+ MAEMO = -DUSE_MAEMO
+endif
+CFLAGS = $(MAEMO) -fPIC -Wall `freetype-config --cflags` `pkg-config --cflags $(LIBRARIES)` -I../include
LDFLAGS = -lX11 -lXext -lXv -lm -lcurl `freetype-config --libs` -ljpeg -lpthread `pkg-config --libs $(LIBRARIES)`
RM = /bin/rm -f
View
3 src/liqapp.c
@@ -119,7 +119,8 @@ char *liqapp_gettitle()
static int hardware_product_ispowerful;
int hardware_product_read()
{
- hardware_product[0]=0;
+ hardware_product[0]=' '; // we call through this function exactly once
+ hardware_product[1]=0; // if it fails, there is no need to repeat in this case.
FILE *fd;
int rs;
fd = fopen(hardware_product_filename, "r");
View
6 src/liqx11info.c
@@ -1284,7 +1284,7 @@ const int x11_seeevent=0;
myx11info->myispressedflag=1;
x11_event_mouse_coord_convert( myx11info,&xev );
- //liqapp_log("buttonpress %i,%i",xev.xmotion.x,xev.xmotion.y);
+ liqapp_log("buttonpress %i,%i",xev.xmotion.x,xev.xmotion.y);
//liqapp_log("ButtonPress");
ev->type = LIQEVENT_TYPE_MOUSE;
ev->mouse.state = LIQEVENT_STATE_PRESS;
@@ -1310,7 +1310,7 @@ const int x11_seeevent=0;
// int qy=xev.xmotion.y;
x11_event_mouse_coord_convert( myx11info,&xev );
- // liqapp_log("motion %i,%i (q %i,%i) (can %i,%i)",xev.xmotion.x,xev.xmotion.y,qx,qy,canvas.pixelwidth,canvas.pixelheight);
+ liqapp_log("motion %i,%i (can %i,%i)",xev.xmotion.x,xev.xmotion.y,canvas.pixelwidth,canvas.pixelheight);
ev->type = LIQEVENT_TYPE_MOUSE;
ev->mouse.state = LIQEVENT_STATE_MOVE;
ev->mouse.x = ((xev.xmotion.x));// *800)/canvas.pixelwidth;
@@ -1331,7 +1331,7 @@ const int x11_seeevent=0;
myx11info->myispressedflag=0;
x11_event_mouse_coord_convert( myx11info,&xev );
- //liqapp_log("release %i,%i",xev.xmotion.x,xev.xmotion.y);
+ liqapp_log("release %i,%i",xev.xmotion.x,xev.xmotion.y);
//liqapp_log("ButtonRelease");
ev->type = LIQEVENT_TYPE_MOUSE;

0 comments on commit 97e8a07

Please sign in to comment.