From 706be4a92dbd89e132ee264b27a4f7e57c1f11f2 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Apr 11 2020 21:51:19 +0000 Subject: Update creduce to rev 21 via SR 793062 https://build.opensuse.org/request/show/793062 by user marxin + dimstar_suse - Add binary-search-location.patch in order to fix binary locations. - Update llvm9-libs-fix.patch to support cmake. - Add install-location.patch and build the spec file with cmake. - Remove BuildRequires of zlib-devel. --- diff --git a/packages/c/creduce/.files b/packages/c/creduce/.files index 1d93f89..e9930fe 100644 Binary files a/packages/c/creduce/.files and b/packages/c/creduce/.files differ diff --git a/packages/c/creduce/.rev b/packages/c/creduce/.rev index bb4b222..21e25e7 100644 --- a/packages/c/creduce/.rev +++ b/packages/c/creduce/.rev @@ -255,4 +255,17 @@ as a dependency. 742088 + + 6655169bd57f50181066e8b8900a25a6 + 2.10.0+git.20191010.8a67e69 + + dimstar_suse + - Add binary-search-location.patch in order to fix binary + locations. + + - Update llvm9-libs-fix.patch to support cmake. + - Add install-location.patch and build the spec file with cmake. + - Remove BuildRequires of zlib-devel. + 793062 + diff --git a/packages/c/creduce/.servicemark b/packages/c/creduce/.servicemark index 0394dda..da3b641 100644 --- a/packages/c/creduce/.servicemark +++ b/packages/c/creduce/.servicemark @@ -1 +1 @@ -aa6a724f73a9b5753856602f61b0ad18 +9f1f964667bd6d0079449bf211094bf1 diff --git a/packages/c/creduce/binary-search-location.patch b/packages/c/creduce/binary-search-location.patch new file mode 100644 index 0000000..411085f --- /dev/null +++ b/packages/c/creduce/binary-search-location.patch @@ -0,0 +1,157 @@ +diff --git a/creduce/creduce_config.pm.in b/creduce/creduce_config.pm.in +index 1e71112..4578b30 100644 +--- a/creduce/creduce_config.pm.in ++++ b/creduce/creduce_config.pm.in +@@ -32,6 +32,8 @@ use constant { + # External programs invoked. + # + CLANG_FORMAT => q{@CLANG_FORMAT@}, ++ UNIFDEF => q{@UNIFDEF@}, ++ TOPFORMFLAT => q{@TOPFORMFLAT@}, + }; + + our @EXPORT = qw(); +diff --git a/creduce/pass_clang.pm b/creduce/pass_clang.pm +index 3bd8314..3b8085b 100644 +--- a/creduce/pass_clang.pm ++++ b/creduce/pass_clang.pm +@@ -35,7 +35,7 @@ sub check_prereqs () { + if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { + # This script is in the installation directory. + # Use the installed `clang_delta'. +- $path = libexecdir . "/clang_delta"; ++ $path = $abs_bindir . "/clang_delta"; + } else { + # Assume that this script is in the C-Reduce build tree. + # Use the `clang_delta' that is also in the build tree. +diff --git a/creduce/pass_clang_binsrch.pm b/creduce/pass_clang_binsrch.pm +index 7470d51..b079214 100644 +--- a/creduce/pass_clang_binsrch.pm ++++ b/creduce/pass_clang_binsrch.pm +@@ -47,7 +47,7 @@ sub check_prereqs () { + if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { + # This script is in the installation directory. + # Use the installed `clang_delta'. +- $path = libexecdir . "/clang_delta"; ++ $path = $abs_bindir . "/clang_delta"; + } else { + # Assume that this script is in the C-Reduce build tree. + # Use the `clang_delta' that is also in the build tree. +diff --git a/creduce/pass_clex.pm b/creduce/pass_clex.pm +index 66707bf..29ea764 100644 +--- a/creduce/pass_clex.pm ++++ b/creduce/pass_clex.pm +@@ -35,7 +35,7 @@ sub check_prereqs () { + if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { + # This script is in the installation directory. + # Use the installed `clex'. +- $path = libexecdir . "/clex"; ++ $path = $abs_bindir . "/clex"; + } else { + # Assume that this script is in the C-Reduce build tree. + # Use the `clex' that is also in the build tree. +diff --git a/creduce/pass_ifs.pm b/creduce/pass_ifs.pm +index c8811a4..238f977 100644 +--- a/creduce/pass_ifs.pm ++++ b/creduce/pass_ifs.pm +@@ -25,28 +25,8 @@ my $unifdef; + my $options = "-B -x 2"; + + sub check_prereqs () { +- my $path; +- my $abs_bindir = abs_path(bindir); +- if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { +- # This script is in the installation directory. +- # Use the installed `unifdef'. +- $path = libexecdir . "/unifdef"; +- } else { +- # Assume that this script is in the C-Reduce build tree. +- # Use the `unifdef' that is also in the build tree. +- $path = "$FindBin::Bin/../unifdef/unifdef"; +- } +- if ((-e $path) && (-x $path)) { +- $unifdef = $path; +- return 1; +- } +- # Check Windows +- $path = $path . ".exe"; +- if (($^O eq "MSWin32") && (-e $path) && (-x $path)) { +- $unifdef = $path; +- return 1; +- } +- return 0; ++ $unifdef = find_external_program(creduce_config::UNIFDEF, "unifdef"); ++ return defined ($unifdef); + } + + sub count_ifs($$) { +diff --git a/creduce/pass_lines.pm b/creduce/pass_lines.pm +index 5166453..affa241 100644 +--- a/creduce/pass_lines.pm ++++ b/creduce/pass_lines.pm +@@ -24,28 +24,8 @@ use creduce_utils; + my $topformflat; + + sub check_prereqs () { +- my $path; +- my $abs_bindir = abs_path(bindir); +- if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { +- # This script is in the installation directory. +- # Use the installed `topformflat'. +- $path = libexecdir . "/topformflat"; +- } else { +- # Assume that this script is in the C-Reduce build tree. +- # Use the `topformflat' that is also in the build tree. +- $path = "$FindBin::Bin/../delta/topformflat"; +- } +- if ((-e $path) && (-x $path)) { +- $topformflat = $path; +- return 1; +- } +- # Check Windows +- $path = $path . ".exe"; +- if (($^O eq "MSWin32") && (-e $path) && (-x $path)) { +- $topformflat = $path; +- return 1; +- } +- return 0; ++ $topformflat = find_external_program(creduce_config::TOPFORMFLAT, "topformflat"); ++ return defined ($topformflat); + } + + # unlike the previous version of pass_lines, this one always +diff --git a/creduce/pass_unifdef.pm b/creduce/pass_unifdef.pm +index 34c6d52..d0df854 100644 +--- a/creduce/pass_unifdef.pm ++++ b/creduce/pass_unifdef.pm +@@ -24,28 +24,8 @@ my $unifdef; + my $options = "-B -x 2"; + + sub check_prereqs () { +- my $path; +- my $abs_bindir = abs_path(bindir); +- if ((defined $abs_bindir) && ($FindBin::RealBin eq $abs_bindir)) { +- # This script is in the installation directory. +- # Use the installed `unifdef'. +- $path = libexecdir . "/unifdef"; +- } else { +- # Assume that this script is in the C-Reduce build tree. +- # Use the `unifdef' that is also in the build tree. +- $path = "$FindBin::Bin/../unifdef/unifdef"; +- } +- if ((-e $path) && (-x $path)) { +- $unifdef = $path; +- return 1; +- } +- # Check Windows +- $path = $path . ".exe"; +- if (($^O eq "MSWin32") && (-e $path) && (-x $path)) { +- $unifdef = $path; +- return 1; +- } +- return 0; ++ $unifdef = find_external_program(creduce_config::UNIFDEF, "unifdef"); ++ return defined ($unifdef); + } + + sub new ($$) { diff --git a/packages/c/creduce/creduce.changes b/packages/c/creduce/creduce.changes index 4d267e8..99575ff 100644 --- a/packages/c/creduce/creduce.changes +++ b/packages/c/creduce/creduce.changes @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Sat Apr 11 07:53:31 UTC 2020 - Martin Liška + +- Add binary-search-location.patch in order to fix binary + locations. + +------------------------------------------------------------------- +Sat Apr 11 06:57:02 UTC 2020 - Martin Liška + + - Update llvm9-libs-fix.patch to support cmake. + - Add install-location.patch and build the spec file with cmake. + - Remove BuildRequires of zlib-devel. + +------------------------------------------------------------------- Wed Oct 23 09:20:56 UTC 2019 - Martin Liška - Add llvm9-libs-fix.patch and build the package with LLVM9 diff --git a/packages/c/creduce/creduce.spec b/packages/c/creduce/creduce.spec index 48779b4..a99e0e2 100644 --- a/packages/c/creduce/creduce.spec +++ b/packages/c/creduce/creduce.spec @@ -1,7 +1,7 @@ # # spec file for package creduce # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,8 +25,11 @@ Group: Development/Tools/Other URL: https://github.com/csmith-project/creduce Source: %{name}-%{version}.tar.xz Patch0: llvm9-libs-fix.patch +Patch1: install-location.patch +Patch2: binary-search-location.patch BuildRequires: astyle BuildRequires: clang9-devel +BuildRequires: cmake BuildRequires: delta BuildRequires: flex BuildRequires: gcc-c++ @@ -39,7 +42,6 @@ BuildRequires: perl-File-Which BuildRequires: perl-Getopt-Tabular BuildRequires: perl-Regexp-Common BuildRequires: perl-Term-ReadKey -BuildRequires: zlib-devel Requires: astyle Requires: clang9-devel Requires: delta @@ -63,17 +65,18 @@ bugs in compilers and other tools that process C/C++ code. %prep %setup -q -%patch0 -p1 +%autopatch -p1 %build -%configure --libexec=%{_bindir} +%cmake %make_build %install +cd build %make_install -rm %{buildroot}%{_bindir}/topformflat -rm %{buildroot}%{_bindir}/unifdef +rm %{buildroot}/usr/libexec/topformflat +rm %{buildroot}/usr/libexec/unifdef %files %license COPYING diff --git a/packages/c/creduce/install-location.patch b/packages/c/creduce/install-location.patch new file mode 100644 index 0000000..b4c9ea6 --- /dev/null +++ b/packages/c/creduce/install-location.patch @@ -0,0 +1,39 @@ +From 307a3d8f6c6314bb06735f3de978d744a0ed92b2 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Sat, 11 Apr 2020 08:36:41 +0200 +Subject: [PATCH] Install clex, strlex and clang_delta to bin folder. + +--- + clang_delta/CMakeLists.txt | 2 +- + clex/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clang_delta/CMakeLists.txt b/clang_delta/CMakeLists.txt +index dcbc1d0..7ae0852 100644 +--- a/clang_delta/CMakeLists.txt ++++ b/clang_delta/CMakeLists.txt +@@ -261,7 +261,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + endif() + + install(TARGETS clang_delta +- RUNTIME DESTINATION "libexec" ++ RUNTIME DESTINATION + ) + # If binary is read-only, then installing may fail with an error: + # CMake Error at cmake_install.cmake:45 (FILE): +diff --git a/clex/CMakeLists.txt b/clex/CMakeLists.txt +index bf9f7b6..4646b59 100644 +--- a/clex/CMakeLists.txt ++++ b/clex/CMakeLists.txt +@@ -52,7 +52,7 @@ add_executable(strlex + ############################################################################### + + install(TARGETS clex strlex +- RUNTIME DESTINATION "libexec" ++ RUNTIME DESTINATION + ) + + ############################################################################### +-- +2.26.0 + diff --git a/packages/c/creduce/llvm9-libs-fix.patch b/packages/c/creduce/llvm9-libs-fix.patch index 13d1e0c..e8c8344 100644 --- a/packages/c/creduce/llvm9-libs-fix.patch +++ b/packages/c/creduce/llvm9-libs-fix.patch @@ -16,3 +16,34 @@ index 5bd6e56..b915946 100644 $(LLVMLIBS) \ $(CLANG_LDFLAGS) \ $(LLVMLDFLAGS) +diff --git a/clang_delta/CMakeLists.txt b/clang_delta/CMakeLists.txt +index a94ec0d..dcbc1d0 100644 +--- a/clang_delta/CMakeLists.txt ++++ b/clang_delta/CMakeLists.txt +@@ -86,24 +86,8 @@ llvm_map_components_to_libnames(LLVM_LIBS + ) + + set(CLANG_LIBS +- clangStaticAnalyzerFrontend +- clangStaticAnalyzerCheckers +- clangStaticAnalyzerCore +- clangFrontendTool +- clangFrontend +- clangDriver +- clangSerialization +- clangCodeGen +- clangParse +- clangSema +- clangAnalysis +- clangRewriteFrontend +- clangRewrite +- clangAST +- clangBasic +- clangEdit +- clangLex +- clangARCMigrate ++ clang-cpp ++ LLVM + ) + + add_executable(clang_delta