Bug 185042

Summary: graphics/libecwj2 : fails to build with recent compilers
Product: Ports & Packages Reporter: Christoph Moench-Tegeder <cmt>
Component: Individual Port(s)Assignee: Gleb Smirnoff <glebius>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Christoph Moench-Tegeder freebsd_committer freebsd_triage 2013-12-20 18:50:02 UTC
type make... the build fails with (gcc47 error message, clang fails with
the same reason):
../C/NCSnet/NCScnet3/NCSProxy.cpp: In member function 'char* CNCSProxy::GetCurrentUserName()':
../C/NCSnet/NCScnet3/NCSProxy.cpp:644:28: error: 'getlogin' was not declared in this scope

Fix: NCSProxy.cpp needs to include unistd.h. Drop the following as
graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h :



Regards,
Christoph--O0MXEPOEWSN2e0OLFeQedS9H4mzmsr5seQ8ufgZOPZXuhpcU
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Source/C/NCSnet/NCScnet3/NCSProxy.h.orig	2013-12-20 19:22:52.000000000 +0100
+++ Source/C/NCSnet/NCScnet3/NCSProxy.h	2013-12-20 19:23:26.000000000 +0100
@@ -35,6 +35,7 @@
 //#include <streambuf>
 #include <iostream>
 #include <sstream>
+#include <unistd.h>
 #include <ctype.h>
 #include <assert.h>
 #include <string>
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-20 18:50:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->glebius

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-21 00:17:48 UTC
Author: vsevolod
Date: Sat Dec 21 00:17:40 2013
New Revision: 337106
URL: http://svnweb.freebsd.org/changeset/ports/337106

Log:
  - Fix build with the recent clang/gcc [1]
  - Support staging
  
  PR:		185042 [1]
  Submitted by:	Christoph Moench-Tegeder <cmt at burggraben.net> [1]
  Approved by:	maintainer [1]

Added:
  head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h   (contents, props changed)
Modified:
  head/graphics/libecwj2/Makefile
  head/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in

Modified: head/graphics/libecwj2/Makefile
==============================================================================
--- head/graphics/libecwj2/Makefile	Sat Dec 21 00:04:46 2013	(r337105)
+++ head/graphics/libecwj2/Makefile	Sat Dec 21 00:17:40 2013	(r337106)
@@ -18,9 +18,9 @@ USE_ZIP=	yes
 USE_AUTOTOOLS=	libtool autoconf
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
 
-NO_STAGE=	yes
+USES=	gmake
+
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 800000

Added: head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h	Sat Dec 21 00:17:40 2013	(r337106)
@@ -0,0 +1,11 @@
+--- Source/C/NCSnet/NCScnet3/NCSProxy.h.orig	2013-12-20 19:22:52.000000000 +0100
++++ Source/C/NCSnet/NCScnet3/NCSProxy.h	2013-12-20 19:23:26.000000000 +0100
+@@ -35,6 +35,7 @@
+ //#include <streambuf>
+ #include <iostream>
+ #include <sstream>
++#include <unistd.h>
+ #include <ctype.h>
+ #include <assert.h>
+ #include <string>
+

Modified: head/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in
==============================================================================
--- head/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in	Sat Dec 21 00:04:46 2013	(r337105)
+++ head/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in	Sat Dec 21 00:17:40 2013	(r337106)
@@ -1,5 +1,5 @@
---- Source/NCSBuildGnu/Makefile.in.orig	2006-08-29 11:57:09.000000000 +0400
-+++ Source/NCSBuildGnu/Makefile.in	2010-07-29 19:56:41.000000000 +0400
+--- Source/NCSBuildGnu/Makefile.in.orig	2006-08-29 08:57:09.000000000 +0100
++++ Source/NCSBuildGnu/Makefile.in	2013-12-21 00:03:30.000000000 +0000
 @@ -246,22 +246,6 @@
  	../C/NCSEcw/shared_src/qmf_util.c \
  	../C/NCSEcw/shared_src/quantize.c \
@@ -96,7 +96,16 @@
  @AMDEP_TRUE@	./$(DEPDIR)/collapse_pyr.Plo \
  @AMDEP_TRUE@	./$(DEPDIR)/compress.Plo ./$(DEPDIR)/dynamiclib.Plo \
  @AMDEP_TRUE@	./$(DEPDIR)/ecw_open.Plo ./$(DEPDIR)/ecw_read.Plo \
-@@ -1321,22 +1262,6 @@
+@@ -1036,8 +977,6 @@
+ 	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+ 	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+-	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+-	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 
+@@ -1321,22 +1260,6 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-NCSWorldFile.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-NCScnet.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-build_pyr.Po@am__quote@
@@ -119,7 +128,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-collapse_pyr.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-compress.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-dynamiclib.Po@am__quote@
-@@ -1364,22 +1289,6 @@
+@@ -1364,22 +1287,6 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-unpack.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-util.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_pyr.Plo@am__quote@
@@ -142,7 +151,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collapse_pyr.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamiclib.Plo@am__quote@
-@@ -1935,534 +1844,6 @@
+@@ -1935,534 +1842,6 @@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(______lib_libecwj2_a_CPPFLAGS) $(CPPFLAGS) $(______lib_libecwj2_a_CFLAGS) $(CFLAGS) -c -o ______lib_libecwj2_a-unpack.lo `test -f '../C/NCSEcw/shared_src/unpack.c' || echo '$(srcdir)/'`../C/NCSEcw/shared_src/unpack.c
  
@@ -677,7 +686,7 @@
  ______lib_libecwj2_a-dynamiclib.o: ../C/NCSUtil/dynamiclib.c
  @am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(______lib_libecwj2_a_CPPFLAGS) $(CPPFLAGS) $(______lib_libecwj2_a_CFLAGS) $(CFLAGS) -MT ______lib_libecwj2_a-dynamiclib.o -MD -MP -MF "$(DEPDIR)/______lib_libecwj2_a-dynamiclib.Tpo" \
  @am__fastdepCC_TRUE@	  -c -o ______lib_libecwj2_a-dynamiclib.o `test -f '../C/NCSUtil/dynamiclib.c' || echo '$(srcdir)/'`../C/NCSUtil/dynamiclib.c; \
-@@ -3288,534 +2669,6 @@
+@@ -3288,534 +2667,6 @@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack.lo `test -f '../C/NCSEcw/shared_src/unpack.c' || echo '$(srcdir)/'`../C/NCSEcw/shared_src/unpack.c
  
_______________________________________________
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 3 Vsevolod Stakhov freebsd_committer freebsd_triage 2013-12-21 00:18:25 UTC
State Changed
From-To: open->closed

Committed, thank you!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-21 10:28:43 UTC
Author: mat
Date: Sat Dec 21 10:28:34 2013
New Revision: 337129
URL: http://svnweb.freebsd.org/changeset/ports/337129

Log:
  MFH: r337106
  
  - Fix build with the recent clang/gcc [1]
  - Support staging
  
  PR:		185042 [1]
  Submitted by:	Christoph Moench-Tegeder <cmt at burggraben.net> [1]
  Approved by:	maintainer [1]
  Approved by:	portmgr (implicit)

Added:
  branches/2014Q1/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h
     - copied unchanged from r337106, head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h
Modified:
  branches/2014Q1/graphics/libecwj2/Makefile
  branches/2014Q1/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/graphics/libecwj2/Makefile
==============================================================================
--- branches/2014Q1/graphics/libecwj2/Makefile	Sat Dec 21 10:27:33 2013	(r337128)
+++ branches/2014Q1/graphics/libecwj2/Makefile	Sat Dec 21 10:28:34 2013	(r337129)
@@ -18,9 +18,9 @@ USE_ZIP=	yes
 USE_AUTOTOOLS=	libtool autoconf
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
 
-NO_STAGE=	yes
+USES=	gmake
+
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 800000

Copied: branches/2014Q1/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h (from r337106, head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h	Sat Dec 21 10:28:34 2013	(r337129, copy of r337106, head/graphics/libecwj2/files/patch-Source-C-NCSnet-NCScnet3-NCSProxy.h)
@@ -0,0 +1,11 @@
+--- Source/C/NCSnet/NCScnet3/NCSProxy.h.orig	2013-12-20 19:22:52.000000000 +0100
++++ Source/C/NCSnet/NCScnet3/NCSProxy.h	2013-12-20 19:23:26.000000000 +0100
+@@ -35,6 +35,7 @@
+ //#include <streambuf>
+ #include <iostream>
+ #include <sstream>
++#include <unistd.h>
+ #include <ctype.h>
+ #include <assert.h>
+ #include <string>
+

Modified: branches/2014Q1/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in
==============================================================================
--- branches/2014Q1/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in	Sat Dec 21 10:27:33 2013	(r337128)
+++ branches/2014Q1/graphics/libecwj2/files/patch-Source-NCSBuildGnu-Makefile.in	Sat Dec 21 10:28:34 2013	(r337129)
@@ -1,5 +1,5 @@
---- Source/NCSBuildGnu/Makefile.in.orig	2006-08-29 11:57:09.000000000 +0400
-+++ Source/NCSBuildGnu/Makefile.in	2010-07-29 19:56:41.000000000 +0400
+--- Source/NCSBuildGnu/Makefile.in.orig	2006-08-29 08:57:09.000000000 +0100
++++ Source/NCSBuildGnu/Makefile.in	2013-12-21 00:03:30.000000000 +0000
 @@ -246,22 +246,6 @@
  	../C/NCSEcw/shared_src/qmf_util.c \
  	../C/NCSEcw/shared_src/quantize.c \
@@ -96,7 +96,16 @@
  @AMDEP_TRUE@	./$(DEPDIR)/collapse_pyr.Plo \
  @AMDEP_TRUE@	./$(DEPDIR)/compress.Plo ./$(DEPDIR)/dynamiclib.Plo \
  @AMDEP_TRUE@	./$(DEPDIR)/ecw_open.Plo ./$(DEPDIR)/ecw_read.Plo \
-@@ -1321,22 +1262,6 @@
+@@ -1036,8 +977,6 @@
+ 	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+ 	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+-	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+-	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 
+@@ -1321,22 +1260,6 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-NCSWorldFile.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-NCScnet.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-build_pyr.Po@am__quote@
@@ -119,7 +128,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-collapse_pyr.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-compress.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-dynamiclib.Po@am__quote@
-@@ -1364,22 +1289,6 @@
+@@ -1364,22 +1287,6 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-unpack.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/______lib_libecwj2_a-util.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_pyr.Plo@am__quote@
@@ -142,7 +151,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collapse_pyr.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamiclib.Plo@am__quote@
-@@ -1935,534 +1844,6 @@
+@@ -1935,534 +1842,6 @@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(______lib_libecwj2_a_CPPFLAGS) $(CPPFLAGS) $(______lib_libecwj2_a_CFLAGS) $(CFLAGS) -c -o ______lib_libecwj2_a-unpack.lo `test -f '../C/NCSEcw/shared_src/unpack.c' || echo '$(srcdir)/'`../C/NCSEcw/shared_src/unpack.c
  
@@ -677,7 +686,7 @@
  ______lib_libecwj2_a-dynamiclib.o: ../C/NCSUtil/dynamiclib.c
  @am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(______lib_libecwj2_a_CPPFLAGS) $(CPPFLAGS) $(______lib_libecwj2_a_CFLAGS) $(CFLAGS) -MT ______lib_libecwj2_a-dynamiclib.o -MD -MP -MF "$(DEPDIR)/______lib_libecwj2_a-dynamiclib.Tpo" \
  @am__fastdepCC_TRUE@	  -c -o ______lib_libecwj2_a-dynamiclib.o `test -f '../C/NCSUtil/dynamiclib.c' || echo '$(srcdir)/'`../C/NCSUtil/dynamiclib.c; \
-@@ -3288,534 +2669,6 @@
+@@ -3288,534 +2667,6 @@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unpack.lo `test -f '../C/NCSEcw/shared_src/unpack.c' || echo '$(srcdir)/'`../C/NCSEcw/shared_src/unpack.c
  
_______________________________________________
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"