llvm-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. # Build options:
  2. #
  3. # --with doxygen
  4. # The doxygen docs are HUGE, so they are not built by default.
  5. Name: llvm
  6. Version: 2.7
  7. Release: 1%{?_dist_release}
  8. Summary: The Low Level Virtual Machine
  9. Summary(ja): LLVM - 低レベルバーチャルマシン
  10. Group: Development/Languages
  11. License: NCSA
  12. URL: http://llvm.org/
  13. Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tgz
  14. Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
  15. # Data files should be installed with timestamps preserved
  16. Patch0: llvm-2.6-timestamp.patch
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  18. BuildRequires: bison
  19. BuildRequires: chrpath
  20. BuildRequires: flex
  21. BuildRequires: gcc-c++ >= 3.4
  22. BuildRequires: groff
  23. BuildRequires: libtool-ltdl-devel
  24. BuildRequires: ocaml
  25. # for DejaGNU test suite
  26. BuildRequires: dejagnu tcl python
  27. %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
  28. BuildRequires: doxygen graphviz
  29. %endif
  30. # LLVM is not supported on PPC64
  31. # http://llvm.org/bugs/show_bug.cgi?id=3729
  32. ExcludeArch: ppc64
  33. %description
  34. LLVM is a compiler infrastructure designed for compile-time,
  35. link-time, runtime, and idle-time optimization of programs from
  36. arbitrary programming languages. The compiler infrastructure includes
  37. mirror sets of programming tools as well as libraries with equivalent
  38. functionality.
  39. %package devel
  40. Summary: Libraries and header files for LLVM
  41. Summary(ja): LLVM のライブラリおよびヘッダファイル
  42. Group: Development/Languages
  43. Requires: %{name} = %{version}-%{release}
  44. Requires: libstdc++-devel
  45. Provides: llvm-static = %{version}-%{release}
  46. %description devel
  47. This package contains library and header files needed to develop new
  48. native programs that use the LLVM infrastructure.
  49. %package doc
  50. Summary: Documentation for LLVM
  51. Summary(ja): LLVM のドキュメント
  52. Group: Documentation
  53. Requires: %{name} = %{version}-%{release}
  54. %description doc
  55. Documentation for the LLVM compiler infrastructure.
  56. %package -n clang
  57. Summary: A C language family front-end for LLVM
  58. Summary(ja): LLVM の C 言語用フロントエンド
  59. License: NCSA
  60. Group: Development/Languages
  61. %description -n clang
  62. clang: noun
  63. 1. A loud, resonant, metallic sound.
  64. 2. The strident call of a crane or goose.
  65. 3. C-language family front-end toolkit.
  66. The goal of the Clang project is to create a new C, C++, Objective C
  67. and Objective C++ front-end for the LLVM compiler. Its tools are built
  68. as libraries and designed to be loosely-coupled and extensible.
  69. %package -n clang-devel
  70. Summary: Header files for clang
  71. Summary(ja): clang のヘッダファイル
  72. Group: Development/Languages
  73. Requires: clang = %{version}-%{release}
  74. %description -n clang-devel
  75. This package contains header files for the Clang compiler.
  76. %package -n clang-analyzer
  77. Summary: A source code analysis framework
  78. Summary(ja): ソースコー分析フレームワーク
  79. License: NCSA
  80. Group: Development/Languages
  81. Requires: clang = %{version}-%{release}
  82. # not picked up automatically since files are currently not instaled
  83. # in standard Python hierarchies yet
  84. Requires: python
  85. %description -n clang-analyzer
  86. The Clang Static Analyzer consists of both a source code analysis
  87. framework and a standalone tool that finds bugs in C and Objective-C
  88. programs. The standalone tool is invoked from the command-line, and is
  89. intended to run in tandem with a build of a project or code base.
  90. %package -n clang-doc
  91. Summary: Documentation for Clang
  92. Summary(ja): Clang のドキュメント
  93. Group: Documentation
  94. Requires: %{name} = %{version}-%{release}
  95. %description -n clang-doc
  96. Documentation for the Clang compiler front-end.
  97. %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
  98. %package apidoc
  99. Summary: API documentation for LLVM
  100. Summary(ja): LLVM の API ドキュメント
  101. Group: Development/Languages
  102. Requires: %{name}-docs = %{version}-%{release}
  103. %description apidoc
  104. API documentation for the LLVM compiler infrastructure.
  105. %endif
  106. %package ocaml
  107. Summary: OCaml binding for LLVM
  108. Summary(ja): LLVM の OCaml バインディング
  109. Group: Development/Libraries
  110. Requires: %{name} = %{version}-%{release}
  111. Requires: ocaml
  112. %description ocaml
  113. OCaml binding for LLVM.
  114. %package ocaml-devel
  115. Summary: Development files for %{name}-ocaml
  116. Summary(ja): %{name}-ocaml の開発ファイル
  117. Group: Development/Libraries
  118. Requires: %{name}-devel = %{version}-%{release}
  119. Requires: %{name}-ocaml = %{version}-%{release}
  120. Requires: ocaml
  121. %description ocaml-devel
  122. The %{name}-ocaml-devel package contains libraries and signature files
  123. for developing applications that use %{name}-ocaml.
  124. %package ocaml-doc
  125. Summary: Documentation for %{name}-ocaml
  126. Summary(ja): %{name}-ocaml のドキュメント
  127. Group: Documentation
  128. Requires: %{name}-ocaml = %{version}-%{release}
  129. %description ocaml-doc
  130. HTML documentation for LLVM's OCaml binding.
  131. %prep
  132. %setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2}
  133. mv clang-%{version} tools/clang
  134. %patch0 -p1 -b .timestamp
  135. # Encoding fix
  136. (cd tools/clang/docs && \
  137. iconv -f ISO88591 -t UTF8 BlockImplementation.txt \
  138. -o BlockImplementation.txt)
  139. %build
  140. # Disabling assertions now, rec. by pure and needed for OpenGTL
  141. # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
  142. mkdir obj && cd obj
  143. ../configure \
  144. --prefix=%{_prefix} \
  145. --libdir=%{_libdir}/%{name} \
  146. --disable-assertions \
  147. --enable-jit \
  148. --enable-shared
  149. # FIXME file this
  150. # configure does not properly specify libdir
  151. sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
  152. make %{_smp_mflags} \
  153. %ifarch ppc
  154. OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments"
  155. %else
  156. OPTIMIZE_OPTION="%{optflags}"
  157. %endif
  158. %check
  159. cd obj
  160. # no current unexpected failures. Use || true if they recur to force ignore
  161. make check 2>&1 | tee ../llvm-testlog.txt
  162. (cd tools/clang && make test 2>&1) | tee ../clang-testlog.txt
  163. %install
  164. rm -rf %{buildroot}
  165. pushd obj
  166. chmod -x examples/Makefile
  167. make install DESTDIR=%{buildroot} \
  168. PROJ_docsdir=/moredocs
  169. popd
  170. # Create ld.so.conf.d entry
  171. mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
  172. cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF
  173. %{_libdir}/llvm
  174. EOF
  175. # Static analyzer not installed by default:
  176. # http://clang-analyzer.llvm.org/installation#OtherPlatforms
  177. mkdir -p %{buildroot}%{_libdir}/clang-analyzer
  178. # create launchers
  179. for f in scan-{build,view}; do
  180. ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
  181. done
  182. (cd tools/clang/tools && cp -pr scan-{build,view} \
  183. %{buildroot}%{_libdir}/clang-analyzer/)
  184. # Move documentation back to build directory
  185. #
  186. mv %{buildroot}/moredocs .
  187. rm moredocs/*.tar.gz
  188. rm moredocs/ocamldoc/html/*.tar.gz
  189. # And prepare Clang documentation
  190. #
  191. mkdir clang-docs
  192. for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
  193. ln tools/clang/$f clang-docs/
  194. done
  195. rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
  196. #find %{buildroot} -name .dir -print0 | xargs -0r rm -f
  197. file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
  198. file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
  199. #chrpath -d %{buildroot}/%{_libexecdir}/clang-cc
  200. # Get rid of erroneously installed example files.
  201. rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
  202. # FIXME file this bug
  203. sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
  204. %{buildroot}%{_bindir}/llvm-config
  205. chmod -x %{buildroot}%{_libdir}/%{name}/*.a
  206. # remove documentation makefiles:
  207. # they require the build directory to work
  208. find examples -name 'Makefile' | xargs -0r rm -f
  209. %clean
  210. rm -rf %{buildroot}
  211. %post -p /sbin/ldconfig
  212. %postun -p /sbin/ldconfig
  213. %files
  214. %defattr(-,root,root,-)
  215. %doc CREDITS.TXT LICENSE.TXT README.txt llvm-testlog.txt
  216. %{_bindir}/bugpoint
  217. %{_bindir}/llc
  218. %{_bindir}/lli
  219. %exclude %{_bindir}/llvm-config
  220. %{_bindir}/llvm*
  221. %{_bindir}/opt
  222. %config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
  223. %dir %{_libdir}/llvm
  224. %{_libdir}/llvm/*.so
  225. %exclude %{_mandir}/man1/clang.1.*
  226. %doc %{_mandir}/man1/*.1.*
  227. %files devel
  228. %defattr(-,root,root,-)
  229. %{_bindir}/llvm-config
  230. %{_includedir}/%{name}
  231. %{_includedir}/%{name}-c
  232. %{_libdir}/%{name}/*.a
  233. %files -n clang
  234. %defattr(-,root,root,-)
  235. %doc clang-docs/* clang-testlog.txt
  236. %{_bindir}/clang*
  237. %{_bindir}/tblgen
  238. %{_prefix}/lib/clang
  239. %doc %{_mandir}/man1/clang.1.*
  240. %files -n clang-devel
  241. %defattr(-,root,root,-)
  242. %{_includedir}/clang
  243. %{_includedir}/clang-c
  244. %files -n clang-analyzer
  245. %defattr(-,root,root,-)
  246. %{_bindir}/scan-build
  247. %{_bindir}/scan-view
  248. %{_libdir}/clang-analyzer
  249. %files -n clang-doc
  250. %defattr(-,root,root,-)
  251. %doc tools/clang/docs/*
  252. %files doc
  253. %defattr(-,root,root,-)
  254. %doc examples moredocs/html
  255. %files ocaml
  256. %defattr(-,root,root,-)
  257. %{_libdir}/ocaml/*.cma
  258. %{_libdir}/ocaml/*.cmi
  259. %files ocaml-devel
  260. %defattr(-,root,root,-)
  261. %{_libdir}/ocaml/*.a
  262. %{_libdir}/ocaml/*.cmx*
  263. %{_libdir}/ocaml/*.mli
  264. %files ocaml-doc
  265. %defattr(-,root,root,-)
  266. %doc moredocs/ocamldoc/html/*
  267. %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
  268. %files apidoc
  269. %defattr(-,root,root,-)
  270. %doc docs/doxygen
  271. %endif
  272. %changelog
  273. * Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
  274. - initial build for Vine Linux
  275. * Sun May 2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
  276. - Update to final 2.7 release
  277. * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
  278. - Update to first 2.7 pre-release
  279. * Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
  280. - Update to 2.6 pre-release2
  281. - -devel subpackage now virtually provides -static
  282. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
  283. - Disable var tracking assignments on PPC
  284. * Wed Sep 9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
  285. - Don't adjust clang include dir; files there are noarch (bz#521893)
  286. - Enable clang unit tests
  287. - clang and clang-analyzer renamed; no longer depend on llvm at runtime
  288. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
  289. - Package Clang's static analyzer tools
  290. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
  291. - PIC is now enabled by default; explicitly disable on %%{ix86}
  292. * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
  293. - First 2.6 prerelease
  294. - Enable Clang front-end
  295. - Enable debuginfo generation
  296. * Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
  297. - Disable assertions (needed by OpenGTL, bz#521261)
  298. - Align spec file with upstream build instructions
  299. - Enable unit tests
  300. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
  301. - Only disable PIC on %%ix86; ppc actually needs it
  302. * Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
  303. - Disable use of position-independent code on 32-bit platforms
  304. (buggy in LLVM <= 2.5)
  305. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
  306. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  307. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
  308. - Remove build scripts; they require the build directory to work
  309. * Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
  310. - Update to 2.5
  311. - Package build scripts (bug #457881)
  312. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
  313. - Patched build process for the OCaml binding
  314. * Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
  315. - Update to 2.4
  316. - Package Ocaml binding
  317. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
  318. - Add dependency on groff
  319. * Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
  320. - LLVM 2.3
  321. * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
  322. - fix license tags
  323. * Wed Mar 5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
  324. - Fix compilation problems with gcc 4.3
  325. * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
  326. - Autorebuild for GCC 4.3
  327. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
  328. - Fix review comments
  329. * Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
  330. - Initial version