%global pkgvers 0 %global scdate0 20241108 %global schash0 aa598a2f14c5c142e90391a69988523505e7db3d %global branch0 master %global source0 https://github.com/The-OpenROAD-Project/OpenSTA.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: opensta Version: 2.2.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Parallax Static Timing Analyzer License: GPLv3 URL: https://theopenroadproject.org BuildRequires: gcc-c++ cmake make flex bison swig BuildRequires: git zlib-devel tcl-devel cudd-devel eigen3-devel %ifarch ppc64le %if 0%{?rhel} >= 8 %global _lto_cflags %{nil} %endif %endif %global __cmake_in_source_build 1 %description OpenSTA is a gate level static timing verifier. As a stand-alone executable it can be used to verify the timing of a design using standard file formats. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel This package contains development files for %{name} %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller # gcc13 sed -i '1i #include ' power/Vcd.hh # no swig version sed -i -e 's|SWIG 3.0 REQUIRED|SWIG REQUIRED|' CMakeLists.txt # dest libs sed -i -e 's|DESTINATION lib)|DESTINATION %{_lib})|' CMakeLists.txt # soversion sed -i -e 's|OpenSTA PROPERTIES CXX|OpenSTA PROPERTIES VERSION 2.2 SOVERSION 2 CXX|' CMakeLists.txt # tcllib sed -i -e '/^set_target_properties(OpenSTA.*/a target_link_libraries(OpenSTA ${TCL_LIBRARY})' CMakeLists.txt # gitversion sed -i -e '/GetGit/d' CMakeLists.txt sed -i -e '/get_git/d' CMakeLists.txt %ifarch ppc64le %if 0%{?rhel} >= 8 sed -i -e '/Eigen3::Eigen/d' CMakeLists.txt sed -i -e 's|${CUDD_INCLUDE}|${CUDD_INCLUDE};/usr/include/eigen3|g' CMakeLists.txt %endif %endif %build mkdir build pushd build export LDFLAGS="-lcudd" export STA_GIT_SHA1=%{sshort0} %cmake .. \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DSTA_GIT_SHA1=%{sshort0} %cmake_build popd %check export LD_LIBRARY_PATH=%{buildroot}%{_libdir} pushd test %{buildroot}%{_bindir}/sta -exit regression.tcl popd pushd examples for t in $(ls *.tcl) do %{buildroot}%{_bindir}/sta -exit $t done popd %install pushd build %cmake_install popd mkdir -p %{buildroot}%{_datadir}/%{name}/etc mkdir -p %{buildroot}%{_datadir}/%{name}/tcl mkdir -p %{buildroot}%{_datadir}/%{name}/sdf mkdir -p %{buildroot}%{_datadir}/%{name}/dcalc mkdir -p %{buildroot}%{_datadir}/%{name}/power mkdir -p %{buildroot}%{_datadir}/%{name}/parasitics mkdir -p %{buildroot}%{_includedir}/power mkdir -p %{buildroot}%{_includedir}/sta/search install -m 0755 etc/* %{buildroot}%{_datadir}/%{name}/etc/ install -m 0644 tcl/* %{buildroot}%{_datadir}/%{name}/tcl/ install -m 0644 sdf/* %{buildroot}%{_datadir}/%{name}/sdf/ install -m 0644 dcalc/* %{buildroot}%{_datadir}/%{name}/dcalc/ install -m 0644 power/*{tcl,i} %{buildroot}%{_datadir}/%{name}/power/ install -m 0644 parasitics/* %{buildroot}%{_datadir}/%{name}/parasitics/ install -m 0644 power/*.hh %{buildroot}%{_includedir}/power install -m 0644 search/*.hh %{buildroot}%{_includedir}/sta/search/ %files %license LICENSE %doc README.md %doc doc examples %{_bindir}/* %{_libdir}/*.so.* %files devel %doc etc %{_datadir}/* %{_includedir}/* %{_libdir}/*.so %changelog * Sat Jul 25 2020 Cristian Balint - github upstream releases