On Wed, Mar 24, 2010 at 10:12 AM, Renato Botelho <[email protected]> wrote:
> On Tue, Mar 23, 2010 at 1:26 PM, Tamas TEVESZ <[email protected]> wrote:
>> On Tue, 23 Mar 2010, Renato Botelho wrote:
>>
>>  > I'm trying to have next branch of Carlos' repo built on my FreeBSD
>>  > 9.0-CURRENT amd64, and I got a gettext related error:
>>
>> i have seen similar errors on netbsd, from the looks of it they are
>> caused by similar things (which i don't know what they are).
>>
>> there probably are some patches and flags and whatnot in ports that
>> you probably should apply to the manual building method.
>>
>>
>> for reference, this is what i'm doing my netbsd test builds with,
>> obviously tweak as needed:
>>
>> CFLAGS='-Wall -Wextra -g -ggdb3 -I/usr/pkg/include'
>> LDFLAGS='-L/usr/pkg/lib -R/usr/pkg/lib'
>> LIBS='-lintl'
>> PKG_CONFIG_PATH='/usr/pkg/lib/pkgconfig'
>> CC='gcc'
>>
>> i believe the notable points for you will be to install *gnu* gettext
>> and libintl and stuff from ports (the ones that freebsd has in
>> base will not cut it).
>>
>> basically, build the port version (that should pull in any needed
>> build deps), inspect what cflags and stuff it sets, and try adjusting
>> those in your manual build.
>>
>> let us know how it goes.
>>
>> and, of course, thanks for testing!
>
> I have news about libintl support, I got the error just when LINGUAS
> envvar is unset, when I have it set for all languages supported,
> wmaker build fine.
>
> I'm investigating

maybe this can fix, i'll let you know:

diff --git a/src/misc.c b/src/misc.c
index a7de66b..b06dba3 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -32,7 +32,15 @@
 #include <pwd.h>
 #include <math.h>
 #include <time.h>
-#include <libintl.h>
+
+#if HAVE_LIBINTL_H && I18N
+# include <libintl.h>
+# define _(text) gettext(text)
+# define N_(text) (text)
+#else
+# define _(text) (text)
+# define N_(text) (text)
+#endif

 #include <WINGs/WUtil.h>
 #include <wraster.h>

-- 
Renato Botelho


--
To unsubscribe, send mail to [email protected].

Reply via email to