Accepting request 425227 from home:scarabeus_iv:branches:devel:tools:compiler

- Sort out with spec-cleaner

- Sort a bit with spec-cleaner
- Remove the latest switch for now, things should be either coinstallable
  or not, we don't need to bother around with compilation like this

OBS-URL: https://build.opensuse.org/request/show/425227
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=470
This commit is contained in:
Ismail Dönmez 2016-09-07 11:28:21 +00:00 committed by Git OBS Bridge
parent c1dc23af67
commit 602347572f
4 changed files with 72 additions and 106 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Sep 7 10:01:47 UTC 2016 - tchvatal@suse.com
- Sort out with spec-cleaner
-------------------------------------------------------------------
Thu Aug 31 20:36:58 UTC 2016 - toddrme2178@gmail.com

View File

@ -16,11 +16,11 @@
#
%define _sonum 3_8
%define _revsn 273405
Name: lldb
Version: 3.8.1
Release: 0
%define _sonum 3_8
%define _revsn 273405
Summary: Software debugger built using LLVM libraries
License: NCSA
Group: Development/Tools/Debuggers
@ -36,6 +36,7 @@ BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: ncurses-devel
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: swig
BuildRequires: cmake(Clang) = %{version}
BuildRequires: cmake(LLVM) = %{version}
@ -44,10 +45,10 @@ BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(python2)
BuildRequires: pkgconfig(zlib)
Requires: python
Requires: python-six
# Avoid multiple provider errors
Requires: liblldb%{_sonum} = %{version}
Requires: python
Requires: python-six
ExclusiveArch: arm x86_64
%description
@ -56,7 +57,6 @@ of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
%package -n liblldb%{_sonum}
Summary: LLDB software debugger runtime library
Group: System/Libraries
@ -67,7 +67,6 @@ Requires: libclang%{_sonum} = %{version}
%description -n liblldb%{_sonum}
This subpackage contains the main LLDB component.
%package devel
Summary: Development files for LLDB
Group: Development/Languages/Other
@ -85,7 +84,6 @@ Requires: pkgconfig(zlib)
%description devel
This package contains the development files for LLDB.
%package -n python-lldb
Summary: Python bindings for liblldb
Group: Development/Languages/Python
@ -95,7 +93,6 @@ Requires: python
%description -n python-lldb
This package contains the Python bindings to clang (C language) frontend for LLVM.
%prep
%setup -q -n %{name}-%{version}.src
%patch0 -p1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Sep 7 10:05:32 UTC 2016 - tchvatal@suse.com
- Sort a bit with spec-cleaner
- Remove the latest switch for now, things should be either coinstallable
or not, we don't need to bother around with compilation like this
-------------------------------------------------------------------
Thu Aug 31 20:36:58 UTC 2016 - toddrme2178@gmail.com

153
llvm.spec
View File

@ -16,39 +16,27 @@
#
# Change this to 0 if this is not the latest version of LLVM
%define _latest 1
%bcond_with ffi
%bcond_with oprofile
%bcond_with valgrind
%if !0%{?is_opensuse} || !0%{_latest}
%bcond_with libcxx
%bcond_with openmp
%else
%ifarch x86_64
%bcond_without libcxx
%else
%bcond_with libcxx
%endif
%ifarch ppc64 ppc64le %{ix86} x86_64
%bcond_without openmp
%else
%bcond_with openmp
%endif
%endif
Name: llvm
Version: 3.8.1
Release: 0
%define _relver 3.8.1
%define _minor 3.8
%define _sonum 3_8
%define _socxx 1
%define _revsn 273405
%ifarch x86_64
%bcond_without libcxx
%else
%bcond_with libcxx
%endif
%ifarch ppc64 ppc64le %{ix86} x86_64
%bcond_without openmp
%else
%bcond_with openmp
%endif
%bcond_with ffi
%bcond_with oprofile
%bcond_with valgrind
Name: llvm
Version: 3.8.1
Release: 0
Summary: Low Level Virtual Machine
License: NCSA
Group: Development/Languages/Other
@ -80,7 +68,6 @@ Patch8: revert-cmake-soname.patch
Patch9: llvm-nonvoid-return.patch
Patch20: glibc-2.23-libcxx.patch
Patch21: glibc-2.24-libcxx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: binutils-devel >= 2.21.90
BuildRequires: bison
BuildRequires: cmake
@ -93,10 +80,16 @@ BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: procps
BuildRequires: python-base
BuildRequires: python-xml
BuildRequires: pkgconfig(libedit)
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# llvm does not work on ppc or s390
ExcludeArch: ppc s390
%if %{with ffi}
BuildRequires: pkgconfig(libffi)
%endif
@ -106,10 +99,6 @@ BuildRequires: pkgconfig(valgrind)
%if %{with oprofile}
BuildRequires: oprofile-devel
%endif
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
# llvm does not work on ppc or s390
ExcludeArch: ppc s390
%description
LLVM is a compiler infrastructure designed for compile-time,
@ -119,7 +108,6 @@ arbitrary programming languages.
The compiler infrastructure includes mirror sets of programming
tools as well as libraries with equivalent functionality.
%package -n libLLVM%{_sonum}
Summary: Libraries for LLVM
Group: Development/Libraries/C and C++
@ -127,11 +115,9 @@ Group: Development/Libraries/C and C++
%description -n libLLVM%{_sonum}
This package contains the shared libraries needed for LLVM.
%package devel
Summary: Header Files for LLVM
Group: Development/Languages/Other
Conflicts: otherproviders(cmake(LLVM))
Requires: %{name} = %{version}
Requires: binutils-devel >= 2.21.90
Requires: bison
@ -140,7 +126,9 @@ Requires: groff
Requires: libstdc++-devel
Requires: libtool
Requires: ncurses-devel
Requires: pkgconfig
Requires: pkgconfig(libedit)
Conflicts: otherproviders(cmake(LLVM))
%if %{with ffi}
Requires: pkgconfig(libffi)
%endif
@ -155,63 +143,58 @@ Requires: oprofile-devel
This package contains library and header files needed to develop
new native programs that use the LLVM infrastructure.
%package clang
Summary: CLANG frontend for LLVM
Group: Development/Languages/Other
Recommends: scan-build
Recommends: scan-view
Recommends: LLVMgold.so()(64bit)
%if %{with openmp} && %{_latest}
Recommends: libomp
%endif
# Avoid multiple provider errors
Requires: libLTO%{_sonum}
Requires: libc++%{_socxx}
Requires: libclang%{_sonum}
Recommends: LLVMgold.so()(64bit)
Recommends: scan-build
Recommends: scan-view
%if %{with openmp}
Recommends: libomp
%endif
%description clang
This package contains the clang (C language) frontend for LLVM.
%package clang-checker
Summary: Static code analyzer for CLANG
Group: Development/Languages/Other
Provides: scan-build
Provides: scan-view
Conflicts: otherproviders(scan-build)
Conflicts: otherproviders(scan-view)
# Avoid multiple provider errors
Requires: libclang%{_sonum}
Conflicts: otherproviders(scan-build)
Conflicts: otherproviders(scan-view)
Provides: scan-build
Provides: scan-view
%description clang-checker
This package contains scan-build and scan-view, command line
static code analyzers for CLANG.
%package -n libclang%{_sonum}
Summary: Library files needed for clang
Group: Development/Libraries/C and C++
Requires: libstdc++-devel
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
Requires: libstdc++-devel
%description -n libclang%{_sonum}
This package contains the shared libraries needed for clang.
%package clang-devel
Summary: CLANG frontend for LLVM (devel package)
Group: Development/Languages/Other
Conflicts: otherproviders(cmake(Clang))
Requires: llvm-clang = %{version}
Requires: cmake(LLVM) = %{version}
Conflicts: otherproviders(cmake(Clang))
%description clang-devel
This package contains the clang (C language) frontend for LLVM.
(development files)
%package -n libLTO%{_sonum}
Summary: Link-time optimizer for LLVM
Group: Development/Languages/Other
@ -221,46 +204,42 @@ Requires: libLLVM%{_sonum}
%description -n libLTO%{_sonum}
This package contains the link-time optimizer for LLVM.
%package LTO-devel
Summary: Link-time optimizer for LLVM (devel package)
Group: Development/Languages/Other
Provides: libLTO.so
Conflicts: otherproviders(libLTO.so)
Requires: cmake(LLVM) = %{version}
# Avoid multiple provider errors
Requires: libLTO%{_sonum}
Requires: cmake(LLVM) = %{version}
Conflicts: otherproviders(libLTO.so)
Provides: libLTO.so
%description LTO-devel
This package contains the link-time optimizer for LLVM.
(development files)
%package gold
Summary: Gold linker plugin for LLVM
Group: Development/Languages/Other
Provides: LLVMgold.so()(64bit)
Conflicts: otherproviders(LLVMgold.so()(64bit))
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
Requires: cmake(LLVM) = %{version}
Conflicts: otherproviders(LLVMgold.so()(64bit))
Provides: LLVMgold.so()(64bit)
%description gold
This package contains the Gold linker plugin for LLVM.
%package -n libomp
Summary: MPI plugin for LLVM
Group: Development/Languages/Other
Provides: libomp.so()(64bit)
Conflicts: otherproviders(libomp.so()(64bit))
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
Conflicts: otherproviders(libomp.so()(64bit))
Provides: libomp.so()(64bit)
%description -n libomp
This package contains the OpenMP MPI plugin for LLVM.
%package -n libc++%{_socxx}
Summary: C++ standard library implementation
Group: Development/Libraries/C and C++
@ -269,18 +248,16 @@ Group: Development/Libraries/C and C++
This package contains libc++, a new implementation of the C++
standard library, targeting C++11.
%package libc++-devel
Summary: C++ standard library implementation (devel package)
Group: Development/Languages/C and C++
Provides: libc++.so
Conflicts: otherproviders(libc++.so)
Provides: libc++.so
%description libc++-devel
This package contains libc++, a new implementation of the C++
standard library, targeting C++11. (development files)
%package -n libc++abi%{_socxx}
Summary: C++ standard library ABI
Group: Development/Libraries/C and C++
@ -289,45 +266,41 @@ Group: Development/Libraries/C and C++
This package contains the ABI for libc++, a new implementation
of the C++ standard library, targeting C++11.
%package libc++abi-devel
Summary: C++ standard library ABI (devel package)
Group: Development/Languages/C and C++
Provides: libc++abi.so
Conflicts: otherproviders(libc++abi.so)
# Avoid multiple provider errors
Requires: %{name}-libc++-devel
Conflicts: otherproviders(libc++abi.so)
Provides: libc++abi.so
%description libc++abi-devel
This package contains the ABI for libc++, a new implementation
of the C++ standard library, targeting C++11.
(development files)
%package vim-plugins
Summary: Vim plugins for LLVM
Group: Productivity/Text/Editors
Provides: vim-plugin-llvm
Conflicts: otherproviders(vim-plugin-llvm)
Requires: vim
Conflicts: otherproviders(vim-plugin-llvm)
Provides: vim-plugin-llvm
BuildArch: noarch
%description vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.
%package emacs-plugins
Summary: Emacs plugins for LLVM
Group: Productivity/Text/Editors
Provides: emacs-llvm
Conflicts: otherproviders(emacs-llvm)
Requires: emacs
Conflicts: otherproviders(emacs-llvm)
Provides: emacs-llvm
BuildArch: noarch
%description emacs-plugins
This package contains Emacs plugins for LLVM like syntax highlighting.
%package -n python-clang
Summary: Python 2 bindings for libclang
Group: Development/Languages/Python
@ -339,7 +312,6 @@ BuildArch: noarch
This package contains the Python 2.x bindings to clang (C language)
frontend for LLVM.
%prep
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -b 50 -a 51 -n llvm-%{version}.src
%patch1
@ -445,7 +417,7 @@ export CXX=${PWD}/stage1/bin/clang++
-DLLVM_ENABLE_TIMESTAMPS=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_BINUTILS_INCDIR=%{_includedir} \
-DLLVM_TARGETS_TO_BUILD=${TARGETS_TO_BUILD} \
%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
@ -478,23 +450,22 @@ ninja -v -j $ninjaproc
# Build man/html pages
pushd docs
rm -rf %{buildroot}/usr/docs
rm -rf %{buildroot}%{_prefix}/docs
mkdir -p %{buildroot}%{_docdir}/llvm/html
mkdir -p %{buildroot}/usr/share/man/man1
cp -r _build/man/* %{buildroot}/usr/share/man/man1
mkdir -p %{buildroot}%{_mandir}/man1
cp -r _build/man/* %{buildroot}%{_mandir}/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm/html
popd
pushd tools/clang/docs
mkdir -p %{buildroot}%{_docdir}/llvm-clang/html
cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/man/* %{buildroot}%{_mandir}/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html
popd
# install python bindings
# The python bindings use the unversioned libclang.so,
# so it doesn't make sense to have multiple versions of it
%if %{_latest}
install -d %{buildroot}%{python_sitelib}/clang
pushd tools/clang/bindings/python
cp clang/*.py %{buildroot}%{python_sitelib}/clang
@ -503,7 +474,6 @@ cp -r examples %{buildroot}%{_docdir}/python-clang
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
cp -r tests %{buildroot}%{_docdir}/python-clang
popd
%endif
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
@ -573,22 +543,16 @@ ninja -v %{?_smp_mflags} check-libcxxabi
%post -n libLLVM%{_sonum} -p /sbin/ldconfig
%postun -n libLLVM%{_sonum} -p /sbin/ldconfig
%post -n libclang%{_sonum} -p /sbin/ldconfig
%postun -n libclang%{_sonum} -p /sbin/ldconfig
%post -n libLTO%{_sonum} -p /sbin/ldconfig
%postun -n libLTO%{_sonum} -p /sbin/ldconfig
%post gold -p /sbin/ldconfig
%postun gold -p /sbin/ldconfig
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%post clang-devel -p /sbin/ldconfig
%postun clang-devel -p /sbin/ldconfig
%post LTO-devel -p /sbin/ldconfig
%postun LTO-devel -p /sbin/ldconfig
@ -600,13 +564,10 @@ ninja -v %{?_smp_mflags} check-libcxxabi
%if %{with libcxx}
%post -n libc++%{_socxx} -p /sbin/ldconfig
%postun -n libc++%{_socxx} -p /sbin/ldconfig
%post -n libc++abi%{_socxx} -p /sbin/ldconfig
%postun -n libc++abi%{_socxx} -p /sbin/ldconfig
%post libc++-devel -p /sbin/ldconfig
%postun libc++-devel -p /sbin/ldconfig
%post libc++abi-devel -p /sbin/ldconfig
%postun libc++abi-devel -p /sbin/ldconfig
%endif
@ -739,9 +700,6 @@ ninja -v %{?_smp_mflags} check-libcxxabi
%dir %{_datadir}/clang/
%{_datadir}/clang/clang-format.py
# The python bindings use the unversioned libclang.so,
# so it doesn't make sense to have multiple versions of it
%if %{_latest}
%files -n python-clang
%defattr(-,root,root)
%{python_sitelib}/clang/
@ -749,6 +707,5 @@ ninja -v %{?_smp_mflags} check-libcxxabi
%{python_sitelib}/clang/cindex.py
%{python_sitelib}/clang/enumerations.py
%{_docdir}/python-clang/
%endif
%changelog