|
Lines 380-385
Link Here
|
| 380 |
debug-print "$FUNCNAME: applying user patches" |
380 |
debug-print "$FUNCNAME: applying user patches" |
| 381 |
epatch_user |
381 |
epatch_user |
| 382 |
|
382 |
|
|
|
383 |
: ${CMAKE_USE_DIR:=${S}} |
| 384 |
[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && { |
| 385 |
local name |
| 386 |
for name in ${CMAKE_REMOVE_MODULES_LIST} ; do |
| 387 |
find "${S}" -name ${name}.cmake -exec rm -v {} + |
| 388 |
done |
| 389 |
} |
| 390 |
|
| 391 |
# check if CMakeLists.txt exist and if no then die |
| 392 |
if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then |
| 393 |
eerror "Unable to locate CMakeLists.txt under:" |
| 394 |
eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\"" |
| 395 |
eerror "Consider not inheriting the cmake eclass." |
| 396 |
die "FATAL: Unable to find CMakeLists.txt" |
| 397 |
fi |
| 398 |
|
| 399 |
# Remove dangerous things. |
| 400 |
_modify-cmakelists |
| 401 |
|
| 383 |
popd >/dev/null |
402 |
popd >/dev/null |
| 384 |
} |
403 |
} |
| 385 |
|
404 |
|
|
Lines 400-432
Link Here
|
| 400 |
enable_cmake-utils_src_configure() { |
419 |
enable_cmake-utils_src_configure() { |
| 401 |
debug-print-function ${FUNCNAME} "$@" |
420 |
debug-print-function ${FUNCNAME} "$@" |
| 402 |
|
421 |
|
| 403 |
[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && { |
|
|
| 404 |
local name |
| 405 |
for name in ${CMAKE_REMOVE_MODULES_LIST} ; do |
| 406 |
find "${S}" -name ${name}.cmake -exec rm -v {} + |
| 407 |
done |
| 408 |
} |
| 409 |
|
| 410 |
_check_build_dir |
422 |
_check_build_dir |
| 411 |
|
423 |
|
| 412 |
# check if CMakeLists.txt exist and if no then die |
|
|
| 413 |
if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then |
| 414 |
eerror "Unable to locate CMakeLists.txt under:" |
| 415 |
eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\"" |
| 416 |
eerror "Consider not inheriting the cmake eclass." |
| 417 |
die "FATAL: Unable to find CMakeLists.txt" |
| 418 |
fi |
| 419 |
|
| 420 |
# Remove dangerous things. |
| 421 |
_modify-cmakelists |
| 422 |
|
| 423 |
# Fix xdg collision with sandbox |
424 |
# Fix xdg collision with sandbox |
| 424 |
export XDG_CONFIG_HOME="${T}" |
425 |
local -x XDG_CONFIG_HOME="${T}" |
| 425 |
|
426 |
|
| 426 |
# @SEE CMAKE_BUILD_TYPE |
427 |
# @SEE CMAKE_BUILD_TYPE |
| 427 |
if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then |
428 |
if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then |
| 428 |
# Handle release builds |
429 |
# Handle release builds |
| 429 |
if ! has debug ${IUSE//+} || ! use debug; then |
430 |
if ! has debug ${IUSE//+} || ! use debug; then |
|
|
431 |
local CPPFLAGS=${CPPFLAGS} |
| 430 |
append-cppflags -DNDEBUG |
432 |
append-cppflags -DNDEBUG |
| 431 |
fi |
433 |
fi |
| 432 |
fi |
434 |
fi |
|
Lines 444-450
Link Here
|
| 444 |
SET (PKG_CONFIG_EXECUTABLE $(type -P $(tc-getPKG_CONFIG)) CACHE FILEPATH "pkg-config executable" FORCE) |
446 |
SET (PKG_CONFIG_EXECUTABLE $(type -P $(tc-getPKG_CONFIG)) CACHE FILEPATH "pkg-config executable" FORCE) |
| 445 |
_EOF_ |
447 |
_EOF_ |
| 446 |
|
448 |
|
| 447 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
449 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && local EPREFIX= |
| 448 |
|
450 |
|
| 449 |
if [[ ${EPREFIX} ]]; then |
451 |
if [[ ${EPREFIX} ]]; then |
| 450 |
cat >> "${build_rules}" <<- _EOF_ |
452 |
cat >> "${build_rules}" <<- _EOF_ |