I needed to write a cmake eclass to build out of the sources. So, here is my cmake.eclass... I hope it may be usefull. 4 functions are defined : cmake_use_option: use_enable-like function: cmake_use_option <USEFLAG> <OPTION> [<value use> [<VALUE else>]] some examples: USE=qt debug cmake_use_option qt ENABLE_QUI => -DENABLE_QUI=ON cmake_use_option gtk ENABLE_GUI => -DENABLE_GUI=OFF cmake_use_option gtk ENABLE_NOGUI OFF => -DENABLE_NOGUI=ON cmake_use_option doc GENDOC full => cmake_use_option html GENDOC html text => -DGENDOC=text cmake_use_option debug CMAKE_BUILD_TYPE debugfull => -DCMAKE_BUILD_TYPE=debugfull cmake_configure: create BUILDDIR, and run cmake with selected debug cmake_compile emake in BUILDDIR cmake_install emake DESTDIR=$D install in BUILDDIR
Created attachment 86965 [details] eclass/cmake.eclass
New eclasses need to be discussed on gentoo-dev mailing list. Please, take it there if you think that this should be in portage and explain why. Thanks.