Bug 185716 - graphics/dynamechs: Fix build with clang
Summary: graphics/dynamechs: Fix build with clang
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-12 18:40 UTC by tkato432
Modified: 2014-01-25 13:30 UTC (History)
0 users

See Also:


Attachments
file.diff (4.73 KB, patch)
2014-01-12 18:40 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2014-01-12 18:40:10 UTC
- Fix build with clang

New file:
files/patch-aquarobot__MatrixMy.cpp
files/patch-dm__svd_linpack.cpp
Comment 1 dfilter service freebsd_committer freebsd_triage 2014-01-19 14:29:37 UTC
Author: miwi
Date: Sun Jan 19 14:29:28 2014
New Revision: 340307
URL: http://svnweb.freebsd.org/changeset/ports/340307
QAT: https://qat.redports.org/buildarchive/r340307/

Log:
  - Fix build with clang
  
  PR:		185716
  Submitted by:	ports fury

Added:
  head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp   (contents, props changed)
  head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp   (contents, props changed)
Modified:
  head/graphics/dynamechs/Makefile
  head/graphics/dynamechs/files/make.platform.freebsd   (contents, props changed)
  head/graphics/dynamechs/files/patch-aquarobot::Gait.hpp   (contents, props changed)

Modified: head/graphics/dynamechs/Makefile
==============================================================================
--- head/graphics/dynamechs/Makefile	Sun Jan 19 14:28:36 2014	(r340306)
+++ head/graphics/dynamechs/Makefile	Sun Jan 19 14:29:28 2014	(r340307)
@@ -10,32 +10,32 @@ MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}
 DISTNAME=	${PORTNAME}_${PORTVERSION:S/.p/pre/}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A Multibody Dynamic Simulation Library
+COMMENT=	Multibody Dynamic Simulation Library
 
-USES=		perl5
 USE_BZIP2=	yes
+USES=		gmake perl5
 USE_GL=		glut
-USE_GMAKE=	yes
 USE_PERL5=	build
-CXXFLAGS+=	${PTHREAD_CFLAGS}
 MAKE_ENV=	OPENGLINCDIR="${LOCALBASE}/include" \
 		OPENGLLIBDIR="${LOCALBASE}/lib"
-LDFLAGS+=	${PTHREAD_LIBS}
 ALL_TARGET=	freebsd
 USE_LDCONFIG=	yes
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+post-patch:
+	@${REINPLACE_CMD} -e \
+		's|.SILENT:||' ${WRKSRC}/Makefile
 
 do-configure:
 	@${CP} -f ${FILESDIR}/make.platform.freebsd ${WRKSRC}/make/
 
 do-install:
 .for dir in dm dmu dmGL
-	${RM} -f ${WRKSRC}/${dir}/*.orig
-	@${MKDIR} ${PREFIX}/include/${PORTNAME}/${dir}
-	${INSTALL_DATA} ${WRKSRC}/${dir}/*.h* ${PREFIX}/include/${PORTNAME}/${dir}
-	${INSTALL_DATA} ${WRKSRC}/lib/platform.freebsd/lib${dir}.so ${PREFIX}/lib
+	@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}/${dir}
+	(cd ${WRKSRC}/${dir} && ${FIND} . -name  "*.h" -or -name "*.hpp" | \
+		${XARGS} -J % ${INSTALL_DATA} % \
+		${STAGEDIR}${PREFIX}/include/${PORTNAME}/${dir})
+	(cd ${WRKSRC}/lib/platform.freebsd && ${INSTALL_LIB} lib${dir}.so \
+		${STAGEDIR}${PREFIX}/lib)
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/graphics/dynamechs/files/make.platform.freebsd
==============================================================================
--- head/graphics/dynamechs/files/make.platform.freebsd	Sun Jan 19 14:28:36 2014	(r340306)
+++ head/graphics/dynamechs/files/make.platform.freebsd	Sun Jan 19 14:29:28 2014	(r340307)
@@ -2,7 +2,7 @@ CXXFLAGS += -D_BOOL -c -fPIC -I/$(OPENGL
 # -pthreads
 DEPENDFLAGS := $(CXXFLAGS)
 
-LDFLAGS += -fPIC -L/$(OPENGLLIBDIR) -L${LOCALBASE}/lib -lX11 -lm -l$(MESA)GLU -l$(MESA)GL
+LDFLAGS += -pthread -fPIC -L/$(OPENGLLIBDIR) -L${LOCALBASE}/lib -lX11 -lm -l$(MESA)GLU -l$(MESA)GL
 LDGLUT := -lglut
 
 # CXX := c++

Modified: head/graphics/dynamechs/files/patch-aquarobot::Gait.hpp
==============================================================================
--- head/graphics/dynamechs/files/patch-aquarobot::Gait.hpp	Sun Jan 19 14:28:36 2014	(r340306)
+++ head/graphics/dynamechs/files/patch-aquarobot::Gait.hpp	Sun Jan 19 14:29:28 2014	(r340307)
@@ -1,15 +1,28 @@
---- aquarobot/Gait.hpp.orig	Thu Jul 19 08:40:44 2001
-+++ aquarobot/Gait.hpp	Sat Dec 21 08:57:01 2002
-@@ -26,10 +26,11 @@
+--- aquarobot/Gait.hpp.orig	2001-07-19 08:40:44.000000000 +0900
++++ aquarobot/Gait.hpp	2014-01-08 21:46:35.000000000 +0900
+@@ -26,24 +26,17 @@
  #include <windows.h>
  #endif
  
 -#if defined(WIN32) || (defined(sgi) && defined(_STANDARD_C_PLUS_PLUS)) || (defined(__GNUC__) && (__GNUC__>=2) && (__GNUC_MINOR__>=91))
-+#if defined(WIN32) || (defined(sgi) && defined(_STANDARD_C_PLUS_PLUS)) || (defined(__GNUC__) && (__GNUC__>=2) && (__GNUC_MINOR__>=91)) || (defined(__GNUC__) && (__GNUC__>=3))
  #include <iostream>
  #include <iomanip>
  #include <fstream>
+-#else
+-#include <iostream.h>
+-#include <iomanip.h>
+-#include <fstream.h>
+-#endif
 +using namespace std;
- #else
- #include <iostream.h>
- #include <iomanip.h>
+ 
+ #include <math.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ 
+ // Use the std namespace. To do this we must first guarantee that it exists.
+-#if defined(__sgi) || defined(__WIN32_) || defined(WIN32)
+ namespace std {}
+ using namespace std;
+-#endif
+ 
+ #endif

Added: head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp	Sun Jan 19 14:29:28 2014	(r340307)
@@ -0,0 +1,11 @@
+--- aquarobot/MatrixMy.cpp.orig
++++ aquarobot/MatrixMy.cpp
+@@ -38,7 +38,7 @@
+ // Constructor
+ // **************************************************************************
+ //MatrixMy::MatrixMy(int r = 4, int c = 4)
+-MatrixMy::MatrixMy(int r = 3, int c = 3)
++MatrixMy::MatrixMy(int r, int c)
+ {
+   row = r;
+   column = c;

Added: head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp	Sun Jan 19 14:29:28 2014	(r340307)
@@ -0,0 +1,13 @@
+--- dm/svd_linpack.cpp.orig
++++ dm/svd_linpack.cpp
+@@ -10,7 +10,9 @@
+ #endif
+ 
+ #include <stdio.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
++using namespace std;
+ 
+ #ifdef __cplusplus
+ extern "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 2 Martin Wilke freebsd_committer freebsd_triage 2014-01-19 14:29:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-01-25 13:21:27 UTC
Author: miwi
Date: Sat Jan 25 13:21:18 2014
New Revision: 341036
URL: http://svnweb.freebsd.org/changeset/ports/341036
QAT: https://qat.redports.org/buildarchive/r341036/

Log:
  MFH: r340307
  
  - Fix build with clang
  
  PR:		185716
  Submitted by:	ports fury

Added:
  branches/2014Q1/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp
     - copied unchanged from r340307, head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp
  branches/2014Q1/graphics/dynamechs/files/patch-dm__svd_linpack.cpp
     - copied unchanged from r340307, head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp
Modified:
  branches/2014Q1/graphics/dynamechs/Makefile
  branches/2014Q1/graphics/dynamechs/files/make.platform.freebsd   (contents, props changed)
  branches/2014Q1/graphics/dynamechs/files/patch-aquarobot::Gait.hpp   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/graphics/dynamechs/Makefile
==============================================================================
--- branches/2014Q1/graphics/dynamechs/Makefile	Sat Jan 25 13:20:40 2014	(r341035)
+++ branches/2014Q1/graphics/dynamechs/Makefile	Sat Jan 25 13:21:18 2014	(r341036)
@@ -10,32 +10,32 @@ MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}
 DISTNAME=	${PORTNAME}_${PORTVERSION:S/.p/pre/}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A Multibody Dynamic Simulation Library
+COMMENT=	Multibody Dynamic Simulation Library
 
-USES=		perl5
 USE_BZIP2=	yes
+USES=		gmake perl5
 USE_GL=		glut
-USE_GMAKE=	yes
 USE_PERL5=	build
-CXXFLAGS+=	${PTHREAD_CFLAGS}
 MAKE_ENV=	OPENGLINCDIR="${LOCALBASE}/include" \
 		OPENGLLIBDIR="${LOCALBASE}/lib"
-LDFLAGS+=	${PTHREAD_LIBS}
 ALL_TARGET=	freebsd
 USE_LDCONFIG=	yes
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+post-patch:
+	@${REINPLACE_CMD} -e \
+		's|.SILENT:||' ${WRKSRC}/Makefile
 
 do-configure:
 	@${CP} -f ${FILESDIR}/make.platform.freebsd ${WRKSRC}/make/
 
 do-install:
 .for dir in dm dmu dmGL
-	${RM} -f ${WRKSRC}/${dir}/*.orig
-	@${MKDIR} ${PREFIX}/include/${PORTNAME}/${dir}
-	${INSTALL_DATA} ${WRKSRC}/${dir}/*.h* ${PREFIX}/include/${PORTNAME}/${dir}
-	${INSTALL_DATA} ${WRKSRC}/lib/platform.freebsd/lib${dir}.so ${PREFIX}/lib
+	@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}/${dir}
+	(cd ${WRKSRC}/${dir} && ${FIND} . -name  "*.h" -or -name "*.hpp" | \
+		${XARGS} -J % ${INSTALL_DATA} % \
+		${STAGEDIR}${PREFIX}/include/${PORTNAME}/${dir})
+	(cd ${WRKSRC}/lib/platform.freebsd && ${INSTALL_LIB} lib${dir}.so \
+		${STAGEDIR}${PREFIX}/lib)
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: branches/2014Q1/graphics/dynamechs/files/make.platform.freebsd
==============================================================================
--- branches/2014Q1/graphics/dynamechs/files/make.platform.freebsd	Sat Jan 25 13:20:40 2014	(r341035)
+++ branches/2014Q1/graphics/dynamechs/files/make.platform.freebsd	Sat Jan 25 13:21:18 2014	(r341036)
@@ -2,7 +2,7 @@ CXXFLAGS += -D_BOOL -c -fPIC -I/$(OPENGL
 # -pthreads
 DEPENDFLAGS := $(CXXFLAGS)
 
-LDFLAGS += -fPIC -L/$(OPENGLLIBDIR) -L${LOCALBASE}/lib -lX11 -lm -l$(MESA)GLU -l$(MESA)GL
+LDFLAGS += -pthread -fPIC -L/$(OPENGLLIBDIR) -L${LOCALBASE}/lib -lX11 -lm -l$(MESA)GLU -l$(MESA)GL
 LDGLUT := -lglut
 
 # CXX := c++

Modified: branches/2014Q1/graphics/dynamechs/files/patch-aquarobot::Gait.hpp
==============================================================================
--- branches/2014Q1/graphics/dynamechs/files/patch-aquarobot::Gait.hpp	Sat Jan 25 13:20:40 2014	(r341035)
+++ branches/2014Q1/graphics/dynamechs/files/patch-aquarobot::Gait.hpp	Sat Jan 25 13:21:18 2014	(r341036)
@@ -1,15 +1,28 @@
---- aquarobot/Gait.hpp.orig	Thu Jul 19 08:40:44 2001
-+++ aquarobot/Gait.hpp	Sat Dec 21 08:57:01 2002
-@@ -26,10 +26,11 @@
+--- aquarobot/Gait.hpp.orig	2001-07-19 08:40:44.000000000 +0900
++++ aquarobot/Gait.hpp	2014-01-08 21:46:35.000000000 +0900
+@@ -26,24 +26,17 @@
  #include <windows.h>
  #endif
  
 -#if defined(WIN32) || (defined(sgi) && defined(_STANDARD_C_PLUS_PLUS)) || (defined(__GNUC__) && (__GNUC__>=2) && (__GNUC_MINOR__>=91))
-+#if defined(WIN32) || (defined(sgi) && defined(_STANDARD_C_PLUS_PLUS)) || (defined(__GNUC__) && (__GNUC__>=2) && (__GNUC_MINOR__>=91)) || (defined(__GNUC__) && (__GNUC__>=3))
  #include <iostream>
  #include <iomanip>
  #include <fstream>
+-#else
+-#include <iostream.h>
+-#include <iomanip.h>
+-#include <fstream.h>
+-#endif
 +using namespace std;
- #else
- #include <iostream.h>
- #include <iomanip.h>
+ 
+ #include <math.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ 
+ // Use the std namespace. To do this we must first guarantee that it exists.
+-#if defined(__sgi) || defined(__WIN32_) || defined(WIN32)
+ namespace std {}
+ using namespace std;
+-#endif
+ 
+ #endif

Copied: branches/2014Q1/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp (from r340307, head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp	Sat Jan 25 13:21:18 2014	(r341036, copy of r340307, head/graphics/dynamechs/files/patch-aquarobot__MatrixMy.cpp)
@@ -0,0 +1,11 @@
+--- aquarobot/MatrixMy.cpp.orig
++++ aquarobot/MatrixMy.cpp
+@@ -38,7 +38,7 @@
+ // Constructor
+ // **************************************************************************
+ //MatrixMy::MatrixMy(int r = 4, int c = 4)
+-MatrixMy::MatrixMy(int r = 3, int c = 3)
++MatrixMy::MatrixMy(int r, int c)
+ {
+   row = r;
+   column = c;

Copied: branches/2014Q1/graphics/dynamechs/files/patch-dm__svd_linpack.cpp (from r340307, head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/graphics/dynamechs/files/patch-dm__svd_linpack.cpp	Sat Jan 25 13:21:18 2014	(r341036, copy of r340307, head/graphics/dynamechs/files/patch-dm__svd_linpack.cpp)
@@ -0,0 +1,13 @@
+--- dm/svd_linpack.cpp.orig
++++ dm/svd_linpack.cpp
+@@ -10,7 +10,9 @@
+ #endif
+ 
+ #include <stdio.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
++using namespace std;
+ 
+ #ifdef __cplusplus
+ extern "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"