On 10/18/2016 01:24 PM, Pavel Raiskup wrote:
On Tuesday, October 18, 2016 11:24:02 AM CEST Igor Gnatenko wrote:
Is this strictly %meson related? Could the generalizing be done in `redhat-rpm-macros` within %meson_ namespace so we can avoid touching all packages?
Actually it's related for any buildsystem with supports (or even requires out-of-tree building).
Hms, I'm not sure... Autotooled projects have VPATH builds (info automake) usually optional, and it usually requires maintainer uses `make distcheck` at least during release time (otherwise VPATH build likely get broken with time). I don't see much benefits in changing something which works now, or risk something..
Though I'm not aware of the actual PoC, neither what boilerplate typing needs to be done for every %meson package, probably worth sharing ...
mkdir build pushd build %meson ..
The '..' is parent dir here I bet...
popd %ninja_build -C build %ninja_install -C build
... TBH, I don't see a big issues here. :) Can can simplify this by:
mkdir build pushd build %meson .. %ninja_build %ninja_install popd
?
instead of this I would prefer to have %meson %meson_build %meson_install
But, yes this sounds cool.
Yes. FWIW this is just the kind of direction I'd like to see everything using a common build infra (be it cmake, autotools, python/ruby/whatever etc) evolve towards.
In case of angelscript it's: mkdir build pushd build %meson ../sdk/angelscript/projects/meson/ popd %ninja_build -C build %ninja_install -C build
With some macro it would be just %global __srcdir sdk/angelscript/projects/meson
Without knowing background peculiarities, this sounds wrong to me. Can we have this named like %meson_srcdir? From the "namespace" reasons ..
Or at least %vpath_builddir? So particular language specific macros could take %vpath_builddir in future? %__srcdir does not say what it is used for.
%meson %meson_build %meson_install
Though I'm not sure you need to have the %__srcdir at all. Can't you have parametrized %meson_vpath macro instead of %mason (so you say where build directory actually is)?
but this applies for other buildsystems. For example, currently with CMake almost everyone does mkdir %{_target_platform} pushd %{_target_platform} %cmake .. popd %make_build -C %{_target_platform} %make_install -C %{_target_platform}
Similarly here, if there was %vpath_builddir, %cmake could have been hacked to support that.
If (almost) everybody is repeating these steps then why are they not macroized into something like %cmake_setup, %cmake_build and %cmake_install? Okay, it requires somebody to actually do it and sanction but...
Taking the idea a bit further, if everything were to follow such %foo_setup, %foo_build, %foo_install then at least in simple and/or well-behaved cases you could do the whole setup-build-install thing with one spec line wher just the type varies:
%autobuild foo
/me wakes up and lets the cat out...
- Panu -
Pavel _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org