source: projects/specs/trunk/l/llvm/llvm-vl.spec @ 12376

Revision 12376, 30.2 KB checked in by tomop, 4 years ago (diff)

updated 19 packages

g-wrap-1.9.15-2

gjs-1.54.3-2

glib2-2.64.2-2

gobject-introspection-1.64.1-1

guile-2.2.7-1

guile20-2.0.14-5

hardinfo-0.5.1-4

llvm-10.0.0-2

libffi-3.3-1

libffi321-3.2.1-1

p11-kit-0.23.20-2

pycairo-1.18.2-1

pygobject-2.28.6-7

pygobject3-3.34.0-1

python-cffi-1.14.0-1

python-2.7.17-1

python3-3.5.9-1

ruby-2.6.6-2

uim-1.8.8-3

RevLine 
[12228]1%bcond_with test
2
[9470]3%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
4
[11969]5%define ver_suffix %(echo "%{version}" | cut -d . -f 1)
6
[11308]7%define _unpackaged_files_terminate_build 1
8
[1073]9# Build options:
[9470]10# Components skipped by default:
11%bcond_with doxygen
[11293]12%bcond_with ocaml
13%bcond_with force_gold
[11969]14%bcond_with lld_libs
15%bcond_with clang_tools_extra
[1073]16
[9470]17# Documentation install path
18%global llvmdocdir() %{_docdir}/%1-%{version}
19
[11293]20%define _unpackaged_files_terminate_build 1
21
[1073]22Name:           llvm
[12354]23Version:        10.0.0
[12376]24Release:        2%{?_dist_release}
[1073]25Summary:        The Low Level Virtual Machine
26Summary(ja):    LLVM - 低レベルバーチャルマシン
27
28Group:          Development/Languages
29License:        NCSA
[12320]30URL:            https://llvm.org/
[11969]31
32Vendor:         Project Vine
33Distribution:   Vine Linux
34
[12320]35Source0:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
36Source1:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
37Source2:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
38Source3:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
39Source4:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
[11985]40%if %{with clang_tools_extra}
[12320]41Source5:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
[11985]42%endif
[12320]43Source6:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/openmp-%{version}.src.tar.xz
[7943]44
[4656]45# multilib fixes
[11293]46Source10:        llvm-config.h
47Source11:        clang-config.h
[4656]48
[9470]49# patches
[1073]50
[11969]51# llvm
[12228]52Patch0:         0001-Filter-out-cxxflags-not-supported-by-clang.patch
53# TODO: I'm not sure why this is needed.  Could be a change in newer version
54# of gold.
55Patch1:         0001-Pass-target-to-gold-linker-to-avoid-faliures-on-i686.patch
56Patch2:         0001-CMake-Split-static-library-exports-into-their-own-ex.patch
57Patch3:         0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
[7197]58
[11969]59# clang
[12228]60Patch100:       0002-gtest-reorg.patch
61Patch101:       0001-Fix-uninitialized-value-in-ABIArgInfo.patch
62Patch102:       0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
63Patch103:       0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
[11308]64
[12228]65# compiler-rt
66Patch200:       0001-PATCH-std-thread-copy.patch
67
[11969]68# lld
[12228]69Patch400:       0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
[11969]70
[7201]71# Vine Patch
[11293]72Patch1000: clang-3.8.1-driver-ld.gold.patch
73Patch1002: clang-3.8.1-driver-vine.patch
[7201]74
[1073]75BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
76
[5424]77BuildRequires:  binutils-devel
[11293]78BuildRequires:  cmake
[12228]79BuildRequires:  ninja
[1073]80BuildRequires:  bison
[12228]81BuildRequires:  python3
82BuildRequires:  python3-rpm-macros
[1073]83BuildRequires:  chrpath
84BuildRequires:  flex
[12228]85BuildRequires:  git
[1073]86BuildRequires:  gcc-c++ >= 3.4
87BuildRequires:  groff
[12376]88BuildRequires:  libffi-devel >= 3.3
[11293]89BuildRequires:  libstdc++-devel
90BuildRequires:  libstdc++-static
[1073]91BuildRequires:  libtool-ltdl-devel
[9594]92BuildRequires:  libxml2-devel
[11969]93%if %{with ocaml}
[9594]94BuildRequires:  ocaml-findlib
[9734]95BuildRequires:  ocaml-ctypes
[9594]96BuildRequires:  ocaml-ounit
[11969]97%endif
[1073]98# for DejaGNU test suite
[12228]99BuildRequires:  dejagnu tcl-devel
[9470]100%if %{with doxygen}
[1073]101BuildRequires:  doxygen graphviz
102%endif
[9594]103# pod2man
104BuildRequires:  perl
[9470]105# lldb
106BuildRequires:  swig
107BuildRequires:  libedit-devel
[12228]108BuildRequires:  python3-devel
[11969]109# lld
110BuildRequires: ncurses-devel
111BuildRequires: zlib-devel
[9470]112
[11969]113Requires:       llvm%{ver_suffix}-libs = %{version}-%{release}
[1073]114
115# LLVM is not supported on PPC64
116# http://llvm.org/bugs/show_bug.cgi?id=3729
117ExcludeArch:    ppc64
118
119%description
120LLVM is a compiler infrastructure designed for compile-time,
121link-time, runtime, and idle-time optimization of programs from
122arbitrary programming languages.  The compiler infrastructure includes
123mirror sets of programming tools as well as libraries with equivalent
124functionality.
125
126
127%package devel
128Summary:        Libraries and header files for LLVM
129Summary(ja):    LLVM のライブラリおよびヘッダファイル
[9470]130Group:          Development/Libraries
[1073]131Requires:       %{name} = %{version}-%{release}
132Requires:       libstdc++-devel
[4656]133Requires:       libffi-devel
[11969]134Requires:       libedit-devel
[1073]135
136%description devel
137This package contains library and header files needed to develop new
138native programs that use the LLVM infrastructure.
139
140
141%package doc
142Summary:        Documentation for LLVM
143Summary(ja):    LLVM のドキュメント
144Group:          Documentation
[9470]145BuildArch:      noarch
[1073]146Requires:       %{name} = %{version}-%{release}
[9470]147# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
148Obsoletes:      %{name}-doc < %{version}-%{release}
[1073]149
150%description doc
151Documentation for the LLVM compiler infrastructure.
152
153
[11969]154%package -n llvm%{ver_suffix}-libs
[4656]155Summary:        LLVM shared libraries
[9470]156Summary(ja):    LLVM 共有ライブラリ
[4656]157Group:          System Environment/Libraries
[11969]158Provides:       llvm-libs = %{version}-%{release}
[11985]159Obsoletes:      llvm-libs <= 7.0.0
[4656]160
[11969]161%description -n llvm%{ver_suffix}-libs
[4656]162Shared libraries for the LLVM compiler infrastructure.
163
[11969]164%description -n llvm%{ver_suffix}-libs -l ja
[9594]165LLVM コンパイラ基盤の共有ライブラリです.
[4656]166
[11308]167%package static
168Summary:        LLVM static libraries
169Summary(ja):    LLVM 静的ライブラリ
170Requires:       llvm-devel = %{version}-%{release}
171
172%description static
173Static libraries for the LLVM compiler infrastructure.
174
175%description static -l ja
176LLVM コンパイラ基盤の静的ライブラリです.
177
178
[1073]179%package -n clang
180Summary:        A C language family front-end for LLVM
[9470]181Summary(ja):    LLVM の C 言語フロントエンド
[1073]182License:        NCSA
183Group:          Development/Languages
[9470]184Requires:       %{name} = %{version}-%{release}
185# clang requires gcc, clang++ requires libstdc++-devel
186Requires:       libstdc++-devel
187# remove clang-doc pacakge
188Obsoletes:      clang-doc < %{version}-%{release}
[1073]189
190%description -n clang
191clang: noun
192    1. A loud, resonant, metallic sound.
193    2. The strident call of a crane or goose.
194    3. C-language family front-end toolkit.
195
196The goal of the Clang project is to create a new C, C++, Objective C
197and Objective C++ front-end for the LLVM compiler. Its tools are built
198as libraries and designed to be loosely-coupled and extensible.
199
[9470]200%Package -n clang-libs
201Summary:        Runtime library for clang
202Summary(ja):    Clang のランタイムライブラリ
203Group:          System Environment/Libraries
[1073]204
[9470]205%description -n clang-libs
206Runtime library for clang.
207
[9594]208%description -n clang-libs -l ja
209Clang のランタイムライブラリです.
[9470]210
[1073]211%package -n clang-devel
212Summary:        Header files for clang
[9470]213Summary(ja):    Clang のヘッダファイル
214Group:          Development/Libraries
[1073]215Requires:       clang = %{version}-%{release}
216
217%description -n clang-devel
218This package contains header files for the Clang compiler.
219
[9594]220%description -n clang-devel -l ja
221Clang コンパイラのヘッダファイル集です.
[1073]222
223%package -n clang-analyzer
224Summary:        A source code analysis framework
[11293]225Summary(ja):    ソースコード分析フレームワーク
[1073]226License:        NCSA
227Group:          Development/Languages
228Requires:       clang = %{version}-%{release}
229# not picked up automatically since files are currently not instaled
230# in standard Python hierarchies yet
[12228]231Requires:       python3
[1073]232
233%description -n clang-analyzer
234The Clang Static Analyzer consists of both a source code analysis
235framework and a standalone tool that finds bugs in C and Objective-C
236programs. The standalone tool is invoked from the command-line, and is
237intended to run in tandem with a build of a project or code base.
238
[12228]239%package -n python3-clang
240Summary: Python3 bindings for clang
[11969]241Requires: %{name}%{ver_suffix}-libs%{?_isa} = %{version}-%{release}
[12228]242Requires: python3
243%description -n python3-clang
244Python3 bindings for clang
[11308]245
246
[9470]247#%package -n clang-doc
248#Summary:        Documentation for Clang
249#Summary(ja):    Clang のドキュメント
250#Group:          Documentation
251#Requires:       %{name} = %{version}-%{release}
252#
253#%description -n clang-doc
254#Documentation for the Clang compiler front-end.
[1073]255
[9470]256%package -n lldb
257Summary:        Next generation high-performance debugger
258Summary(ja):    高性能デバッガー
259License:        NCSA
260Group:          Development/Debuggers
[1073]261Requires:       %{name} = %{version}-%{release}
262
[9470]263%description -n lldb
264LLDB is a next generation, high-performance debugger. It is built as a set
265of reusable components which highly leverage existing libraries in the
266larger LLVM Project, such as the Clang expression parser and LLVM
267disassembler.
[1073]268
[9470]269%package -n lldb-devel
270Summary:        Header files for LLDB
271Summary(ja):    LLDB のヘッダファイル
272Group:          Development/Libraries
273Requires:       lldb = %{version}-%{release}
[1073]274
[9470]275%description -n lldb-devel
276This package contains header files for the LLDB debugger.
277
278
[11969]279%package -n lld
280Summary:        The LLVM Linker
281Summary(ja):    LLVMリンカー
282License:        NCSA
283Group:          Development/Tools
284
285%description -n lld
286The LLVM project linker.
287
288%if %{with lld_libs}
289%package -n lld-libs
290Summary:        LLD shared libraries
291Summary(ja):    LLD 共有ライブラリ
292License:        NCSA
293Group:          System Environment/Libraries
294
295%description -n lld-libs
296Shared libraries for LLD.
297
298
299%package -n lld-devel
300Summary:        Libraries and header files for LLD
301Summary(ja):    LLD 用ライブラリとヘッダファイル
302License:        NCSA
303Group:          System Environment/Libraries
304Requires:       lld-libs = %{version}-%{release}
305
306%description -n lld-devel
307This package contains library and header files needed to develop new native
308programs that use the LLD infrastructure.
309%endif
310
[9470]311%if %{with doxygen}
[1073]312%package apidoc
313Summary:        API documentation for LLVM
314Summary(ja):    LLVM の API ドキュメント
[9470]315Group:          Documentation
316BuildArch:      noarch
[1073]317Requires:       %{name}-docs = %{version}-%{release}
318
319%description apidoc
320API documentation for the LLVM compiler infrastructure.
[9470]321
322%package -n clang-apidoc
323Summary:        API documentation for Clang
324Summary(ja):    Clang の API ドキュメント
325Group:          Documentation
326BuildArch:      noarch
327
328%description -n clang-apidoc
329API documentation for the Clang compiler.
[1073]330%endif
331
[11308]332
[12228]333%package -n python3-lldb
334Summary:        Python3 module for LLDB
335Summary(ja):    LLDB用Python3モジュール
[11308]336BuildRequires:  python-devel
337Requires:       python-six
338
[12228]339%description -n python3-lldb
340The package contains the LLDB Python3 module.
[11308]341
342
[12221]343%package -n libomp
344Summary:        OpenMP runtime for clang
345Summary(ja):    clang用OpenMPランタイム
346
347%description -n libomp
348The package contains the OpenMP runtime for clang.
349
350
351%package -n libomp-devel
352Summary:        OpenMP header files
353Summary(ja):    OpenMPヘッダファイル
354Requires:       clang-devel%{?isa} = %{version}
355
356%description -n libomp-devel
357The package contains the OpenMP header files.
358
359
[11293]360%if %{with ocaml}
[1073]361%package        ocaml
362Summary:        OCaml binding for LLVM
363Summary(ja):    LLVM の OCaml バインディング
[9470]364Group:          System Environment/Libraries
[1073]365Requires:       %{name} = %{version}-%{release}
366Requires:       ocaml
367
368%description    ocaml
369OCaml binding for LLVM.
370
371%package        ocaml-devel
372Summary:        Development files for %{name}-ocaml
373Summary(ja):    %{name}-ocaml の開発ファイル
374Group:          Development/Libraries
375Requires:       %{name}-devel = %{version}-%{release}
376Requires:       %{name}-ocaml = %{version}-%{release}
377Requires:       ocaml
378
379%description    ocaml-devel
380The %{name}-ocaml-devel package contains libraries and signature files
381for developing applications that use %{name}-ocaml.
382
383%package ocaml-doc
384Summary:        Documentation for %{name}-ocaml
385Summary(ja):    %{name}-ocaml のドキュメント
386Group:          Documentation
[9470]387BuildArch:      noarch
[1073]388Requires:       %{name}-ocaml = %{version}-%{release}
[9470]389# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
390Obsoletes:      %{name}-ocaml-doc < %{version}-%{release}
[1073]391
392%description ocaml-doc
393HTML documentation for LLVM's OCaml binding.
394
[11293]395%endif
396
[9470]397# compat32'
[11969]398%package -n compat32-%{name}%{ver_suffix}-libs
[9470]399Summary:        LLVM shared libraries
400Summary(ja):    LLVM 共有ライブラリ
401Group:          System Environment/Libraries
[11969]402Provides:       compat32-llvm-libs = %{version}-%{release}
403Requires:       %{name}%{ver_suffix}-libs = %{version}-%{release}
[1073]404
[11969]405%description -n compat32-%{name}%{ver_suffix}-libs
[9470]406Shared libraries for the LLVM compiler infrastructure.
[1073]407
[9470]408
[1073]409%prep
[12221]410%setup -q -a1 -a2 -a3 -a4 -a6 -n llvm-%{version}.src
[11308]411
[12228]412#%patch0 -p2
413#%patch1 -p2
414#%patch2 -p2
415##patch3 -p2
[11308]416
[11969]417rm -rf tools/clang tools/lld tools/lldb projects/compiler-rt
[12320]418mv clang-%{version}.src tools/clang
[9470]419mv compiler-rt-%{version}.src projects/compiler-rt
420mv lldb-%{version}.src tools/lldb
[11969]421mv lld-%{version}.src tools/lld
[12221]422mv openmp-%{version}.src projects/openmp
[1073]423
[11969]424%if %{with clang_tools_extra}
425tar xvf %{SOURCE5}
426mv clang-tools-extra-%{version}.src tools/clang/tools/extra
427%endif
428
[11293]429pushd tools/clang
[12228]430##patch100 -p1
431#%patch101 -p2
432#%patch102 -p1
433#%patch103 -p2
[9470]434popd
435
[12228]436pushd projects/compiler-rt
437#%patch200 -p1
438popd
439
[11969]440pushd tools/lld
[12228]441#%patch400 -p1
[11308]442popd
443
[9470]444# Vine Linux
[11293]445%if %{with force_gold}
446pushd tools/clang
[9121]447%patch1000 -p1 -b .driver-ld.gold
[11293]448popd
449%endif
[11308]450#%patch1002 -p1 -b .driver-vine
[7201]451
[12228]452sed -i -e 's/"i686-linux-gnu",/"i686-linux-gnu","i686-vine-linux","i686-vine-linux-gnu",/' tools/clang/lib/Driver/ToolChains/Gnu.cpp
453sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-vine-linux-gnu",/' tools/clang/lib/Driver/ToolChains/Gnu.cpp
[11308]454
[11293]455sed -i -e 's/"ld"/"ld.gold"/' tools/clang/include/clang/Driver/ToolChain.h
[1073]456
457%build
[11293]458mkdir build
459cd build
460
[12228]461%ifarch s390 s390x %{arm} %ix86
462# Decrease debuginfo verbosity to reduce memory consumption during final library linking
463%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
464%endif
[11293]465
[12228]466#CFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC"
467#CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC -std=c++11"
468#TMP_PWD=$(pwd)
469#LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
470
[11293]471%cmake .. \
[12228]472        -GNinja \
[11293]473        -DBUILD_SHARED_LIBS:BOOL=OFF \
[12228]474        -DLLVM_PARALLEL_LINK_JOBS=1 \
[11293]475        -DCMAKE_BUILD_TYPE=Release \
[12228]476        -DCMAKE_INSTALL_RPATH=";" \
[11293]477%if 0%{?__isa_bits} == 64
478        -DLLVM_LIBDIR_SUFFIX=64 \
479%else
480        -DLLVM_LIBDIR_SUFFIX= \
481%endif
[12228]482        -DLLVM_TARGETS_TO_BUILD=all \
[11293]483        -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
484        -DLLVM_ENABLE_ZLIB:BOOL=ON \
485        -DLLVM_ENABLE_FFI:BOOL=ON \
486        -DLLVM_ENABLE_RTTI:BOOL=ON \
[12228]487        -DLLVM_ENABLE_EH=ON \
[11293]488        -DLLVM_BINUTILS_INCDIR=%{_includedir} \
489        -DLLVM_BUILD_RUNTIME:BOOL=ON \
490        -DLLVM_INCLUDE_TOOLS:BOOL=ON \
491        -DLLVM_BUILD_TOOLS:BOOL=ON \
492        -DLLVM_INCLUDE_TESTS:BOOL=ON \
493        -DLLVM_BUILD_TESTS:BOOL=ON \
494        -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
495        -DLLVM_BUILD_EXAMPLES:BOOL=OFF \
496        -DLLVM_INCLUDE_UTILS:BOOL=ON \
497        -DLLVM_INSTALL_UTILS:BOOL=OFF \
498        -DLLVM_INCLUDE_DOCS:BOOL=ON \
499        -DLLVM_ENABLE_SPHINX:BOOL=OFF \
[9470]500%if %{with doxygen}
[11293]501        -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
[9470]502%else
[11293]503        -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
[5555]504%endif
[11293]505        -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
[11969]506        -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
[11293]507        -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
508        -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
509        -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
510        \
511        -DCLANG_ENABLE_ARCMT:BOOL=ON \
512        -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
513        -DCLANG_INCLUDE_DOCS:BOOL=ON \
514        -DCLANG_INCLUDE_TESTS:BOOL=ON \
515        -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
516        -DCLANG_BUILD_EXAMPLES:BOOL=OFF \
[12228]517        -DCLANG_LINK_CLANG_DYLIB=ON \
518        -DCLANG_REPOSITORY_STRING="Vine Linux %{version}-%{release}" \
[11293]519        -DLIB_SUFFIX= \
520        \
521        -DLLDB_DISABLE_CURSES:BOOL=OFF \
522        -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
523        -DLLDB_DISABLE_PYTHON:BOOL=OFF \
524        \
[11969]525        -DLLDB_LINK_LLVM_DYLIB:BOOL=ON \
526        \
[12221]527        -DLIBOMP_INSTALL_ALIASES=OFF \
528        -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \
529        \
[12228]530        -DPYTHON_EXECUTABLE:STRING=%{__python3} \
[11293]531        -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
[9594]532
[11293]533# workaround for all-in-one build
[11308]534#TMP_PWD=$(pwd)
535#LD_LIBRARY_PATH="$TMP_PWD/%{_lib}" make %{?_smp_mflags}
[9594]536
[12228]537%ninja_build
538
[1073]539%install
540rm -rf %{buildroot}
[5555]541
[11293]542cd build
[12228]543%ninja_install
[4656]544
[11293]545# llvm
[9121]546
[11293]547install -m755 ./bin/lli-child-target %{buildroot}%{_bindir}/lli-child-target
[4656]548
[11293]549# fix multi-lib
550mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
[11308]551ln -sf llvm-config-%{__isa_bits} %{buildroot}%{_bindir}/llvm-config
[11293]552mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
553install -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
[1073]554
[11293]555# clang
[9470]556
[11308]557# remove static libraries
558rm -fv %{buildroot}%{_libdir}/libclang*.a
559
560# install clang python bindings
[12228]561mkdir -p %{buildroot}%{python3_sitelib}/clang/
562install -p -m644 ../tools/clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
[11308]563
[11293]564mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
565install -m 0644 %{SOURCE11} %{buildroot}%{_includedir}/clang/Config/config.h
[9470]566
[11293]567# remove git integration
568rm -vf %{buildroot}%{_bindir}/git-clang-format
569# remove editor integrations (bbedit, sublime, emacs, vim)
570rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
571rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
572rm -vf %{buildroot}%{_datadir}/clang/clang-format.el
573rm -vf %{buildroot}%{_datadir}/clang/clang-format.py*
574# remove diff reformatter
575rm -vf %{buildroot}%{_datadir}/clang/clang-format-diff.py*
[9470]576
577
[11293]578# lldb
[1073]579
[11293]580# remove static libraries
[11308]581rm -fv %{buildroot}%{_libdir}/liblldb*.a
[1073]582
[11293]583# python: fix binary libraries location
584liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
[12228]585ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
[1073]586
[11293]587# remove bundled six.py
[12228]588rm -f %{buildroot}%{python3_sitearch}/six.*
[1073]589
[9594]590
[11969]591# lld
[11308]592
[11969]593# remove static libraries
594rm -fv %{buildroot}%{_libdir}/liblld*.a
595
596# Remove rpath
597chrpath --delete %{buildroot}%{_bindir}/*lld
598chrpath --delete %{buildroot}%{_bindir}/lld-link
599chrpath --delete %{buildroot}%{_bindir}/wasm-ld
600find %{buildroot}%{_libdir} -type f -name 'liblld*.so*' | \
601  grep -v 'liblldb' | \
602  xargs chrpath --delete
603
604%if !%{with lld_libs}
605  rm -rf %{buildroot}%{_includedir}/lld
606%endif
607
[11293]608# compiler-rt
[9470]609
[11293]610# move sanitizer lists to better place
611mkdir -p %{buildroot}%{_libdir}/clang/%{version}
612for file in asan_blacklist.txt msan_blacklist.txt dfsan_blacklist.txt cfi_blacklist.txt dfsan_abilist.txt; do
613        mv -v %{buildroot}%{_prefix}/${file} %{buildroot}%{_libdir}/clang/%{version}/ || :
[1073]614done
615
[11293]616# move sanitizer libs to better place
617#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
618#mv -v %{buildroot}%{_prefix}/lib/linux/libclang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
619#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
620#pushd %{buildroot}%{_libdir}/clang/%{version}/lib
621#for i in *.a *.syms *.so; do
622#        ln -s ../$i linux/$i
623#done
[1073]624
[11308]625#rm -rf %{buildroot}%{_libdir}/python*
[1073]626
[11308]627rm -f %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
628rm -f %{buildroot}%{_datadir}/clang/clang-rename.el
629rm -f %{buildroot}%{_datadir}/clang/clang-rename.py
[1073]630
[12228]631%if %{with test}
[4656]632%check
[12228]633ninja -C build check
634ninja -C build check-clang
635ninja -C build check-lldb
636ninja -C build check-lld
637%endif
[4656]638
[1073]639%clean
640rm -rf %{buildroot}
641
642
[11969]643%post -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
644%postun -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
[1073]645
[9470]646%post -n clang-libs -p /sbin/ldconfig
647%postun -n clang-libs -p /sbin/ldconfig
[1073]648
[9470]649%post -n lldb -p /sbin/ldconfig
650%postun -n lldb -p /sbin/ldconfig
[1073]651
[11969]652%post -n lld
653  /sbin/alternatives --install /usr/bin/ld ld \
654  /usr/bin/ld.lld 20
[1073]655
[11969]656%preun -n lld
657if [ $1 = 0 ]; then
658  /sbin/alternatives --remove ld /usr/bin/ld.lld
659fi
660
661%if %{with lld_libs}
662%post -n lld-libs -p /sbin/ldconfig
663%postun -n lld-libs -p /sbin/ldconfig
664%endif
665
[4656]666%posttrans devel
667# link llvm-config to the platform-specific file;
668# use ISA bits as priority so that 64-bit is preferred
669# over 32-bit if both are installed
670alternatives \
671  --install \
672  %{_bindir}/llvm-config \
673  llvm-config \
674  %{_bindir}/llvm-config-%{__isa_bits} \
675  %{__isa_bits}
676
677%postun devel
678if [ $1 -eq 0 ]; then
679  alternatives --remove llvm-config \
680    %{_bindir}/llvm-config-%{__isa_bits}
681fi
682exit 0
683
684
[1073]685%files
686%defattr(-,root,root,-)
[9470]687%doc CREDITS.TXT README.txt
[1073]688%{_bindir}/bugpoint
[11969]689%{_bindir}/dsymutil
[1073]690%{_bindir}/llc
691%{_bindir}/lli
[9121]692%{_bindir}/lli-child-target
[11293]693%{_bindir}/obj2yaml
694%{_bindir}/sancov
[11308]695%{_bindir}/sanstats
[11293]696%{_bindir}/verify-uselistorder
697%{_bindir}/yaml2obj
[11308]698%exclude %{_bindir}/llvm-config
[4656]699%exclude %{_bindir}/llvm-config-%{__isa_bits}
[1073]700%{_bindir}/llvm*
701%{_bindir}/opt
[9470]702%exclude %{_mandir}/man1/scan-build.1.*
[1073]703%doc %{_mandir}/man1/*.1.*
[11308]704%{_datadir}/opt-viewer
[1073]705
706%files devel
707%defattr(-,root,root,-)
[9470]708#doc %{llvmdocdir %{name}-devel}/
[11308]709%{_bindir}/llvm-config
[4656]710%{_bindir}/llvm-config-%{__isa_bits}
[1073]711%{_includedir}/%{name}
712%{_includedir}/%{name}-c
[12221]713#{_libdir}/BugpointPasses.so
[11293]714%{_libdir}/libLLVM.so
[11985]715%{_libdir}/libLTO.so*
[12221]716%{_libdir}/libRemarks.so
[12354]717%{_libdir}/LLVMgold.so
[11308]718%{_libdir}/cmake/llvm
[12228]719#exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
[1073]720
[11969]721%files -n llvm%{ver_suffix}-libs
[4656]722%defattr(-,root,root,-)
[9470]723%doc LICENSE.TXT
[11293]724#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
725#dir %{_libdir}/%{name}
726%{_libdir}/libLLVM-*.so
[12221]727%{_libdir}/libRemarks.so.*
728#exclude %{_libdir}/LLVMHello.so
[4656]729
[11308]730%files static
731%{_libdir}/*.a
[12228]732#{_libdir}/cmake/llvm/LLVMStaticExports.cmake
[11308]733
[1073]734%files -n clang
735%defattr(-,root,root,-)
[11293]736#doc %{llvmdocdir clang}/
[1073]737%{_bindir}/clang*
[7197]738%{_bindir}/c-index-test
[11969]739%{_bindir}/diagtool
740%{_bindir}/hmaptool
[11293]741%{_libdir}/clang
[1073]742
[9470]743%files -n clang-libs
744%defattr(-,root,root,-)
[11293]745%{_libdir}/libclang.so
746%{_libdir}/libclang.so.*
[12221]747%{_libdir}/libclang-cpp.so
748%{_libdir}/libclang-cpp.so.*
[9470]749
[1073]750%files -n clang-devel
751%defattr(-,root,root,-)
[9470]752#doc %{llvmdocdir clang-devel}/
[1073]753%{_includedir}/clang
754%{_includedir}/clang-c
[11293]755%dir %{_datadir}/clang/
[11308]756%{_libdir}/cmake/*
[1073]757
758%files -n clang-analyzer
759%defattr(-,root,root,-)
760%{_bindir}/scan-build
761%{_bindir}/scan-view
[12320]762#%{_libdir}/CheckerDependencyHandlingAnalyzerPlugin.so
763#%{_libdir}/CheckerOptionHandlingAnalyzerPlugin.so
764#%{_libdir}/SampleAnalyzerPlugin.so
[11293]765%{_libexecdir}/ccc-analyzer
766%{_libexecdir}/c++-analyzer
767%{_datadir}/scan-view
768%{_datadir}/scan-build
[9470]769%{_mandir}/man1/scan-build.1.*
[1073]770
[12228]771%files -n python3-clang
772%{python3_sitelib}/clang/
[11308]773
[9470]774%files -n lldb
[1073]775%defattr(-,root,root,-)
[11293]776#doc %{llvmdocdir lldb}/
[11308]777%{_bindir}/lldb*
[11969]778%{_libdir}/liblldb*.so.*
[1073]779
[9470]780%files -n lldb-devel
781%defattr(-,root,root,-)
782%{_includedir}/lldb
[11969]783%{_libdir}/liblldb*.so
[9470]784
[12228]785%files -n python3-lldb
786%{python3_sitearch}/lldb
[11293]787
[11969]788%files -n lld
789%defattr(-,root,root,-)
790%{_bindir}/lld*
791%{_bindir}/ld.lld
792%{_bindir}/ld64.lld
793%{_bindir}/wasm-ld
794%exclude %{_bindir}/lldb*
795
796%if %{with lld_libs}
797%files -n lld-libs
798%{_libdir}/liblld*.so.*
799%exclude %{_libdir}/liblldb*.so.*
800
801%files -n lld-devel
802%{_includedir}/lld
803%{_libdir}/liblld*.so
804%exclude %{_libdir}/liblldb*.so
805%endif
806
[12221]807%files -n libomp
[12354]808%{_libdir}/libarcher.so
[12221]809%{_libdir}/libomp.so
810%{_libdir}/libomptarget.so
811
812%files -n libomp-devel
813%{_libdir}/clang/%{version}/include/omp.h
814%{_libdir}/clang/%{version}/include/omp-tools.h
815%{_libdir}/clang/%{version}/include/ompt.h
816
[1073]817%files doc
818%defattr(-,root,root,-)
[11293]819%doc docs/*
820#doc %{llvmdocdir %{name}-doc}/
[1073]821
[11293]822%if %{with ocaml}
[1073]823%files ocaml
824%defattr(-,root,root,-)
825%{_libdir}/ocaml/*.cma
826%{_libdir}/ocaml/*.cmi
[9073]827%{_libdir}/ocaml/*.so
828%{_libdir}/ocaml/META.llvm*
[1073]829
830%files ocaml-devel
831%defattr(-,root,root,-)
832%{_libdir}/ocaml/*.a
833%{_libdir}/ocaml/*.cmx*
834%{_libdir}/ocaml/*.mli
835
836%files ocaml-doc
837%defattr(-,root,root,-)
[9594]838#doc %{llvmdocdir %{name}-ocaml-doc}/
[11293]839%endif
[1073]840
[4656]841%if 0%{?_with_doxygen}
[1073]842%files apidoc
843%defattr(-,root,root,-)
[9470]844%doc %{llvmdocdir %{name}-apidoc}/
[4656]845
846%files -n clang-apidoc
847%defattr(-,root,root,-)
[9470]848%doc %{llvmdocdir clang-apidoc}/
[1073]849%endif
850
[9470]851%if %{build_compat32}
[11969]852%files -n compat32-%{name}%{ver_suffix}-libs
[9470]853%defattr(-,root,root)
854%doc LICENSE.TXT
[11293]855#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
[11985]856%exclude %{_libdir}/libLTO.so
[12228]857#exclude %{_libdir}/BugpointPasses.so
858%exclude %{_libdir}/libclang*.so
[11969]859%exclude %{_libdir}/liblld*.so
[11985]860%exclude %{_libdir}/LLVMGold.so
[11293]861%exclude %{_libdir}/LLVMHello.so
862%{_libdir}/*.so
[11308]863%{_libdir}/libLTO.so.*
[9470]864%endif
[1073]865
[4656]866%changelog
[12376]867* Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
868- rebuilt with libffi-3.3.
869
870* Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
871- new upstream release.
872
[12320]873* Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
874- new upstream release.
875
[12228]876* Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
877- dropped all patches.
878- switched build-system to ninja.
879- switched python to python3.
880
[12221]881* Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
882- new upstream release.
883- added OpenMP.
884
[11985]885* Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
886- fixed %%files.
887
[11969]888* Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
889- new upstream release.
890- dropped Patch0, 4, 5, 100 and 200.
891- imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
892- renamed a subpackage "llvm-libs".
893- added a subpackage "lld".
894
[11308]895* Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
896- added subpackages "llvm-static", "python-lldb" and "python-clang".
897
898* Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
899- new upstream release.
900- dropped Patch1 and 2: fixed in upstream.
901- imported Patch0, 3-5, 100 and 200 from rawhide.
902- disabled Patch1002: no longer needed?
903
[11293]904* Fri Aug  5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
905- new upstream release.
906- switched to cmake.
907- disable ocaml binding as default.
908- updated Patch1000 and 1002.
909- disabled Patch1000 as default.
910- cleanup patches.
911
[10438]912* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
913- rebuild with gcc-5.4.0
914
[9734]915* Sat Sep  5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
916- new upstream release
917- added BR: ocaml-ctypes
918
[9594]919* Thu Jun  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
920- new upstream release
921- dropt Patch 1, 201 and 1001
922- updated Patch 1000
923
[9470]924* Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
925- updated to 3.5.1
926- added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
927- added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
928- obsoleted clang-doc
929- built with ocaml 4.02.1
930
[9121]931* Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
932- fix <BTS:2832>
933  - fix configure option "--with-c-include-dirs"
934  - update Patch1000: clang-3.5.0-driver-ld.gold.patch
935  - update Patch1001: clang-3.5.0-driver-lib64.patch
936  - update Patch1002: clang-3.5.0-driver-vine.patch
937
[9073]938* Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
939- update to 3.5.0
940- remove Patch11 (clang-hardfloat-hack.patch)
941
[8758]942* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
943- rebuild with libffi-3.0.13
944
[7943]945* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
946- update to 3.3
947
[7201]948* Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
949- ld.gold (patch1000,1001)
950- add /%{_lib} to ld search path
951- add support *-vine-linux gcc (patch1002)
952
[7197]953* Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
954- update to 3.1
955
[5555]956* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
957- updated to 3.0 release
958
[5424]959* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
960- added patch 2-4 to support -O4 link-time optimization
961
[4738]962* Fri Sep  9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
963- disable -fno-var-tracking-assignments on ppc
964  (seems like gcc-4.4.5 still doesn't support this)
965
[4656]966* Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
967- new upstream release
968- add BR: libffi-devel
969- add R: libffi-devel to -devel
[1073]970
971* Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
972- initial build for Vine Linux
973
974* Sun May  2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
975- Update to final 2.7 release
976
977* Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
978- Update to first 2.7 pre-release
979
980* Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
981- Update to 2.6 pre-release2
982- -devel subpackage now virtually provides -static
983
984* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
985- Disable var tracking assignments on PPC
986
987* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
988- Don't adjust clang include dir; files there are noarch (bz#521893)
989- Enable clang unit tests
990- clang and clang-analyzer renamed; no longer depend on llvm at runtime
991
992* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
993- Package Clang's static analyzer tools
994
995* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
996- PIC is now enabled by default; explicitly disable on %%{ix86}
997
998* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
999- First 2.6 prerelease
1000- Enable Clang front-end
1001- Enable debuginfo generation
1002
1003* Sat Sep  5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
1004- Disable assertions (needed by OpenGTL, bz#521261)
1005- Align spec file with upstream build instructions
1006- Enable unit tests
1007
1008* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
1009- Only disable PIC on %%ix86; ppc actually needs it
1010
1011* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
1012- Disable use of position-independent code on 32-bit platforms
1013  (buggy in LLVM <= 2.5)
1014
1015* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
1016- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1017
1018* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
1019- Remove build scripts; they require the build directory to work
1020
1021* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
1022- Update to 2.5
1023- Package build scripts (bug #457881)
1024
1025* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
1026- Patched build process for the OCaml binding
1027
1028* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
1029- Update to 2.4
1030- Package Ocaml binding
1031
1032* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
1033- Add dependency on groff
1034
1035* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
1036- LLVM 2.3
1037
1038* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
1039- fix license tags
1040
1041* Wed Mar  5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
1042- Fix compilation problems with gcc 4.3
1043
1044* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
1045- Autorebuild for GCC 4.3
1046
1047* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
1048- Fix review comments
1049
1050* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
1051- Initial version
Note: See TracBrowser for help on using the repository browser.