Source: lxtask
Version: 0.1.3-1
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

Hi,

your package FTBFS on GNU/kFreeBSD:
| make[3]: Entering directory 
`/build/buildd-lxtask_0.1.3-1-kfreebsd-amd64-9XdDVu/lxtask-0.1.3/src'
| gcc -DHAVE_CONFIG_H -I. -I.. -I../include 
-DG_LOG_DOMAIN=\"xfce4-taskmanager\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" 
  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 
-I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   
-g -O2 -c -o lxtask-main.o `test -f 'main.c' || echo './'`main.c
| main.c:54: error: expected identifier or '(' before numeric constant
| main.c: In function 'main':
| main.c:68: error: lvalue required as left operand of assignment
| make[3]: *** [lxtask-main.o] Error 1

The issue being PAGE_SIZE, which is defined already.

I'm attaching the patch I came up with, which seems to solve this FTBFS.
Thanks for considering.

Mraw,
KiBi.
diff -Nru lxtask-0.1.3/debian/changelog lxtask-0.1.3/debian/changelog
--- lxtask-0.1.3/debian/changelog	2010-06-11 21:36:12.000000000 +0200
+++ lxtask-0.1.3/debian/changelog	2010-06-15 11:09:15.000000000 +0200
@@ -1,3 +1,10 @@
+lxtask (0.1.3-2) unstable; urgency=low
+
+  * Replace PAGE_SIZE with page_size everywhere, since the former might
+    be defined through system-wide headers (e.g. on GNU/kFreeBSD).
+
+ -- Cyril Brulebois <k...@debian.org>  Tue, 15 Jun 2010 11:08:17 +0200
+
 lxtask (0.1.3-1) unstable; urgency=low
 
   [ Julien Lavergne ]
diff -Nru lxtask-0.1.3/debian/patches/debian-changes-0.1.3-2 lxtask-0.1.3/debian/patches/debian-changes-0.1.3-2
--- lxtask-0.1.3/debian/patches/debian-changes-0.1.3-2	1970-01-01 01:00:00.000000000 +0100
+++ lxtask-0.1.3/debian/patches/debian-changes-0.1.3-2	2010-06-15 11:09:21.000000000 +0200
@@ -0,0 +1,69 @@
+Description: Upstream changes introduced in version 0.1.3-2
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ lxtask (0.1.3-2) unstable; urgency=low
+ .
+   * Replace PAGE_SIZE with page_size everywhere, since the former might
+     be defined through system-wide headers (e.g. on GNU/kFreeBSD).
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Cyril Brulebois <k...@debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- lxtask-0.1.3.orig/src/main.c
++++ lxtask-0.1.3/src/main.c
+@@ -51,7 +51,7 @@ guint win_height;
+ guint refresh_interval;
+ guint rID;
+ 
+-int PAGE_SIZE;
++int page_size;
+ 
+ int main (int argc, char *argv[])
+ {
+@@ -65,7 +65,7 @@ int main (int argc, char *argv[])
+     gtk_set_locale ();
+     gtk_init (&argc, &argv);
+ 
+-    PAGE_SIZE=sysconf(_SC_PAGESIZE)>>10;
++    page_size=sysconf(_SC_PAGESIZE)>>10;
+     own_uid = getuid();
+ 
+     config_file = g_build_filename(g_get_user_config_dir(), "lxtask.conf", NULL);
+--- lxtask-0.1.3.orig/src/types.h
++++ lxtask-0.1.3/src/types.h
+@@ -78,6 +78,6 @@ extern guint win_height;
+ const gchar *custom_signal_0;
+ const gchar *custom_signal_1;
+ 
+-extern int PAGE_SIZE;
++extern int page_size;
+ 
+ #endif
+--- lxtask-0.1.3.orig/src/xfce-taskmanager-linux.c
++++ lxtask-0.1.3/src/xfce-taskmanager-linux.c
+@@ -46,8 +46,8 @@ void get_task_details(gint pid,struct ta
+         sscanf(line,"%d %d",&task->size,&task->rss);
+         close(fd);
+         if(!task->size) return;
+-	task->size*=PAGE_SIZE;
+-	task->rss*=PAGE_SIZE;
++	task->size*=page_size;
++	task->rss*=page_size;
+ 
+ 	sprintf(line,"/proc/%d/stat",pid);
+ 	fd=open(line,O_RDONLY);
diff -Nru lxtask-0.1.3/debian/patches/series lxtask-0.1.3/debian/patches/series
--- lxtask-0.1.3/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ lxtask-0.1.3/debian/patches/series	2010-06-15 11:09:21.000000000 +0200
@@ -0,0 +1 @@
+debian-changes-0.1.3-2

Reply via email to