diff --git a/.gitignore b/.gitignore index a411ae2..797f485 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /smoldyn-2.58.zip /smoldyn-2.61.zip +/smoldyn-2.63.zip diff --git a/smoldyn-fix_libpaths.patch b/smoldyn-fix_libpaths.patch index 22f5bca..3f4d155 100644 --- a/smoldyn-fix_libpaths.patch +++ b/smoldyn-fix_libpaths.patch @@ -1,92 +1,65 @@ --- CMakeLists.txt.fix_libpaths 2018-09-18 23:33:59.000000000 +0200 +++ CMakeLists.txt 2019-02-03 19:25:01.064012276 +0100 -@@ -73,10 +73,7 @@ - source/lib/SFMT/SFMT.h - source/Smoldyn/smoldyn.h - source/Smoldyn/smoldynfuncs.h -- source/vcell/SimpleMesh.h -- source/vcell/SimpleValueProvider.h - source/NextSubVolume/nsvc.h -- source/vtk/vtkwrapper.h - ) +@@ -103,10 +103,7 @@ + ${CMAKE_SOURCE_DIR}/source/libSteve/SFMT/SFMT.h + ${CMAKE_SOURCE_DIR}/source/Smoldyn/smoldyn.h + ${CMAKE_SOURCE_DIR}/source/Smoldyn/smoldynfuncs.h +- ${CMAKE_SOURCE_DIR}/source/vcell/SimpleMesh.h +- ${CMAKE_SOURCE_DIR}/source/vcell/SimpleValueProvider.h + ${CMAKE_SOURCE_DIR}/source/NextSubVolume/nsvc.h +- ${CMAKE_SOURCE_DIR}/source/vtk/vtkwrapper.h + ) set(SRC_FILES -@@ -130,7 +127,7 @@ - set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE CXX ) - set_source_files_properties(${MAIN_FILES} PROPERTIES LANGUAGE CXX ) - --include_directories(source/lib source/Smoldyn source/vcell source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR}) -+include_directories(source/lib source/Smoldyn source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR}) - - - -@@ -141,8 +138,8 @@ - endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - - if(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX) -- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wno-deprecated-declarations") -- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -Wno-deprecated-declarations -DNDEBUG") -+ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -I/usr/include") -+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -DNDEBUG -I/usr/include") - endif(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX) - - if(NOT CMAKE_BUILD_TYPE) -@@ -193,7 +190,7 @@ - set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") - else() - set(NIX_BUILD 1) -- set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") -+ set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl") - endif() - - -@@ -348,7 +345,8 @@ - find_path(ZLIB_INCLUDE_DIRS zlib.h) - find_library(ZLIB_LIBRARIES libz.a) - else() -- include(FindZlib) -+ find_path(ZLIB_INCLUDE_DIRS zlib.h PATHS ${INCLUDE_INSTALL_DIR}) -+ find_library(ZLIB_LIBRARIES libz.so PATHS ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES) -@@ -406,7 +404,7 @@ - - list(APPEND SRC_FILES source/vtk/vtkwrapper.cpp) - list(APPEND HEADER_FILES source/vtk/vtkwrapper.h) -- add_definitions("-Wno-deprecated") -+ add_definitions(" ") - list(APPEND DEP_LIBS ${VTK_LIBRARIES}) - - endif(OPTION_VTK) -@@ -430,7 +428,7 @@ - endif() - - -- set(Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/NextSubVolume/boost_include) +@@ -213,7 +210,7 @@ + set(APPLE_BUILD ON) + message(STATUS "Compiling on an Apple computer") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -mmacosx-version-min=10.9") +- set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") ++ set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl") + elseif (WIN32) + set(WINDOWS_BUILD ON) + if(MSVC) +@@ -229,7 +226,7 @@ + else () + set(NIX_BUILD ON) + message(STATUS "Compiling on a Linux computer") +- set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") ++ set(BNG2_PATH "${PERL_VENDORLIB}/BioNetGen/BNG2.pl") + endif () + + message(STATUS "CMAKE_CXX_FLAGS variable: '${CMAKE_CXX_FLAGS}'") +@@ -397,7 +394,8 @@ + find_path(ZLIB_INCLUDE_DIRS zlib.h) + find_library(ZLIB_LIBRARIES libz.a) + else() +- include(FindZlib) ++ find_path(ZLIB_INCLUDE_DIRS zlib.h PATHS ${INCLUDE_INSTALL_DIR}) ++ find_library(ZLIB_LIBRARIES libz.so PATHS ${CMAKE_INSTALL_LIBDIR}) + endif() + + if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES) +@@ -479,7 +477,7 @@ + endif () + + +- set(Boost_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/source/NextSubVolume/boost_include) + set(Boost_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/boost) include_directories(SYSTEM ${Boost_INCLUDE_DIR}) - - list(APPEND SRC_FILES -@@ -457,7 +455,7 @@ - source/NextSubVolume/nsvc.h - ) - -- add_definitions("-Wno-deprecated") -+ add_definitions(" ") - endif(OPTION_NSV) - - ####### Option: Build with PDE ########## -@@ -489,9 +487,9 @@ - endif() - - if(OPTION_TARGET_LIBSMOLDYN) -- install(TARGETS smoldyn_shared LIBRARY DESTINATION lib) -- install(TARGETS smoldyn_static ARCHIVE DESTINATION lib) -- install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include) -+ install(TARGETS smoldyn_shared LIBRARY DESTINATION lib${LIB_SUFFIX}/smoldyn) -+ install(TARGETS smoldyn_static ARCHIVE DESTINATION lib${LIB_SUFFIX}/smoldyn) -+ install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include/smoldyn) - endif(OPTION_TARGET_LIBSMOLDYN) - - endif(NOT OPTION_MINGW) + message(STATUS "Boost headers found: '${Boost_INCLUDE_DIR}'") + +@@ -554,11 +545,9 @@ + endif() + + if (OPTION_TARGET_LIBSMOLDYN) +- install(TARGETS smoldyn_shared LIBRARY DESTINATION lib) +- install(TARGETS smoldyn_static ARCHIVE DESTINATION lib) +- install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h +- ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h +- DESTINATION include) ++ install(TARGETS smoldyn_shared LIBRARY DESTINATION lib${LIB_SUFFIX}/smoldyn) ++ install(TARGETS smoldyn_static ARCHIVE DESTINATION lib${LIB_SUFFIX}/smoldyn) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/source/Smoldyn/libsmoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include/smoldyn) + endif () + + endif () diff --git a/smoldyn-freeglut.patch b/smoldyn-freeglut.patch index fc17725..3290b5d 100644 --- a/smoldyn-freeglut.patch +++ b/smoldyn-freeglut.patch @@ -1,35 +1,20 @@ --- CMakeLists.txt~ 2019-09-19 11:56:56.000000000 -0500 +++ CMakeLists.txt 2019-09-19 12:00:30.716178022 -0500 -@@ -270,20 +270,20 @@ - #find_library(GLUT_LIBRARIES NAMES libglut) - endif() +@@ -326,15 +326,8 @@ + set(GLUT_FOUND TRUE) + endif () -- if(GLUT_FOUND) -- set(GLUT_FOUND TRUE) -- message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") -- elseif(GLUT_INCLUDE_DIR AND GLUT_LIBRARIES) -- set(GLUT_FOUND TRUE) -- message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") -- else() -- set(GLUT_FOUND FALSE) -- message(FATAL_ERROR "Glut not found. Building without OpenGL is possible.") -- endif() -+# if(GLUT_FOUND) -+# set(GLUT_FOUND TRUE) -+# message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") -+# elseif(GLUT_INCLUDE_DIR AND GLUT_LIBRARIES) -+# set(GLUT_FOUND TRUE) -+# message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") -+# else() -+# set(GLUT_FOUND FALSE) -+# message(FATAL_ERROR "Glut not found. Building without OpenGL is possible.") -+# endif() - - set(HAVE_OPENGL TRUE) -- include_directories(${GLUT_INCLUDE_DIR}) -- list(APPEND DEP_LIBS ${GLUT_LIBRARIES}) -+ include_directories(/usr/include/GL) -+ list(APPEND DEP_LIBS -lglut) +- if(GLUT_FOUND) +- message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") +- else() +- message(STATUS "Glut include and library variables: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'") +- message(FATAL_ERROR "Glut not found. Building without OpenGL is possible.") +- endif() +- +- include_directories(${GLUT_INCLUDE_DIR}) +- list(APPEND DEP_LIBS ${GLUT_LIBRARIES}) ++ include_directories(/usr/include/GL) ++ list(APPEND DEP_LIBS -lglut) endif() diff --git a/smoldyn-use_boost169.patch b/smoldyn-use_boost169.patch deleted file mode 100644 index a342a25..0000000 --- a/smoldyn-use_boost169.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- CMakeLists.orig.txt 2020-05-25 11:24:42.754220000 +0200 -+++ CMakeLists.txt 2020-05-25 11:25:53.945372024 +0200 -@@ -430,3 +430,3 @@ - -- set(Boost_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/boost) -+ set(Boost_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/boost169/boost ${INCLUDE_INSTALL_DIR}/boost169) - include_directories(SYSTEM ${Boost_INCLUDE_DIR}) diff --git a/smoldyn.spec b/smoldyn.spec index b9e5925..6a139dd 100644 --- a/smoldyn.spec +++ b/smoldyn.spec @@ -1,23 +1,15 @@ -%global __cmake_in_source_build 1 - # Smoldyn provides the SFMT-1.3.3 (SIMD-oriented Fast Mersenne Twister) source code; # currently unavailable on Fedora. # http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html -%global with_libs 0 - # VTK support? # See https://github.com/ssandrews/Smoldyn-official/issues/3 %global with_vtk 0 -%if 0%{?rhel} && 0%{?rhel} == 7 -%global dts devtoolset-8- -%endif - Name: smoldyn Summary: A particle-based spatial stochastic simulator -Version: 2.61 -Release: 6%{?dist} +Version: 2.63 +Release: 1%{?dist} # The rxnparam.c and SurfaceParam.c source code files are in the public domain. # @@ -27,7 +19,7 @@ Release: 6%{?dist} # The rest of the code is Copyright 2003-2018 by Steven Andrews and also # distributed under the Gnu LGPL. # -# source/lib/SFMT is licensed under the 'BSD 3-clause "New" or "Revised" License' +# source/libSteve/SFMT is licensed under the 'BSD 3-clause "New" or "Revised" License' License: LGPLv3+ and Public Domain and BSD URL: http://www.smoldyn.org Source0: %{url}/%{name}-%{version}.zip @@ -36,32 +28,24 @@ Source0: %{url}/%{name}-%{version}.zip Patch0: %{name}-fix_libpaths.patch Patch1: %{name}-freeglut.patch -Patch2: %{name}-use_boost169.patch - BuildRequires: make BuildRequires: cmake3 BuildRequires: gcc -BuildRequires: %{?dts}gcc-c++ -%if 0%{?rhel} && 0%{?rhel} == 7 -BuildRequires: %{?dts}toolchain, %{?dts}libatomic-devel -BuildRequires: boost169-devel -%endif -%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: gcc-c++ BuildRequires: boost-devel -%endif BuildRequires: freeglut-devel BuildRequires: libXmu-devel BuildRequires: libXi-devel BuildRequires: libtiff-devel BuildRequires: libglvnd-devel BuildRequires: perl-macros +BuildRequires: python3-devel %if %{?with_vtk} BuildRequires: vtk-devel %endif BuildRequires: zlib-devel Requires: bionetgen-perl - Provides: bundled(SFMT) = 1.3.3 %description @@ -75,19 +59,10 @@ Simulated molecules diffuse, react, are confined by surfaces, and bind to membranes much as they would in a real biological system. It is more accurate and faster than other particle-based simulators. -Smoldyn's unique features include: a "virtual experimenter" who can +Smoldyn unique features include: a "virtual experimenter" who can manipulate or measure the simulated system, support for spatial compartments, molecules with excluded volume, and simulations in 1, 2, or 3 dimensions. -%if %{?with_libs} -%package devel -Summary: %{name} devel files -Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{name}-static = %{version}-%{release} -%description devel -This package provides the %{name} examples, header files and private libraries. -%endif - %package doc Summary: %{name} PDF documentation Requires: %{name} = %{version}-%{release} @@ -98,19 +73,10 @@ BuildArch: noarch %prep %autosetup -n %{name}-%{version} -N %patch0 -p0 -b .fix_libpaths -%if 0%{?fedora} %patch1 -p0 -b .freeglut -%endif -%if 0%{?rhel} && 0%{?rhel} == 7 -%patch2 -p0 -b .use_boost169 -%endif - -# Copy license file -mv source/lib/SFMT/LICENSE.txt source/lib/SFMT/SFMT-LICENSE.txt -mv source/lib/SFMT/README.txt source/lib/SFMT/SFMT-README.txt -# Remove pre-built archives -rm -rf Linux +# Remove bundled archives +rm -rf source/MSVClibs source/pybind11 # Remove bundled libraries rm -rf source/BioNetGen source/MinGWlibs Toolchain-mingw32.cmake @@ -133,13 +99,20 @@ sed -e 's|../../../source/BioNetGen/BNG2.pl|%{perl_vendorlib}/BioNetGen/BNG2.pl| examples/S12_bionetgen/abba/abbasim.txt \ examples/S94_archive/Andrews_2016/BioNetGen/lrm/lrmsim.txt \ examples/S94_archive/Andrews_2016/BioNetGen/abba/abbasim.txt + +# Copy license file +cp -p source/libSteve/SFMT/LICENSE.txt source/libSteve/SFMT/SFMT-LICENSE.txt +cp -p source/libSteve/SFMT/README.txt source/libSteve/SFMT/SFMT-README.txt + +# These files are currently not used +rm -f examples/CMakeLists.txt +rm -rf examples/S15_python +rm -rf examples/S97_libsmoldyn +chmod 0644 examples/* %build -mkdir -p build && pushd build -%if 0%{?rhel} && 0%{?rhel} == 7 -. /opt/rh/devtoolset-8/enable -%endif -%cmake3 -Wno-dev \ +# Python binding needs shared libraries +%cmake3 -Wno-dev -B . -S . \ -DCPACK_BINARY_STGZ:BOOL=OFF \ -DCPACK_BINARY_TGZ:BOOL=OFF \ -DCPACK_BINARY_TZ:BOOL=OFF \ @@ -153,11 +126,11 @@ mkdir -p build && pushd build %else -DOPTION_VTK:BOOL=OFF \ %endif -%if %{?with_libs} - -DOPTION_TARGET_LIBSMOLDYN:BOOL=ON \ -%else + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DSMOLDYN_VERSION:STRING=%{version} \ -DOPTION_TARGET_LIBSMOLDYN:BOOL=OFF \ -%endif + -DOPTION_STATIC:BOOL=OFF \ + -DOPTION_PYTHON:BOOL=OFF -DPYBIND11_FINDPYTHON:BOOL=OFF \ -DOPTION_USE_ZLIB:BOOL=ON \ -DOPTION_PDE:BOOL=ON \ -DPERL_VENDORLIB:PATH=%{perl_vendorlib} \ @@ -165,29 +138,23 @@ mkdir -p build && pushd build -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -DCMAKE_COLOR_MAKEFILE:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES \ - -DHAVE_GL_FREEGLUT_H=TRUE .. -%make_build V=1 -popd + -DHAVE_GL_FREEGLUT_H=TRUE +%make_build %install -%make_install -C build +%make_install %files -%doc source/lib/SFMT/SFMT-README.txt -%license License.txt source/lib/SFMT/SFMT-LICENSE.txt +%license License.txt source/libSteve/SFMT/SFMT-LICENSE.txt %{_bindir}/%{name} -%if %{?with_libs} -%files devel -%doc examples -%{_includedir}/%{name}/ -%{_libdir}/%{name}/ -%endif - %files doc -%doc documentation/* +%doc documentation/* examples %changelog +* Fri Jan 29 2021 Antonio Trande - 2.63-1 +- Release 2.63 + * Wed Jan 27 2021 Fedora Release Engineering - 2.61-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 2001beb..c1894c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (smoldyn-2.61.zip) = 4beaa82a0b915db2c990ea2a75f3903f7e230400b331328112d19866d2d8e7a49cc48c9abe2bb20761dd733afe0b4e1643a9ced7eddd68d9957517ce0e1e7a78 +SHA512 (smoldyn-2.63.zip) = 289f80e891b3bea5ab7175c410814750ce1bf4f949a73c17a46e7be36ec43cb19d632ee0cc94367003dabe2b760c9badf61db613ced732d7f7e7724f9b50d24c