This commit is contained in:
Bryan O'Sullivan 2008-12-12 05:46:36 +00:00
parent e2fa788ceb
commit 03bad00517
4 changed files with 126 additions and 58 deletions

View File

@ -1 +1 @@
llvm-2.3.tar.gz llvm-2.4.tar.gz

11
llvm-2.4-fix-ocaml.patch Normal file
View File

@ -0,0 +1,11 @@
--- llvm-2.4/bindings/ocaml/Makefile.ocaml.ocaml-symlinks 2008-03-10 12:15:32.000000000 -0400
+++ llvm-2.4/bindings/ocaml/Makefile.ocaml 2008-12-02 16:29:01.000000000 -0500
@@ -160,7 +160,7 @@
install-deplibs:
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
- ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
+ ln -sf "${OVERRIDE_libdir}/$$i" "$(PROJ_libocamldir)/$$i"; \
done
uninstall-deplibs:

169
llvm.spec
View File

@ -10,31 +10,35 @@
# LLVM object files don't contain build IDs. I don't know why yet. # LLVM object files don't contain build IDs. I don't know why yet.
# Suppress their generation for now. # Suppress their generation for now.
%define __debug_install_post echo not building debuginfo
Name: llvm %define debug_package %{nil}
Version: 2.3
Release: 2%{?dist} Name: llvm
Summary: The Low Level Virtual Machine Version: 2.4
License: NCSA Release: 2%{?dist}
Group: Development/Languages Summary: The Low Level Virtual Machine
URL: http://llvm.org/
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz Group: Development/Languages
License: NCSA
URL: http://llvm.org/
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
%if %{?_with_gcc:1}%{!?_with_gcc:0} %if %{?_with_gcc:1}%{!?_with_gcc:0}
Source1: http://llvm.org/releases/%{version}/llvm-gcc%{lgcc_version}-%{version}.source.tar.gz Source1: http://llvm.org/releases/%{version}/llvm-gcc%{lgcc_version}-%{version}.source.tar.gz
%endif %endif
Patch0: llvm-2.1-fix-sed.patch
Patch1: llvm-2.4-fix-ocaml.patch
Patch0: llvm-2.1-fix-sed.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: bison
BuildRequires: bison BuildRequires: chrpath
BuildRequires: chrpath BuildRequires: flex
BuildRequires: flex BuildRequires: gcc-c++ >= 3.4
BuildRequires: gcc-c++ >= 3.4 BuildRequires: groff
BuildRequires: groff BuildRequires: libtool-ltdl-devel
BuildRequires: libtool-ltdl-devel BuildRequires: ocaml-ocamldoc
%if %{?_with_doxygen:1}%{!?_with_doxygen:0} %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
BuildRequires: doxygen graphviz BuildRequires: doxygen graphviz
%endif %endif
%description %description
@ -51,10 +55,10 @@ ends derived from GCC %{lgcc_version}.
%package devel %package devel
Summary: Libraries and header files for LLVM Summary: Libraries and header files for LLVM
Group: Development/Languages Group: Development/Languages
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: libstdc++-devel >= 3.4 Requires: libstdc++-devel >= 3.4
%description devel %description devel
@ -63,10 +67,9 @@ native programs that use the LLVM infrastructure.
%package doc %package doc
Summary: Documentation for LLVM Summary: Documentation for LLVM
Group: Development/Languages Group: Development/Languages
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description doc %description doc
Documentation for the LLVM compiler infrastructure. Documentation for the LLVM compiler infrastructure.
@ -75,10 +78,10 @@ Documentation for the LLVM compiler infrastructure.
%if %{?_with_gcc:1}%{!?_with_gcc:0} %if %{?_with_gcc:1}%{!?_with_gcc:0}
%package gcc %package gcc
Summary: C compiler for LLVM Summary: C compiler for LLVM
License: GPL+ License: GPL+
Group: Development/Languages Group: Development/Languages
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description gcc %description gcc
@ -86,10 +89,10 @@ C compiler for LLVM.
%package gcc-c++ %package gcc-c++
Summary: C++ compiler for LLVM Summary: C++ compiler for LLVM
License: GPL+ License: GPL+
Group: Development/Languages Group: Development/Languages
Requires: %{name}-gcc = %{version}-%{release} Requires: %{name}-gcc = %{version}-%{release}
%description gcc-c++ %description gcc-c++
@ -100,9 +103,9 @@ C++ compiler for LLVM.
%if %{?_with_doxygen:1}%{!?_with_doxygen:0} %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
%package apidoc %package apidoc
Summary: API documentation for LLVM Summary: API documentation for LLVM
Group: Development/Languages Group: Development/Languages
Requires: %{name}-docs = %{version}-%{release} Requires: %{name}-docs = %{version}-%{release}
%description apidoc %description apidoc
@ -110,16 +113,34 @@ API documentation for the LLVM compiler infrastructure.
%endif %endif
%package ocaml
Summary: OCaml binding for LLVM
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: ocaml-runtime
%description ocaml
OCaml binding for LLVM.
%package ocaml-devel
Summary: Development files for %{name}-ocaml
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-ocaml = %{version}-%{release}
%description ocaml-devel
The %{name}-ocaml-devel package contains libraries and signature files
for developing applications that use %{name}-ocaml.
%prep %prep
%setup -q -n llvm-%{version} %{?_with_gcc:-a1} %setup -q -n llvm-%{version} %{?_with_gcc:-a1}
%patch0 -p1 -b .fix-sed %patch0 -p1 -b .fix-sed
%patch1 -p1 -b .fix-ocaml
%build %build
# We're not building a debuginfo package yet, because some generated
# files don't include build IDs.
cat /dev/null > debugfiles.list
%configure \ %configure \
--libdir=%{_libdir}/%{name} \ --libdir=%{_libdir}/%{name} \
--datadir=%{_datadir}/%{name}-%{version} \ --datadir=%{_datadir}/%{name}-%{version} \
@ -129,10 +150,12 @@ cat /dev/null > debugfiles.list
--enable-jit \ --enable-jit \
--enable-optimized \ --enable-optimized \
--enable-shared \ --enable-shared \
--enable-targets=host-only \
--with-pic --with-pic
make %{_smp_mflags} tools-only VERBOSE=1 OmitFramePointer='' REQUIRES_EH=1 \ # --enable-targets=host-only \
OPTIMIZE_OPTION='%{optflags}'
make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}'
# tools-only VERBOSE=1 OmitFramePointer='' REQUIRES_EH=1 \
# OPTIMIZE_OPTION='%{optflags}'
%if %{?_with_gcc:1}%{!?_with_gcc:0} %if %{?_with_gcc:1}%{!?_with_gcc:0}
# Build llvm-gcc. # Build llvm-gcc.
@ -163,22 +186,37 @@ make %{_smp_mflags} LLVM_VERSION_INFO=%{version}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
chmod -x examples/Makefile chmod -x examples/Makefile
make install \ # OVERRIDE_libdir used by our patched Makefile.ocaml:
PROJ_prefix=%{buildroot}/%{_prefix} \ # see http://llvm.org/bugs/show_bug.cgi?id=3153
PROJ_bindir=%{buildroot}/%{_bindir} \ make install DESTDIR=%{buildroot} \
PROJ_libdir=%{buildroot}/%{_libdir}/%{name} \ PROJ_libdir=%{buildroot}/%{_libdir}/%{name} \
PROJ_datadir=%{buildroot}/%{_datadir} \ OVERRIDE_libdir=%{_libdir}/%{name}/%{name} \
PROJ_docsdir=%{buildroot}/%{_docdir}/%{name}-%{version} \ PROJ_docsdir=`pwd`/moredocs
PROJ_etcdir=%{buildroot}/%{_datadir}/%{name}-%{version} \
PROJ_includedir=%{buildroot}/%{_includedir} \ #make install \
PROJ_infodir=%{buildroot}/%{_infodir} \ # PROJ_prefix=%{buildroot}/%{_prefix} \
PROJ_mandir=%{buildroot}/%{_mandir} # PROJ_bindir=%{buildroot}/%{_bindir} \
# PROJ_libdir=%{buildroot}/%{_libdir}/%{name} \
# PROJ_datadir=%{buildroot}/%{_datadir} \
# PROJ_docsdir=%{buildroot}/%{_docdir}/%{name}-%{version} \
# PROJ_etcdir=%{buildroot}/%{_datadir}/%{name}-%{version} \
# PROJ_includedir=%{buildroot}/%{_includedir} \
# PROJ_infodir=%{buildroot}/%{_infodir} \
# PROJ_mandir=%{buildroot}/%{_mandir}
find %{buildroot} -name .dir -print0 | xargs -0r rm -f find %{buildroot} -name .dir -print0 | xargs -0r rm -f
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
# Get rid of erroneously installed example files. # Get rid of erroneously installed example files.
rm %{buildroot}%{_libdir}/%{name}/LLVMHello.* rm %{buildroot}%{_libdir}/%{name}/LLVMHello.*
# And OCaml .o files
rm %{buildroot}%{_libdir}/ocaml/*.o
# Use relative links for ocaml's libLLVM*.a
#(cd %{buildroot}%{_libdir}/ocaml && for i in libLLVM*.a; do
# ln -sf %{_libdir}/llvm/$i $i;
# done)
# Remove deprecated tools. # Remove deprecated tools.
rm %{buildroot}%{_bindir}/gcc{as,ld} rm %{buildroot}%{_bindir}/gcc{as,ld}
@ -204,6 +242,7 @@ rm -r libexec/gcc/%{_target_platform}/%{lgcc_version}/install-tools
rm -r %{_lib}/gcc/%{_target_platform}/%{lgcc_version}/install-tools rm -r %{_lib}/gcc/%{_target_platform}/%{lgcc_version}/install-tools
%endif %endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -241,9 +280,20 @@ rm -rf %{buildroot}
%{_libdir}/%{name} %{_libdir}/%{name}
%files ocaml
%defattr(-,root,root,-)
%{_libdir}/ocaml/*.cma
%{_libdir}/ocaml/*.cmi
%files ocaml-devel
%defattr(-,root,root,-)
%{_libdir}/ocaml/*.a
%{_libdir}/ocaml/*.cmx*
%{_libdir}/ocaml/*.mli
%files doc %files doc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/*.{html,css} docs/img examples %doc docs/*.{html,css} docs/img examples moredocs/*
%if %{?_with_doxygen:1}%{!?_with_doxygen:0} %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
@ -287,6 +337,13 @@ rm -rf %{buildroot}
%changelog %changelog
* Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
- Patched build process for the OCaml binding
* Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
- Update to 2.4
- Package Ocaml binding
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2 * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
- Add dependency on groff - Add dependency on groff

View File

@ -1 +1 @@
17254d72863b7fa005f3fb327aea3439 llvm-2.3.tar.gz bf43eee98c364fd79c7d2b72e645a15e llvm-2.4.tar.gz