pkgsrc-WIP-changes archive

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

or-tools : first successful build



Module Name:	pkgsrc-wip
Committed By:	mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Wed Aug 28 16:27:53 2024 +0530
Changeset:	f07563a71bd5e2d3e20d3c1c4c29b1cdb8e04064

Modified Files:
	or-tools/Makefile
	or-tools/TODO
	or-tools/distinfo
Added Files:
	or-tools/patches/patch-ortools_base_sysinfo.cc
	or-tools/patches/patch-ortools_util_fp__utils.h
	or-tools/patches/patch-ortools_util_zvector.h

Log Message:
or-tools : first successful build

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

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

diffstat:
 or-tools/Makefile                               | 15 ++++++++---
 or-tools/TODO                                   |  9 ++++++-
 or-tools/distinfo                               |  9 ++++---
 or-tools/patches/patch-ortools_base_sysinfo.cc  | 33 +++++++++++++++++++++++++
 or-tools/patches/patch-ortools_util_fp__utils.h | 23 +++++++++++++++++
 or-tools/patches/patch-ortools_util_zvector.h   | 15 +++++++++++
 6 files changed, 97 insertions(+), 7 deletions(-)

diffs:
diff --git a/or-tools/Makefile b/or-tools/Makefile
index 78bacfb72e..23a4dfcdfb 100644
--- a/or-tools/Makefile
+++ b/or-tools/Makefile
@@ -1,7 +1,8 @@
 # $NetBSD$
 
-GITHUB_TAG=	refs/tags/v${PKGVERSION_NOREV}
-DISTNAME=	or-tools-9.10
+#GITHUB_TAG=	refs/tags/v${PKGVERSION_NOREV}
+GITHUB_TAG=	v99bugfix
+DISTNAME=	or-tools-99bugfix
 CATEGORIES=	math
 MASTER_SITES=	${MASTER_SITE_GITHUB:=google/}
 
@@ -12,10 +13,18 @@ LICENSE=	apache-2.0
 
 USE_LANGUAGES=	c c++
 USE_TOOLS+=	gmake
-MAKE_FLAGS+=	CXX=${CXX:Q}
+
+USE_CXX_FEATURES=	c++20
+FORCE_CXX_STD=		c++20
+GCC_REQD+=		12
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
 
+CMAKE_CONFIGURE_ARGS+=	-DUSE_COINOR=OFF
+CMAKE_CONFIGURE_ARGS+=	-DBUILD_absl=OFF
+CMAKE_CONFIGURE_ARGS+=	-DBUILD_DEPS=OFF
+CMAKE_CONFIGURE_ARGS+=	-DBUILD_EXAMPLES=OFF
+
 .include "../../wip/HiGHS/buildlink3.mk"
 .include "../../wip/scip/buildlink3.mk"
 .include "../../wip/ThirdParty-Mumps/buildlink3.mk"
diff --git a/or-tools/TODO b/or-tools/TODO
index 97d88dd305..c0622b98b2 100644
--- a/or-tools/TODO
+++ b/or-tools/TODO
@@ -1 +1,8 @@
-- a number of unmet dependencies are listed in Makefile
+HiGHS, google-glog, abseil, protobuf, re2 required to be built with c++20, gcc12
+
+release 9.10 has issues with abseil-cpp making use of VLOG_IS_ON, so we used tag v99bugfix
+
+should switch to 9.11 when it is released
+
+patches are submitted on https://github.com/google/or-tools/issues/4359 and may get incorporated by 9.11
+
diff --git a/or-tools/distinfo b/or-tools/distinfo
index 500ec6ac4a..3da2adf839 100644
--- a/or-tools/distinfo
+++ b/or-tools/distinfo
@@ -1,5 +1,8 @@
 $NetBSD$
 
-BLAKE2s (or-tools-9.10.tar.gz) = de27738eb91c108965d1e3732065adb83d9145283a495e742acb19c37c58f6c1
-SHA512 (or-tools-9.10.tar.gz) = 7d36715b77d085e1fe96c009380d640ef3c8f357f9884e42d970478ebaa9f3b84990ba4c324993e6ac86ecbe99ab9e0f14cf968ea41bf3defd4480fd54fe4a0b
-Size (or-tools-9.10.tar.gz) = 20465445 bytes
+BLAKE2s (or-tools-99bugfix.tar.gz) = cdd7fd781cc27856c9ff106181dad15f4e9a4f0c1383c568395aca114ca6de4a
+SHA512 (or-tools-99bugfix.tar.gz) = e3c3e9c8cd37b905a8ca7187e0a55f089e7c1bd6179d3b8c0ae7874854a4f921520f2fd6f2a47c32c760e4345224060670bf6df48806d4f81342d8fb46968109
+Size (or-tools-99bugfix.tar.gz) = 20589966 bytes
+SHA1 (patch-ortools_base_sysinfo.cc) = 23f71598bbe25244c372fe4e4221766bdd830049
+SHA1 (patch-ortools_util_fp__utils.h) = ba51678c4e042d99d08e837ad5879ccfad636d70
+SHA1 (patch-ortools_util_zvector.h) = fbea1e1b3f71a68af01d4269f00c94657956eb67
diff --git a/or-tools/patches/patch-ortools_base_sysinfo.cc b/or-tools/patches/patch-ortools_base_sysinfo.cc
new file mode 100644
index 0000000000..cd10e27b3d
--- /dev/null
+++ b/or-tools/patches/patch-ortools_base_sysinfo.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+https://github.com/google/or-tools/issues/4359
+
+--- ortools/base/sysinfo.cc.orig	2024-08-27 13:35:44.000000000 +0000
++++ ortools/base/sysinfo.cc
+@@ -17,7 +17,7 @@
+ #if defined(__APPLE__) && defined(__GNUC__)  // MacOS
+ #include <mach/mach_init.h>
+ #include <mach/task.h>
+-#elif (defined(__FreeBSD__) || defined(__OpenBSD__))  // FreeBSD or OpenBSD
++#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) || defined(__NetBSD__)  // FreeBSD or OpenBSD or NetBSD
+ #include <sys/resource.h>
+ #include <sys/time.h>
+ // Windows
+@@ -48,7 +48,7 @@ int64_t GetProcessMemoryUsage() {
+   int64_t resident_memory = t_info.resident_size;
+   return resident_memory;
+ }
+-#elif defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
++#elif defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \
+     !defined(__EMSCRIPTEN__) && !defined(_WIN32)      // Linux
+ int64_t GetProcessMemoryUsage() {
+   unsigned size = 0;
+@@ -61,7 +61,7 @@ int64_t GetProcessMemoryUsage() {
+   fclose(pf);
+   return int64_t{1024} * size;
+ }
+-#elif (defined(__FreeBSD__) || defined(__OpenBSD__))  // FreeBSD or OpenBSD
++#elif (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__))  // FreeBSD or OpenBSD or NetBSD
+ int64_t GetProcessMemoryUsage() {
+   int who = RUSAGE_SELF;
+   struct rusage rusage;
diff --git a/or-tools/patches/patch-ortools_util_fp__utils.h b/or-tools/patches/patch-ortools_util_fp__utils.h
new file mode 100644
index 0000000000..a1ae3c2ae1
--- /dev/null
+++ b/or-tools/patches/patch-ortools_util_fp__utils.h
@@ -0,0 +1,23 @@
+$NetBSD$
+
+https://github.com/google/or-tools/issues/4359
+
+--- ortools/util/fp_utils.h.orig	2024-08-27 13:35:44.000000000 +0000
++++ ortools/util/fp_utils.h
+@@ -92,10 +92,16 @@ class ScopedFloatingPointEnv {
+     fenv_.__control &= ~excepts;
+ #elif (defined(__FreeBSD__) || defined(__OpenBSD__))
+     fenv_.__x87.__control &= ~excepts;
++#elif (defined(__NetBSD__))
++    fenv_.x87.control &= ~excepts;
+ #else  // Linux
+     fenv_.__control_word &= ~excepts;
+ #endif
++#if defined(__NetBSD__)
++    fenv_.mxcsr &= ~(excepts << 7);
++#else
+     fenv_.__mxcsr &= ~(excepts << 7);
++#endif
+     CHECK_EQ(0, fesetenv(&fenv_));
+ #endif
+   }
diff --git a/or-tools/patches/patch-ortools_util_zvector.h b/or-tools/patches/patch-ortools_util_zvector.h
new file mode 100644
index 0000000000..d829f138d3
--- /dev/null
+++ b/or-tools/patches/patch-ortools_util_zvector.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+https://github.com/google/or-tools/issues/4359
+
+--- ortools/util/zvector.h.orig	2024-08-27 13:35:44.000000000 +0000
++++ ortools/util/zvector.h
+@@ -14,7 +14,7 @@
+ #ifndef OR_TOOLS_UTIL_ZVECTOR_H_
+ #define OR_TOOLS_UTIL_ZVECTOR_H_
+ 
+-#if (defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \
++#if (defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ) && \
+     defined(__GNUC__)
+ #include <machine/endian.h>
+ #elif !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__MINGW64__)


Home | Main Index | Thread Index | Old Index