Re: How to build two flavors of the same package?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/17/23 14:28, Till Hofmann wrote:
Hi all,

Someone (rightfully) suggested that we should build glfw twice, once with wayland support and once without:
https://bugzilla.redhat.com/show_bug.cgi?id=2152319

Is there any best practice how to build the same package in two different flavors, in this case cmake-based? I vaguely remember seeing a spec file that did that, but I don't remember where.

Thanks for any pointers!

In vtk.spec I do things like:

%global _vpath_builddir build
%cmake %{cmake_gen} \
 %{vtk_cmake_options} \
 -DVTK_BUILD_DOCUMENTATION:BOOL=ON \
 -DVTK_BUILD_EXAMPLES:BOOL=ON \
 -DVTK_BUILD_TESTING:BOOL=ON
%cmake_build -- --output-sync
%cmake_build --target DoxygenDoc

%if %{with mpich}
%global _vpath_builddir build-mpich
%_mpich_load
export CC=mpicc
export CXX=mpic++
%cmake %{cmake_gen} \
 %{vtk_cmake_options} \
 -DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \
 -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
 -DCMAKE_INSTALL_LIBDIR:PATH=lib \
 -DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \
 -DCMAKE_INSTALL_QMLDIR:PATH=lib/qt5/qml \
 -DVTK_USE_MPI:BOOL=ON
%cmake_build -- --output-sync
%_mpich_unload
%endif

--
Orion Poplawski
he/him/his  - surely the least important thing about me
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@xxxxxxxx
Boulder, CO 80301                 https://www.nwra.com/

<<attachment: smime.p7s>>

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux