diff --git a/programming/library/z3/actions.py b/programming/library/z3/actions.py new file mode 100644 index 0000000000..47f8bb58ed --- /dev/null +++ b/programming/library/z3/actions.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file https://www.gnu.org/licenses/gpl-3.0.txt + +from pisi.actionsapi import shelltools +from pisi.actionsapi import cmaketools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +j = "-DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DPYTHON_EXECUTABLE=/usr/bin/python3 \ + -DZ3_USE_LIB_GMP=True \ + -DZ3_LINK_TIME_OPTIMIZATION=True \ + -DZ3_BUILD_LIBZ3_SHARED=True \ + -DZ3_BUILD_PYTHON_BINDINGS=True \ + -DZ3_INSTALL_PYTHON_BINDINGS=True \ + " + +shelltools.export("PYTHON", "/usr/bin/python3") + +def setup(): + shelltools.makedirs("build") + shelltools.cd("build") + cmaketools.configure("%s -G 'Ninja'" % j, sourceDir = '..') + +def build(): + shelltools.system("ninja -C build") + +def install(): + shelltools.system("DESTDIR=%s ninja -C build install" % get.installDIR()) + + pisitools.dodoc("LICENSE.txt", "README*", "RELEASE_NOTES") + diff --git a/programming/library/z3/pspec.xml b/programming/library/z3/pspec.xml new file mode 100644 index 0000000000..f301ef0754 --- /dev/null +++ b/programming/library/z3/pspec.xml @@ -0,0 +1,74 @@ + + + + + z3 + https://github.com/Z3Prover/z3 + + fury + wascheme@tuta.io + + MIT + library + programming.library + The Z3 Theorem Prover. + Z3 is a theorem prover from Microsoft Research. + + https://github.com/Z3Prover/z3/archive/z3-4.8.9.tar.gz + + + cmake + ninja + python3 + gmp-devel + python3-setuptools + + + + + z3 + + gmp + libgcc + python3 + + + /usr/bin + /usr/lib + /usr/share/doc + + + + + python3-z3 + programming.language.python3 + + z3 + python3 + + + /usr/lib/python* + + + + + z3-devel + + z3 + + + /usr/include + + + + + + 2020-10-08 + 4.8.9 + First build. + fury + wascheme@tuta.io + + + + diff --git a/programming/tool/cppcheck/actions.py b/programming/tool/cppcheck/actions.py index 342f16af11..fa87526ea6 100644 --- a/programming/tool/cppcheck/actions.py +++ b/programming/tool/cppcheck/actions.py @@ -9,27 +9,32 @@ from pisi.actionsapi import cmaketools from pisi.actionsapi import pisitools from pisi.actionsapi import get -j = "-DHAVE_RULES=ON \ +j = "-DUSE_Z3=ON \ + -DHAVE_RULES=ON \ -DBUILD_GUI=ON \ - -DWITH_QCHART=ON \ - -DENABLE_CHECK_INTERNAL=ON -L \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTS=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF \ + -DENABLE_CHECK_INTERNAL=ON \ + -DWITH_QCHART=ON -L \ " def setup(): shelltools.makedirs("build") shelltools.cd("build") - cmaketools.configure("-DUSE_Z3=OFF -DBUILD_TESTS=OFF %s" % j, sourceDir = '..') + cmaketools.configure(j, sourceDir = '..') def build(): shelltools.cd("build") cmaketools.make() -#def check(): -# cmaketools.make("test") +def check(): + pass def install(): shelltools.cd("build") cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) - pisitools.dodoc("../AUTHORS", "../COPYING", "../readme*") + pisitools.dodoc("../AUTHORS", "../COPYING", "philosophy.md", "../readme.md") diff --git a/programming/tool/cppcheck/files/htmlreport_py3.patch b/programming/tool/cppcheck/files/htmlreport_py3.patch new file mode 100644 index 0000000000..771aff78fb --- /dev/null +++ b/programming/tool/cppcheck/files/htmlreport_py3.patch @@ -0,0 +1,30 @@ +diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport +index 97a3af50d..b45cebf31 100755 +--- a/htmlreport/cppcheck-htmlreport ++++ b/htmlreport/cppcheck-htmlreport +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from __future__ import unicode_literals + +diff --git a/htmlreport/setup.py b/htmlreport/setup.py +index e741ece55..ac790fbeb 100755 +--- a/htmlreport/setup.py ++++ b/htmlreport/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from setuptools import setup + +diff --git a/htmlreport/test_htmlreport.py b/htmlreport/test_htmlreport.py +index 6553f625e..b3aef10e4 100755 +--- a/htmlreport/test_htmlreport.py ++++ b/htmlreport/test_htmlreport.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + """Test cppcheck-htmlreport.""" + + import os diff --git a/programming/tool/cppcheck/files/qm_install_path.patch b/programming/tool/cppcheck/files/qm_install_path.patch index b43d82cafe..c34adb9dbe 100644 --- a/programming/tool/cppcheck/files/qm_install_path.patch +++ b/programming/tool/cppcheck/files/qm_install_path.patch @@ -1,6 +1,8 @@ ---- a/gui/CMakeLists.txt 2020-05-10 12:31:19.000000000 +0300 -+++ b/gui/CMakeLists.txt 2020-05-28 16:22:24.704402614 +0300 -@@ -37,7 +37,7 @@ +diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt +index 9cd93a21f..d07094a00 100644 +--- a/gui/CMakeLists.txt ++++ b/gui/CMakeLists.txt +@@ -40,7 +40,7 @@ if (BUILD_GUI) endif() install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) @@ -9,11 +11,13 @@ install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) ---- a/gui/translationhandler.cpp 2020-05-28 16:29:27.334549404 +0300 -+++ b/gui/translationhandler.cpp 2020-05-28 16:27:15.183706532 +0300 -@@ -116,15 +116,16 @@ - if (datadir.isEmpty()) - datadir = appPath; +diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp +index d12fb7057..626f8641a 100644 +--- a/gui/translationhandler.cpp ++++ b/gui/translationhandler.cpp +@@ -113,15 +113,16 @@ bool TranslationHandler::setLanguage(const QString &code) + + QString datadir = getDataDir(); - QString translationFile; - if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm")) @@ -30,8 +34,8 @@ - else - translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm"; +// else -+// translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm"; -+ QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm"); ++// translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm"; ++ QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm"); if (!mTranslator->load(translationFile) && !failure) { //If it failed, lets check if the default file exists diff --git a/programming/tool/cppcheck/files/use_system_tinyxml.patch b/programming/tool/cppcheck/files/use_system_tinyxml.patch new file mode 100644 index 0000000000..9a92c215e4 --- /dev/null +++ b/programming/tool/cppcheck/files/use_system_tinyxml.patch @@ -0,0 +1,90 @@ +diff -up cppcheck-2.2/cli/CMakeLists.txt.orig cppcheck-2.2/cli/CMakeLists.txt +--- cppcheck-2.2/cli/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 ++++ cppcheck-2.2/cli/CMakeLists.txt 2020-10-04 06:47:29.867450500 +0200 +@@ -1,5 +1,4 @@ + include_directories(${PROJECT_SOURCE_DIR}/lib/) +-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) + include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/) + + file(GLOB hdrs "*.h") +@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp") + list(REMOVE_ITEM srcs ${mainfile}) + + add_library(cli_objs OBJECT ${hdrs} ${srcs}) +-add_executable(cppcheck ${hdrs} ${mainfile} $ $ $ $) ++add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) + if (HAVE_RULES) + target_link_libraries(cppcheck ${PCRE_LIBRARY}) + endif() +@@ -18,6 +17,7 @@ endif() + if (WIN32 AND NOT BORLAND) + target_link_libraries(cppcheck Shlwapi.lib) + endif() ++target_link_libraries(cppcheck tinyxml2) + + install(TARGETS cppcheck + RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} +diff -up cppcheck-2.2/CMakeLists.txt.orig cppcheck-2.2/CMakeLists.txt +--- cppcheck-2.2/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 ++++ cppcheck-2.2/CMakeLists.txt 2020-10-04 06:48:18.324566600 +0200 +@@ -23,7 +23,6 @@ if (BUILD_TESTS) + enable_testing() + endif() + +-add_subdirectory(externals/tinyxml) + add_subdirectory(externals/simplecpp) + add_subdirectory(lib) # CppCheck Library + add_subdirectory(cli) # Client application +diff -up cppcheck-2.2/gui/CMakeLists.txt.orig cppcheck-2.2/gui/CMakeLists.txt +--- cppcheck-2.2/gui/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 ++++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:36:13.199769100 +0200 +@@ -10,7 +10,6 @@ if (BUILD_GUI) + endif() + + include_directories(${PROJECT_SOURCE_DIR}/lib/) +- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) + + file(GLOB hdrs "*.h") + file(GLOB srcs "*.cpp") +@@ -20,14 +19,14 @@ if (BUILD_GUI) + QT5_ADD_RESOURCES(resources "gui.qrc") + QT5_ADD_TRANSLATION(qms ${tss}) + +- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) ++ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) + if (HAVE_RULES) + target_link_libraries(cppcheck-gui ${PCRE_LIBRARY}) + endif() + if (USE_Z3) + target_link_libraries(cppcheck-gui ${Z3_LIBRARIES}) + endif() +- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help) ++ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help) + if(WITH_QCHART) + target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART ) + target_link_libraries(cppcheck-gui Qt5::Charts) +diff -up cppcheck-2.2/test/CMakeLists.txt.orig cppcheck-2.2/test/CMakeLists.txt +--- cppcheck-2.2/test/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200 ++++ cppcheck-2.2/test/CMakeLists.txt 2020-10-04 06:55:33.660775300 +0200 +@@ -13,19 +13,19 @@ if (BUILD_TESTS) + add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90) + + include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/) +- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml) + include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/) + + file(GLOB hdrs "*.h") + file(GLOB srcs "*.cpp") + +- add_executable(testrunner ${hdrs} ${srcs} $ $ $ $) ++ add_executable(testrunner ${hdrs} ${srcs} $ $ $) + if (HAVE_RULES) + target_link_libraries(testrunner ${PCRE_LIBRARY}) + endif() + if (USE_Z3) + target_link_libraries(testrunner ${Z3_LIBRARIES}) + endif() ++ target_link_libraries(testrunner tinyxml2) + + if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) + target_precompile_headers(testrunner PRIVATE precompiled.h) diff --git a/programming/tool/cppcheck/pspec.xml b/programming/tool/cppcheck/pspec.xml index f8f40e45f9..ed795e5e94 100644 --- a/programming/tool/cppcheck/pspec.xml +++ b/programming/tool/cppcheck/pspec.xml @@ -16,32 +16,39 @@ Cppcheck is a static analysis tool for C/C++ code. It provides unique code analysis to detect bugs and focuses on detecting undefined behaviour and dangerous coding constructs. The goal is to detect only real errors in the code (i.e. have very few false positives). - - https://github.com/danmar/cppcheck/archive/2.1.tar.gz + + https://sourceforge.net/projects/cppcheck/files/cppcheck/2.2/cppcheck-2.2.tar.bz2 cmake python3 - + z3-devel zlib-devel + docbook-xsl qt5-linguist + libxslt-devel libpcre-devel + python3-devel qt5-base-devel tinyxml2-devel qt5-charts-devel + python3-setuptools + htmlreport_py3.patch qm_install_path.patch + use_system_tinyxml.patch cppcheck - + z3 libgcc libpcre python3 + tinyxml2 qt5-base qt5-charts python3-Pygments @@ -51,12 +58,19 @@ /usr/share /usr/share/Cppcheck /usr/share/Cppcheck/lang - + /usr/share/man /usr/share/doc + + 2020-10-06 + 2.2 + Ver. bump + fury + wascheme@tuta.io + 2020-06-27 2.1