| 1 | local modname = "boost" |
| 2 | local version = "1.51.0" |
| 3 | local system_type = os.getenv("SYSTEM_DIR") |
| 4 | local modules_top_dir = "/unknown/apps/ossw" |
| 5 | local compiler = "gcc" |
| 6 | local compiler_version = "4.6" |
| 7 | |
| 8 | |
| 9 | help( |
| 10 | "The boost module file defines the following environment variables:\n".. |
| 11 | "BOOST_DIR, BOOST_LIB, and BOOST_INC for the location of the \n".. |
| 12 | "BOOST distribution.\n\n".. |
| 13 | "To use the BOOST library, compile the source code with the option:\n".. |
| 14 | "-I$BOOST_INC \n".. |
| 15 | "and add the following options to the link step: \n".. |
| 16 | "-L$BOOST_LIB -lboost\n".. |
| 17 | "Version "..version..", compiled with "..compiler.." "..compiler_version.." compilers." |
| 18 | ) |
| 19 | |
| 20 | whatis( "Name: Boost C++ Library" ) |
| 21 | whatis( "Version: "..version..", built with "..compiler.." "..compiler_version ) |
| 22 | whatis( "Category: library" ) |
| 23 | whatis( "URL: http://www.boost.org" ) |
| 24 | |
| 25 | local mpath_root = os.getenv("MODULEPATH_ROOT") |
| 26 | edit_derived_modulepaths(mpath_root, modname, version) |
| 27 | |
| 28 | local boost_base = pathJoin(modules_top_dir, system_type, compiler, compiler_version, modname, version) |
| 29 | |
| 30 | prepend_path( "LD_LIBRARY_PATH", pathJoin(boost_base, "lib") ) |
| 31 | prepend_path( "INCLUDE", pathJoin(boost_base, "include" ) ) |
| 32 | |
| 33 | setenv( "BOOST_DIR", boost_base ) |
| 34 | setenv( "BOOST_BIN", pathJoin(boost_base, "bin" ) ) |
| 35 | setenv( "BOOST_INC", pathJoin(boost_base, "include" ) ) |
| 36 | setenv( "BOOST_LIB", pathJoin(boost_base, "lib" ) ) |
| 37 | |
| 38 | setenv( "BOOST_VERSION", version ) |