Bug#648153: abiword: FTBFS on hurd-i386

2012-01-18 Thread Dmitry Smirnov
Dear Svante,

Apologies for closing - abiword was uploaded before you had a chance to reply.
I'm fixing my silly patch applying - the updated package will be available 
soon.

Thank you.

Regards,
Dmitry.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#648153: abiword: FTBFS on hurd-i386

2012-01-16 Thread Dmitry Smirnov
Dear Svante,

Thanks for your patch.

As you may know abiword currently is orphaned in debian so I'm taking over the 
package ownership.

Please send me the updated patch if you can.

Also you're welcome to try new source package (with your pactch included).
Feel free to grab it using command:

dget -ux 
http://mentors.debian.net/debian/pool/main/a/abiword/abiword_2.9.2-1.dsc

Regards,
Dmitry.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#648153: abiword: FTBFS on hurd-i386

2011-11-10 Thread Svante Signell
On Thu, 2011-11-10 at 17:13 +0100, Guillem Jover wrote:
> Hi!
> 
> On Wed, 2011-11-09 at 18:15:50 +0100, Svante Signell wrote:
> > diff -ur abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp 
> > abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp
> > --- abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp2011-05-09 
> > 09:32:28.0 +0200
> > +++ abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp   2011-11-09 
> > 15:58:06.0 +0100
> > @@ -271,12 +271,13 @@
> >  {
> > // FIXME: this code sucks hard
> >  
> > -   char buf[PATH_MAX];
> > +   char * buf = NULL;
> > 
> > // see if ABIWORD_DATADIR was set in the environment
> > const char * sz = getenv("ABIWORD_DATADIR");
> > if (sz && *sz)
> > {
> > +   buf = (gchar *)g_malloc(strlen(sz)+1);
> > strcpy(buf,sz);
> > char * p = buf;
> > int len = strlen(p);
> 
> You could either use g_strdup() or rearrange the code to reuse len
> instead of doing strlen(sz) twice.

Yes, that would be more efficient of course. I'll submit a new patch if
the maintainer wishes. No response yet from that side. 

BTW: Abiword works fine under GNU/Hurd!




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#648153: abiword: FTBFS on hurd-i386

2011-11-10 Thread Guillem Jover
Hi!

On Wed, 2011-11-09 at 18:15:50 +0100, Svante Signell wrote:
> diff -ur abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp 
> abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp
> --- abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp  2011-05-09 
> 09:32:28.0 +0200
> +++ abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp 2011-11-09 
> 15:58:06.0 +0100
> @@ -271,12 +271,13 @@
>  {
>   // FIXME: this code sucks hard
>  
> - char buf[PATH_MAX];
> + char * buf = NULL;
>   
>   // see if ABIWORD_DATADIR was set in the environment
>   const char * sz = getenv("ABIWORD_DATADIR");
>   if (sz && *sz)
>   {
> + buf = (gchar *)g_malloc(strlen(sz)+1);
>   strcpy(buf,sz);
>   char * p = buf;
>   int len = strlen(p);

You could either use g_strdup() or rearrange the code to reuse len
instead of doing strlen(sz) twice.

regards,
guillem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#648153: abiword: FTBFS on hurd-i386

2011-11-09 Thread Svante Signell
On Wed, 2011-11-09 at 09:38 +0100, Svante Signell wrote:
> Package: abiword
> Version: 2.9.1-0.1
> Severity: important
> Tags: patch
> User: debian-h...@lists.debian.org
> Usertags: hurd
> 
> Hi,
> 
> the attached tiny patch solves the FTBFS problems of abiword on
> GNU/Hurd. In the first path config.h is included to make possible to
> check if TOOLKIT_GTK is defined. The second part use dynamic memory
> allocation to avoid the absence of a PATH_MAX definition for GNU/Hurd.
> The patch has been tested with a small program on GNU/Linux and
> GNU/Hurd.
> 
> Thanks!

Attached is an updated patch, taking the glib versions of malloc and
free into account. Additionally a redundant free statement was removed.

Thanks!

diff -ur abiword-2.9.1/src/af/util/xp/ut_path.h abiword-2.9.1.modified/src/af/util/xp/ut_path.h
--- abiword-2.9.1/src/af/util/xp/ut_path.h	2009-12-13 10:45:47.0 +0100
+++ abiword-2.9.1.modified/src/af/util/xp/ut_path.h	2011-11-09 09:26:11.0 +0100
@@ -29,6 +29,8 @@
 #include 
 #endif
 
+#include "config.h"
+
 /* GTK build supports platforms without PATH_MAX; we leave the warning in for
  * other platforms to avoid headaches
  */
diff -ur abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp
--- abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp	2011-05-09 09:32:28.0 +0200
+++ abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp	2011-11-09 15:58:06.0 +0100
@@ -271,12 +271,13 @@
 {
 	// FIXME: this code sucks hard
 
-	char buf[PATH_MAX];
+	char * buf = NULL;
 	
 	// see if ABIWORD_DATADIR was set in the environment
 	const char * sz = getenv("ABIWORD_DATADIR");
 	if (sz && *sz)
 	{
+		buf = (gchar *)g_malloc(strlen(sz)+1);
 		strcpy(buf,sz);
 		char * p = buf;
 		int len = strlen(p);
@@ -290,6 +291,7 @@
 		if (p[len-1]=='/')// trim trailing slash
 			p[len-1] = 0;
 		XAP_App::_setAbiSuiteLibDir(p);
+		g_free(buf);
 		return;
 	}
 


Bug#648153: abiword: FTBFS on hurd-i386

2011-11-09 Thread Svante Signell
Package: abiword
Version: 2.9.1-0.1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

the attached tiny patch solves the FTBFS problems of abiword on
GNU/Hurd. In the first path config.h is included to make possible to
check if TOOLKIT_GTK is defined. The second part use dynamic memory
allocation to avoid the absence of a PATH_MAX definition for GNU/Hurd.
The patch has been tested with a small program on GNU/Linux and
GNU/Hurd.

Thanks!
diff -ur abiword-2.9.1/src/af/util/xp/ut_path.h abiword-2.9.1.modified/src/af/util/xp/ut_path.h
--- abiword-2.9.1/src/af/util/xp/ut_path.h	2009-12-13 10:45:47.0 +0100
+++ abiword-2.9.1.modified/src/af/util/xp/ut_path.h	2011-11-09 09:26:11.0 +0100
@@ -29,6 +29,8 @@
 #include 
 #endif
 
+#include "config.h"
+
 /* GTK build supports platforms without PATH_MAX; we leave the warning in for
  * other platforms to avoid headaches
  */
diff -ur abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp
--- abiword-2.9.1/src/af/xap/gtk/xap_UnixApp.cpp	2011-05-09 09:32:28.0 +0200
+++ abiword-2.9.1.modified/src/af/xap/gtk/xap_UnixApp.cpp	2011-11-08 20:43:26.0 +0100
@@ -271,12 +271,13 @@
 {
 	// FIXME: this code sucks hard
 
-	char buf[PATH_MAX];
+	char * buf = NULL;
 	
 	// see if ABIWORD_DATADIR was set in the environment
 	const char * sz = getenv("ABIWORD_DATADIR");
 	if (sz && *sz)
 	{
+		buf = (char *)malloc(strlen(sz)+1);
 		strcpy(buf,sz);
 		char * p = buf;
 		int len = strlen(p);
@@ -290,12 +291,14 @@
 		if (p[len-1]=='/')// trim trailing slash
 			p[len-1] = 0;
 		XAP_App::_setAbiSuiteLibDir(p);
+		free(buf);
 		return;
 	}
 
 	// otherwise, use the hard-coded value
 	XAP_App::_setAbiSuiteLibDir(getAbiSuiteHome());
 
+	free(buf);
 	return;
 }