From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-libs/tapi/Manifest | 7 +++ .../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 ++++ sys-libs/tapi/metadata.xml | 8 +++ sys-libs/tapi/tapi-1.30.ebuild | 37 ++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 sys-libs/tapi/Manifest 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 create mode 100644 sys-libs/tapi/metadata.xml create mode 100644 sys-libs/tapi/tapi-1.30.ebuild (limited to 'sys-libs/tapi') diff --git a/sys-libs/tapi/Manifest b/sys-libs/tapi/Manifest new file mode 100644 index 000000000000..6fbb259020a0 --- /dev/null +++ b/sys-libs/tapi/Manifest @@ -0,0 +1,7 @@ +AUX tapi-1.30-allow-all-clients.patch 792 SHA256 1b8d4bb9de1a0e5dfd2e94662a8718c9ecd70246908ccc2f45ac12f3e3d8da1d SHA512 08116c81611554ab8c07176d89762016f12a18d9b38fa47a541abc7c94194007d0cc1067e15abf25479ef0c10708ef8d37ef3c9234dbaaa294c372018a283be7 WHIRLPOOL 3ab012c1ba6dd1ca6881a7bdf88d6bba929790cc622798a290e4ae46e80956322a1e12381f7887c35b63d2e4686d97ba8d0262ad1714879ceec174ba5cb4a7e9 +AUX tapi-1.30-llvm-config.patch 360 SHA256 5617c045e17cf2ec3f0d7b01d13dbd5ded0accc84107d903ea8dfd0012eb3a4f SHA512 77958e021478299c7aba6a38a861de5c7602ae70d97a3bb008f8d0a456afb303d445244a19a7043d555f7669fcbac3eaa924e93d3e1753479748e29b33c7a34e WHIRLPOOL 40d66fe6106b0245a02923d0efa3064da4102688658899d8bff16f4ffa7248518cca8a132734db5fdcdcdd82a1ae43a2ef601b108a838f54733107be3b9ea76f +AUX tapi-1.30-llvm-new-error-api.patch 1714 SHA256 c8cfaccc519adeaa379571102548e8047d3cac28f1067a730d8611bba989bead SHA512 2fa31ea8ca320aeb78458c2ab88771ab7978da565dfe81aaaf22ff8d18c859379001dc226b4f4330b981e3c73195ef283af37a0db1142caaeb71052f6c3cf354 WHIRLPOOL 976c6d08273a4f4ff252a62cf14f5d72b366c18bccff3cbba85785e3ef7ae56f6289ce2d5af9a31850aec2379410e66c0a6726c7f5bed71bb1fbe7293dd82f65 +AUX tapi-1.30-llvm-out-of-tree.patch 368 SHA256 75a1ba1187e7df57e2c3dc574ee93bd6486721ad47ff69bd47f512d524d33627 SHA512 51d3fb6148dc42108f144e35d57000b5ade9ec792860bf0d14a4d5e15a677184293d761bc36e9ea81e541849e9815f3c9d5bffca2ce92f160ff75697e145ea9c WHIRLPOOL db3a8ac7877fd16ca44fa970c5709cadb1fad3f515e67d9e6487ff0bd3750489b0f07b5e23b817e0b8e25f93405d9f96c96cf2ee5c31473f70285bdd36cceb59 +DIST tapi-1.30.tar.gz 29071 SHA256 be2f3732c4ba7e9d78696fe43f0b31fa4963925ee6e4e5e11cc45603a83ff9a1 SHA512 fa495da150c6b6ff9e0bf667a9a06f0b932363297b75379fd59a5c728168a3ac103a656d1a59fa1b0c0012a18c9874439237bbf2a3c26f9bdf202b4d78e31520 WHIRLPOOL 966cfd8149ab9952858d1985c96039b2f21cccc6d415b557c860d307823ea323bf66cec03a1ab572e160ad21590fd2584ea9037a5c3d769b22aeaacc934fcfe2 +EBUILD tapi-1.30.ebuild 962 SHA256 9124ad8c129e1a666d055915f2a22538272517c283234412efea4e397bafb0c3 SHA512 edfd3a4f3277e517eb8fd09f4aa276d5ec5130b80296098dd906d3d5f0262302d7dc6c7857c5375de14a9f96a2ed04e4222e4f6275b824c4a1645cb070373e91 WHIRLPOOL 1ae6464751b51a39943e79c2276c0f4ea981af09e72406d526aaed5adce0b9ba6b998dbdceb7c08088458b5ddbc593d8e5d1973d36d91fde41fa4aada21a2f63 +MISC metadata.xml 247 SHA256 beb9a5395fe6fcde3c82e31b0cde4a75ea911efb59294b0419f76b71e4518366 SHA512 ae91bc559b2380b04af0bacbaf419deb042e9a9235c596c1afdbbb3933e59ba4f895c6e7ebf8fa4884702d5b39febedfdcce109ab912d6ef4f51b3696bc82c18 WHIRLPOOL b82c282b0539e6427a6d6dc1d6742794f922e0b6276dbc7acb805735d6654c79600eb6f650a9c1e36cd727a63d1f1655d728535082154a218c6fb40c01eb8fe0 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" diff --git a/sys-libs/tapi/metadata.xml b/sys-libs/tapi/metadata.xml new file mode 100644 index 000000000000..0c982d881307 --- /dev/null +++ b/sys-libs/tapi/metadata.xml @@ -0,0 +1,8 @@ + + + + + prefix@gentoo.org + Gentoo Prefix + + diff --git a/sys-libs/tapi/tapi-1.30.ebuild b/sys-libs/tapi/tapi-1.30.ebuild new file mode 100644 index 000000000000..c3f24900a40f --- /dev/null +++ b/sys-libs/tapi/tapi-1.30.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils flag-o-matic + +DESCRIPTION="Text-based Application Programming Interface" +HOMEPAGE="https://opensource.apple.com/source/tapi" +SRC_URI="https://opensource.apple.com/tarballs/${PN}/${P}.tar.gz" +S="${WORKDIR}/lib${P}" + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~x64-macos ~x86-macos" + +DOCS=( Readme.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.30-llvm-out-of-tree.patch + "${FILESDIR}"/${PN}-1.30-llvm-new-error-api.patch + "${FILESDIR}"/${PN}-1.30-llvm-config.patch + "${FILESDIR}"/${PN}-1.30-allow-all-clients.patch +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_MODULE_PATH="${EPREFIX}/usr/lib/cmake/llvm;${EPREFIX}/usr/share/llvm/cmake" + ) + + # poor man's configure + [ -f "${EPREFIX}"/usr/include/llvm/Support/Error.h ] && \ + append-cxxflags -DLLVM_NEW_ERROR_API=1 + + append-cxxflags -std=c++11 + cmake-utils_src_configure +} -- cgit v1.2.3