1 |
commit: 62e6ca1025a44ced65beaf2dc91eaf2bfbaf2dd3 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 11:11:33 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 11:11:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62e6ca10 |
7 |
|
8 |
sys-libs/tapi: remove last-rited package |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
profiles/package.mask | 6 - |
13 |
sys-libs/tapi/Manifest | 4 - |
14 |
.../files/objcmetadata-800.0.42.1-standalone.patch | 130 --------------- |
15 |
sys-libs/tapi/files/tapi-2.0.0-standalone.patch | 141 ----------------- |
16 |
sys-libs/tapi/metadata.xml | 8 - |
17 |
sys-libs/tapi/tapi-2.0.0.ebuild | 174 --------------------- |
18 |
6 files changed, 463 deletions(-) |
19 |
|
20 |
diff --git a/profiles/package.mask b/profiles/package.mask |
21 |
index d90ab8b095ca..7a04f6b2b3f5 100644 |
22 |
--- a/profiles/package.mask |
23 |
+++ b/profiles/package.mask |
24 |
@@ -359,12 +359,6 @@ x11-libs/libyui-gtk |
25 |
x11-libs/libyui-ncurses |
26 |
x11-libs/libyui-qt |
27 |
|
28 |
-# Fabian Groffen <grobian@g.o> (2022-02-27) |
29 |
-# Masked for removal, needs updates, significant amount of work, no |
30 |
-# Clang toolchain available to test with |
31 |
-# Removal on 2022-03-29. Bug #834306 |
32 |
-sys-libs/tapi |
33 |
- |
34 |
# Anton Fischl <github@×××××××××××××.de> (2022-02-23) |
35 |
# Version 2.5.* is not meant for production according to upstream |
36 |
=app-backup/burp-2.5* |
37 |
|
38 |
diff --git a/sys-libs/tapi/Manifest b/sys-libs/tapi/Manifest |
39 |
deleted file mode 100644 |
40 |
index f039ef639cc4..000000000000 |
41 |
--- a/sys-libs/tapi/Manifest |
42 |
+++ /dev/null |
43 |
@@ -1,4 +0,0 @@ |
44 |
-DIST cfe-5.0.1.src.tar.xz 11483036 BLAKE2B c4eb54cd8271b62cf7a2219db0b599b68c00b6e574d1946220efbd1633e841796e6717d6eeb35e84a6db32a731a3285b59cedeb3b1a8f3c3c502b799fdd0a720 SHA512 6619177a2ff9934fe8b15d6aa229abb8e34d0b1a75228d9efba9393daf71d6419a7256de57b31e2f9f829f71f842118556f996e86ee076f1e0a7cd394dfd31a2 |
45 |
-DIST clang-800.0.42.1.tar.gz 41165807 BLAKE2B 89e3ddc0268c2302f6679089648163a1b7457c3133f8f07de12c5980a66b6b7efdfa65966f5d9425ca20bd622cb1739bc009fe45edb4f0986ffd36af77a2480e SHA512 7fec6236996e4647043697f0f62d2eddb064a4604a7c64c11d2df2ff89aff95f4eb9fe1c2e604c0e276296927dd06b8a7794e0343bf0352cf65400dde40aab41 |
46 |
-DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb |
47 |
-DIST tapi-2.0.0.tar.gz 195080 BLAKE2B 28c31f4cb119525edb1a755895d8a3a05c9a606610fbf0c135790c0caf85a26d3b7e7fbbf856d001c26641a755e0d836f2f697a5856153d9dfc7c258e28427a1 SHA512 fc7209556ff75285a99ce64225831d53f9d959f7d6d9562cbfe91b019591860a00196c93de2258bbdaba02301af38990557b7e241ad3f66d09eb9440f4edf5ab |
48 |
|
49 |
diff --git a/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch b/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch |
50 |
deleted file mode 100644 |
51 |
index 71ca24f1beb2..000000000000 |
52 |
--- a/sys-libs/tapi/files/objcmetadata-800.0.42.1-standalone.patch |
53 |
+++ /dev/null |
54 |
@@ -1,130 +0,0 @@ |
55 |
-Provide standalone cmake project file that allows compilation outside the LLVM |
56 |
-source tree and installs the headers as well. |
57 |
- |
58 |
-Tune other CMakeLists for out-of-tree build. |
59 |
- |
60 |
-Provide missing isDynamic() method for Objective C properties. (Best-guess |
61 |
-implementation based on |
62 |
-https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html |
63 |
-and llvm-objdump -m -objc-meta-data output). Does not seem to be used anywhere |
64 |
-anyways - but the control flow of the code is somewhat encrypted. |
65 |
- |
66 |
-Adjust to some minor API differencies between Apple clang 8.0.0 and upstream |
67 |
-LLVM 5.0.1. |
68 |
- |
69 |
---- objcmetadata-800.0.42.1/CMakeLists.txt.orig 2017-12-25 22:23:41.000000000 +0100 |
70 |
-+++ objcmetadata-800.0.42.1/CMakeLists.txt 2017-12-25 20:54:39.000000000 +0100 |
71 |
-@@ -0,0 +1,25 @@ |
72 |
-+cmake_minimum_required(VERSION 3.4.3) |
73 |
-+project(ObjCMetadata) |
74 |
-+ |
75 |
-+find_package(LLVM REQUIRED CONFIG) |
76 |
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR}) |
77 |
-+include(AddLLVM) |
78 |
-+ |
79 |
-+include_directories(${LLVM_INCLUDE_DIRS}) |
80 |
-+link_directories(${LLVM_LIBRARY_DIRS}) |
81 |
-+add_definitions(${LLVM_DEFINITIONS}) |
82 |
-+set(LLVM_COMMON_LIBS Object Support Analysis Core) |
83 |
-+ |
84 |
-+include_directories(BEFORE |
85 |
-+ ${CMAKE_CURRENT_BINARY_DIR}/include |
86 |
-+ ${CMAKE_CURRENT_SOURCE_DIR}/include |
87 |
-+ ) |
88 |
-+ |
89 |
-+install(FILES |
90 |
-+ include/llvm/${PROJECT_NAME}/ObjCBitcode.h |
91 |
-+ include/llvm/${PROJECT_NAME}/ObjCMachOBinary.h |
92 |
-+ include/llvm/${PROJECT_NAME}/ObjCMetadata.h |
93 |
-+ DESTINATION include/llvm/${PROJECT_NAME} |
94 |
-+ ) |
95 |
-+ |
96 |
-+add_subdirectory(lib/${PROJECT_NAME}) |
97 |
---- objcmetadata-800.0.42.1/include/llvm/ObjCMetadata/ObjCMetadata.h.orig 2017-12-25 20:09:28.000000000 +0100 |
98 |
-+++ objcmetadata-800.0.42.1/include/llvm/ObjCMetadata/ObjCMetadata.h 2017-12-25 20:10:11.000000000 +0100 |
99 |
-@@ -110,6 +110,7 @@ |
100 |
- // Return empty string if doesn't exists. |
101 |
- Expected<std::string> getGetter() const; |
102 |
- Expected<std::string> getSetter() const; |
103 |
-+ Expected<bool> isDynamic() const; |
104 |
- }; |
105 |
- |
106 |
- class ObjCMethod : public ObjCInfoBase { |
107 |
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMetadata.cpp.orig 2017-12-25 20:09:11.000000000 +0100 |
108 |
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMetadata.cpp 2017-12-25 20:13:33.000000000 +0100 |
109 |
-@@ -164,6 +164,20 @@ |
110 |
- return setter; |
111 |
- } |
112 |
- |
113 |
-+Expected<bool> ObjCProperty::isDynamic() const { |
114 |
-+ auto Attr = getAttribute(); |
115 |
-+ if (!Attr) |
116 |
-+ return Attr.takeError(); |
117 |
-+ // Find setter attribute. |
118 |
-+ SmallVector<StringRef, 4> Attrs; |
119 |
-+ Attr->split(Attrs, ','); |
120 |
-+ for (auto a : Attrs) { |
121 |
-+ if (a == "D") |
122 |
-+ return true; |
123 |
-+ } |
124 |
-+ return false; |
125 |
-+} |
126 |
-+ |
127 |
- Expected<StringRef> ObjCMethod::getName() const { |
128 |
- return MetadataReader->getMethodName(*this); |
129 |
- } |
130 |
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/CMakeLists.txt.orig 2017-12-25 17:29:01.000000000 +0100 |
131 |
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/CMakeLists.txt 2017-12-25 20:59:31.000000000 +0100 |
132 |
-@@ -1,3 +1,10 @@ |
133 |
-+set(LLVM_LINK_COMPONENTS |
134 |
-+ Object |
135 |
-+ Support |
136 |
-+ Analysis |
137 |
-+ Core |
138 |
-+) |
139 |
-+ |
140 |
- add_llvm_library(LLVMObjCMetadata |
141 |
- ObjCBitcode.cpp |
142 |
- ObjCMetadata.cpp |
143 |
-@@ -5,7 +12,4 @@ |
144 |
- |
145 |
- ADDITIONAL_HEADER_DIRS |
146 |
- ${LLVM_MAIN_INCLUDE_DIR}/llvm/ObjCMetadata |
147 |
-- |
148 |
-- DEPENDS |
149 |
-- intrinsics_gen |
150 |
- ) |
151 |
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCBitcode.cpp.orig 2017-12-25 17:14:29.000000000 +0100 |
152 |
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCBitcode.cpp 2017-12-25 17:17:51.000000000 +0100 |
153 |
-@@ -20,7 +20,7 @@ |
154 |
- #include "llvm/IR/GlobalAlias.h" |
155 |
- #include "llvm/IR/GlobalVariable.h" |
156 |
- #include "llvm/IR/Operator.h" |
157 |
--#include "llvm/Support/Error.h" |
158 |
-+#include "llvm/Object/Error.h" |
159 |
- |
160 |
- #include "macho-obj.h" |
161 |
- |
162 |
-@@ -75,7 +75,7 @@ |
163 |
- Operator::getOpcode(V) == Instruction::AddrSpaceCast) { |
164 |
- V = cast<Operator>(V)->getOperand(0); |
165 |
- } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) { |
166 |
-- if (GA->mayBeOverridden()) |
167 |
-+ if (GA->isInterposable()) |
168 |
- return V; |
169 |
- V = GA->getAliasee(); |
170 |
- } else if (PtrToIntOperator *PTI = dyn_cast<PtrToIntOperator>(V)) { |
171 |
---- objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMachOBinary.cpp.orig 2017-12-25 17:24:23.000000000 +0100 |
172 |
-+++ objcmetadata-800.0.42.1/lib/ObjCMetadata/ObjCMachOBinary.cpp 2017-12-25 17:27:15.000000000 +0100 |
173 |
-@@ -1262,9 +1262,9 @@ |
174 |
- const char *SymbolName = nullptr; |
175 |
- if (reloc_found && isExtern) { |
176 |
- offset = Symbol.getValue(); |
177 |
-- ErrorOr<StringRef> NameOrError = Symbol.getName(); |
178 |
-+ Expected<StringRef> NameOrError = Symbol.getName(); |
179 |
- if (!NameOrError) { |
180 |
-- return errorOrToExpected(std::move(NameOrError)); |
181 |
-+ return NameOrError; |
182 |
- } |
183 |
- StringRef Name = *NameOrError; |
184 |
- if (!Name.empty()) { |
185 |
|
186 |
diff --git a/sys-libs/tapi/files/tapi-2.0.0-standalone.patch b/sys-libs/tapi/files/tapi-2.0.0-standalone.patch |
187 |
deleted file mode 100644 |
188 |
index 77bc56331dfb..000000000000 |
189 |
--- a/sys-libs/tapi/files/tapi-2.0.0-standalone.patch |
190 |
+++ /dev/null |
191 |
@@ -1,141 +0,0 @@ |
192 |
-Tune CMakeLists for out-of-tree build. |
193 |
- |
194 |
-Adjust for API discrepancies between Apple clang-8.0.0 and upstream LLVM 5.0.1. |
195 |
- |
196 |
-Allow all clients to link against the library, not just ld. Main reason: Our ld |
197 |
-is called ld64 when we link it. |
198 |
- |
199 |
---- tapi-2.0.0/tools/tapi/CMakeLists.txt.orig 2017-12-25 22:36:06.620886714 +0100 |
200 |
-+++ tapi-2.0.0/tools/tapi/CMakeLists.txt 2017-12-25 22:41:43.867893060 +0100 |
201 |
-@@ -6,6 +6,12 @@ |
202 |
- |
203 |
- target_link_libraries(tapi |
204 |
- tapiDriver |
205 |
-+ clangAST |
206 |
-+ clangFrontend |
207 |
-+ LLVMOption |
208 |
-+ LLVMDemangle |
209 |
-+ LLVMSupport |
210 |
-+ LLVMCore |
211 |
- ) |
212 |
- |
213 |
- if (TAPI_BUILD_LIBIOSSDK) |
214 |
---- tapi-2.0.0/tools/libtapi/CMakeLists.txt.orig 2017-12-25 22:26:06.816905789 +0100 |
215 |
-+++ tapi-2.0.0/tools/libtapi/CMakeLists.txt 2017-12-25 22:31:22.914862289 +0100 |
216 |
-@@ -1,4 +1,7 @@ |
217 |
- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libtapi.exports) |
218 |
-+set(LLVM_LINK_COMPONENTS |
219 |
-+ Support |
220 |
-+ ) |
221 |
- |
222 |
- add_tapi_library(libtapi |
223 |
- SHARED |
224 |
-@@ -19,5 +22,5 @@ |
225 |
- |
226 |
- set_property(TARGET libtapi APPEND_STRING |
227 |
- PROPERTY |
228 |
-- LINK_FLAGS " -current_version ${TAPI_FULL_VERSION} -compatibility_version 1 -allowable_client ld" |
229 |
-+ LINK_FLAGS " -current_version ${TAPI_FULL_VERSION} -compatibility_version 1" |
230 |
- ) |
231 |
---- tapi-2.0.0/tools/tapi-run/CMakeLists.txt.orig 2017-12-26 15:12:39.605057352 +0100 |
232 |
-+++ tapi-2.0.0/tools/tapi-run/CMakeLists.txt 2017-12-26 15:15:53.304983942 +0100 |
233 |
-@@ -5,6 +5,8 @@ |
234 |
- target_link_libraries(tapi-run |
235 |
- tapiCore |
236 |
- libtapi |
237 |
-+ LLVMSupport |
238 |
-+ LLVMCore |
239 |
- ) |
240 |
- |
241 |
- set_property(TARGET tapi-run APPEND_STRING |
242 |
---- tapi-2.0.0/CMakeLists.txt.orig 2017-12-24 15:27:56.000000000 +0100 |
243 |
-+++ tapi-2.0.0/CMakeLists.txt 2017-12-26 15:50:01.199506782 +0100 |
244 |
-@@ -4,6 +4,24 @@ |
245 |
- message(FATAL_ERROR "Unsupported configuration.") |
246 |
- endif() |
247 |
- |
248 |
-+project(tapi) |
249 |
-+set(PACKAGE_VENDOR Apple CACHE STRING "") |
250 |
-+add_definitions(-DTAPI_BUG_REPORT_URL="https://bugs.gentoo.org/") |
251 |
-+ |
252 |
-+find_package(LLVM REQUIRED CONFIG) |
253 |
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR}) |
254 |
-+include(AddLLVM) |
255 |
-+ |
256 |
-+add_definitions(${LLVM_DEFINITIONS}) |
257 |
-+include_directories(${LLVM_INCLUDE_DIRS} ${OBJCMETADATA_INCLUDE_DIRS}) |
258 |
-+link_directories(${LLVM_LIBRARY_DIRS} ${OBJCMETADATA_LIBRARY_DIRS}) |
259 |
-+ |
260 |
-+# make tblgen happy |
261 |
-+include(TableGen) |
262 |
-+foreach(IPATH ${LLVM_INCLUDE_DIRS}) |
263 |
-+ list(APPEND LLVM_TABLEGEN_FLAGS -I ${IPATH}) |
264 |
-+endforeach(IPATH) |
265 |
-+ |
266 |
- set(TAPI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
267 |
- set(TAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) |
268 |
- |
269 |
---- tapi-2.0.0/lib/Core/MachODylibReader.cpp.orig 2017-12-24 15:27:56.000000000 +0100 |
270 |
-+++ tapi-2.0.0/lib/Core/MachODylibReader.cpp 2017-12-25 22:15:53.075478606 +0100 |
271 |
-@@ -254,8 +254,7 @@ |
272 |
- auto arch = getArchType(H.cputype, H.cpusubtype); |
273 |
- assert(arch != Architecture::unknown && "unknown architecture slice"); |
274 |
- |
275 |
-- Error error = Error::success(); |
276 |
-- for (const auto &symbol : object->exports(error)) { |
277 |
-+ for (const auto &symbol : object->exports()) { |
278 |
- StringRef name; |
279 |
- XPIKind kind; |
280 |
- std::tie(name, kind) = parseSymbol(symbol.name()); |
281 |
-@@ -272,7 +271,7 @@ |
282 |
- file->addSymbol(kind, name, arch, flags); |
283 |
- } |
284 |
- |
285 |
-- return error; |
286 |
-+ return Error::success(); |
287 |
- } |
288 |
- |
289 |
- static Error readUndefinedSymbols(MachOObjectFile *object, |
290 |
-@@ -309,10 +308,7 @@ |
291 |
- auto H = object->getHeader(); |
292 |
- auto arch = getArchType(H.cputype, H.cpusubtype); |
293 |
- |
294 |
-- auto error = Error::success(); |
295 |
-- MachOMetadata metadata(object, error); |
296 |
-- if (error) |
297 |
-- return std::move(error); |
298 |
-+ MachOMetadata metadata(object); |
299 |
- |
300 |
- /// |
301 |
- /// Classes |
302 |
---- tapi-2.0.0/lib/Driver/Snapshot.cpp.orig 2017-12-24 15:27:56.000000000 +0100 |
303 |
-+++ tapi-2.0.0/lib/Driver/Snapshot.cpp 2017-12-26 15:49:09.864184826 +0100 |
304 |
-@@ -14,7 +14,7 @@ |
305 |
- #include "tapi/Defines.h" |
306 |
- #include "clang/Frontend/FrontendOptions.h" |
307 |
- #include "llvm/ADT/ArrayRef.h" |
308 |
--#include "llvm/Config/config.h" |
309 |
-+#include "llvm/Config/llvm-config.h" |
310 |
- #include "llvm/Support/FileSystem.h" |
311 |
- #include "llvm/Support/raw_ostream.h" |
312 |
- #include "llvm/Support/xxhash.h" |
313 |
-@@ -356,7 +356,7 @@ |
314 |
- } |
315 |
- |
316 |
- if (isCrash) { |
317 |
-- outs() << "PLEASE submit a bug report to " BUG_REPORT_URL |
318 |
-+ outs() << "PLEASE submit a bug report to " TAPI_BUG_REPORT_URL |
319 |
- " and include the " |
320 |
- "crash backtrace and snapshot.\n\n" |
321 |
- "********************************************************\n\n" |
322 |
---- tapi-2.0.0/lib/Driver/Options.cpp.orig 2017-12-25 22:17:40.506874748 +0100 |
323 |
-+++ tapi-2.0.0/lib/Driver/Options.cpp 2017-12-25 22:18:04.181989766 +0100 |
324 |
-@@ -1023,7 +1023,7 @@ |
325 |
- table->PrintHelp( |
326 |
- outs(), |
327 |
- (programName + " " + getNameFromTAPICommand(command)).str().c_str(), |
328 |
-- toolName, /*FlagsToInclude=*/getIncludeOptionFlagMasks(command), |
329 |
-+ toolName, /*FlagsToInclude=*///getIncludeOptionFlagMasks(command), |
330 |
- /*FlagsToExclude=*/0, /*ShowAllAliases=*/false); |
331 |
- } |
332 |
- |
333 |
|
334 |
diff --git a/sys-libs/tapi/metadata.xml b/sys-libs/tapi/metadata.xml |
335 |
deleted file mode 100644 |
336 |
index 232d18dd1fa2..000000000000 |
337 |
--- a/sys-libs/tapi/metadata.xml |
338 |
+++ /dev/null |
339 |
@@ -1,8 +0,0 @@ |
340 |
-<?xml version="1.0" encoding="UTF-8"?> |
341 |
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
342 |
-<pkgmetadata> |
343 |
- <maintainer type="project"> |
344 |
- <email>prefix@g.o</email> |
345 |
- <name>Gentoo Prefix</name> |
346 |
- </maintainer> |
347 |
-</pkgmetadata> |
348 |
|
349 |
diff --git a/sys-libs/tapi/tapi-2.0.0.ebuild b/sys-libs/tapi/tapi-2.0.0.ebuild |
350 |
deleted file mode 100644 |
351 |
index 1eb844c2cde9..000000000000 |
352 |
--- a/sys-libs/tapi/tapi-2.0.0.ebuild |
353 |
+++ /dev/null |
354 |
@@ -1,174 +0,0 @@ |
355 |
-# Copyright 1999-2021 Gentoo Authors |
356 |
-# Distributed under the terms of the GNU General Public License v2 |
357 |
- |
358 |
-EAPI=6 |
359 |
- |
360 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
361 |
- |
362 |
-inherit cmake-utils llvm |
363 |
- |
364 |
-# This is a hog: We need to carve ObjCMetadata out of Apple's clang. We also |
365 |
-# need llvm-tblgen and clang-tblgen because tapi uses them to generate some |
366 |
-# source. It's assumed that they're only ever needed when building LLVM and |
367 |
-# clang. So they don't get installed in the system and we need to compile them |
368 |
-# fresh from LLVM and clang sources. And finally we need an installed LLVM and |
369 |
-# clang to build tapi against. |
370 |
- |
371 |
-LLVM_PV=5.0.1 |
372 |
-LLVM_PN=llvm |
373 |
-LLVM_P=${LLVM_PN}-${LLVM_PV} |
374 |
- |
375 |
-CLANG_PN=cfe |
376 |
-CLANG_P=${CLANG_PN}-${LLVM_PV} |
377 |
- |
378 |
-APPLE_LLVM_PV=800.0.42.1 |
379 |
-APPLE_LLVM_PN=clang |
380 |
-APPLE_LLVM_P=${APPLE_LLVM_PN}-${APPLE_LLVM_PV} |
381 |
- |
382 |
-OBJCMD_PN=objcmetadata |
383 |
-OBJCMD_P=${OBJCMD_PN}-${APPLE_LLVM_PV} |
384 |
- |
385 |
-DESCRIPTION="Text-based Application Programming Interface" |
386 |
-HOMEPAGE="https://opensource.apple.com/source/tapi" |
387 |
-SRC_URI="https://opensource.apple.com/tarballs/clang/${APPLE_LLVM_P}.tar.gz |
388 |
- http://releases.llvm.org/${LLVM_PV}/${LLVM_P}.src.tar.xz |
389 |
- http://releases.llvm.org/${LLVM_PV}/${CLANG_P}.src.tar.xz" |
390 |
- |
391 |
-if [[ ${PV} == 9999* ]] ; then |
392 |
- EGIT_REPO_URI="https://github.com/ributzka/tapi.git" |
393 |
- TAPI_P=${P} |
394 |
- inherit git-r3 |
395 |
-else |
396 |
- TAPI_COMMIT=b9205695b4edee91000383695be8de5ba8e0db41 |
397 |
- SRC_URI+=" https://github.com/ributzka/${PN}/archive/${TAPI_COMMIT}.tar.gz -> ${P}.tar.gz" |
398 |
- TAPI_P=${PN}-${TAPI_COMMIT} |
399 |
-fi |
400 |
- |
401 |
-LICENSE="|| ( UoI-NCSA MIT )" |
402 |
-SLOT="0" |
403 |
-KEYWORDS="~x64-macos" |
404 |
- |
405 |
-DEPEND="sys-devel/llvm:= |
406 |
- sys-devel/clang:=" |
407 |
-RDEPEND="${DEPEND}" |
408 |
- |
409 |
-DOCS=( Readme.md ) |
410 |
- |
411 |
-LLVM_S="${WORKDIR}"/${LLVM_P}.src |
412 |
-LLVM_BUILD="${WORKDIR}"/${LLVM_P}_build |
413 |
- |
414 |
-CLANG_S="${WORKDIR}"/${CLANG_P}.src |
415 |
- |
416 |
-APPLE_LLVM_S="${WORKDIR}/${APPLE_LLVM_P}"/src |
417 |
- |
418 |
-S="${WORKDIR}"/${TAPI_P} |
419 |
- |
420 |
-TAPI_BUILD="${WORKDIR}"/${P}_build |
421 |
- |
422 |
-OBJCMD_S="${WORKDIR}"/${OBJCMD_P} |
423 |
-OBJCMD_BUILD="${WORKDIR}"/${OBJCMD_P}_build |
424 |
-# put temporary install root into tapi build dir so that it does not end up on |
425 |
-# libtapi's rpath |
426 |
-OBJCMD_ROOT="${TAPI_BUILD}"/${OBJCMD_PN}_root |
427 |
- |
428 |
-src_prepare() { |
429 |
- # carve ObjCMetadata out of llvm and make it stand on its own |
430 |
- mkdir -p "${OBJCMD_S}"/{include/llvm,lib} || die |
431 |
- cd ${OBJCMD_S} || die |
432 |
- cp -r ${APPLE_LLVM_S}/include/llvm/ObjCMetadata include/llvm || die |
433 |
- cp -r ${APPLE_LLVM_S}/lib/ObjCMetadata lib || die |
434 |
- eapply "${FILESDIR}"/${OBJCMD_PN}-800.0.42.1-standalone.patch |
435 |
- CMAKE_USE_DIR="${PWD}" \ |
436 |
- cmake-utils_src_prepare |
437 |
- |
438 |
- cd "${LLVM_S}" || die |
439 |
- CMAKE_USE_DIR="${PWD}" \ |
440 |
- cmake-utils_src_prepare |
441 |
- |
442 |
- cd "${S}" || die |
443 |
- eapply "${FILESDIR}"/${PN}-2.0.0-standalone.patch |
444 |
- CMAKE_USE_DIR="${PWD}" \ |
445 |
- cmake-utils_src_prepare |
446 |
-} |
447 |
- |
448 |
-src_configure() { |
449 |
- # configure LLVM and clang for tablegen build |
450 |
- local mycmakeargs=( |
451 |
- # shared libs cause all kinds of problems and we don't need them just |
452 |
- # to run tblgen a couple of times |
453 |
- -DBUILD_SHARED_LIBS=OFF |
454 |
- # configure less targets to speed up configuration. We don't build them |
455 |
- # anyway. |
456 |
- -DLLVM_TARGETS_TO_BUILD=X86 |
457 |
- -DLLVM_EXTERNAL_PROJECTS=clang |
458 |
- -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=${CLANG_S} |
459 |
- ) |
460 |
- |
461 |
- cd "${LLVM_S}" || die |
462 |
- BUILD_DIR="${LLVM_BUILD}" \ |
463 |
- CMAKE_USE_DIR="${PWD}" \ |
464 |
- CMAKE_BUILD_TYPE=RelWithDebInfo \ |
465 |
- cmake-utils_src_configure |
466 |
- |
467 |
- local llvm_prefix=$(get_llvm_prefix) |
468 |
- |
469 |
- # configure ObjCMetadata |
470 |
- local mycmakeargs=( |
471 |
- # fails to compile without -std=c++11 |
472 |
- -DCMAKE_CXX_STANDARD=11 |
473 |
- # compile against currently installed LLVM |
474 |
- -DLLVM_DIR="${llvm_prefix}/lib/cmake/llvm" |
475 |
- # install into temporary root in work dir just so we can compile and |
476 |
- # link against it. Static lib will be pulled into libtapi and tools. |
477 |
- -DCMAKE_INSTALL_PREFIX="${OBJCMD_ROOT}" |
478 |
- ) |
479 |
- |
480 |
- cd "${OBJCMD_S}" || die |
481 |
- BUILD_DIR="${OBJCMD_BUILD}" \ |
482 |
- CMAKE_USE_DIR="${PWD}" \ |
483 |
- cmake-utils_src_configure |
484 |
- |
485 |
- # configure tapi |
486 |
- local mycmakeargs=( |
487 |
- # fails to compile without -std=c++11 |
488 |
- -DCMAKE_CXX_STANDARD=11 |
489 |
- # compile against currently installed LLVM |
490 |
- -DLLVM_DIR="${llvm_prefix}"/lib/cmake/llvm |
491 |
- # use tblgens from LLVM build directory directly. They generate source |
492 |
- # from description files. Therefore it shouldn't matter if they |
493 |
- # match up with the installed LLVM. |
494 |
- -DLLVM_TABLEGEN_EXE="${LLVM_BUILD}"/bin/llvm-tblgen |
495 |
- -DCLANG_TABLEGEN_EXE="${LLVM_BUILD}"/bin/clang-tblgen |
496 |
- # pull in includes and libs from ObjCMetadata's temporary install root |
497 |
- -DOBJCMETADATA_INCLUDE_DIRS="${OBJCMD_ROOT}"/include |
498 |
- -DOBJCMETADATA_LIBRARY_DIRS="${OBJCMD_ROOT}"/lib |
499 |
- ) |
500 |
- |
501 |
- cd "${S}" || die |
502 |
- BUILD_DIR="${TAPI_BUILD}/" \ |
503 |
- CMAKE_USE_DIR="${PWD}" \ |
504 |
- cmake-utils_src_configure |
505 |
-} |
506 |
- |
507 |
-src_compile() { |
508 |
- # build LLVM and clang tablegen |
509 |
- cd "${LLVM_S}" || die |
510 |
- BUILD_DIR="${LLVM_BUILD}" \ |
511 |
- CMAKE_USE_DIR="${PWD}" \ |
512 |
- cmake-utils_src_compile llvm-tblgen clang-tblgen |
513 |
- |
514 |
- # build ObjCMetadata |
515 |
- cd "${OBJCMD_S}" || die |
516 |
- BUILD_DIR="${OBJCMD_BUILD}" \ |
517 |
- CMAKE_USE_DIR="${PWD}" \ |
518 |
- cmake-utils_src_compile |
519 |
- # install into temporary root in work dir |
520 |
- cd "${OBJCMD_BUILD}" || die |
521 |
- ${CMAKE_MAKEFILE_GENERATOR} install |
522 |
- |
523 |
- # finally build tapi |
524 |
- cd "${S}" || die |
525 |
- BUILD_DIR="${TAPI_BUILD}" \ |
526 |
- CMAKE_USE_DIR="${PWD}" \ |
527 |
- cmake-utils_src_compile |
528 |
-} |