Add macros and cross-file for meson and ninja.
This commit is contained in:
parent
7147464c6a
commit
bd0be208c7
30
macros.mingw
30
macros.mingw
@ -142,5 +142,35 @@ popd \
|
||||
} \
|
||||
run_mingw_qmake_qt5
|
||||
|
||||
%mingw_meson \
|
||||
run_mingw_meson() \
|
||||
{ \
|
||||
%if 0%{?mingw_build_win32} == 1 \
|
||||
mkdir build_win32$MINGW_BUILDDIR_SUFFIX \
|
||||
pushd build_win32$MINGW_BUILDDIR_SUFFIX \
|
||||
%{?mingw32_meson "$@"} \
|
||||
popd \
|
||||
%endif \
|
||||
%if 0%{?mingw_build_win64} == 1 \
|
||||
mkdir build_win64$MINGW_BUILDDIR_SUFFIX \
|
||||
pushd build_win64$MINGW_BUILDDIR_SUFFIX \
|
||||
%{?mingw64_meson "$@"} \
|
||||
popd \
|
||||
%endif \
|
||||
} \
|
||||
run_mingw_meson
|
||||
|
||||
%mingw_ninja \
|
||||
run_mingw_ninja() \
|
||||
{ \
|
||||
%if 0%{?mingw_build_win32} == 1 \
|
||||
ninja -C build_win32$MINGW_BUILDDIR_SUFFIX "$@" $MINGW32_NINJA_ARGS \
|
||||
%endif \
|
||||
%if 0%{?mingw_build_win64} == 1 \
|
||||
ninja -C build_win64$MINGW_BUILDDIR_SUFFIX "$@" $MINGW64_NINJA_ARGS \
|
||||
%endif \
|
||||
} \
|
||||
run_mingw_ninja
|
||||
|
||||
# Deprecated:
|
||||
%mingw_make_install %mingw_make install
|
||||
|
@ -150,6 +150,31 @@
|
||||
%mingw32_qmake_qt4 /usr/bin/mingw32-qmake-qt4
|
||||
%mingw32_qmake_qt5 /usr/bin/mingw32-qmake-qt5
|
||||
|
||||
%mingw32_meson %{mingw32_env} ; \
|
||||
unset CC CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS; \\\
|
||||
export CFLAGS="%{__global_cflags}" CXXFLAGS="%{__global_cxxflags}" LDFLAGS="%{__global_ldflags}"; \\\
|
||||
if test -f meson.build; then __mingw32_topdir=.; \\\
|
||||
elif test -f ../meson.build; then __mingw32_topdir=..; \\\
|
||||
else __mingw32_topdir=""; fi; \\\
|
||||
%__meson \\\
|
||||
--cross-file /usr/share/mingw/toolchain-mingw32.meson \\\
|
||||
--default-library shared \\\
|
||||
--prefix %{mingw32_prefix} \\\
|
||||
--bindir %{mingw32_bindir} \\\
|
||||
--sbindir %{mingw32_sbindir} \\\
|
||||
--sysconfdir %{mingw32_sysconfdir} \\\
|
||||
--datadir %{mingw32_datadir} \\\
|
||||
--includedir %{mingw32_includedir} \\\
|
||||
--libdir %{mingw32_libdir} \\\
|
||||
--libexecdir %{mingw32_libexecdir} \\\
|
||||
--localstatedir %{mingw32_localstatedir} \\\
|
||||
--sharedstatedir %{mingw32_sharedstatedir} \\\
|
||||
--mandir %{mingw32_mandir} \\\
|
||||
--infodir %{mingw32_infodir} \\\
|
||||
${MINGW_MESON_ARGS} \\\
|
||||
${MINGW32_MESON_ARGS} \\\
|
||||
"$@" $__mingw32_topdir
|
||||
|
||||
%mingw32_description This is the cross-compiled version of this library / tool.\
|
||||
You should only install this package if you want to cross-compile programs for \
|
||||
Win32 (32 bit Windows).
|
||||
|
@ -150,6 +150,31 @@
|
||||
%mingw64_qmake_qt4 /usr/bin/mingw64-qmake-qt4
|
||||
%mingw64_qmake_qt5 /usr/bin/mingw64-qmake-qt5
|
||||
|
||||
%mingw64_meson %{mingw64_env} ; \
|
||||
unset CC CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS; \\\
|
||||
export CFLAGS="%{__global_cflags}" CXXFLAGS="%{__global_cxxflags}" LDFLAGS="%{__global_ldflags}"; \\\
|
||||
if test -f meson.build; then __mingw64_topdir=.; \\\
|
||||
elif test -f ../meson.build; then __mingw64_topdir=..; \\\
|
||||
else __mingw64_topdir=""; fi; \\\
|
||||
%__meson \\\
|
||||
--cross-file /usr/share/mingw/toolchain-mingw64.meson \\\
|
||||
--default-library shared \\\
|
||||
--prefix %{mingw64_prefix} \\\
|
||||
--bindir %{mingw64_bindir} \\\
|
||||
--sbindir %{mingw64_sbindir} \\\
|
||||
--sysconfdir %{mingw64_sysconfdir} \\\
|
||||
--datadir %{mingw64_datadir} \\\
|
||||
--includedir %{mingw64_includedir} \\\
|
||||
--libdir %{mingw64_libdir} \\\
|
||||
--libexecdir %{mingw64_libexecdir} \\\
|
||||
--localstatedir %{mingw64_localstatedir} \\\
|
||||
--sharedstatedir %{mingw64_sharedstatedir} \\\
|
||||
--mandir %{mingw64_mandir} \\\
|
||||
--infodir %{mingw64_infodir} \\\
|
||||
${MINGW_MESON_ARGS} \\\
|
||||
${MINGW64_MESON_ARGS} \\\
|
||||
"$@" $__mingw64_topdir
|
||||
|
||||
%mingw64_description This is the cross-compiled version of this library / tool.\
|
||||
You should only install this package if you want to cross-compile programs for \
|
||||
Win64 (64 bit Windows).
|
||||
|
@ -6,8 +6,8 @@
|
||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
Name: mingw-filesystem
|
||||
Version: 103
|
||||
Release: 2%{?dist}
|
||||
Version: 104
|
||||
Release: 1%{?dist}
|
||||
Summary: MinGW cross compiler base filesystem and environment
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -36,6 +36,8 @@ Source15: mingw64.attr
|
||||
Source16: standard-dlls-mingw32
|
||||
# (rpm -ql mingw64-crt | grep '\.a$' | while read f ; do x86_64-w64-mingw32-dlltool -I $f 2>/dev/null ; done) | sort | uniq | tr A-Z a-z > standard-dlls-mingw64
|
||||
Source17: standard-dlls-mingw64
|
||||
Source18: toolchain-mingw32.meson
|
||||
Source19: toolchain-mingw64.meson
|
||||
|
||||
# Taken from the Fedora filesystem package
|
||||
Source101: https://fedorahosted.org/filesystem/browser/lang-exceptions
|
||||
@ -135,8 +137,8 @@ install -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{_libexecdir}/mingw-scripts
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
pushd $RPM_BUILD_ROOT%{_bindir}
|
||||
for i in mingw32-configure mingw32-cmake mingw32-make mingw32-pkg-config \
|
||||
mingw64-configure mingw64-cmake mingw64-make mingw64-pkg-config ; do
|
||||
for i in mingw32-configure mingw32-cmake mingw32-make mingw32-meson mingw32-pkg-config \
|
||||
mingw64-configure mingw64-cmake mingw64-make mingw64-meson mingw64-pkg-config ; do
|
||||
ln -s %{_libexecdir}/mingw-scripts $i
|
||||
done
|
||||
popd
|
||||
@ -274,6 +276,8 @@ install -m 0644 %{SOURCE15} $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw
|
||||
install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
install -m 0644 %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
install -m 0644 %{SOURCE19} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
|
||||
|
||||
%files base
|
||||
@ -291,10 +295,12 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
%{_bindir}/mingw32-configure
|
||||
%{_bindir}/mingw32-cmake
|
||||
%{_bindir}/mingw32-make
|
||||
%{_bindir}/mingw32-meson
|
||||
%{_bindir}/mingw32-pkg-config
|
||||
%{_prefix}/i686-w64-mingw32
|
||||
%{_rpmconfigdir}/fileattrs/mingw32.attr
|
||||
%{_datadir}/mingw/toolchain-mingw32.cmake
|
||||
%{_datadir}/mingw/toolchain-mingw32.meson
|
||||
|
||||
%files -n mingw64-filesystem
|
||||
%{macrosdir}/macros.mingw64
|
||||
@ -302,13 +308,18 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
|
||||
%{_bindir}/mingw64-configure
|
||||
%{_bindir}/mingw64-cmake
|
||||
%{_bindir}/mingw64-make
|
||||
%{_bindir}/mingw64-meson
|
||||
%{_bindir}/mingw64-pkg-config
|
||||
%{_prefix}/x86_64-w64-mingw32
|
||||
%{_rpmconfigdir}/fileattrs/mingw64.attr
|
||||
%{_datadir}/mingw/toolchain-mingw64.cmake
|
||||
%{_datadir}/mingw/toolchain-mingw64.meson
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Apr 20 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 104-1
|
||||
- Add macros for meson and ninja
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org>
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
20
toolchain-mingw32.meson
Normal file
20
toolchain-mingw32.meson
Normal file
@ -0,0 +1,20 @@
|
||||
[binaries]
|
||||
c = '/usr/bin/i686-w64-mingw32-gcc'
|
||||
cpp = '/usr/bin/i686-w64-mingw32-g++'
|
||||
fortran = '/usr/bin/i686-w64-mingw32-gfortran'
|
||||
rust = ['rustc', '--target', 'i686-pc-windows-msvc', '-C', 'linker=/usr/bin/i686-w64-mingw32-gcc']
|
||||
ar = '/usr/bin/i686-w64-mingw32-ar'
|
||||
pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
|
||||
ranlib = '/usr/bin/x86_64-w64-mingw32-ranlib'
|
||||
strip = '/usr/bin/i686-w64-mingw32-strip'
|
||||
windres = '/usr/bin/i686-w64-mingw32-windres'
|
||||
|
||||
[properties]
|
||||
root = '/usr/i686-w64-mingw32/sys-root/mingw'
|
||||
needs_exe_wrapper = true
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86'
|
||||
cpu = 'i686'
|
||||
endian = 'little'
|
20
toolchain-mingw64.meson
Normal file
20
toolchain-mingw64.meson
Normal file
@ -0,0 +1,20 @@
|
||||
[binaries]
|
||||
c = '/usr/bin/x86_64-w64-mingw32-gcc'
|
||||
cpp = '/usr/bin/x86_64-w64-mingw32-g++'
|
||||
fortran = '/usr/bin/x86_64-w64-mingw32-gfortran'
|
||||
rust = ['rustc', '--target', 'x86_64-pc-windows-msvc', '-C', 'linker=/usr/bin/x86_64-w64-mingw32-gcc']
|
||||
ar = '/usr/bin/x86_64-w64-mingw32-ar'
|
||||
pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
|
||||
ranlib = '/usr/bin/x86_64-w64-mingw32-ranlib'
|
||||
strip = '/usr/bin/x86_64-w64-mingw32-strip'
|
||||
windres = '/usr/bin/x86_64-w64-mingw32-windres'
|
||||
|
||||
[properties]
|
||||
root = '/usr/x86_64-w64-mingw32/sys-root/mingw'
|
||||
needs_exe_wrapper = true
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
Loading…
Reference in New Issue
Block a user