Bug 182094 - deskutils/notecase will not compile on 10.0-CURRENT
Summary: deskutils/notecase will not compile on 10.0-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-14 15:20 UTC by Walter Hurry
Modified: 2013-09-20 09:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Hurry 2013-09-14 15:20:00 UTC
The messages are these:

./src/gui/GuiLanguage.cpp:321:3: error: use of undeclared identifier 'putenv'
                putenv( g_strconcat("LANG=", szLocaleCode, (char *)NULL) );
                ^
./src/gui/GuiLanguage.cpp:474:25: error: use of undeclared identifier 'getenv';
      did you mean 'g_getenv'?
        const char *szLocale = getenv("LANG"); //setlocale(LC_ALL, NULL);
                               ^~~~~~
                               g_getenv

How-To-Repeat: Attempt ot compile deskutils/notecase on 10.0-CURRENT
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-14 15:20:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->martymac

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ganael LAPLANCHE freebsd_committer freebsd_triage 2013-09-17 08:41:57 UTC
Hi,

> ./src/gui/GuiLanguage.cpp:321:3: error: use of undeclared identifier
'putenv'
> putenv( g_strconcat("LANG=", szLocaleCode, (char *)NULL) );
> ^
> ./src/gui/GuiLanguage.cpp:474:25: error: use of undeclared identifier
'getenv';
> did you mean 'g_getenv'?
> const char *szLocale = getenv("LANG"); //setlocale(LC_ALL, NULL);
> ^~~~~~
> g_getenv

Weird. I am running current from Sept, 4th :

FreeBSD laptop.martymac.org 10.0-CURRENT FreeBSD 10.0-CURRENT #1
r255202M: Wed Sep  4 12:47:38 CEST 2013    
martymac@laptop.martymac.org:/usr/obj/files/Src/sys/GENERIC  amd64

and cannot reproduce the problem. Have you tried to build notecase on a
previous -CURRENT ? Could you try to #include <stdlib.h> at the
beginning of src/gui/GuiLanguage.cpp and recompile the port ?

Best regards,

--
Ganael LAPLANCHE <ganael.laplanche@martymac.org>
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
Comment 3 paul.brewer40 2013-09-17 13:17:21 UTC
On Tue, 17 Sep 2013 00:41:56 -0700 (PDT)
Ganael LAPLANCHE wrote:
> 
> Weird. I am running current from Sept, 4th :
> 
> FreeBSD laptop.martymac.org 10.0-CURRENT FreeBSD 10.0-CURRENT #1
> r255202M: Wed Sep  4 12:47:38 CEST 2013    
> martymac@laptop.martymac.org:/usr/obj/files/Src/sys/GENERIC  amd64
> 
> and cannot reproduce the problem. Have you tried to build notecase on a
> previous -CURRENT ? Could you try to #include <stdlib.h> at the
> beginning of src/gui/GuiLanguage.cpp and recompile the port ?
> 
It didn't compile for me on earlier versions of -CURRENT either.
The #include <stdlib.h> worked - src/gui/GuiLanguage.cpp now compiles, but I get another error elsewhere:

===> Compiling src/lib/IniFile.cpp
Configuration: GNOME_VFS=1;GTKSOURCEVIEW=1;DEBUG=;PROFILE=;BYTE_ORDER=-DSHA1_LITTLE_ENDIAN -DORDER_DCBA;PLATFORM="FreeBsd"
#@sed -i.bak 's:\#define INSTALL_PREFIX .*:\#define INSTALL_PREFIX "/usr/local":' ./src/config.h
./src/lib/IniFile.cpp:178:18: error: use of undeclared identifier 'atoi'
        nValue = atoi(It->m_value.c_str());
                 ^
./src/lib/IniFile.cpp:190:18: error: use of undeclared identifier 'atoi'
        nValue = atoi(It->m_value.c_str());
                 ^
./src/lib/IniFile.cpp:202:18: error: use of undeclared identifier 'atoi'
        bValue = atoi(It->m_value.c_str()) > 0;

Should I try the stdlib.h trick on src/lib/IniFile.cpp? I'm afraid I am no c or c++ programmer.

Thanks for your help.
Comment 4 Ganael LAPLANCHE freebsd_committer freebsd_triage 2013-09-18 07:22:28 UTC
On Tue, 17 Sep 2013 13:17:21 +0100, Paul Brewer wrote

Hi Paul,

> Should I try the stdlib.h trick on src/lib/IniFile.cpp? I'm 
> afraid I am no c or c++ programmer.

Yes, please, this header should be included (I wonder why those errors
are not triggered on my side).

--
Ganael LAPLANCHE <ganael.laplanche@martymac.org>
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
Comment 5 paul.brewer40 2013-09-18 09:14:34 UTC
On Tue, 17 Sep 2013 23:22:27 -0700 (PDT)
Ganael LAPLANCHE wrote:

> On Tue, 17 Sep 2013 13:17:21 +0100, Paul Brewer wrote
> 
> Hi Paul,
> 
> > Should I try the stdlib.h trick on src/lib/IniFile.cpp? I'm 
> > afraid I am no c or c++ programmer.
> 
> Yes, please, this header should be included (I wonder why those errors
> are not triggered on my side).
> 
All OK now. Thanks for your help.
Comment 6 Ganael LAPLANCHE freebsd_committer freebsd_triage 2013-09-18 10:58:11 UTC
On Wed, 18 Sep 2013 09:14:34 +0100, Paul Brewer wrote

> All OK now. Thanks for your help.

Thanks.

I'll fix the port with those two patches.

Best regards,

--
Ganael LAPLANCHE <ganael.laplanche@martymac.org>
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-09-20 08:26:59 UTC
Author: martymac
Date: Fri Sep 20 07:26:51 2013
New Revision: 327663
URL: http://svnweb.freebsd.org/changeset/ports/327663

Log:
  Add missing #includes to fix build on -CURRENT
  
  PR:		ports/182094
  Submitted by:	Walter Hurry <walterhurry@gmail.com>

Added:
  head/deskutils/notecase/files/patch-src-gui-GuiLanguage.cpp   (contents, props changed)
  head/deskutils/notecase/files/patch-src-lib-IniFile.cpp   (contents, props changed)
Modified:
  head/deskutils/notecase/Makefile

Modified: head/deskutils/notecase/Makefile
==============================================================================
--- head/deskutils/notecase/Makefile	Fri Sep 20 07:07:48 2013	(r327662)
+++ head/deskutils/notecase/Makefile	Fri Sep 20 07:26:51 2013	(r327663)
@@ -3,7 +3,7 @@
 
 PORTNAME=	notecase
 PORTVERSION=	1.9.8
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	deskutils textproc
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}-${PORTVERSION}_src

Added: head/deskutils/notecase/files/patch-src-gui-GuiLanguage.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/notecase/files/patch-src-gui-GuiLanguage.cpp	Fri Sep 20 07:26:51 2013	(r327663)
@@ -0,0 +1,10 @@
+--- src/gui/GuiLanguage.cpp.orig	2013-09-18 16:02:26.000000000 +0200
++++ src/gui/GuiLanguage.cpp	2013-09-18 16:03:53.000000000 +0200
+@@ -17,6 +17,7 @@
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+ #endif
++#include <stdlib.h>
+ #include <string.h>
+ 
+ #include "../lib/EnumDirectory.h"

Added: head/deskutils/notecase/files/patch-src-lib-IniFile.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/notecase/files/patch-src-lib-IniFile.cpp	Fri Sep 20 07:26:51 2013	(r327663)
@@ -0,0 +1,10 @@
+--- src/lib/IniFile.cpp.orig	2013-09-18 16:05:10.000000000 +0200
++++ src/lib/IniFile.cpp	2013-09-18 16:05:50.000000000 +0200
+@@ -8,6 +8,7 @@
+ 
+ #include "IniFile.h"
+ #include <algorithm>    //find() function
++#include <stdlib.h>
+ #include <string>
+ #include "File64.h"
+ #include "FilePath.h"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Ganael LAPLANCHE freebsd_committer freebsd_triage 2013-09-20 09:23:33 UTC
State Changed
From-To: open->closed

Committed, thanks!