From 2f835d24a30b4a4a5b76500249d641889ec13a96 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 28 Apr 2010 18:11:40 +0200 Subject: [PATCH] Added llvm-2.7 (clang is a subpkg) build template. --HG-- extra : convert_revision : e2cfab9c10b455a3abd71aa5650fb0d358c61ba9 --- srcpkgs/clang | 1 + srcpkgs/clang-devel | 1 + srcpkgs/llvm-docs | 1 + srcpkgs/llvm/clang-devel.template | 37 +++++++++++++ srcpkgs/llvm/clang.template | 42 +++++++++++++++ srcpkgs/llvm/depends | 2 + srcpkgs/llvm/llvm-docs.template | 14 +++++ srcpkgs/llvm/template | 66 ++++++++++++++++++++++++ xbps-src/common/mapping_shlib_binpkg.txt | 6 +++ 9 files changed, 170 insertions(+) create mode 120000 srcpkgs/clang create mode 120000 srcpkgs/clang-devel create mode 120000 srcpkgs/llvm-docs create mode 100644 srcpkgs/llvm/clang-devel.template create mode 100644 srcpkgs/llvm/clang.template create mode 100644 srcpkgs/llvm/depends create mode 100644 srcpkgs/llvm/llvm-docs.template create mode 100644 srcpkgs/llvm/template diff --git a/srcpkgs/clang b/srcpkgs/clang new file mode 120000 index 00000000000..0d68131b9b3 --- /dev/null +++ b/srcpkgs/clang @@ -0,0 +1 @@ +llvm \ No newline at end of file diff --git a/srcpkgs/clang-devel b/srcpkgs/clang-devel new file mode 120000 index 00000000000..0d68131b9b3 --- /dev/null +++ b/srcpkgs/clang-devel @@ -0,0 +1 @@ +llvm \ No newline at end of file diff --git a/srcpkgs/llvm-docs b/srcpkgs/llvm-docs new file mode 120000 index 00000000000..0d68131b9b3 --- /dev/null +++ b/srcpkgs/llvm-docs @@ -0,0 +1 @@ +llvm \ No newline at end of file diff --git a/srcpkgs/llvm/clang-devel.template b/srcpkgs/llvm/clang-devel.template new file mode 100644 index 00000000000..a7715c83153 --- /dev/null +++ b/srcpkgs/llvm/clang-devel.template @@ -0,0 +1,37 @@ +# Template file for 'clang-devel'. +# +short_desc="LLVM C language family frontend - development files" +long_desc=" + Clang project is a new C, C++, Objective C and Objective C++ front-end for + the LLVM compiler. Some of its goals include the following: + + End-User Features: + + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + + Utility and Applications: + + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + + Internal Design and Implementation: + + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + + This package includes development files for the LLVM clang." + +noarch=yes + +do_install() +{ + mkdir -p ${DESTDIR}/usr/include + mv ${SRCPKGDESTDIR}/usr/include/clang* ${DESTDIR}/usr/include +} diff --git a/srcpkgs/llvm/clang.template b/srcpkgs/llvm/clang.template new file mode 100644 index 00000000000..bd1a80f9c7a --- /dev/null +++ b/srcpkgs/llvm/clang.template @@ -0,0 +1,42 @@ +# Template file for 'clang'. +# +short_desc="Low-Level Virtual Machine (LLVM), C language family frontend" +long_desc=" + Clang project is a new C, C++, Objective C and Objective C++ front-end for + the LLVM compiler. Some of its goals include the following: + + End-User Features: + + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + + Utility and Applications: + + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + + Internal Design and Implementation: + + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants" + +Add_dependency run libgcc +Add_dependency run glibc +Add_dependency run libffi +Add_dependency run libstdc++ +Add_dependency run llvm + +do_install() +{ + mkdir -p ${DESTDIR}/usr/{bin,lib} ${DESTDIR}/usr/share/man/man1 + mv ${SRCPKGDESTDIR}/usr/bin/*clang ${DESTDIR}/usr/bin + mv ${SRCPKGDESTDIR}/usr/lib/clang ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share/man/man1/*clang* \ + ${DESTDIR}/usr/share/man/man1 +} diff --git a/srcpkgs/llvm/depends b/srcpkgs/llvm/depends new file mode 100644 index 00000000000..f9c802c81c0 --- /dev/null +++ b/srcpkgs/llvm/depends @@ -0,0 +1,2 @@ +abi_depends=">=2.7" +api_depends="${abi_depends}" diff --git a/srcpkgs/llvm/llvm-docs.template b/srcpkgs/llvm/llvm-docs.template new file mode 100644 index 00000000000..aa358609ed4 --- /dev/null +++ b/srcpkgs/llvm/llvm-docs.template @@ -0,0 +1,14 @@ +# Template file for 'llvm-docs'. +# +short_desc="${sourcepkg} - documentation files" +long_desc="${long_desc} + + This package contains the documentation for LLVM." + +noarch=yes + +do_install() +{ + mkdir -p ${DESTDIR}/usr/share/llvm + mv ${SRCPKGDESTDIR}/usr/docs ${DESTDIR}/usr/share/llvm +} diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template new file mode 100644 index 00000000000..08abecee494 --- /dev/null +++ b/srcpkgs/llvm/template @@ -0,0 +1,66 @@ +# Template file for 'llvm' +pkgname=llvm +version=2.7 +distfiles=" +http://www.llvm.org/releases/${version}/llvm-${version}.tgz +http://www.llvm.org/releases/${version}/clang-${version}.tgz" +build_style=gnu_configure +configure_args="--disable-expensive-checks --disable-debug-runtime +--enable-targets=all --enable-bindings=none --enable-optimize +--enable-shared --enable-libffi --enable-llvmc-dynamic +PATH='/bin:/usr/bin:$PATH'" +short_desc="Low Level Virtual Machine" +maintainer="Juan RP " +checksum=" +99664bdc8503a306038166af33f28eb426d99e297575a59d74a1a0dcbddbbca5 +fb349471947f155c1cda1c8a4a3bbc7fa437b86f6875d9978f86c915dfed623a" + +long_desc=" + Low Level Virtual Machine (LLVM) is: + + 1. A compilation strategy designed to enable effective program optimization + across the entire lifetime of a program. LLVM supports effective + optimization at compile time, link-time (particularly interprocedural), + run-time and offline (i.e., after software is installed), while remaining + transparent to developers and maintaining compatibility with existing + build scripts. + + 2. A virtual instruction set - LLVM is a low-level object code + representation that uses simple RISC-like instructions, but provides + rich, language-independent, type information and dataflow (SSA) + information about operands. This combination enables sophisticated + transformations on object code, while remaining light-weight enough to + be attached to the executable. This combination is key to allowing + link-time, run-time, and offline transformations. + + 3. A compiler infrastructure - LLVM is also a collection of source code that + implements the language and compilation strategy. The primary components + of the LLVM infrastructure are a GCC-based C & C++ front-end, a + link-time optimization framework with a growing set of global and + interprocedural analyses and transformations, static back-ends for many + popular (and some obscure) architectures, a back-end which emits portable + C code, and a Just-In-Time compilers for several architectures. + + 4. LLVM does not imply things that you would expect from a high-level + virtual machine. It does not require garbage collection or run-time code + generation (In fact, LLVM makes a great static compiler!). Note that + optional LLVM components can be used to build high-level virtual machines + and other systems that need these services." + +subpackages="clang clang-devel llvm-docs" + +# XXX: Investigate bindings support. +Add_dependency run libgcc +Add_dependency run glibc +Add_dependency run libstdc++ +Add_dependency run libffi +Add_dependency build python +Add_dependency build libffi-devel + +pre_configure() +{ + # Move clang files into the llvm source. + if [ -d ${XBPS_BUILDDIR}/clang-${version} ]; then + mv ${XBPS_BUILDDIR}/clang-${version} ${wrksrc}/tools/clang + fi +} diff --git a/xbps-src/common/mapping_shlib_binpkg.txt b/xbps-src/common/mapping_shlib_binpkg.txt index 69a8dd4f958..89f41e01c00 100644 --- a/xbps-src/common/mapping_shlib_binpkg.txt +++ b/xbps-src/common/mapping_shlib_binpkg.txt @@ -621,3 +621,9 @@ libldap-2.4.so libldap libldap-devel libldap_r-2.4.so libldap libldap-devel libevent-1.4.so libevent libevent-devel libSDL_mixer-1.2.so SDL_mixer SDL_mixer-devel +libCIndex.so llvm llvm-devel +libEnhancedDisassembly.so llvm llvm-devel +libLLVM-2.7.so llvm llvm-devel +libLLVMHello.so llvm llvm-devel +libLTO.so llvm llvm-devel +libprofile_rt.so llvm llvm-devel