pkgsrc-WIP-changes archive

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

openroad: just imported using ports2pkg, need suggestions on mailing list



Module Name:	pkgsrc-wip
Committed By:	mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Sat Aug 24 23:20:41 2024 +0530
Changeset:	f74ee273420af7a47643a37ea24d411a61b2277c

Added Files:
	openroad/DESCR
	openroad/Makefile
	openroad/TODO
	openroad/distinfo
	openroad/patches/patch-CMakeLists.txt
	openroad/patches/patch-src_odb_include_odb_dbTypes.h
	openroad/patches/patch-src_stt_src_flt_etc_MakeDatVar.tcl
	openroad/patches/patch-swig-tcl86

Log Message:
openroad: just imported using ports2pkg, need suggestions on mailing list

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

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

diffstat:
 openroad/DESCR                                     |  2 +
 openroad/Makefile                                  | 87 ++++++++++++++++++++++
 openroad/TODO                                      |  6 ++
 openroad/distinfo                                  |  9 +++
 openroad/patches/patch-CMakeLists.txt              | 14 ++++
 .../patches/patch-src_odb_include_odb_dbTypes.h    | 13 ++++
 .../patch-src_stt_src_flt_etc_MakeDatVar.tcl       | 13 ++++
 openroad/patches/patch-swig-tcl86                  | 20 +++++
 8 files changed, 164 insertions(+)

diffs:
diff --git a/openroad/DESCR b/openroad/DESCR
new file mode 100644
index 0000000000..643c4f7ca2
--- /dev/null
+++ b/openroad/DESCR
@@ -0,0 +1,2 @@
+OpenROAD is a chip physical design tool. It uses the OpenDB database as a design
+database and representation. OpenSTA is used for static timing analysis.
diff --git a/openroad/Makefile b/openroad/Makefile
new file mode 100644
index 0000000000..954ec91695
--- /dev/null
+++ b/openroad/Makefile
@@ -0,0 +1,87 @@
+# $NetBSD$
+PORTNAME=	openroad
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.0-11595
+DISTVERSIONSUFFIX=	-g31d7e3dc5
+PORTREVISION=	3
+PORTEPOCH=	1
+CATEGORIES=	cad
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+COMMENT=	ASIC physical design tool
+WWW=		https://theopenroadproject.org/
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BROKEN_i386=	C++ issue on i386, should be resolved in the next update
+.if !exists(/usr/include/omp.h)
+BROKEN=		requires OpenMP support that is missing on this architecture
+.endif
+
+BUILD_DEPENDS=	base64:converters/base64 \
+		bash:shells/bash \
+		boost-libs>0:devel/boost-libs \
+		coin-or-lemon>0:math/lemon \
+		gmake:devel/gmake \
+		swig:devel/swig
+DEPENDS=	libabsl_flags_parse.so:devel/abseil \
+		libCbc.so:math/cbc \
+		libCgl.so:math/cgl \
+		libClpSolver.so:math/clp \
+		libcoinasl.so:math/asl \
+		libcoinmumps.so:math/coin-or-mumps \
+		libCoinUtils.so:math/coinutils \
+		libcudd.so:math/cudd \
+		libfmt.so:devel/libfmt \
+		libnauty.so:math/nauty \
+		libopenblas.so:math/openblas \
+		libortools.so:math/or-tools \
+		libOsi.so:math/osi \
+		libprotobuf.so:devel/protobuf \
+		libre2.so:devel/re2 \
+		libspdlog.so:devel/spdlog
+
+USES=		bison compiler:c++17-lang cmake eigen:3 qt:5 \
+		localbase:ldflags pkgconfig python:build readline tcl:86 # the code asks for tcl-87, but build fails: https://github.com/The-OpenROAD-Project/OpenROAD/issues/508
+USE_QT=		core gui widgets buildtools:build qmake:build
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	The-OpenROAD-Project
+GH_PROJECT=	OpenROAD
+GH_TUPLE=	The-OpenROAD-Project:OpenSTA:42b994d:The_OpenROAD_Project_OpenSTA/src/sta \
+		The-OpenROAD-Project:abc:95b3543:abc/third-party/abc
+
+CMAKE_OFF=	BUILD_PYTHON \
+		ENABLE_TESTS
+CMAKE_ON=	BUILD_TCL
+CMAKE_ARGS=	-DFREEBSD_TCL_VER=${TCL_VER:S/.//} -DFREEBSD_TCL_INCLUDEDIR=${TCL_INCLUDEDIR}
+
+CXXFLAGS+=	-I${LOCALBASE}/include/eigen3 \
+		-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
+
+BINARY_ALIAS=	python3=${PYTHON_CMD} tclsh=${TCLSH} make=${GMAKE}
+
+PLIST_FILES=	bin/openroad \
+		bin/sta
+
+PORTSCOUT=	limit:^[0-9]\. # prevent 2021_*
+
+post-patch: # override the TCL version to be the same as USES=tcl sets
+	@${FIND} ${WRKSRC} -name FindTCL.cmake \
+		| ${XARGS} ${REINPLACE_CMD} -e ' \
+			s|set(TCL_POSSIBLE_NAMES |set(TCL_POSSIBLE_NAMES tcl$${FREEBSD_TCL_VER} |; \
+			s|PATHS $${TCL_LIB_PARENT1}|PATHS $${FREEBSD_TCL_INCLUDEDIR} $${TCL_LIB_PARENT1}|'
+
+post-install: # unnecessarily installs bundled OpenSTA project: https://github.com/The-OpenROAD-Project/OpenROAD/issues/597
+	${RM} -r ${STAGEDIR}${PREFIX}/include/sta ${STAGEDIR}${PREFIX}/lib/libOpenSTA.a
+
+do-test: # some tests are known to fail
+	@${MKDIR} ${WRKSRC}/build/src
+	@[ -f ${WRKSRC}/build/src/openroad ] || ${LN} ${STAGEDIR}${PREFIX}/bin/openroad ${WRKSRC}/build/src/openroad
+	@${ECHO} "==> Unit tests"
+	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} test/regression
+	@${ECHO} "==> Flow tests"
+	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} test/regression flow
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/openroad/TODO b/openroad/TODO
new file mode 100644
index 0000000000..ca66ae1c5c
--- /dev/null
+++ b/openroad/TODO
@@ -0,0 +1,6 @@
+wip/openroad projects : invite volunteers
+
+This has just been imported from FreeBSD ports using ports2pkg, though a lot of
+work is needed in adopting it
+
+Please email suggestions to pkgsrc mailing list
diff --git a/openroad/distinfo b/openroad/distinfo
new file mode 100644
index 0000000000..2d2cf7b9f8
--- /dev/null
+++ b/openroad/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+TIMESTAMP = 1703799603
+SHA256 (The-OpenROAD-Project-OpenROAD-v2.0-11595-g31d7e3dc5_GH0.tar.gz) = c2a16cb6fd6cbaf1378277eb2073f2f8471e42066f18ad81e769412d400f5b44
+SIZE (The-OpenROAD-Project-OpenROAD-v2.0-11595-g31d7e3dc5_GH0.tar.gz) = 319926448
+SHA256 (The-OpenROAD-Project-OpenSTA-42b994d_GH0.tar.gz) = 513875cc7efd01f79a9931f00d9a202d1d91863ea820cee3aaabca4c86b6db0a
+SIZE (The-OpenROAD-Project-OpenSTA-42b994d_GH0.tar.gz) = 7518125
+SHA256 (The-OpenROAD-Project-abc-95b3543_GH0.tar.gz) = 135fb146204124d879606f9f22ec1f598fc40c5da0a0067c1d5061a0e5e283eb
+SIZE (The-OpenROAD-Project-abc-95b3543_GH0.tar.gz) = 6020695
diff --git a/openroad/patches/patch-CMakeLists.txt b/openroad/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..b591ee4198
--- /dev/null
+++ b/openroad/patches/patch-CMakeLists.txt
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig	2022-02-09 14:58:23 UTC
++++ CMakeLists.txt
+@@ -45,6 +45,9 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.10)
+ cmake_policy(SET CMP0071 NEW)
+ endif()
+ 
++# Fix with FMT >= 9 - see https://github.com/The-OpenROAD-Project/OpenROAD/issues/2386
++add_compile_definitions(FMT_DEPRECATED_OSTREAM)
++
+ # Interfers with Qt so off by default.
+ option(LINK_TIME_OPTIMIZATION "Flag to control link time optimization: off by default" OFF)
+ 
diff --git a/openroad/patches/patch-src_odb_include_odb_dbTypes.h b/openroad/patches/patch-src_odb_include_odb_dbTypes.h
new file mode 100644
index 0000000000..da4d433d50
--- /dev/null
+++ b/openroad/patches/patch-src_odb_include_odb_dbTypes.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/odb/include/odb/dbTypes.h.orig	2022-02-10 04:05:30 UTC
++++ src/odb/include/odb/dbTypes.h
+@@ -34,6 +34,8 @@
+ 
+ #include "odb.h"
+ 
++#include <sys/types.h> // int8_t
++
+ namespace odb {
+ 
+ ///
diff --git a/openroad/patches/patch-src_stt_src_flt_etc_MakeDatVar.tcl b/openroad/patches/patch-src_stt_src_flt_etc_MakeDatVar.tcl
new file mode 100644
index 0000000000..408fa9de05
--- /dev/null
+++ b/openroad/patches/patch-src_stt_src_flt_etc_MakeDatVar.tcl
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/stt/src/flt/etc/MakeDatVar.tcl.orig	2022-02-10 04:38:37 UTC
++++ src/stt/src/flt/etc/MakeDatVar.tcl
+@@ -32,7 +32,7 @@ close $var_stream
+ set b64_file "[file rootname $dat_file].b64"
+ set b64_file2 "[file rootname $dat_file].tr"
+ 
+-exec base64 -i $dat_file > $b64_file
++exec base64 $dat_file > $b64_file
+ # strip trailing \n from base64 file
+ exec tr -d "\n" <$b64_file >$b64_file2
+ exec cat < $b64_file2 >> $var_file
diff --git a/openroad/patches/patch-swig-tcl86 b/openroad/patches/patch-swig-tcl86
new file mode 100644
index 0000000000..88c22723f8
--- /dev/null
+++ b/openroad/patches/patch-swig-tcl86
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Reference:	https://github.com/swig/swig/issues/2887
+		https://github.com/swig/swig/commit/b91ffa5631eb049293d3478744606148c9726521
+
+--- src/gui/src/tclCmdInputWidget.h.orig	2023-12-27 07:04:34 UTC
++++ src/gui/src/tclCmdInputWidget.h
+@@ -47,6 +47,12 @@
+ 
+ #include "cmdInputWidget.h"
+ #include "tclCmdHighlighter.h"
++
++#include <tcl.h>
++#ifndef TCL_SIZE_MAX
++typedef int Tcl_Size;
++#endif
++
+ #include "tclSwig.h"  // generated header
+ 
+ namespace gui {


Home | Main Index | Thread Index | Old Index