Changeset View
Changeset View
Standalone View
Standalone View
modules/ksb/Module.pm
Show First 20 Lines • Show All 636 Lines • ▼ Show 20 Line(s) | |||||
637 | 637 | | |||
638 | # Establishes proper build environment in the build context. Should be run | 638 | # Establishes proper build environment in the build context. Should be run | ||
639 | # before forking off commands for e.g. updates, builds, installs, etc. | 639 | # before forking off commands for e.g. updates, builds, installs, etc. | ||
640 | sub setupEnvironment | 640 | sub setupEnvironment | ||
641 | { | 641 | { | ||
642 | my $self = assert_isa(shift, 'ksb::Module'); | 642 | my $self = assert_isa(shift, 'ksb::Module'); | ||
643 | my $ctx = $self->buildContext(); | 643 | my $ctx = $self->buildContext(); | ||
644 | my $kdedir = $self->getOption('kdedir'); | 644 | my $kdedir = $self->getOption('kdedir'); | ||
645 | my $qtdir = $self->getOption('qtdir'); | ||||
645 | my $prefix = $self->installationPath(); | 646 | my $prefix = $self->installationPath(); | ||
646 | 647 | | |||
647 | # Add global set-envs and context | 648 | # Add global set-envs and context | ||
648 | $self->buildContext()->applyUserEnvironment(); | 649 | $self->buildContext()->applyUserEnvironment(); | ||
649 | 650 | | |||
650 | # Avoid moving /usr up in env vars | 651 | # Avoid moving /usr up in env vars | ||
652 | if ($qtdir ne '/usr') { | ||||
ouwerkerk: Unrelated but shouldn't we probably really check for whether the relevant $kdedir/XXX is… | |||||
Perhaps, but I'm also not aware of any direct equivalent to things like XDG_DATA_DIRS for /usr/share. 64-bit or 32-bit suffixes are the kind of thing that worry me more to be honest. mpyne: Perhaps, but I'm also not aware of any direct equivalent to things like XDG_DATA_DIRS for… | |||||
653 | my @qt_pkg_config_dirs = ("$qtdir/lib/pkgconfig"); | ||||
654 | $ctx->prependEnvironmentValue('PKG_CONFIG_PATH', @qt_pkg_config_dirs); | ||||
655 | | ||||
656 | my @qt_ld_dirs = ("$qtdir/lib"); | ||||
657 | $ctx->prependEnvironmentValue('LD_LIBRARY_PATH', @qt_ld_dirs); | ||||
658 | | ||||
659 | my @qt_path = ("$qtdir/bin"); | ||||
660 | $ctx->prependEnvironmentValue('PATH', @qt_path); | ||||
661 | } | ||||
662 | | ||||
663 | # Avoid moving /usr up in env vars | ||||
651 | if ($kdedir ne '/usr') { | 664 | if ($kdedir ne '/usr') { | ||
Unrelated but shouldn't we probably really check for whether the relevant $kdedir/XXX is actually contained with a given env var instead of just '/usr' ? ouwerkerk: Unrelated but shouldn't we probably really check for whether the relevant $kdedir/XXX is… | |||||
652 | my @pkg_config_dirs = ("$kdedir/lib/pkgconfig"); | 665 | my @pkg_config_dirs = ("$kdedir/lib/pkgconfig"); | ||
653 | $ctx->prependEnvironmentValue('PKG_CONFIG_PATH', @pkg_config_dirs); | 666 | $ctx->prependEnvironmentValue('PKG_CONFIG_PATH', @pkg_config_dirs); | ||
654 | 667 | | |||
655 | my @ld_dirs = ("$kdedir/lib", $self->getOption('libpath')); | 668 | my @ld_dirs = ("$kdedir/lib", $self->getOption('libpath')); | ||
656 | $ctx->prependEnvironmentValue('LD_LIBRARY_PATH', @ld_dirs); | 669 | $ctx->prependEnvironmentValue('LD_LIBRARY_PATH', @ld_dirs); | ||
657 | 670 | | |||
658 | my @path = ("$kdedir/bin", $self->getOption('binpath')); | 671 | my @path = ("$kdedir/bin", $self->getOption('binpath')); | ||
659 | $ctx->prependEnvironmentValue('PATH', @path); | 672 | $ctx->prependEnvironmentValue('PATH', @path); | ||
▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines |
Unrelated but shouldn't we probably really check for whether the relevant $kdedir/XXX is actually contained with a given env var instead of just '/usr' ?