From 796921c93f72e27bcfbdbea701238c1e9458b29c Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 26 Feb 2017 18:36:14 +0100 Subject: sys-libs/tapi: initial ebuild by Michael Weiser, bug #609436 Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- .../tapi/files/tapi-1.30-allow-all-clients.patch | 17 ++++++ sys-libs/tapi/files/tapi-1.30-llvm-config.patch | 11 ++++ .../tapi/files/tapi-1.30-llvm-new-error-api.patch | 65 ++++++++++++++++++++++ .../tapi/files/tapi-1.30-llvm-out-of-tree.patch | 10 ++++ 4 files changed, 103 insertions(+) create mode 100644 sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch create mode 100644 sys-libs/tapi/files/tapi-1.30-llvm-config.patch create mode 100644 sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch create mode 100644 sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch (limited to 'sys-libs/tapi/files') diff --git a/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch b/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch new file mode 100644 index 000000000000..98309132cf70 --- /dev/null +++ b/sys-libs/tapi/files/tapi-1.30-allow-all-clients.patch @@ -0,0 +1,17 @@ +libtapi is by default limited to be linked to binaries called ld only. When +trying to link it into e.g. our ld64 we get: + +ld: cannot link directly with ${EPREFIX}/usr/lib/libtapi.dylib for architecture +x86_64 + +Drop that limitation in order to be able to use the library. + +--- libtapi-1.30/tools/libtapi/CMakeLists.txt.orig 2017-02-12 17:35:55.000000000 +0100 ++++ libtapi-1.30/tools/libtapi/CMakeLists.txt 2017-02-12 17:36:17.000000000 +0100 +@@ -18,5 +18,5 @@ + + set_property(TARGET libtapi APPEND_STRING + PROPERTY +- LINK_FLAGS " -current_version ${TAPI_VERSION_MAJOR}.${TAPI_VERSION_MINOR}.${TAPI_VERSION_PATCH} -compatibility_version 1 -allowable_client ld" ++ LINK_FLAGS " -current_version ${TAPI_VERSION_MAJOR}.${TAPI_VERSION_MINOR}.${TAPI_VERSION_PATCH} -compatibility_version 1" + ) diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-config.patch b/sys-libs/tapi/files/tapi-1.30-llvm-config.patch new file mode 100644 index 000000000000..ea5a462c025b --- /dev/null +++ b/sys-libs/tapi/files/tapi-1.30-llvm-config.patch @@ -0,0 +1,11 @@ +--- libtapi-1.30/lib/Core/Symbol.cpp.orig 2017-02-11 21:51:53.000000000 +0100 ++++ libtapi-1.30/lib/Core/Symbol.cpp 2017-02-11 21:52:00.000000000 +0100 +@@ -9,7 +9,7 @@ + + #include "tapi/Core/Symbol.h" + #include "tapi/Core/LLVM.h" +-#include "llvm/Config/config.h" ++#include "llvm/Config/llvm-config.h" + #include "llvm/Support/raw_ostream.h" + + #if HAVE_CXXABI_H diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch b/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch new file mode 100644 index 000000000000..814ca30879a0 --- /dev/null +++ b/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch @@ -0,0 +1,65 @@ +--- libtapi-1.30/lib/Core/MachODylibReader.cpp.orig 2017-02-11 21:36:40.000000000 +0100 ++++ libtapi-1.30/lib/Core/MachODylibReader.cpp 2017-02-11 21:48:25.000000000 +0100 +@@ -37,7 +37,11 @@ + } + + auto binaryOrErr = createBinary(bufferRef); ++#if LLVM_NEW_ERROR_API ++ if (binaryOrErr.takeError()) ++#else + if (binaryOrErr.getError()) ++#endif + return FileType::Invalid; + + Binary &bin = *binaryOrErr.get(); +@@ -49,7 +53,11 @@ + for (auto OI = UB->begin_objects(), OE = UB->end_objects(); OI != OE; ++OI) { + auto objOrErr = OI->getAsObjectFile(); + // Ignore archives. ++#if LLVM_NEW_ERROR_API ++ if (objOrErr.takeError()) ++#else + if (objOrErr.getError()) ++#endif + continue; + + auto &obj = *objOrErr.get(); +@@ -228,7 +236,11 @@ + ? SymbolFlags::WeakReferenced + : SymbolFlags::None; + auto symbolName = symbol.getName(); ++#if LLVM_NEW_ERROR_API ++ if (symbolName.takeError()) ++#else + if (symbolName.getError()) ++#endif + continue; + + StringRef name; +@@ -244,8 +256,14 @@ + file->setPath(memBuffer.getBufferIdentifier()); + + auto binaryOrErr = createBinary(memBuffer); ++// no way to figure this out from the headers :-( ++#if LLVM_NEW_ERROR_API ++ if (auto ec = binaryOrErr.takeError()) { ++ file->setErrorCode(llvm::errorToErrorCode(std::move(ec))); ++#else + if (auto ec = binaryOrErr.getError()) { + file->setErrorCode(ec); ++#endif + return std::move(file); + } + +@@ -263,7 +281,11 @@ + auto objOrErr = OI->getAsObjectFile(); + + // Ignore archives. ++#if LLVM_NEW_ERROR_API ++ if (objOrErr.takeError()) ++#else + if (objOrErr.getError()) ++#endif + continue; + + auto &object = *objOrErr.get(); diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch b/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch new file mode 100644 index 000000000000..56386476994a --- /dev/null +++ b/sys-libs/tapi/files/tapi-1.30-llvm-out-of-tree.patch @@ -0,0 +1,10 @@ +--- libtapi-1.30/CMakeLists.txt.orig 2017-02-11 21:04:56.000000000 +0100 ++++ libtapi-1.30/CMakeLists.txt 2017-02-11 21:05:12.000000000 +0100 +@@ -34,6 +34,7 @@ + ${CMAKE_CURRENT_SOURCE_DIR}/include/tapi/Version.inc.in + ${CMAKE_CURRENT_BINARY_DIR}/include/tapi/Version.inc) + ++include(AddLLVM) + macro(add_tapi_library name) + cmake_parse_arguments(ARG + "SHARED" -- cgit v1.2.3-65-gdbad