Skip to content

Commit 6bcb492

Browse files
authored
Merge pull request #26 from Geontech/redhawk-2-2-1
REDHAWK 2.2.1 Support
2 parents aea8833 + ad1ba05 commit 6bcb492

File tree

124 files changed

+915
-816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+915
-816
lines changed

classes/redhawk-component.bbclass

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
2-
# We have to inherit from pythonnative if we do stuff with the system python.
3-
# autotools-brokensep is the sasme as autotools but our build and src locations are the same since we cannot build away from our src.
4-
51
inherit autotools-brokensep pkgconfig redhawk-entity

classes/redhawk-core-cpp-softpkg.bbclass

Lines changed: 0 additions & 16 deletions
This file was deleted.

classes/redhawk-device.bbclass

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# autotools-brokensep is the sasme as autotools but our build and src locations are the same since we cannot build away from our src.
2-
31
inherit autotools-brokensep pkgconfig redhawk-entity
42

5-
DEPENDS += "omniorb-native omniorbpy-native"
3+
DEPENDS_prepend = "omniorb-native omniorbpy-native "
4+
5+
NODE_CONFIG_SCRIPT ?= ""
6+
do_nodeconfig_patch () {
7+
if ! [ -z ${NODE_CONFIG_SCRIPT} ] ; then
8+
sed -i "s/tmp_proc_map.get(tmp_uname_p, 'x86')/'${REDHAWK_PROCESSOR}'/g" ${S}/${NODE_CONFIG_SCRIPT}
9+
fi
10+
}
11+
do_patch[postfuncs] += "do_nodeconfig_patch"

classes/redhawk-entity.bbclass

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,47 @@
11
# This file sets OSSIEHOME and other environment variables used by autotools
22
inherit redhawk-oeconf redhawk-sysroot pythonnative
33

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 "
137

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
2223

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
3129
}
30+
do_patch[postfuncs] += "do_autotools_patch"
3231

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}"
4040
}
41-
addtask dynamic_arch_patch after do_patch before do_configure
4241

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

classes/redhawk-env.bbclass

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ SDRROOT = "${localstatedir}/redhawk-sdr/sdr"
66
# libs, etc.)
77
OSSIEHOME_STAGED="${STAGING_DIR_TARGET}${OSSIEHOME}"
88
SDRROOT_STAGED="${STAGING_DIR_TARGET}${SDRROOT}"
9+
10+
OSSIEHOME_STAGED_NATIVE="${STAGING_DIR_NATIVE}${OSSIEHOME}"
11+
SDRROOT_STAGED_NATIVE="${STAGING_DIR_NATIVE}${SDRROOT}"

classes/redhawk-oeconf.bbclass

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ EXTRA_OECONF += "\
1515
"
1616

1717
# Patches common to nearly every REDHAWK source
18-
do_configure_prepend () {
19-
touch ./NEWS ./README ./AUTHORS ./ChangeLog
20-
sed -i 's/ACLOCAL_AMFLAGS = .\+$/ACLOCAL_AMFLAGS = -I m4/g' Makefile.am
18+
ac_meta_files () {
19+
touch ${S}/NEWS ${S}/README ${S}/AUTHORS ${S}/ChangeLog
2120
}
21+
do_unpack[postfuncs] += "ac_meta_files"
22+
23+
aclocal_amflags () {
24+
sed -i 's/ACLOCAL_AMFLAGS = .\+$/ACLOCAL_AMFLAGS = -I m4/g' ${S}/Makefile.am
25+
}
26+
do_patch[postfuncs] += "aclocal_amflags"
2227

2328
# Include the ossie autoconf macros
2429
EXTRA_AUTORECONF += "-I ${OSSIEHOME_STAGED}/share/aclocal/ossie"

classes/redhawk-softpkg.bbclass

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
inherit redhawk-entity
1+
inherit autotools-brokensep pkgconfig redhawk-entity
22

3-
# Basic set of depends
4-
DEPENDS = "redhawk"
5-
RDEPENDS_${PN} = "redhawk"
3+
do_autotools_patch_append () {
4+
sed -i -r "s/(^RH_SOFTPKG_PREFIX.+?\[cpp)(\])/\1-${REDHAWK_PROCESSOR}\2/g" ${S}/configure.ac
5+
}
66

77
# Set/append SOFTPKG_PREFIX to the installation directory of your softpkg.
88
# Standard REDHAWK Deps install with a package config as:
@@ -14,7 +14,7 @@ RDEPENDS_${PN} = "redhawk"
1414
SOFTPKG_BASE = "${SDRROOT}/dom/deps"
1515
SOFTPKG_PREFIX ?= "${SOFTPKG_BASE}"
1616
SOFTPKG_INCLUDEDIR ?= "${SOFTPKG_PREFIX}/include"
17-
SOFTPKG_EPREFIX ?= "${SOFTPKG_PREFIX}/cpp"
17+
SOFTPKG_EPREFIX ?= "${SOFTPKG_PREFIX}/cpp-${REDHAWK_PROCESSOR}"
1818
SOFTPKG_LIBDIR ?= "${SOFTPKG_EPREFIX}/lib"
1919

2020
EXTRA_OECONF += "\
@@ -35,6 +35,6 @@ FILES_${PN}-dev += "\
3535
FILES_${PN}-staticdev += "${SOFTPKG_LIBDIR}/*.a"
3636

3737
# Move the xml to be at the base of SOFTPKG_PREFIX.
38-
do_install_append () {
38+
fakeroot do_install_append () {
3939
find ${D} -name "*.spd.xml" -exec mv {} ${D}${SOFTPKG_PREFIX} \;
4040
}

classes/redhawk-sysroot.bbclass

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
inherit redhawk-env
22

3-
redhawk_core_ossie_sysroot () {
3+
fakeroot redhawk_core_ossie_sysroot () {
44
sysroot_stage_dir ${D}${OSSIEHOME} \
55
${SYSROOT_DESTDIR}${OSSIEHOME}
66
}
7-
redhawk_core_sdrroot_sysroot () {
7+
fakeroot redhawk_core_sdrroot_sysroot () {
88
sysroot_stage_dir ${D}${SDRROOT} \
99
${SYSROOT_DESTDIR}${SDRROOT}
1010
}

conf/layer.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ LAYERDEPENDS_redhawk-sdr = "\
3535
networking-layer \
3636
meta-python \
3737
"
38+
39+
# #####################################################
40+
# Set this in your local.conf to override the version #
41+
# (if available in this layer). #
42+
# #####################################################
43+
REDHAWK_VERSION ?= "2.2.1"
44+
require conf/versions/redhawk.inc
45+
46+
# Utility scripts for REDHAWK
47+
PATH =. "${LAYERDIR}/scripts:"

conf/versions/omniorb-4.2.3.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PREFERRED_VERSION_omniorb = "4.2.3"
2+
PREFERRED_VERSION_omniorbpy = "4.2.3"
3+
PREFERRED_VERSION_omnievents = "2.8.1"

0 commit comments

Comments
 (0)