0c1e1f
# RPM macros for the Fedora MinGW Cross Compiler collection
0c1e1f
0c1e1f
%mingw_build_targets        mingw32 mingw64
9dad08
%mingw_build_win32          1
9dad08
%mingw_build_win64          1
0c1e1f
0c1e1f
%mingw_strip                mingw-strip
0c1e1f
%mingw_objdump              mingw-objdump
0c1e1f
%mingw_objcopy              mingw-objcopy
9a9de1
%mingw_nm                   mingw-nm
0c1e1f
0c1e1f
%mingw_findprovides         %{_rpmconfigdir}/mingw-find-provides.sh %{mingw_build_targets}
0c1e1f
%mingw_findrequires         %{_rpmconfigdir}/mingw-find-requires.sh %{mingw_build_targets}
0c1e1f
%mingw_finddebuginfo        %{_rpmconfigdir}/mingw-find-debuginfo.sh
0c1e1f
0c1e1f
%mingw_find_lang            %{_rpmconfigdir}/mingw-find-lang.sh %{buildroot}
0c1e1f
0c1e1f
%mingw_debug_install_post   %{mingw_finddebuginfo} %{_builddir}/%{?buildsubdir} %{mingw_build_targets}
0c1e1f
9dad08
%mingw_debug_package               \
9dad08
%if 0%{?mingw_build_win32} == 1    \
9dad08
%{?mingw32_debug_package}          \
9dad08
%endif                             \
9dad08
%if 0%{?mingw_build_win64} == 1    \
9dad08
%{?mingw64_debug_package}          \
9dad08
%endif                             \
0c1e1f
%{nil}
0c1e1f
0c1e1f
%mingw_package_header                                         \
0c1e1f
%global __strip %{mingw_strip}                                \
0c1e1f
%global __objdump %{mingw_objdump}                            \
ac0406
%if 0%{?rhel} == 6                                            \
ac0406
%global _use_internal_dependency_generator 0                  \
ac0406
%global __find_requires %{mingw_findrequires}                 \
ac0406
%global __find_provides %{mingw_findprovides}                 \
ac0406
%endif                                                        \
0c1e1f
%global __debug_install_post %%{mingw_debug_install_post}     \
0c1e1f
%{nil}
0c1e1f
0c1e1f
%mingw_configure                                       \
0c1e1f
run_mingw_configure()                                  \
0c1e1f
{                                                      \
5d10b9
[ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find . -name config.guess -o -name config.sub) ; do \
5d10b9
    [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
5d10b9
done ; \
9dad08
%if 0%{?mingw_build_win32} == 1                        \
0c1e1f
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
0c1e1f
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
57554d
    %{?mingw32_configure} "$@"                         \
9dad08
popd                                                   \
9dad08
%endif                                                 \
9dad08
%if 0%{?mingw_build_win64} == 1                        \
0c1e1f
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
0c1e1f
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
57554d
    %{?mingw64_configure} "$@"                         \
9dad08
popd                                                   \
9dad08
%endif                                                 \
0c1e1f
}                                                      \
0c1e1f
run_mingw_configure
0c1e1f
c277ca
%mingw_make                                                         \
c277ca
run_mingw_make()                                                    \
c277ca
{                                                                   \
c277ca
%if 0%{?mingw_build_win32} == 1                                     \
c277ca
make -C build_win32$MINGW_BUILDDIR_SUFFIX "$@" $MINGW32_MAKE_ARGS   \
c277ca
%endif                                                              \
c277ca
%if 0%{?mingw_build_win64} == 1                                     \
c277ca
make -C build_win64$MINGW_BUILDDIR_SUFFIX "$@" $MINGW64_MAKE_ARGS   \
c277ca
%endif                                                              \
c277ca
}                                                                   \
0c1e1f
run_mingw_make
0c1e1f
7b0757
%mingw_cmake                                           \
7b0757
run_mingw_cmake()                                      \
7b0757
{                                                      \
7b0757
%if 0%{?mingw_build_win32} == 1                        \
7b0757
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
7b0757
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
7b0757
    %{?mingw32_cmake "$@"}                             \
7b0757
popd                                                   \
7b0757
%endif                                                 \
7b0757
%if 0%{?mingw_build_win64} == 1                        \
7b0757
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
7b0757
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
7b0757
    %{?mingw64_cmake "$@"}                             \
7b0757
popd                                                   \
7b0757
%endif                                                 \
7b0757
}                                                      \
0c1e1f
run_mingw_cmake
0c1e1f
7b0757
%mingw_cmake_kde4                                      \
7b0757
run_mingw_cmake_kde4()                                 \
7b0757
{                                                      \
7b0757
%if 0%{?mingw_build_win32} == 1                        \
7b0757
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
7b0757
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
7b0757
    %{?mingw32_cmake_kde4 "$@"}                        \
7b0757
popd                                                   \
7b0757
%endif                                                 \
7b0757
%if 0%{?mingw_build_win64} == 1                        \
7b0757
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
7b0757
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
7b0757
    %{?mingw64_cmake_kde4 "$@"}                        \
7b0757
popd                                                   \
7b0757
%endif                                                 \
7b0757
}                                                      \
0c1e1f
run_mingw_cmake_kde4
0c1e1f
4c049a
%mingw_qmake_qt4                                       \
4c049a
run_mingw_qmake_qt4()                                  \
4c049a
{                                                      \
4c049a
%if 0%{?mingw_build_win32} == 1                        \
4c049a
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
4c049a
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
4c049a
    %{?mingw32_qmake_qt4} "$@"                         \
4c049a
popd                                                   \
4c049a
%endif                                                 \
4c049a
%if 0%{?mingw_build_win64} == 1                        \
4c049a
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
4c049a
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
4c049a
    %{?mingw64_qmake_qt4} "$@"                         \
4c049a
popd                                                   \
4c049a
%endif                                                 \
4c049a
}                                                      \
4c049a
run_mingw_qmake_qt4
4c049a
4c049a
%mingw_qmake_qt5                                       \
4c049a
run_mingw_qmake_qt5()                                  \
4c049a
{                                                      \
4c049a
%if 0%{?mingw_build_win32} == 1                        \
4c049a
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
4c049a
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
4c049a
    %{?mingw32_qmake_qt5} "$@"                         \
4c049a
popd                                                   \
4c049a
%endif                                                 \
4c049a
%if 0%{?mingw_build_win64} == 1                        \
4c049a
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
4c049a
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
4c049a
    %{?mingw64_qmake_qt5} "$@"                         \
4c049a
popd                                                   \
4c049a
%endif                                                 \
4c049a
}                                                      \
4c049a
run_mingw_qmake_qt5
4c049a
bd0be2
%mingw_meson                                           \
bd0be2
run_mingw_meson()                                      \
bd0be2
{                                                      \
bd0be2
%if 0%{?mingw_build_win32} == 1                        \
bd0be2
mkdir build_win32$MINGW_BUILDDIR_SUFFIX                \
bd0be2
pushd build_win32$MINGW_BUILDDIR_SUFFIX                \
bd0be2
    %{?mingw32_meson "$@"}                             \
bd0be2
popd                                                   \
bd0be2
%endif                                                 \
bd0be2
%if 0%{?mingw_build_win64} == 1                        \
bd0be2
mkdir build_win64$MINGW_BUILDDIR_SUFFIX                \
bd0be2
pushd build_win64$MINGW_BUILDDIR_SUFFIX                \
bd0be2
    %{?mingw64_meson "$@"}                             \
bd0be2
popd                                                   \
bd0be2
%endif                                                 \
bd0be2
}                                                      \
bd0be2
run_mingw_meson
bd0be2
bd0be2
%mingw_ninja                                                        \
bd0be2
run_mingw_ninja()                                                   \
bd0be2
{                                                                   \
bd0be2
%if 0%{?mingw_build_win32} == 1                                     \
bd0be2
ninja -C build_win32$MINGW_BUILDDIR_SUFFIX "$@" $MINGW32_NINJA_ARGS \
bd0be2
%endif                                                              \
bd0be2
%if 0%{?mingw_build_win64} == 1                                     \
bd0be2
ninja -C build_win64$MINGW_BUILDDIR_SUFFIX "$@" $MINGW64_NINJA_ARGS \
bd0be2
%endif                                                              \
bd0be2
}                                                                   \
bd0be2
run_mingw_ninja
bd0be2
f14297
# Deprecated:
f14297
%mingw_make_install         %mingw_make install