|
1 | 1 | # This file sets OSSIEHOME and other environment variables used by autotools |
2 | 2 | inherit redhawk-oeconf redhawk-sysroot pythonnative |
3 | 3 |
|
4 | | -# Needed so that when the python distutils is run it can get the system prefix which, since it's the build system python will be /.../x86_64-linux/usr and replace it with our host systems name. |
5 | | -do_configure_prepend() { |
6 | | - export BUILD_SYS=${BUILD_SYS} |
7 | | - export HOST_SYS=${HOST_SYS} |
8 | | - export STAGING_INCDIR=${STAGING_INCDIR} |
9 | | - export STAGING_LIBDIR=${STAGING_LIBDIR} |
10 | | - export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}" |
11 | | - export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH} |
12 | | - export PATH="${OSSIEHOME_STAGED}/bin:${PATH}" |
| 4 | +# Basic set of depends |
| 5 | +DEPENDS_prepend = "redhawk redhawk-native " |
| 6 | +RDEPENDS_${PN}_prepend = "redhawk " |
13 | 7 |
|
14 | | - # Common patches among device and component as noted by YLB. |
15 | | - # These were individual patch files but were being tacked on to many recipes. |
16 | | - # This is to reduce some clutter. |
17 | | - sed -i 's/xmldir = $(prefix)/xmldir = $(SDR_ROOT)/g' Makefile.am |
18 | | - sed -i 's/bindir = $(prefix)/bindir = $(SDR_ROOT)/g' Makefile.am |
19 | | - sed -i 's/domdir = $(prefix)/domdir = $(SDR_ROOT)/g' Makefile.am |
20 | | - sed -i 's,${prefix}/dom/deps,${SDR_ROOT}/dom/deps,g' configure.ac |
21 | | -} |
| 8 | +# Our dynamic do_patch tasks are sensitive to REDHAWK_PROCESSOR and the |
| 9 | +# modifications are not repeatable if that variable changes since we're |
| 10 | +# post-patching source without patch files. My making unpack sensitive |
| 11 | +# to the same variable, changes to it will unpack fresh source so the |
| 12 | +# dynamic patches can run according to the change. |
| 13 | +do_unpack[vardeps] += "REDHAWK_PROCESSOR" |
| 14 | + |
| 15 | +do_autotools_patch () { |
| 16 | + # Common patches among device and component as noted by YLB. |
| 17 | + # These were individual patch files but were being tacked on to many recipes. |
| 18 | + # This is to reduce some clutter. |
| 19 | + sed -i 's/xmldir = $(prefix)/xmldir = $(SDR_ROOT)/g' ${S}/Makefile.am |
| 20 | + sed -i 's/bindir = $(prefix)/bindir = $(SDR_ROOT)/g' ${S}/Makefile.am |
| 21 | + sed -i 's/domdir = $(prefix)/domdir = $(SDR_ROOT)/g' ${S}/Makefile.am |
| 22 | + sed -i 's,${prefix}/dom/deps,${SDR_ROOT}/dom/deps,g' ${S}/configure.ac |
22 | 23 |
|
23 | | -# Needed so that when the python distutils is run it can get the system prefix. |
24 | | -do_install_prepend() { |
25 | | - export BUILD_SYS=${BUILD_SYS} |
26 | | - export HOST_SYS=${HOST_SYS} |
27 | | - export STAGING_INCDIR=${STAGING_INCDIR} |
28 | | - export STAGING_LIBDIR=${STAGING_LIBDIR} |
29 | | - export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}" |
30 | | - export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH} |
| 24 | + # Patch the bindir to match what the spd patch will do to the entrypoint |
| 25 | + sed -i -r "s,(bindir = .+?cpp)/,\1-${REDHAWK_PROCESSOR}/,g" ${S}/Makefile.am |
| 26 | + |
| 27 | + # Patch the relationship to any softpkg dependencies |
| 28 | + sed -i -r "s/(^RH_SOFTPKG_CXX.+?\[cpp)(\])(.+$)/\1-${REDHAWK_PROCESSOR}\2\3/g" ${S}/configure.ac |
31 | 29 | } |
| 30 | +do_patch[postfuncs] += "do_autotools_patch" |
32 | 31 |
|
33 | | -NODE_CONFIG_SCRIPT ?= "" |
34 | | -do_dynamic_arch_patch () { |
35 | | - if ! [ -z ${NODE_CONFIG_SCRIPT} ] ; then |
36 | | - sed -i "s/tmp_proc_map.get(tmp_uname_p, 'x86')/'${REDHAWK_PROCESSOR}'/g" ${S}/${NODE_CONFIG_SCRIPT} |
37 | | - fi |
38 | | - find ${S}/../ -name *.spd.xml -exec sed -i "s/<processor name=\"x86_64\"\/>/<processor name=\"${REDHAWK_PROCESSOR}\"\/>/g" {} \; |
39 | | - find ${S}/../ -name *.spd.xml -exec sed -i "s/<processor name=\"x86\"\/>//g" {} \; |
| 32 | +do_configure_prepend () { |
| 33 | + export BUILD_SYS=${BUILD_SYS} |
| 34 | + export HOST_SYS=${HOST_SYS} |
| 35 | + export STAGING_INCDIR=${STAGING_INCDIR} |
| 36 | + export STAGING_LIBDIR=${STAGING_LIBDIR} |
| 37 | + export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}" |
| 38 | + export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH} |
| 39 | + export PATH="${OSSIEHOME_STAGED}/bin:${PATH}" |
40 | 40 | } |
41 | | -addtask dynamic_arch_patch after do_patch before do_configure |
42 | 41 |
|
| 42 | +do_spd_implementation_patch () { |
| 43 | + export PYTHONPATH=${OSSIEHOME_STAGED_NATIVE}/lib/python:${PYTHONPATH} |
| 44 | + spd_utility -n "${REDHAWK_PROCESSOR}" "${S}/.." |
| 45 | +} |
| 46 | +do_spd_implementation_patch[cleandirs] += "${S}/../cpp-${REDHAWK_PROCESSOR}" |
| 47 | +addtask spd_implementation_patch after do_compile before do_install |
0 commit comments