diff --git a/dev-util/cppcheck/cppcheck-1.84.recipe b/dev-util/cppcheck/cppcheck-1.84.recipe deleted file mode 100644 index 0fd30bb6f..000000000 --- a/dev-util/cppcheck/cppcheck-1.84.recipe +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY="A static analysis tool for C/C++ code" -DESCRIPTION="Cppcheck 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). - -Features: -* Unique code analysis that detect various kinds of bugs in your code. -* Both command line interface and graphical user interface are available. -* Cppcheck has a strong focus on detecting undefined behaviour." -HOMEPAGE="http://cppcheck.sourceforge.net/" -COPYRIGHT="2007-2018 Cppcheck team" -LICENSE="GNU GPL v3" -REVISION="2" -SOURCE_URI="https://github.com/danmar/cppcheck/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="aaa6293d91505fc6caa6982ca3cd2d949fa1aac603cabad072b705fdda017fc5" -SOURCE_FILENAME="cppcheck-$portVersion.tar.gz" -PATCHES="cppcheck-$portVersion.patchset" - -ARCHITECTURES="!x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - cppcheck$secondaryArchSuffix = $portVersion - cmd:cppcheck$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libpcre$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libpcre$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - cmd:pkg_config$secondaryArchSuffix - " - -defineDebugInfoPackage cppcheck$secondaryArchSuffix \ - $binDir/cppcheck - -BUILD() -{ - mkdir -p build - cd build - cmake .. \ - -DUSE_CLANG=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTS=ON \ - -DHAVE_RULES=ON \ - -DCFGDIR=$settingsDir/cppcheck \ - $cmakeDirArgs - - make $jobArgs -} - -INSTALL() -{ - cd build - make install -} - -TEST() -{ - cd build - make test -} diff --git a/dev-util/cppcheck/cppcheck-1.85.recipe b/dev-util/cppcheck/cppcheck-1.87.recipe similarity index 95% rename from dev-util/cppcheck/cppcheck-1.85.recipe rename to dev-util/cppcheck/cppcheck-1.87.recipe index 0e70749d6..f4c2c0bcf 100644 --- a/dev-util/cppcheck/cppcheck-1.85.recipe +++ b/dev-util/cppcheck/cppcheck-1.87.recipe @@ -12,7 +12,7 @@ COPYRIGHT="2007-2018 Cppcheck team" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/danmar/cppcheck/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="dc17ecf2f6bacbee32141fe7713747de9026bbb36207bfad2d73a5185c6b14a3" +CHECKSUM_SHA256="ea7ac1cd2f5c00ecffd596fd0f7281cba44308e565a634fae02b77ecd927c153" SOURCE_FILENAME="cppcheck-$portVersion.tar.gz" PATCHES="cppcheck-$portVersion.patchset" diff --git a/dev-util/cppcheck/patches/cppcheck-1.84.patchset b/dev-util/cppcheck/patches/cppcheck-1.84.patchset deleted file mode 100644 index 05dc7a14a..000000000 --- a/dev-util/cppcheck/patches/cppcheck-1.84.patchset +++ /dev/null @@ -1,101 +0,0 @@ -From dbfa760b6cf29de363428cae6cb62db89fb49a4e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Thu, 5 Apr 2018 17:55:26 +0200 -Subject: Haiku patches - - -diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp -index 8da7086..f259391 100644 ---- a/cli/cppcheckexecutor.cpp -+++ b/cli/cppcheckexecutor.cpp -@@ -52,7 +52,7 @@ - # include - - # undef _XOPEN_SOURCE --#elif !defined(__OpenBSD__) -+#elif !defined(__OpenBSD__) && !defined(__HAIKU__) - # include - #endif - #ifdef __linux__ -diff --git a/cli/filelister.cpp b/cli/filelister.cpp -index 52a9400..7e51de4 100644 ---- a/cli/filelister.cpp -+++ b/cli/filelister.cpp -@@ -204,6 +204,7 @@ static void addFiles2(std::map &files, - - new_path = path + '/' + dir_result->d_name; - -+#ifndef __HAIKU__ - if (dir_result->d_type == DT_DIR || (dir_result->d_type == DT_UNKNOWN && FileLister::isDirectory(new_path))) { - if (recursive && !ignored.match(new_path)) { - addFiles2(files, new_path, extra, recursive, ignored); -@@ -213,6 +214,7 @@ static void addFiles2(std::map &files, - files[new_path] = file_stat.st_size; - } - } -+#endif - } - closedir(dir); - } else -diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp -index f0534d5..028a28f 100644 ---- a/cli/threadexecutor.cpp -+++ b/cli/threadexecutor.cpp -@@ -143,7 +143,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result) - - bool ThreadExecutor::checkLoadAverage(size_t nchildren) - { --#if defined(__CYGWIN__) || defined(__QNX__) // getloadavg() is unsupported on Cygwin, Qnx. -+#if defined(__CYGWIN__) || defined(__QNX__) || defined(__HAIKU__) // getloadavg() is unsupported on Cygwin, Qnx, Haiku. - return true; - #else - if (!nchildren || !_settings.loadAverage) { -diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake -index 8f6e957..17b3d1c 100644 ---- a/cmake/compileroptions.cmake -+++ b/cmake/compileroptions.cmake -@@ -5,9 +5,13 @@ set(EXTRA_C_FLAGS_DEBUG "-DDEBUG -O0") - if (USE_CLANG) - set (CMAKE_C_COMPILER_ID "Clang") - set (CMAKE_CXX_COMPILER_ID "Clang") -- set (CMAKE_C_COMPILER "/usr/bin/clang") -- set (CMAKE_CXX_COMPILER "/usr/bin/clang++") -- -+ if (NOT HAIKU) -+ set (CMAKE_C_COMPILER "/usr/bin/clang") -+ set (CMAKE_CXX_COMPILER "/usr/bin/clang++") -+ else (NOT HAIKU) -+ set (CMAKE_C_COMPILER "/bin/clang") -+ set (CMAKE_CXX_COMPILER "/bin/clang++") -+ endif (NOT HAIKU) - set (CMAKE_C_FLAGS "-std=c99") - set (CMAKE_C_FLAGS_DEBUG "-g") - set (CMAKE_C_FLAGS_RELEASE "-O2") --- -2.16.4 - - -From 7d641cef19798b763ed81c9a844bc2bca6f93345 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Wed, 15 Aug 2018 20:23:10 +0200 -Subject: Data Path - - -diff --git a/cmake/compilerDefinitions.cmake b/cmake/compilerDefinitions.cmake -index 7179c68..992a2bb 100644 ---- a/cmake/compilerDefinitions.cmake -+++ b/cmake/compilerDefinitions.cmake -@@ -5,5 +5,9 @@ if (UNIX) - if (HAVE_RULES) - add_definitions(-DHAVE_RULES -DTIXML_USE_STL) - endif() -- add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}") -+ if (NOT HAIKU) -+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}") -+ else() -+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/data/${PROJECT_NAME}") -+ endif() - endif() --- -2.16.4 - diff --git a/dev-util/cppcheck/patches/cppcheck-1.85.patchset b/dev-util/cppcheck/patches/cppcheck-1.87.patchset similarity index 52% rename from dev-util/cppcheck/patches/cppcheck-1.85.patchset rename to dev-util/cppcheck/patches/cppcheck-1.87.patchset index 545b574cd..71edf0c89 100644 --- a/dev-util/cppcheck/patches/cppcheck-1.85.patchset +++ b/dev-util/cppcheck/patches/cppcheck-1.87.patchset @@ -1,11 +1,11 @@ -From b4973d8327b89e44c43fc696f5454821c0a665f6 Mon Sep 17 00:00:00 2001 +From 4a9dcbc50d09bf6d186f28e1b0cb2febd8d60491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Thu, 5 Apr 2018 17:55:26 +0200 Subject: Haiku patches diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp -index 8da7086..f259391 100644 +index 82cc960..ded5fe0 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -52,7 +52,7 @@ @@ -17,26 +17,6 @@ index 8da7086..f259391 100644 # include #endif #ifdef __linux__ -diff --git a/cli/filelister.cpp b/cli/filelister.cpp -index 52a9400..7e51de4 100644 ---- a/cli/filelister.cpp -+++ b/cli/filelister.cpp -@@ -204,6 +204,7 @@ static void addFiles2(std::map &files, - - new_path = path + '/' + dir_result->d_name; - -+#ifndef __HAIKU__ - if (dir_result->d_type == DT_DIR || (dir_result->d_type == DT_UNKNOWN && FileLister::isDirectory(new_path))) { - if (recursive && !ignored.match(new_path)) { - addFiles2(files, new_path, extra, recursive, ignored); -@@ -213,6 +214,7 @@ static void addFiles2(std::map &files, - files[new_path] = file_stat.st_size; - } - } -+#endif - } - closedir(dir); - } else diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index f0534d5..028a28f 100644 --- a/cli/threadexecutor.cpp @@ -51,7 +31,7 @@ index f0534d5..028a28f 100644 #else if (!nchildren || !_settings.loadAverage) { diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake -index ef41288..8c74b42 100644 +index 545e6be..695853d 100644 --- a/cmake/compileroptions.cmake +++ b/cmake/compileroptions.cmake @@ -5,9 +5,13 @@ set(EXTRA_C_FLAGS_DEBUG "-DDEBUG") @@ -72,30 +52,30 @@ index ef41288..8c74b42 100644 set (CMAKE_C_FLAGS_DEBUG "-g") set (CMAKE_C_FLAGS_RELEASE "-O2") -- -2.16.2 +2.19.1 -From 7d641cef19798b763ed81c9a844bc2bca6f93345 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Wed, 15 Aug 2018 20:23:10 +0200 -Subject: Data Path +From df6b2a1c46a76891bffbcbe3f0721e60fc811334 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 22 Mar 2019 21:30:17 +0100 +Subject: Use data instead of shared on haiku. -diff --git a/cmake/compilerDefinitions.cmake b/cmake/compilerDefinitions.cmake -index 7179c68..992a2bb 100644 ---- a/cmake/compilerDefinitions.cmake -+++ b/cmake/compilerDefinitions.cmake -@@ -5,5 +5,9 @@ if (UNIX) - if (HAVE_RULES) - add_definitions(-DHAVE_RULES -DTIXML_USE_STL) - endif() -- add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}") -+ if (NOT HAIKU) -+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}") -+ else() -+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/data/${PROJECT_NAME}") -+ endif() - endif() +diff --git a/cmake/options.cmake b/cmake/options.cmake +index 3c96ca8..803cd07 100644 +--- a/cmake/options.cmake ++++ b/cmake/options.cmake +@@ -47,5 +47,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + +-set(CFGDIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME} CACHE STRING "CFG files directory") +- ++if (NOT HAIKU) ++ set(CFGDIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME} CACHE STRING "CFG files directory") ++else() ++ set(CFGDIR ${CMAKE_INSTALL_PREFIX}/data/${PROJECT_NAME} CACHE STRING "CFG files directory") ++endif() -- -2.16.4 +2.19.1