pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/oce: fix build on fbsd + clang
Module Name: pkgsrc-wip
Committed By: Rumko <rumko%NetBSD.org@localhost>
Pushed By: rumko
Date: Sun Aug 21 11:35:50 2016 +0200
Changeset: 8258b67f25d4b949aea92a8ce9a354dc33ac1993
Modified Files:
oce/Makefile
oce/buildlink3.mk
oce/distinfo
Added Files:
oce/patches/patch-src_OSD_OSD__MemInfo.cxx
oce/patches/patch-src_STEPConstruct_STEPConstruct__AP203Context.cxx
oce/patches/patch-src_StepFile_recfile.pc
Log Message:
wip/oce: fix build on fbsd + clang
Also add necessary BUILDLINK_INCDIRS.
Ok@ filip
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8258b67f25d4b949aea92a8ce9a354dc33ac1993
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
oce/Makefile | 7 ++++++
oce/buildlink3.mk | 2 ++
oce/distinfo | 3 +++
oce/patches/patch-src_OSD_OSD__MemInfo.cxx | 15 +++++++++++++
...c_STEPConstruct_STEPConstruct__AP203Context.cxx | 26 ++++++++++++++++++++++
oce/patches/patch-src_StepFile_recfile.pc | 15 +++++++++++++
6 files changed, 68 insertions(+)
diffs:
diff --git a/oce/Makefile b/oce/Makefile
index 5887e4a..55cba69 100644
--- a/oce/Makefile
+++ b/oce/Makefile
@@ -29,6 +29,13 @@ CMAKE_ARGS+= -DOCE_INSTALL_PREFIX:PATH=${PREFIX}
LIBS.SunOS+= -lresolv
+
+SUBST_CLASSES+= prefix
+SUBST_MESSAGE.prefix= Fixing PREFIX path.
+SUBST_STAGE.prefix= post-configure
+SUBST_FILES.prefix= CMakeFiles/Export/lib/oce/OCE-libraries-release.cmake
+SUBST_SED.prefix= -e "s|${BUILDLINK_DIR}/lib/lib\([0-9a-zA-Z_-]*\)\.so|\1|g"
+
.include "options.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/oce/buildlink3.mk b/oce/buildlink3.mk
index 69bd369..22434ff 100644
--- a/oce/buildlink3.mk
+++ b/oce/buildlink3.mk
@@ -8,6 +8,8 @@ OCE_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.oce+= oce>=0.17
BUILDLINK_PKGSRCDIR.oce?= ../../wip/oce
+BUILDLINK_INCDIRS.oce+= include/oce
+
.if !empty(PKG_OPTIONS:Mx11)
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
diff --git a/oce/distinfo b/oce/distinfo
index cbb361b..8e0c06c 100644
--- a/oce/distinfo
+++ b/oce/distinfo
@@ -7,7 +7,10 @@ Size (OCE-0.17.2.tar.gz) = 24389678 bytes
SHA1 (patch-CMakeLists.txt) = 2af5bffb315578ee8554cc9dfa9e51b48121df70
SHA1 (patch-adm_cmake_TKernel_CMakeLists.txt) = 40752a95ba115a4869c6ff4c3ef906d70a34ff43
SHA1 (patch-src_MeshVS_MeshVS__MeshPrsBuilder.cxx) = 599e553edb1075887ee47c7bd7098d16ef76dc0a
+SHA1 (patch-src_OSD_OSD__MemInfo.cxx) = e1328a861393d458bc110c930c5ecf5343e2a304
SHA1 (patch-src_OSD_OSD__signal.cxx) = 74f1291aae6872543a52b3202fa90432f6d328c6
SHA1 (patch-src_OpenGl_OpenGl__Context.hxx) = f5654287a239c8885923f36f0a34699788b0fdad
+SHA1 (patch-src_STEPConstruct_STEPConstruct__AP203Context.cxx) = a863980eed38b7ee7bba790afba76ef54189e2e0
SHA1 (patch-src_Standard_Standard__Mutex.hxx) = ffea6f4a7a4b01663f71643276f9f94a94a5ab70
SHA1 (patch-src_Standard_Standard__PrimitiveTypes.hxx) = 791ad1d8120c43aadb3e321c72bf217dc1057e58
+SHA1 (patch-src_StepFile_recfile.pc) = 0474353a9ffeb390913a4b153118b6f0a97ab19e
diff --git a/oce/patches/patch-src_OSD_OSD__MemInfo.cxx b/oce/patches/patch-src_OSD_OSD__MemInfo.cxx
new file mode 100644
index 0000000..3d75f87
--- /dev/null
+++ b/oce/patches/patch-src_OSD_OSD__MemInfo.cxx
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use stdlib.h instead of malloc.h
+
+--- src/OSD/OSD_MemInfo.cxx.orig 2016-06-02 12:18:16.000000000 +0000
++++ src/OSD/OSD_MemInfo.cxx
+@@ -32,7 +32,7 @@
+ #include <malloc/malloc.h>
+ #else
+ #include <unistd.h>
+- #include <malloc.h>
++ #include <stdlib.h>
+ #endif
+
+ #include <string>
diff --git a/oce/patches/patch-src_STEPConstruct_STEPConstruct__AP203Context.cxx b/oce/patches/patch-src_STEPConstruct_STEPConstruct__AP203Context.cxx
new file mode 100644
index 0000000..13da5e1
--- /dev/null
+++ b/oce/patches/patch-src_STEPConstruct_STEPConstruct__AP203Context.cxx
@@ -0,0 +1,26 @@
+$NetBSD$
+
+On fbsd + clang we get:
+error: cast from 'char* (*)(int, int)' to 'Standard_Integer' loses precision
+
+Fix taken from
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=131600
+
+--- src/STEPConstruct/STEPConstruct_AP203Context.cxx.orig 2016-06-02 12:18:16.000000000 +0000
++++ src/STEPConstruct/STEPConstruct_AP203Context.cxx
+@@ -105,6 +105,15 @@ Handle(StepBasic_DateAndTime) STEPConstr
+
+ Handle(StepBasic_CoordinatedUniversalTimeOffset) zone =
+ new StepBasic_CoordinatedUniversalTimeOffset;
++
++#if defined(__FreeBSD__)
++ struct tm newtime;
++ time_t ltime;
++ ltime = time(<ime);
++ localtime_r(<ime, &newtime);
++ int timezone = newtime.tm_gmtoff;
++#endif
++
+ Standard_Integer shift = Standard_Integer(timezone);
+ Standard_Integer shifth = abs ( shift ) / 3600;
+ Standard_Integer shiftm = ( abs ( shift ) - shifth * 3600 ) / 60;
diff --git a/oce/patches/patch-src_StepFile_recfile.pc b/oce/patches/patch-src_StepFile_recfile.pc
new file mode 100644
index 0000000..56e27f8
--- /dev/null
+++ b/oce/patches/patch-src_StepFile_recfile.pc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+malloc.h must not be included on fbsd.
+
+--- src/StepFile/recfile.pc.orig 2015-09-25 14:19:16.000000000 +0000
++++ src/StepFile/recfile.pc
+@@ -16,7 +16,7 @@
+ #include "stdio.h"
+ #include "string.h"
+ #include "stdlib.h"
+-#if (!defined(_WIN32) && !defined(__APPLE__))
++#if (!defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__))
+ #include "malloc.h"
+ #endif
+ #include "recfile.ph"
Home |
Main Index |
Thread Index |
Old Index