diff options
author | Robert Schuster <robertschuster@fsfe.org> | 2010-06-28 14:34:46 +0200 |
---|---|---|
committer | Robert Schuster <robertschuster@fsfe.org> | 2010-06-30 09:31:10 +0200 |
commit | 06be7fc026eaa9e8d8cdec01f360ed2a4e5ff18d (patch) | |
tree | 9aaf3e653c087663d6f3ef92c655b041bc0312bc /recipes/llvm/llvm.inc | |
parent | 3a0f681008689cfa70c6b7b1cd334fe5c2a231ea (diff) |
llvm.inc: Moved packages dynamic stuff into the general llvm.inc file.
Diffstat (limited to 'recipes/llvm/llvm.inc')
-rw-r--r-- | recipes/llvm/llvm.inc | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/recipes/llvm/llvm.inc b/recipes/llvm/llvm.inc index 3e11318743..baebe308af 100644 --- a/recipes/llvm/llvm.inc +++ b/recipes/llvm/llvm.inc @@ -55,45 +55,57 @@ EXTRA_OECMAKE = "\ -DCMAKE_STRIP:FILEPATH=${STRIP} \ -DNM_PATH:FILEPATH=${NM} \ -DLLVM_ENABLE_PIC:BOOL=ON \ + -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \ + -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ + -DBUILD_SHARED_LIBS:BOOL=ON \ " +PACKAGES = " ${PN}-dev ${PN}-dbg ${PN}-doc " + +PACKAGES_DYNAMIC = "llvm-*" + +python populate_packages_prepend () { + libllvm_libdir = bb.data.expand('${libdir}/', d) + + do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True) +} + +FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/LLVMHello.so" + llvm_stage() { # Install into a private directory to be able to reorganize the files. - oe_runmake DESTDIR=${WORKDIR}/llvm-install install + oe_runmake DESTDIR=${WORKDIR}/llvm-install install # Create our custom target directories install -d ${STAGING_BINDIR}/llvm${LLVM_RELEASE} - install -d ${STAGING_INCDIR}/llvm${LLVM_RELEASE} + install -d ${STAGING_INCDIR}/llvm${LLVM_RELEASE} install -d ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} # Move headers into their own directory cp -r ${WORKDIR}/llvm-install/${prefix}/include/llvm \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ + ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ cp -r ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ - - # llvm somehow forgets these -# find include/llvm -name "*.h" -maxdepth 1 -exec \ -# install {} ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/llvm \; + ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \ - install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \; + install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \; # I dont know another way out. Binaries are installed into a special subdir find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \ - install {} ${STAGING_BINDIR}/llvm${LLVM_RELEASE} \; + install {} ${STAGING_BINDIR}/llvm${LLVM_RELEASE} \; # LLVM does not install this by default. - install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE} - - # Fix the paths in the config script to make it find the binaries and - # library files. Doing so allows 3rd party configure scripts working - # unmodified. - sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \ - -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ - bin/llvm-config > bin/llvm-config${LLVM_RELEASE} + install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE} + + # Fix the paths in the config script to make it find the binaries and + # library files. Doing so allows 3rd party configure scripts working + # unmodified. + sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \ + -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \ + -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \ + -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ + bin/llvm-config > bin/llvm-config${LLVM_RELEASE} } do_stage() { |