SFEllvm.spec: bump to 2.9, add clang
authorjurikm
Mon, 11 Apr 2011 06:06:43 +0000
changeset 3409 cf402809d5eb
parent 3408 d61fbdac3864
child 3410 356a523bd72e
SFEllvm.spec: bump to 2.9, add clang
ChangeLog
SFEllvm.spec
patches/llvm-01-limits.diff
patches/llvm-01-pod2html.diff
--- a/ChangeLog	Wed Apr 06 16:59:21 2011 +0000
+++ b/ChangeLog	Mon Apr 11 06:06:43 2011 +0000
@@ -1,3 +1,7 @@
+2011-04-11 Milan Jurik <[email protected]>
+
+	* SFEllvm.spec: bump to 2.9, add clang
+
 2011-04-06 Milan Jurik <[email protected]>
 
 	* SFEproftpd.spec: add more modules
--- a/SFEllvm.spec	Wed Apr 06 16:59:21 2011 +0000
+++ b/SFEllvm.spec	Mon Apr 11 06:06:43 2011 +0000
@@ -8,43 +8,36 @@
 #
 
 %include Solaris.inc
+%define cc_is_gcc 1
+%include base.inc
+
 %define src_name        llvm
 
 
 Name:		SFEllvm
 Summary:	The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
-Version:	2.5
+Version:	2.9
 License:        University of Illinois/NCSA Open Source License
 
 URL:		http://llvm.org/
-Source:		http://llvm.org/releases/%{version}/%{src_name}-%{version}.tar.gz
+Source:		http://llvm.org/releases/%{version}/%{src_name}-%{version}.tgz
+Source1:	http://llvm.org/releases/%{version}/clang-%{version}.tgz
+Patch1:		llvm-01-limits.diff
 
 Group:          Development
-Distribution:   OpenSolaris
-Vendor:         OpenSolaris Community
-
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 SUNW_BaseDir:   %{_basedir}
-SUNW_Copyright: %{name}.copyright
-
-Patch1:		llvm-01-pod2html.diff
 
 %include default-depend.inc
 
 BuildRequires:	SUNWlibtool
 BuildRequires:	SUNWperl584usr
 BuildRequires:	SUNWgroff
-BuildRequires:	SUNWgcc
 BuildRequires:	SUNWbison
 BuildRequires:	SUNWflexlex
 BuildRequires:	SUNWgmake
-
-
-# OpenSolaris IPS Manifest Fields
-Meta(info.upstream):		Chris Lattner <[email protected]>
-Meta(info.maintainer):		David Höppner <[email protected]>
-Meta(info.repository_url):	http://llvm.org/svn/llvm-project/llvm/trunk
-Meta(info.classification):	org.opensolaris.category.2008: Development/C
+BuildRequires:	SFEgcc
+Requires:	SFEgccruntime
 
 %description
 LLVM is a compiler infrastructure designed for compile-time, link-time, runtime,
@@ -58,8 +51,8 @@
 
 %prep
 %setup -q -n %{src_name}-%{version}
-
-%patch1	-p1
+%patch1 -p1
+cd tools && tar xzf %{SOURCE1} && mv clang-%{version} clang
 
 %build
 
@@ -68,14 +61,13 @@
     CPUS=1
 fi
 
-export CC="/usr/sfw/bin/gcc"
-export CXX="/usr/sfw/bin/g++"
+export CC="/usr/gcc/4.5/bin/gcc"
+export CXX="/usr/gcc/4.5/bin/g++"
 
-export POD2HTML="/usr/perl5/5.8.4/bin/pod2html"
-export POD2MAN="/usr/perl5/5.8.4/bin/pod2man"
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags"
 
-#export CFLAGS="%{gcc_optflags}"
-#export LDFLAGS="%{_ldflags}"
+export PATH=$PATH:/usr/perl5/bin
 
 ./configure	--prefix=%{_prefix}		\
 		--bindir=%{_bindir}		\
@@ -85,75 +77,35 @@
 		--datadir=%{_datadir}		\
 		--disable-dependency-tracking	\
 		--enable-optimized		\
-		--enable-assertions
+		--disable-static		\
+		--enable-shared
 	
-gmake -j$CPUS
+VERBOSE=1 make -j$CPUS
 
 %install
 rm -rf ${RPM_BUILD_ROOT}
+export PATH=$PATH:/usr/perl5/bin
+
 make install DESTDIR=${RPM_BUILD_ROOT}
 
 mv ${RPM_BUILD_ROOT}/%{_prefix}/docs ${RPM_BUILD_ROOT}%{_datadir}/doc
 
 %files
-%defattr (-, root, root)
-
-%dir %attr (0755, root, bin) %{_bindir}
-%{_bindir}/llvm-config
-%{_bindir}/gccas
-%{_bindir}/gccld
-%{_bindir}/opt
-%{_bindir}/llvm-as
-%{_bindir}/llvm-dis
-%{_bindir}/llc
-%{_bindir}/llvm-ranlib
-%{_bindir}/llvm-ar
-%{_bindir}/llvm-nm
-%{_bindir}/llvm-ld
-%{_bindir}/llvm-prof
-%{_bindir}/llvm-link
-%{_bindir}/lli
-%{_bindir}/llvm-extract
-%{_bindir}/llvm-db
-%{_bindir}/bugpoint
-%{_bindir}/llvm-bcanalyzer
-%{_bindir}/llvm-stub
-%{_bindir}/llvmc
-
-%dir %attr (0755, root, sys) %{_includedir}
-%{_includedir}/*
-
-%dir %attr (0755, root, bin) %{_libdir}
-%{_libdir}/*
-
-%dir %attr (0755, root, sys) %{_mandir}
-%dir %attr (0755, root, sys) %{_mandir}/man1
-%{_mandir}/man1/bugpoint.1
-%{_mandir}/man1/llc.1
-%{_mandir}/man1/lli.1
-%{_mandir}/man1/llvm-ar.1
-%{_mandir}/man1/llvm-as.1
-%{_mandir}/man1/llvm-bcanalyzer.1
-%{_mandir}/man1/llvm-config.1
-%{_mandir}/man1/llvmc.1
-%{_mandir}/man1/llvm-db.1
-%{_mandir}/man1/llvm-dis.1
-%{_mandir}/man1/llvm-extract.1
-%{_mandir}/man1/llvmgcc.1
-%{_mandir}/man1/llvmgxx.1
-%{_mandir}/man1/llvm-ld.1
-%{_mandir}/man1/llvm-link.1
-%{_mandir}/man1/llvm-nm.1
-%{_mandir}/man1/llvm-prof.1
-%{_mandir}/man1/llvm-ranlib.1
-%{_mandir}/man1/opt.1
-%{_mandir}/man1/tblgen.1
-
-
+%defattr (-, root, bin)
+%{_bindir}
+%{_includedir}/clang
+%{_includedir}/clang-c
+%{_includedir}/llvm
+%{_includedir}/llvm-c
+%{_libdir}
 %dir %attr (0755, root, sys) %{_datadir}
-%{_datadir}/doc/*
+%{_mandir}
+%dir %attr (0755, root, other) %{_docdir}
+%{_docdir}/llvm
 
 %changelog
+* Mon Apr 11 2011 - Milan Jurik
+- bump to 2.9, add clang
 *                 - Thomas Wagner
 - migrated over from sourcejuicer
 * Fri May  8 2009 <[email protected]>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/llvm-01-limits.diff	Mon Apr 11 06:06:43 2011 +0000
@@ -0,0 +1,10 @@
+--- llvm-2.9/lib/Support/Unix/PathV2.inc	Thu Feb 10 00:33:15 2011
++++ llvm-2.9-patch/llvm/lib/Support/Unix/PathV2.inc	Fri Mar 18 22:29:04 2011
+@@ -42,6 +42,7 @@
+ #if HAVE_STDIO_H
+ #include <stdio.h>
+ #endif
++#include <limits.h>
+ 
+ using namespace llvm;
+ 
--- a/patches/llvm-01-pod2html.diff	Wed Apr 06 16:59:21 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
---- llvm-2.5.orig/docs/CommandGuide/Makefile	2008-06-09 09:14:31.000000000 +0200
-+++ llvm-2.5/docs/CommandGuide/Makefile	2009-05-08 15:25:40.763500732 +0200
-@@ -52,11 +52,11 @@
- .SUFFIXES: .html .pod .1 .ps
- 
- $(DST_HTML_DIR)%.html: %.pod $(DST_HTML_DIR)/.dir
--	pod2html --css=manpage.css --htmlroot=. \
-+	${POD2HTML} --css=manpage.css --htmlroot=. \
- 	  --podpath=. --noindex --infile=$< --outfile=$@ --title=$*
- 
- $(DST_MAN_DIR)%.1: %.pod $(DST_MAN_DIR)/.dir
--	pod2man --release=CVS --center="LLVM Command Guide" $< $@
-+	${POD2MAN} --release=CVS --center="LLVM Command Guide" $< $@
- 
- $(DST_PS_DIR)%.ps: $(DST_MAN_DIR)%.1 $(DST_PS_DIR)/.dir
- 	groff -Tps -man $< > $@