diff options
| author | Saul Wold <sgw@linux.intel.com> | 2011-11-15 12:58:44 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-16 17:32:45 +0000 |
| commit | 65333d263e92d6cece36e87f7cd2ccc27d074cec (patch) | |
| tree | bf08fa12cd589c6952e249a6a199e93c0bcdfcac /meta/recipes-support/boost/boost.inc | |
| parent | 7fb529436942015aebd6db0eb55c4a5e1e9c787a (diff) | |
| download | poky-65333d263e92d6cece36e87f7cd2ccc27d074cec.tar.gz | |
boost: Update to 1.47.0 & Cleanup
Removed boost-jam-native since it was an older version
no incompatible with boost 1.47.
Modified boost to use BBCLASSEXTEND native for the bjam
native binary.
Removed older unused patches.
(From OE-Core rev: 67df7590d0a6600cb9768b3df2b56983a5fe234f)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost/boost.inc')
| -rw-r--r-- | meta/recipes-support/boost/boost.inc | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc new file mode 100644 index 0000000000..ddb65b754d --- /dev/null +++ b/meta/recipes-support/boost/boost.inc | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | # The Boost web site provides free peer-reviewed portable | ||
| 2 | # C++ source libraries. The emphasis is on libraries which | ||
| 3 | # work well with the C++ Standard Library. The libraries are | ||
| 4 | # intended to be widely useful, and are in regular use by | ||
| 5 | # thousands of programmers across a broad spectrum of applications. | ||
| 6 | DESCRIPTION = "Free peer-reviewed portable C++ source libraries" | ||
| 7 | HOMEPAGE = "http://www.boost.org/" | ||
| 8 | SECTION = "libs" | ||
| 9 | DEPENDS = "boost-native zlib" | ||
| 10 | DEPENDS_virtclass-native = "" | ||
| 11 | LICENSE = "Boost" | ||
| 12 | |||
| 13 | ARM_INSTRUCTION_SET = "arm" | ||
| 14 | |||
| 15 | BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" | ||
| 16 | BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" | ||
| 17 | BOOST_P = "boost_${BOOST_VER}" | ||
| 18 | |||
| 19 | INC_PR = "r0" | ||
| 20 | |||
| 21 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BOOST_P}.tar.bz2" | ||
| 22 | |||
| 23 | S = "${WORKDIR}/${BOOST_P}" | ||
| 24 | |||
| 25 | BOOST_LIBS = "\ | ||
| 26 | date_time \ | ||
| 27 | filesystem \ | ||
| 28 | graph \ | ||
| 29 | iostreams \ | ||
| 30 | program_options \ | ||
| 31 | regex \ | ||
| 32 | signals \ | ||
| 33 | system \ | ||
| 34 | test \ | ||
| 35 | thread \ | ||
| 36 | " | ||
| 37 | |||
| 38 | # FIXME: for some reason this fails on powerpc | ||
| 39 | #BOOST_LIBS += "serialization" | ||
| 40 | |||
| 41 | # To enable python, uncomment the following: | ||
| 42 | #BOOST_LIBS += "python" | ||
| 43 | #DEPENDS += "python" | ||
| 44 | #PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" | ||
| 45 | #PYTHON_VERSION = "2.5" | ||
| 46 | |||
| 47 | # Make a package for each library, plus -dev | ||
| 48 | PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}" | ||
| 49 | python __anonymous () { | ||
| 50 | import bb | ||
| 51 | |||
| 52 | packages = [] | ||
| 53 | extras = [] | ||
| 54 | for lib in d.getVar('BOOST_LIBS', 1).split( ): | ||
| 55 | pkg = "boost-%s" % lib.replace("_", "-") | ||
| 56 | extras.append("--with-%s" % lib) | ||
| 57 | packages.append(pkg) | ||
| 58 | if not d.getVar("FILES_%s" % pkg, 1): | ||
| 59 | d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib) | ||
| 60 | bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d) | ||
| 61 | bb.data.setVar("BJAM_EXTRA", " ".join(extras), d) | ||
| 62 | } | ||
| 63 | |||
| 64 | # Override the contents of specific packages | ||
| 65 | FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \ | ||
| 66 | ${libdir}/libboost_wserialization*.so.*" | ||
| 67 | FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ | ||
| 68 | ${libdir}/libboost_unit_test_framework*.so.*" | ||
| 69 | |||
| 70 | # -dev last to pick up the remaining stuff | ||
| 71 | PACKAGES += "${PN}-dev" | ||
| 72 | FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a" | ||
| 73 | |||
| 74 | # "boost" is a metapackage which pulls in all boost librabries | ||
| 75 | PACKAGES += "${PN}" | ||
| 76 | RRECOMMENDS_${PN} += "${BOOST_PACKAGES}" | ||
| 77 | ALLOW_EMPTY_${PN} = "1" | ||
| 78 | |||
| 79 | # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works | ||
| 80 | TARGET_CC_ARCH += " ${LDFLAGS}" | ||
| 81 | |||
| 82 | # Oh yippee, a new build system, it's sooo cooool I could eat my own | ||
| 83 | # foot. inlining=on lets the compiler choose, I think. At least this | ||
| 84 | # stuff is documented... | ||
| 85 | # NOTE: if you leave <debug-symbols>on then in a debug build the build sys | ||
| 86 | # objcopy will be invoked, and that won't work. Building debug apparently | ||
| 87 | # requires hacking gcc-tools.jam | ||
| 88 | # | ||
| 89 | # Sometimes I wake up screaming. Famous figures are gathered in the nightmare, | ||
| 90 | # Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just | ||
| 91 | # standing there, waiting, but the truely terrifying thing is what they carry | ||
| 92 | # in their hands. At first sight each seems to bear the same thing, but it is | ||
| 93 | # not so for the forms in their grasp are ever so slightly different one from | ||
| 94 | # the other. Each is twisted in some grotesque way from the other to make each | ||
| 95 | # an unspeakable perversion impossible to perceive without the onset of madness. | ||
| 96 | # True insanity awaits anyone who perceives all of these horrors together. | ||
| 97 | # | ||
| 98 | # Quotation marks, there might be an easier way to do this, but I can't find | ||
| 99 | # it. The problem is that the user.hpp configuration file must receive a | ||
| 100 | # pre-processor macro defined as the appropriate string - complete with "'s | ||
| 101 | # around it. (<> is a possibility here but the danger to that is that the | ||
| 102 | # failure case interprets the < and > as shell redirections, creating | ||
| 103 | # random files in the source tree.) | ||
| 104 | # | ||
| 105 | #bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"' | ||
| 106 | #do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'" | ||
| 107 | SQD = '"' | ||
| 108 | EQD = '\"' | ||
| 109 | #boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..." | ||
| 110 | BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}" | ||
| 111 | |||
| 112 | # bzip2 and zip are disabled because... they're broken - the compilation simply | ||
| 113 | # isn't working with bjam. I guess they will fix it, but who needs it? This | ||
| 114 | # only affects the (new in 33) iostream library. | ||
| 115 | BJAM_TOOLS = "-sTOOLS=gcc \ | ||
| 116 | '-sGCC=${CC} '${BJAM_CONF} \ | ||
| 117 | '-sGXX=${CXX} '${BJAM_CONF} \ | ||
| 118 | '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \ | ||
| 119 | '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \ | ||
| 120 | '-sNO_BZIP2=1' \ | ||
| 121 | '-sNO_ZLIB=1' \ | ||
| 122 | '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \ | ||
| 123 | '-sPYTHON_VERSION=${PYTHON_VERSION}' \ | ||
| 124 | '--layout=system' \ | ||
| 125 | " | ||
| 126 | |||
| 127 | BJAM_OPTS = '${BJAM_TOOLS} \ | ||
| 128 | --builddir=${S}/${TARGET_SYS} \ | ||
| 129 | --with-python-root=${PYTHON_ROOT} \ | ||
| 130 | ${BJAM_EXTRA}' | ||
| 131 | |||
| 132 | |||
| 133 | do_boostconfig() { | ||
| 134 | cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp | ||
| 135 | |||
| 136 | echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam | ||
| 137 | } | ||
| 138 | |||
| 139 | addtask do_boostconfig after do_patch before do_configure | ||
| 140 | |||
| 141 | do_compile() { | ||
| 142 | set -ex | ||
| 143 | bjam ${BJAM_OPTS} --prefix=${prefix} \ | ||
| 144 | --exec-prefix=${exec_prefix} \ | ||
| 145 | --libdir=${libdir} \ | ||
| 146 | --includedir=${includedir} | ||
| 147 | } | ||
| 148 | |||
| 149 | do_install() { | ||
| 150 | set -ex | ||
| 151 | bjam ${BJAM_OPTS} \ | ||
| 152 | --libdir=${D}${libdir} \ | ||
| 153 | --includedir=${D}${includedir} \ | ||
| 154 | install | ||
| 155 | } | ||
| 156 | |||
| 157 | BBCLASSEXTEND = "native" | ||
| 158 | |||
| 159 | do_configure_virtclass-native() { | ||
| 160 | : | ||
| 161 | } | ||
| 162 | |||
| 163 | do_boostconfig_virtclass-native() { | ||
| 164 | : | ||
| 165 | } | ||
| 166 | |||
| 167 | do_compile_virtclass-native() { | ||
| 168 | set -ex | ||
| 169 | cd ${S}/tools/build/v2/engine | ||
| 170 | rm -rf bin.* | ||
| 171 | ./build.sh gcc | ||
| 172 | } | ||
| 173 | |||
| 174 | # This is too terrible - the build script doesn't give any good | ||
| 175 | # way I can see to find out where the binaries are placed, so | ||
| 176 | # rely on only one bin.foo directory being created. | ||
| 177 | do_install_virtclass-native () { | ||
| 178 | set -ex | ||
| 179 | cd ${S}/tools/build/v2/engine | ||
| 180 | install -d ${D}${bindir}/ | ||
| 181 | install -c -m 755 bin.*/bjam ${D}${bindir}/ | ||
| 182 | } | ||
| 183 | |||
| 184 | |||
