Lines 63-80
Link Here
|
63 |
inherit git-2 |
63 |
inherit git-2 |
64 |
fi |
64 |
fi |
65 |
|
65 |
|
66 |
IUSE="+c++11 debug test" |
66 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
|
|
67 |
IUSE="+c++11 debug doc test" |
67 |
|
68 |
|
68 |
DEPEND=" |
69 |
DEPEND=" |
69 |
>=dev-lang/perl-5.14 |
70 |
>=dev-lang/perl-5.14 |
70 |
virtual/pkgconfig |
71 |
virtual/pkgconfig |
71 |
" |
72 |
" |
72 |
if [[ ${PN} != "qttest" ]]; then |
73 |
|
73 |
if [[ ${QT5_MODULE} == "qtbase" ]]; then |
74 |
if [[ ${PN} != "qttest" ]]; then |
74 |
DEPEND+=" test? ( ~dev-qt/qttest-${PV}[debug=] )" |
75 |
if [[ ${QT5_MODULE} == "qtbase" ]]; then |
75 |
else |
76 |
DEPEND+=" test? ( ~dev-qt/qttest-${PV}[debug=] )" |
76 |
DEPEND+=" test? ( >=dev-qt/qttest-${PV}:5[debug=] )" |
77 |
else |
|
|
78 |
DEPEND+=" test? ( >=dev-qt/qttest-${PV}:5[debug=] )" |
79 |
fi |
77 |
fi |
80 |
fi |
|
|
81 |
|
82 |
if [[ ${QT5_MODULE} == "qtbase" || ${QT5_MODULE} == "qttools" ]]; then |
83 |
PDEPEND+=" doc? ( ~dev-qt/${QT5_MODULE}-doc-${PV} )" |
84 |
else |
85 |
DEPEND+=" doc? ( ~dev-qt/qhelpgenerator-${PV} |
86 |
~dev-qt/qdoc-${PV} )" |
87 |
PDEPEND=" doc? ( ~dev-qt/assistant-${PV} )" |
88 |
fi |
89 |
else |
90 |
RDEPEND+=" ~dev-qt/assistant-${PV}" |
91 |
DEPEND+=" ~dev-qt/qhelpgenerator-${PV} |
92 |
~dev-qt/qdoc-${PV} |
93 |
" |
78 |
fi |
94 |
fi |
79 |
|
95 |
|
80 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm |
96 |
EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm |
Lines 246-252
Link Here
|
246 |
# @DESCRIPTION: |
262 |
# @DESCRIPTION: |
247 |
# Compiles the code in target directories. |
263 |
# Compiles the code in target directories. |
248 |
qt5-build_src_compile() { |
264 |
qt5-build_src_compile() { |
249 |
qt5_foreach_target_subdir emake |
265 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
|
|
266 |
qt5_foreach_target_subdir emake |
267 |
fi |
268 |
# qtbase and qttools have separate doc packages |
269 |
if [[ "${QT5_MODULE}" != "qtbase" && "${QT5_MODULE}" != "qttools" ]]; then |
270 |
use doc && qt5_compile_docs |
271 |
fi |
250 |
} |
272 |
} |
251 |
|
273 |
|
252 |
# @FUNCTION: qt5-build_src_test |
274 |
# @FUNCTION: qt5-build_src_test |
Lines 276-303
Link Here
|
276 |
# @DESCRIPTION: |
298 |
# @DESCRIPTION: |
277 |
# Performs the actual installation of target directories. |
299 |
# Performs the actual installation of target directories. |
278 |
qt5-build_src_install() { |
300 |
qt5-build_src_install() { |
279 |
qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install |
301 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
|
|
302 |
qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install |
280 |
|
303 |
|
281 |
if [[ ${PN} == "qtcore" ]]; then |
304 |
if [[ ${PN} == "qtcore" ]]; then |
282 |
pushd "${QT5_BUILD_DIR}" > /dev/null || die |
305 |
pushd "${QT5_BUILD_DIR}" > /dev/null || die |
283 |
einfo "Running emake INSTALL_ROOT=${D} install_{mkspecs,qmake,syncqt}" |
306 |
einfo "Running emake INSTALL_ROOT=${D} install_{mkspecs,qmake,syncqt}" |
284 |
emake INSTALL_ROOT="${D}" install_{mkspecs,qmake,syncqt} |
307 |
emake INSTALL_ROOT="${D}" install_{mkspecs,qmake,syncqt} |
285 |
popd > /dev/null || die |
308 |
popd > /dev/null || die |
|
|
309 |
|
310 |
# create an empty Gentoo/gentoo-qconfig.h |
311 |
dodir "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo |
312 |
: > "${D}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h |
313 |
|
314 |
# include gentoo-qconfig.h at the beginning of QtCore/qconfig.h |
315 |
sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \ |
316 |
"${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \ |
317 |
|| die "sed failed (qconfig.h)" |
318 |
fi |
286 |
|
319 |
|
287 |
# create an empty Gentoo/gentoo-qconfig.h |
320 |
qt5_install_module_qconfigs |
288 |
dodir "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo |
|
|
289 |
: > "${D}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h |
290 |
|
321 |
|
291 |
# include gentoo-qconfig.h at the beginning of QtCore/qconfig.h |
322 |
# remove .la files since we are building only shared libraries |
292 |
sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \ |
323 |
prune_libtool_files |
293 |
"${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \ |
|
|
294 |
|| die "sed failed (qconfig.h)" |
295 |
fi |
324 |
fi |
296 |
|
325 |
|
297 |
qt5_install_module_qconfigs |
326 |
use doc && qt5_install_docs |
298 |
|
|
|
299 |
# remove .la files since we are building only shared libraries |
300 |
prune_libtool_files |
301 |
} |
327 |
} |
302 |
|
328 |
|
303 |
# @FUNCTION: qt5-build_pkg_postinst |
329 |
# @FUNCTION: qt5-build_pkg_postinst |
Lines 305-319
Link Here
|
305 |
# Regenerate configuration, plus throw a message about possible |
331 |
# Regenerate configuration, plus throw a message about possible |
306 |
# breakages and proposed solutions. |
332 |
# breakages and proposed solutions. |
307 |
qt5-build_pkg_postinst() { |
333 |
qt5-build_pkg_postinst() { |
308 |
qt5_regenerate_global_qconfigs |
334 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
|
|
335 |
qt5_regenerate_global_qconfigs |
336 |
fi |
309 |
} |
337 |
} |
310 |
|
338 |
|
311 |
# @FUNCTION: qt5-build_pkg_postrm |
339 |
# @FUNCTION: qt5-build_pkg_postrm |
312 |
# @DESCRIPTION: |
340 |
# @DESCRIPTION: |
313 |
# Regenerate configuration when the package is completely removed. |
341 |
# Regenerate configuration when the package is completely removed. |
314 |
qt5-build_pkg_postrm() { |
342 |
qt5-build_pkg_postrm() { |
315 |
if [[ -z ${REPLACED_BY_VERSION} && ${PN} != "qtcore" ]]; then |
343 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
316 |
qt5_regenerate_global_qconfigs |
344 |
if [[ -z ${REPLACED_BY_VERSION} && ${PN} != "qtcore" ]]; then |
|
|
345 |
qt5_regenerate_global_qconfigs |
346 |
fi |
317 |
fi |
347 |
fi |
318 |
} |
348 |
} |
319 |
|
349 |
|
Lines 365-371
Link Here
|
365 |
mkdir -p "${QT5_BUILD_DIR}"/bin || die |
395 |
mkdir -p "${QT5_BUILD_DIR}"/bin || die |
366 |
|
396 |
|
367 |
local bin |
397 |
local bin |
368 |
for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,uic,qdoc,qdbuscpp2xml,qdbusxml2cpp}; do |
398 |
for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,uic,qdoc,qdbuscpp2xml,qdbusxml2cpp,qhelpgenerator}; do |
369 |
if [[ -e ${bin} ]]; then |
399 |
if [[ -e ${bin} ]]; then |
370 |
ln -s "${bin}" "${QT5_BUILD_DIR}"/bin/ || die "failed to symlink ${bin}" |
400 |
ln -s "${bin}" "${QT5_BUILD_DIR}"/bin/ || die "failed to symlink ${bin}" |
371 |
fi |
401 |
fi |
Lines 396-411
Link Here
|
396 |
-examplesdir "${QT5_EXAMPLESDIR}" |
426 |
-examplesdir "${QT5_EXAMPLESDIR}" |
397 |
-testsdir "${QT5_TESTSDIR}" |
427 |
-testsdir "${QT5_TESTSDIR}" |
398 |
|
428 |
|
399 |
# debug/release |
|
|
400 |
$(use debug && echo -debug || echo -release) |
401 |
-no-separate-debug-info |
402 |
|
403 |
# licensing stuff |
429 |
# licensing stuff |
404 |
-opensource -confirm-license |
430 |
-opensource -confirm-license |
405 |
|
431 |
|
406 |
# C++11 support |
|
|
407 |
$(qt_use c++11) |
408 |
|
409 |
# build shared libraries |
432 |
# build shared libraries |
410 |
-shared |
433 |
-shared |
411 |
|
434 |
|
Lines 426-434
Link Here
|
426 |
-nomake examples |
449 |
-nomake examples |
427 |
-nomake tests |
450 |
-nomake tests |
428 |
|
451 |
|
429 |
# disable rpath on non-prefix (bugs 380415 and 417169) |
|
|
430 |
$(use prefix || echo -no-rpath) |
431 |
|
432 |
# verbosity of the configure and build phases |
452 |
# verbosity of the configure and build phases |
433 |
-verbose $(${QT5_VERBOSE_BUILD} || echo -silent) |
453 |
-verbose $(${QT5_VERBOSE_BUILD} || echo -silent) |
434 |
|
454 |
|
Lines 460-465
Link Here
|
460 |
# module-specific options |
480 |
# module-specific options |
461 |
"${myconf[@]}" |
481 |
"${myconf[@]}" |
462 |
) |
482 |
) |
|
|
483 |
if [[ "$PN" == "${PN%-doc}" ]]; then |
484 |
conf+=( |
485 |
# debug/release |
486 |
$(use debug && echo -debug || echo -release) |
487 |
-no-separate-debug-info |
488 |
|
489 |
# C++11 support |
490 |
$(qt_use c++11) |
491 |
|
492 |
# disable rpath on non-prefix (bugs 380415 and 417169) |
493 |
$(use prefix || echo -no-rpath) |
494 |
) |
495 |
fi |
463 |
|
496 |
|
464 |
einfo "Configuring with: ${conf[@]}" |
497 |
einfo "Configuring with: ${conf[@]}" |
465 |
"${S}"/configure "${conf[@]}" || die "configure failed" |
498 |
"${S}"/configure "${conf[@]}" || die "configure failed" |
Lines 574-576
Link Here
|
574 |
ewarn "${qconfig_pri} does not exist or is not a regular file" |
607 |
ewarn "${qconfig_pri} does not exist or is not a regular file" |
575 |
fi |
608 |
fi |
576 |
} |
609 |
} |
|
|
610 |
|
611 |
|
612 |
# @FUNCTION: qt5_compile_docs |
613 |
# @DESCRIPTION: |
614 |
# Generate QCH docs. |
615 |
qt5_compile_docs() { |
616 |
# in some modules "make qch_docs" fails without "make docs" before |
617 |
# in some modules "make -jx" docs fails |
618 |
qt5_foreach_target_subdir emake -j1 docs qch_docs |
619 |
} |
620 |
|
621 |
# @FUNCTION: qt5_install_docs |
622 |
# @DESCRIPTION: |
623 |
# Install QCH docs. |
624 |
qt5_install_docs() { |
625 |
docompress -x "${QT5_DOCDIR}" |
626 |
qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install_qch_docs |
627 |
} |