# Source this file to setup a Linux build_packages build.

# Tailor these values.

# Put latest CMake on PATH
PATH=/home/software/cmake/install/bin:$PATH

export INSTALL_PREFIX=/home/wine/newstart/build_script/install-linux

export EPA_BUILD_SOURCE_PATH=/home/software/plplot/HEAD/plplot.git/cmake/epa_build

# gcc, g++, and gfortran flags you might want to tailor to different values.
export CFLAGS='-O3 -fvisibility=hidden -Wuninitialized'
export CXXFLAGS='-O3 -fvisibility=hidden -Wuninitialized'
export FFLAGS='-O3 -Wuninitialized'

# The debian gcj-4.7-jdk package (or its dependencies) has
# some peculiar locations for java components so CMake needs
# some help in finding those.
export CMAKE_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.7/include
export CMAKE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gcj-4.7-13

# In the past, CMake has needed help finding the Phobos library for D
# for Debian stable.  I am not sure this is necessary anymore with D2,
# but it apparently does not hurt.
CMAKE_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:$CMAKE_LIBRARY_PATH

# End of tailored values.

# Workaround for gtk+ issue on Linux where it is assumed it is part of an
# integrated desktop with dbus connecting everything together rather
# than an isolated library as in the epa_build case.
export NO_AT_BRIDGE=1

export INSTALL_PREFIX_BUILDTOOLS="${INSTALL_PREFIX}_buildtools"

# Put buildtools that have been built and installed by build_packages on PATH.
PATH="${INSTALL_PREFIX_BUILDTOOLS}"/bin:$PATH

# Put Linux install directory on PATH (so that, e.g., the wxwidgets
# configuration tool will be found.
PATH=${INSTALL_PREFIX}/bin:$PATH

CMAKE_INCLUDE_PATH="${INSTALL_PREFIX_BUILDTOOLS}"/include:$CMAKE_INCLUDE_PATH
CMAKE_LIBRARY_PATH="${INSTALL_PREFIX_BUILDTOOLS}"/lib:$CMAKE_LIBRARY_PATH

# Put version 3 of itcl and friends higher on CMAKE_INCLUDE_PATH then
# the above default.
CMAKE_INCLUDE_PATH="${INSTALL_PREFIX_BUILDTOOLS}"/include/itcl3.4:$CMAKE_INCLUDE_PATH

# Put appropriate install areas on these.
CMAKE_INCLUDE_PATH=${INSTALL_PREFIX}/include:$CMAKE_INCLUDE_PATH
CMAKE_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$CMAKE_LIBRARY_PATH

# Put buildtools pkg-config directories at top of PKG_CONFIG_PATH
export PKG_CONFIG_PATH="${INSTALL_PREFIX_BUILDTOOLS}"/share/pkgconfig:"${INSTALL_PREFIX_BUILDTOOLS}"/lib/pkgconfig

# Put install-location pkg-config directories at top of PKG_CONFIG_PATH
PKG_CONFIG_PATH=$INSTALL_PREFIX/share/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

# Some autotools package in the gtk+ superset (but not pango/cairo subset
# of that stack) do not handle rpath properly for non-standard install
# locations.  Therefore, must set LD_LIBRARY_PATH until those rpath issues
# are sorted out.
export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib

# As temporary measure also use system-installed *.pc files for dependencies
# which are currently not built.  Put these at the end of PKG_CONFIG_PATH
# so they are only used as a last resort.
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig

# BUILD_COMMAND contains the appropriate build command for this generator.
export BUILD_COMMAND=make

export GENERATOR_STRING="Unix Makefiles"