forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add breakpad recipe * Build test_package with CXX 11 * Use 2 spaces to indent Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * Use double quotes and specify 'provides' Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * breakpad: add components * Raise if os != Linux * Cleanup recipe since it is Linux only * Move source patching to actual patch files Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
- Loading branch information
1 parent
697eae0
commit 5aef256
Showing
8 changed files
with
421 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sources: | ||
"cci.20210521": | ||
url: "https://github.com/google/breakpad/archive/f7428bc.tar.gz" | ||
sha256: "55a688a49ffc476d94d92c3fd73f9264c974c25af8d6371c3901bd3451081e47" | ||
patches: | ||
"cci.20210521": | ||
- patch_file: "patches/0001-Use_conans_lss.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/0002-Remove-hardcoded-fpic.patch" | ||
base_path: "source_subfolder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
from conans import ConanFile, AutoToolsBuildEnvironment, tools | ||
from conans.errors import ConanInvalidConfiguration | ||
import os | ||
import textwrap | ||
|
||
required_conan_version = ">=1.33.0" | ||
|
||
class BreakpadConan(ConanFile): | ||
name = "breakpad" | ||
description = "A set of client and server components which implement a crash-reporting system" | ||
topics = ["crash", "report", "breakpad"] | ||
license = "BSD-3-Clause" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://chromium.googlesource.com/breakpad/breakpad/" | ||
settings = "os", "compiler", "build_type", "arch" | ||
provides = "breakpad" | ||
exports_sources = "patches/**" | ||
options = { | ||
"fPIC": [True, False] | ||
} | ||
default_options = { | ||
"fPIC": True | ||
} | ||
_env_build = None | ||
|
||
@property | ||
def _source_subfolder(self): | ||
return "source_subfolder" | ||
|
||
def validate(self): | ||
if self.settings.os != "Linux": | ||
raise ConanInvalidConfiguration("Breakpad can only be built on Linux. For other OSs check sentry-breakpad") | ||
|
||
def requirements(self): | ||
self.requires("linux-syscall-support/cci.20200813") | ||
|
||
def _configure_autotools(self): | ||
if not self._env_build: | ||
self._env_build = AutoToolsBuildEnvironment(self) | ||
self._env_build.configure(configure_dir=self._source_subfolder) | ||
return self._env_build | ||
|
||
def source(self): | ||
tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) | ||
|
||
def build(self): | ||
for patch in self.conan_data.get("patches", {}).get(self.version, []): | ||
tools.patch(**patch) | ||
env_build = self._configure_autotools() | ||
env_build.make() | ||
|
||
def package(self): | ||
self.copy("LICENSE", src=self._source_subfolder, dst="licenses") | ||
env_build = self._configure_autotools() | ||
env_build.install() | ||
tools.rmdir(os.path.join(self.package_folder, "share")) | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) | ||
|
||
def package_info( self ): | ||
self.cpp_info.components["libbreakpad"].libs = ["breakpad"] | ||
self.cpp_info.components["libbreakpad"].includedirs.append(os.path.join("include", "breakpad")) | ||
self.cpp_info.components["libbreakpad"].names["pkg_config"] = "breakpad" | ||
|
||
self.cpp_info.components["client"].libs = ["breakpad_client"] | ||
self.cpp_info.components["client"].includedirs.append(os.path.join("include", "breakpad")) | ||
self.cpp_info.components["client"].names["pkg_config"] = "breakpad-client" | ||
|
||
|
||
self.cpp_info.components["libbreakpad"].system_libs.append("pthread") | ||
self.cpp_info.components["libbreakpad"].requires.append("linux-syscall-support::linux-syscall-support") | ||
|
||
self.cpp_info.components["client"].system_libs.append("pthread") | ||
self.cpp_info.components["client"].requires.append("linux-syscall-support::linux-syscall-support") | ||
|
||
bindir = os.path.join(self.package_folder, "bin") | ||
self.output.info("Appending PATH environment variable: {}".format(bindir)) | ||
self.env_info.PATH.append(bindir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
diff --color -ur Makefile.in Makefile.in | ||
--- Makefile.in 2021-05-21 15:56:41.000000000 -0300 | ||
+++ Makefile.in 2021-05-27 18:57:23.986912433 -0300 | ||
@@ -2082,7 +2082,7 @@ | ||
HEADERS = $(includec_HEADERS) $(includecl_HEADERS) \ | ||
$(includeclc_HEADERS) $(includecldwc_HEADERS) \ | ||
$(includeclh_HEADERS) $(includeclm_HEADERS) \ | ||
- $(includegbc_HEADERS) $(includelss_HEADERS) \ | ||
+ $(includegbc_HEADERS) \ | ||
$(includep_HEADERS) | ||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) | ||
# Read a list of newline-separated strings from the standard input, | ||
@@ -9718,7 +9718,7 @@ | ||
install-includeclHEADERS install-includeclcHEADERS \ | ||
install-includecldwcHEADERS install-includeclhHEADERS \ | ||
install-includeclmHEADERS install-includegbcHEADERS \ | ||
- install-includelssHEADERS install-includepHEADERS \ | ||
+ iinstall-includepHEADERS \ | ||
install-pkgconfigDATA | ||
|
||
install-dvi: install-dvi-am | ||
@@ -10084,7 +10084,7 @@ | ||
install-includeclHEADERS install-includeclcHEADERS \ | ||
install-includecldwcHEADERS install-includeclhHEADERS \ | ||
install-includeclmHEADERS install-includegbcHEADERS \ | ||
- install-includelssHEADERS install-includepHEADERS install-info \ | ||
+ iinstall-includepHEADERS install-info \ | ||
install-info-am install-libLIBRARIES install-libexecPROGRAMS \ | ||
install-man install-pdf install-pdf-am install-pkgconfigDATA \ | ||
install-ps install-ps-am install-strip installcheck \ | ||
diff --color -ur src/client/linux/crash_generation/crash_generation_client.cc src/client/linux/crash_generation/crash_generation_client.cc | ||
--- src/client/linux/crash_generation/crash_generation_client.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/crash_generation/crash_generation_client.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -37,7 +37,7 @@ | ||
|
||
#include "common/linux/eintr_wrapper.h" | ||
#include "common/linux/ignore_ret.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/client/linux/handler/exception_handler.cc src/client/linux/handler/exception_handler.cc | ||
--- src/client/linux/handler/exception_handler.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/handler/exception_handler.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -95,7 +95,7 @@ | ||
#include "client/linux/minidump_writer/linux_dumper.h" | ||
#include "client/linux/minidump_writer/minidump_writer.h" | ||
#include "common/linux/eintr_wrapper.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
#if defined(__ANDROID__) | ||
#include "linux/sched.h" | ||
diff --color -ur src/client/linux/handler/exception_handler_unittest.cc src/client/linux/handler/exception_handler_unittest.cc | ||
--- src/client/linux/handler/exception_handler_unittest.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/handler/exception_handler_unittest.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -50,7 +50,7 @@ | ||
#include "common/linux/linux_libc_support.h" | ||
#include "common/tests/auto_tempdir.h" | ||
#include "common/using_std_string.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#include "google_breakpad/processor/minidump.h" | ||
|
||
using namespace google_breakpad; | ||
diff --color -ur src/client/linux/log/log.cc src/client/linux/log/log.cc | ||
--- src/client/linux/log/log.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/log/log.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -33,7 +33,7 @@ | ||
#include <android/log.h> | ||
#include <dlfcn.h> | ||
#else | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#endif | ||
|
||
namespace logger { | ||
diff --color -ur src/client/linux/minidump_writer/cpu_set.h src/client/linux/minidump_writer/cpu_set.h | ||
--- src/client/linux/minidump_writer/cpu_set.h 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/cpu_set.h 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -35,7 +35,7 @@ | ||
#include <string.h> | ||
|
||
#include "common/linux/linux_libc_support.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/client/linux/minidump_writer/directory_reader.h src/client/linux/minidump_writer/directory_reader.h | ||
--- src/client/linux/minidump_writer/directory_reader.h 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/directory_reader.h 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -38,7 +38,7 @@ | ||
#include <string.h> | ||
|
||
#include "common/linux/linux_libc_support.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/client/linux/minidump_writer/line_reader.h src/client/linux/minidump_writer/line_reader.h | ||
--- src/client/linux/minidump_writer/line_reader.h 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/line_reader.h 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -35,7 +35,7 @@ | ||
#include <string.h> | ||
|
||
#include "common/linux/linux_libc_support.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/client/linux/minidump_writer/linux_dumper.cc src/client/linux/minidump_writer/linux_dumper.cc | ||
--- src/client/linux/minidump_writer/linux_dumper.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/linux_dumper.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -51,7 +51,7 @@ | ||
#include "common/linux/memory_mapped_file.h" | ||
#include "common/linux/safe_readlink.h" | ||
#include "google_breakpad/common/minidump_exception_linux.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
#if defined(__ANDROID__) | ||
|
||
diff --color -ur src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc | ||
--- src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -39,7 +39,7 @@ | ||
#include <unistd.h> | ||
|
||
#include "common/scoped_ptr.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
#if defined(__ARM_EABI__) | ||
#define TID_PTR_REGISTER "r3" | ||
diff --color -ur src/client/linux/minidump_writer/linux_ptrace_dumper.cc src/client/linux/minidump_writer/linux_ptrace_dumper.cc | ||
--- src/client/linux/minidump_writer/linux_ptrace_dumper.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/linux_ptrace_dumper.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -57,7 +57,7 @@ | ||
#include "client/linux/minidump_writer/directory_reader.h" | ||
#include "client/linux/minidump_writer/line_reader.h" | ||
#include "common/linux/linux_libc_support.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
// Suspends a thread by attaching to it. | ||
static bool SuspendThread(pid_t pid) { | ||
diff --color -ur src/client/linux/minidump_writer/minidump_writer.cc src/client/linux/minidump_writer/minidump_writer.cc | ||
--- src/client/linux/minidump_writer/minidump_writer.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/minidump_writer.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -77,7 +77,7 @@ | ||
#include "common/linux/linux_libc_support.h" | ||
#include "common/minidump_type_helper.h" | ||
#include "google_breakpad/common/minidump_format.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace { | ||
|
||
diff --color -ur src/client/linux/minidump_writer/proc_cpuinfo_reader.h src/client/linux/minidump_writer/proc_cpuinfo_reader.h | ||
--- src/client/linux/minidump_writer/proc_cpuinfo_reader.h 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/linux/minidump_writer/proc_cpuinfo_reader.h 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -36,7 +36,7 @@ | ||
|
||
#include "client/linux/minidump_writer/line_reader.h" | ||
#include "common/linux/linux_libc_support.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/client/minidump_file_writer.cc src/client/minidump_file_writer.cc | ||
--- src/client/minidump_file_writer.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/client/minidump_file_writer.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -41,7 +41,7 @@ | ||
#include "common/linux/linux_libc_support.h" | ||
#include "common/string_conversion.h" | ||
#if defined(__linux__) && __linux__ | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#endif | ||
|
||
#if defined(__ANDROID__) | ||
diff --color -ur src/common/linux/file_id.cc src/common/linux/file_id.cc | ||
--- src/common/linux/file_id.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/common/linux/file_id.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -46,7 +46,7 @@ | ||
#include "common/linux/linux_libc_support.h" | ||
#include "common/linux/memory_mapped_file.h" | ||
#include "common/using_std_string.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/common/linux/memory_mapped_file.cc src/common/linux/memory_mapped_file.cc | ||
--- src/common/linux/memory_mapped_file.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/common/linux/memory_mapped_file.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -40,7 +40,7 @@ | ||
#include <unistd.h> | ||
|
||
#include "common/memory_range.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/common/linux/safe_readlink.cc src/common/linux/safe_readlink.cc | ||
--- src/common/linux/safe_readlink.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/common/linux/safe_readlink.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -32,7 +32,7 @@ | ||
|
||
#include <stddef.h> | ||
|
||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace google_breakpad { | ||
|
||
diff --color -ur src/common/memory_allocator.h src/common/memory_allocator.h | ||
--- src/common/memory_allocator.h 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/common/memory_allocator.h 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -47,7 +47,7 @@ | ||
#define sys_munmap munmap | ||
#define MAP_ANONYMOUS MAP_ANON | ||
#else | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#endif | ||
|
||
namespace google_breakpad { | ||
diff --color -ur src/processor/testdata/linux_test_app.cc src/processor/testdata/linux_test_app.cc | ||
--- src/processor/testdata/linux_test_app.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/processor/testdata/linux_test_app.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -46,7 +46,7 @@ | ||
#include <string> | ||
|
||
#include "client/linux/handler/exception_handler.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
|
||
namespace { | ||
|
||
diff --color -ur src/tools/linux/md2core/minidump-2-core.cc src/tools/linux/md2core/minidump-2-core.cc | ||
--- src/tools/linux/md2core/minidump-2-core.cc 2021-05-21 15:56:41.000000000 -0300 | ||
+++ src/tools/linux/md2core/minidump-2-core.cc 2021-05-27 18:57:23.990912414 -0300 | ||
@@ -52,7 +52,7 @@ | ||
#include "common/using_std_string.h" | ||
#include "google_breakpad/common/breakpad_types.h" | ||
#include "google_breakpad/common/minidump_format.h" | ||
-#include "third_party/lss/linux_syscall_support.h" | ||
+#include <linux_syscall_support.h> | ||
#include "tools/linux/md2core/minidump_memory_range.h" | ||
|
||
#if ULONG_MAX == 0xffffffffffffffff |
13 changes: 13 additions & 0 deletions
13
recipes/breakpad/all/patches/0002-Remove-hardcoded-fpic.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --color -ur a/Makefile.in b/Makefile.in | ||
--- Makefile.in 2021-05-21 15:56:41.000000000 -0300 | ||
+++ Makefile.in 2021-05-27 19:01:06.857704652 -0300 | ||
@@ -130,8 +130,7 @@ | ||
@ANDROID_HOST_TRUE@ -I$(top_srcdir)/src/common/android/testing/include | ||
|
||
# Build as PIC on Linux, for linux_client_unittest_shlib | ||
-@LINUX_HOST_TRUE@am__append_2 = -fPIC | ||
-@LINUX_HOST_TRUE@am__append_3 = -fPIC | ||
+ | ||
libexec_PROGRAMS = $(am__EXEEXT_10) | ||
bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) | ||
check_PROGRAMS = $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package CXX) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) | ||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
class BreakpadTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self.settings): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |
Oops, something went wrong.