Hello community, here is the log from the commit of package creduce for openSUSE:Factory checked in at 2020-04-11 23:47:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/creduce (Old) and /work/SRC/openSUSE:Factory/.creduce.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "creduce" Sat Apr 11 23:47:08 2020 rev:21 rq:793062 version:2.10.0+git.20191010.8a67e69 Changes: -------- --- /work/SRC/openSUSE:Factory/creduce/creduce.changes 2019-10-23 15:53:51.182889352 +0200 +++ /work/SRC/openSUSE:Factory/.creduce.new.3248/creduce.changes 2020-04-11 23:47:35.895137276 +0200 @@ -1,0 +2,13 @@ +Sat Apr 11 07:53:31 UTC 2020 - Martin Liška <[email protected]> + +- Add binary-search-location.patch in order to fix binary + locations. + +------------------------------------------------------------------- +Sat Apr 11 06:57:02 UTC 2020 - Martin Liška <[email protected]> + + - Update llvm9-libs-fix.patch to support cmake. + - Add install-location.patch and build the spec file with cmake. + - Remove BuildRequires of zlib-devel. + +------------------------------------------------------------------- New: ---- binary-search-location.patch install-location.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ creduce.spec ++++++ --- /var/tmp/diff_new_pack.28ai65/_old 2020-04-11 23:47:37.307138352 +0200 +++ /var/tmp/diff_new_pack.28ai65/_new 2020-04-11 23:47:37.311138355 +0200 @@ -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 @@ 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-Getopt-Tabular BuildRequires: perl-Regexp-Common BuildRequires: perl-Term-ReadKey -BuildRequires: zlib-devel Requires: astyle Requires: clang9-devel Requires: delta @@ -63,17 +65,18 @@ %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 ++++++ binary-search-location.patch ++++++ 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 ($$) { ++++++ install-location.patch ++++++ >From 307a3d8f6c6314bb06735f3de978d744a0ed92b2 Mon Sep 17 00:00:00 2001 From: Martin Liska <[email protected]> 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 ++++++ llvm9-libs-fix.patch ++++++ --- /var/tmp/diff_new_pack.28ai65/_old 2020-04-11 23:47:37.379138407 +0200 +++ /var/tmp/diff_new_pack.28ai65/_new 2020-04-11 23:47:37.379138407 +0200 @@ -16,3 +16,34 @@ $(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
