pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

freecad: fix build on fbsd



Module Name:	pkgsrc-wip
Committed By:	Rumko <rumko%NetBSD.org@localhost>
Pushed By:	rumko
Date:		Sun Apr 30 14:18:33 2017 +0200
Changeset:	018a8b157ed6ef21d15c7b1e69891789e7b9696b

Modified Files:
	freecad/Makefile
	freecad/distinfo
Added Files:
	freecad/patches/patch-src_Base_TimeInfo.cpp
	freecad/patches/patch-src_Base_TimeInfo.h

Log Message:
freecad: fix build on fbsd

Get rid of undefined references to ftime() by switching to
gettimeofday

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=018a8b157ed6ef21d15c7b1e69891789e7b9696b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 freecad/Makefile                            |  1 +
 freecad/distinfo                            |  2 ++
 freecad/patches/patch-src_Base_TimeInfo.cpp | 18 ++++++++++++++++++
 freecad/patches/patch-src_Base_TimeInfo.h   | 12 ++++++++++++
 4 files changed, 33 insertions(+)

diffs:
diff --git a/freecad/Makefile b/freecad/Makefile
index 54598075a3..9ac5120771 100644
--- a/freecad/Makefile
+++ b/freecad/Makefile
@@ -24,6 +24,7 @@ LDFLAGS.FreeBSD+=	-fPIC
 CMAKE_ARGS+=		-DCMAKE_INSTALL_HOMEDIR:PATH=${PREFIX:Q}/freecad
 CMAKE_ARGS+=		-DCMAKE_CXX_FLAGS=${CXXFLAGS:Q}
 CMAKE_ARGS+=		-DCMAKE_SHARED_LINKER_FLAGS=${LDFLAGS:Q}
+#CMAKE_ARGS+=		-DCMAKE_VERBOSE_MAKEFILE=ON
 
 CMAKE_ARGS+=		-DFREECAD_USE_EXTERNAL_KDL=ON
 
diff --git a/freecad/distinfo b/freecad/distinfo
index d3b9984a37..07e875b233 100644
--- a/freecad/distinfo
+++ b/freecad/distinfo
@@ -10,6 +10,8 @@ SHA1 (patch-src_3rdParty_salomesmesh_src_SMDS_SMDS__Mesh.cpp) = ebef7e0abdd3ada3
 SHA1 (patch-src_App_Application.cpp) = 7f23ee068ae97695c81a847ebf93abce9f8db2c7
 SHA1 (patch-src_App_CMakeLists.txt) = c73a2a69235bf62ae0a1d45101fd021826aed9cf
 SHA1 (patch-src_App_FreeCADInit.py) = 81ff70632cdb15ab4ebd744da64f691bf621f3d2
+SHA1 (patch-src_Base_TimeInfo.cpp) = 7ec2ddac5c326ff1b1aa3f68c046c81018cc6e23
+SHA1 (patch-src_Base_TimeInfo.h) = 3dbdd0fbb27c0c8fb1fe7cec8faa6c437426d9c6
 SHA1 (patch-src_Main_CMakeLists.txt) = c10d5b97eb8fb840360681c4a5a38b14b8c1c0bb
 SHA1 (patch-src_Main_MainCmd.cpp) = 1554fd69e21627889fd4e0802e16dbd8f057f21d
 SHA1 (patch-src_Main_MainGui.cpp) = 482dafad3dbfd80661870d9230bbad2f05a4b950
diff --git a/freecad/patches/patch-src_Base_TimeInfo.cpp b/freecad/patches/patch-src_Base_TimeInfo.cpp
new file mode 100644
index 0000000000..7a2ae41897
--- /dev/null
+++ b/freecad/patches/patch-src_Base_TimeInfo.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- src/Base/TimeInfo.cpp.orig	2016-04-07 01:39:34.000000000 +0000
++++ src/Base/TimeInfo.cpp
+@@ -59,8 +59,11 @@ void TimeInfo::setCurrent(void)
+ {
+ #if defined (_MSC_VER)
+     _ftime( &timebuffer );
+-#elif defined(__GNUC__)
+-    ftime( &timebuffer );
++#else
++    struct timeval curTime;
++    gettimeofday(&curTime, NULL);
++    timebuffer.time = curTime.tv_sec;
++    timebuffer.millitm = curTime.tv_usec;
+ #endif
+ }
+ 
diff --git a/freecad/patches/patch-src_Base_TimeInfo.h b/freecad/patches/patch-src_Base_TimeInfo.h
new file mode 100644
index 0000000000..f3864211b1
--- /dev/null
+++ b/freecad/patches/patch-src_Base_TimeInfo.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/Base/TimeInfo.h.orig	2016-04-07 01:39:34.000000000 +0000
++++ src/Base/TimeInfo.h
+@@ -29,6 +29,7 @@
+ 
+ #include <stdio.h>
+ #include <sys/timeb.h>
++#include <sys/time.h>
+ #include <time.h>
+ 
+ #ifdef __GNUC__


Home | Main Index | Thread Index | Old Index