0c1e1f
# RPM macros for Fedora MinGW.
0c1e1f
0c1e1f
%mingw64_pkg_name        %(echo %{name} | sed 's/^mingw-/mingw64-/')
0c1e1f
%mingw64_target          x86_64-w64-mingw32
0c1e1f
0c1e1f
# Paths.
0c1e1f
%mingw64_sysroot         %{_prefix}/%{mingw64_target}/sys-root
0c1e1f
%mingw64_prefix          %{mingw64_sysroot}/mingw
0c1e1f
%mingw64_exec_prefix     %{mingw64_prefix}
0c1e1f
%mingw64_bindir          %{mingw64_exec_prefix}/bin
0c1e1f
%mingw64_sbindir         %{mingw64_exec_prefix}/sbin
0c1e1f
%mingw64_libexecdir      %{mingw64_exec_prefix}/libexec
0c1e1f
%mingw64_libdir          %{mingw64_exec_prefix}/lib
0c1e1f
%mingw64_datadir         %{mingw64_prefix}/share
0c1e1f
%mingw64_docdir          %{mingw64_prefix}/share/doc
0c1e1f
%mingw64_infodir         %{mingw64_prefix}/share/info
0c1e1f
%mingw64_mandir          %{mingw64_prefix}/share/man
0c1e1f
%mingw64_sysconfdir      %{mingw64_prefix}/etc
0c1e1f
%mingw64_sharedstatedir  %{mingw64_prefix}/com
0c1e1f
%mingw64_localstatedir   %{mingw64_prefix}/var
0c1e1f
%mingw64_includedir      %{mingw64_prefix}/include
0c1e1f
0c1e1f
# Build macros.
0c1e1f
%mingw64_host            %{mingw64_target}
0c1e1f
0c1e1f
%mingw64_cflags          %{mingw64_cppflags} -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
0c1e1f
%mingw64_cppflags        %{nil}
0c1e1f
%mingw64_ldflags         %{nil}
0c1e1f
0c1e1f
%mingw64_cc              %{mingw64_target}-gcc
0c1e1f
%mingw64_cxx             %{mingw64_target}-g++
0c1e1f
%mingw64_cpp             %{mingw64_target}-gcc -E
0c1e1f
%mingw64_addr2line       %{mingw64_target}-addr2line
0c1e1f
%mingw64_ar              %{mingw64_target}-ar
0c1e1f
%mingw64_as              %{mingw64_target}-as
0c1e1f
%mingw64_dlltool         %{mingw64_target}-dlltool
0c1e1f
%mingw64_dllwrap         %{mingw64_target}-dllwrap
0c1e1f
%mingw64_gcov            %{mingw64_target}-gcov
0c1e1f
%mingw64_gprof           %{mingw64_target}-gprof
0c1e1f
%mingw64_ld              %{mingw64_target}-ld
0c1e1f
%mingw64_nm              %{mingw64_target}-nm
0c1e1f
%mingw64_objcopy         %{mingw64_target}-objcopy
0c1e1f
%mingw64_objdump         %{mingw64_target}-objdump
0c1e1f
%mingw64_ranlib          %{mingw64_target}-ranlib
0c1e1f
%mingw64_readelf         %{mingw64_target}-readelf
0c1e1f
%mingw64_size            %{mingw64_target}-size
0c1e1f
%mingw64_strings         %{mingw64_target}-strings
0c1e1f
%mingw64_strip           %{mingw64_target}-strip
0c1e1f
%mingw64_windmc          %{mingw64_target}-windmc
0c1e1f
%mingw64_windres         %{mingw64_target}-windres
0c1e1f
0c1e1f
%mingw64_env unset $(/usr/bin/env | egrep '^(\w+)=(.*)$' | egrep -vw 'PWD|USER|LANG' | /usr/bin/cut -d= -f1); \
0c1e1f
  if test -z "$PATH_ORIG" ; then \
0c1e1f
    PATH_ORIG="$PATH"; export PATH_ORIG; \
0c1e1f
  fi; \
0c1e1f
  PATH="%{mingw64_bindir}:$PATH_ORIG"; export PATH; \
0c1e1f
  HOST_CC=gcc; export HOST_CC; \
0c1e1f
  unset PKG_CONFIG_PATH; \
0c1e1f
  _PREFIX="%{_bindir}/%{mingw64_target}-"; \
0c1e1f
  for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \
0c1e1f
    x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-." "A-ZX__"`; \
0c1e1f
    declare -x $x="$i" ; export $x; \
0c1e1f
  done; \
0c1e1f
  unset _PREFIX; \
0c1e1f
  CC="${MINGW64_CC:-%mingw64_cc}"; export CC; \
64394b
  CFLAGS="${MINGW64_CFLAGS-%mingw64_cflags}"; export CFLAGS; \
64394b
  CPPFLAGS="${MINGW64_CPPFLAGS-%mingw64_cppflags}"; export CPPFLAGS; \
0c1e1f
  if [ -x "%{_bindir}/%{mingw64_cxx}" ]; then \
0c1e1f
    CXX="${MINGW64_CXX:-%mingw64_cxx}"; export CXX; \
64394b
    CXXFLAGS="${MINGW64_CXXFLAGS-%mingw64_cflags}"; export CXXFLAGS; \
0c1e1f
  else \
0c1e1f
    CXX=; export CXX; \
0c1e1f
    ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \
0c1e1f
    CXXFLAGS=; export CXXFLAGS; \
0c1e1f
  fi; \
0c1e1f
  LDFLAGS="${MINGW64_LDFLAGS:-%mingw64_ldflags}"; export LDFLAGS; \
0c1e1f
  for i in `ls %{mingw64_bindir}/*|grep -- "-config\$"` ; do \
0cec28
    x=`basename $i|tr "a-z+-." "A-ZX_"`; \
0c1e1f
    declare -x $x="$i" ; export $x; \
0c1e1f
  done; \
0c1e1f
  unset x i
0c1e1f
0c1e1f
%mingw64_pkg_config %{mingw64_target}-pkg-config
782b10
%mingw64_pkgconfig_personalitydir %{mingw32_datadir}/pkgconfig/personality.d
0c1e1f
0c1e1f
%mingw64_configure %{mingw64_env} ; \
0c1e1f
  __mingw64_topdir=.; if ! test -x configure; then __mingw64_topdir=..; fi; \\\
0c1e1f
  $__mingw64_topdir/configure \\\
0c1e1f
	--host=%{mingw64_host} \\\
0c1e1f
	--build=%_build \\\
0c1e1f
	--target=%{mingw64_target} \\\
0c1e1f
	--prefix=%{mingw64_prefix} \\\
0c1e1f
	--exec-prefix=%{mingw64_exec_prefix} \\\
0c1e1f
	--bindir=%{mingw64_bindir} \\\
0c1e1f
	--sbindir=%{mingw64_sbindir} \\\
0c1e1f
	--sysconfdir=%{mingw64_sysconfdir} \\\
0c1e1f
	--datadir=%{mingw64_datadir} \\\
0c1e1f
	--includedir=%{mingw64_includedir} \\\
0c1e1f
	--libdir=%{mingw64_libdir} \\\
0c1e1f
	--libexecdir=%{mingw64_libexecdir} \\\
0c1e1f
	--localstatedir=%{mingw64_localstatedir} \\\
0c1e1f
	--sharedstatedir=%{mingw64_sharedstatedir} \\\
0c1e1f
	--mandir=%{mingw64_mandir} \\\
0c1e1f
	--infodir=%{mingw64_infodir} \\\
0c1e1f
	${MINGW_CONFIGURE_ARGS} \\\
0c1e1f
	${MINGW64_CONFIGURE_ARGS}
0c1e1f
0c1e1f
%mingw64_make %{mingw64_env} ; \
0c1e1f
  make \\\
0c1e1f
	prefix=%{mingw64_prefix} \\\
0c1e1f
	exec_prefix=%{mingw64_exec_prefix} \\\
0c1e1f
	bindir=%{mingw64_bindir} \\\
0c1e1f
	sbindir=%{mingw64_sbindir} \\\
0c1e1f
	sysconfdir=%{mingw64_sysconfdir} \\\
0c1e1f
	datadir=%{mingw64_datadir} \\\
0c1e1f
	includedir=%{mingw64_includedir} \\\
0c1e1f
	libdir=%{mingw64_libdir} \\\
0c1e1f
	libexecdir=%{mingw64_libexecdir} \\\
0c1e1f
	localstatedir=%{mingw64_localstatedir} \\\
0c1e1f
	sharedstatedir=%{mingw64_sharedstatedir} \\\
0c1e1f
	mandir=%{mingw64_mandir} \\\
0c1e1f
	infodir=%{mingw64_infodir}
0c1e1f
a1d54d
%mingw64_cmake_generic %{mingw64_env} ; \
6f9ecc
  PKG_CONFIG_LIBDIR="%{mingw64_libdir}/pkgconfig:%{mingw64_datadir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
0c1e1f
  if test -f CMakeLists.txt; then __mingw64_topdir=.; \\\
0c1e1f
  elif test -f ../CMakeLists.txt; then __mingw64_topdir=..; \\\
0c1e1f
  else __mingw64_topdir=""; fi; \\\
6e3f91
  if test "${MINGW_CMAKE_NO_VERBOSE}" == "" ; then \
6e3f91
    MINGW64_CMAKE_ARGS="${MINGW64_CMAKE_ARGS} -DCMAKE_VERBOSE_MAKEFILE=ON" \
6e3f91
  fi \
0c1e1f
  PATH=%{_prefix}/%{mingw64_target}/bin:$PATH %__cmake \\\
a1d54d
        -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake \\\
a1d54d
        -DBUILD_SHARED_LIBS:BOOL=ON \\\
0c1e1f
        -DSYSCONF_INSTALL_DIR:PATH=%{mingw64_sysconfdir} \\\
0c1e1f
        -DSHARE_INSTALL_PREFIX:PATH=%{mingw64_datadir} \\\
0c1e1f
        -DCMAKE_INSTALL_PREFIX:PATH=%{mingw64_prefix} \\\
0c1e1f
        -DCMAKE_INSTALL_LIBDIR:PATH=%{mingw64_libdir} \\\
0c1e1f
        ${MINGW_CMAKE_ARGS} \\\
0c1e1f
        ${MINGW64_CMAKE_ARGS} \\\
2fdaf5
        "$@" $__mingw64_topdir
0c1e1f
a1d54d
%mingw64_cmake \
a1d54d
  MINGW64_CMAKE_ARGS="${MINGW64_CMAKE_ARGS} -DINCLUDE_INSTALL_DIR:PATH=%{mingw64_includedir}" \
a1d54d
  %mingw64_cmake_generic
a1d54d
a1d54d
%mingw64_cmake_kde4 \
a1d54d
  MINGW64_CMAKE_ARGS="${MINGW64_CMAKE_ARGS} -DINCLUDE_INSTALL_DIR:PATH=%{mingw64_includedir}/kde4" \
a1d54d
  %mingw64_cmake_generic
a1d54d
4c049a
%mingw64_qmake_qt4 /usr/bin/mingw64-qmake-qt4
4c049a
%mingw64_qmake_qt5 /usr/bin/mingw64-qmake-qt5
0c1e1f
bd0be2
%mingw64_meson %{mingw64_env} ; \
bd0be2
  unset CC CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS; \\\
bd0be2
  export CFLAGS="%{__global_cflags}" CXXFLAGS="%{__global_cxxflags}" LDFLAGS="%{__global_ldflags}"; \\\
bd0be2
  if test -f meson.build; then __mingw64_topdir=.; \\\
bd0be2
  elif test -f ../meson.build; then __mingw64_topdir=..; \\\
bd0be2
  else __mingw64_topdir=""; fi; \\\
bd0be2
  %__meson \\\
bd0be2
        --cross-file /usr/share/mingw/toolchain-mingw64.meson \\\
bd0be2
        --default-library shared \\\
bd0be2
        --prefix %{mingw64_prefix} \\\
bd0be2
        --bindir %{mingw64_bindir} \\\
bd0be2
        --sbindir %{mingw64_sbindir} \\\
bd0be2
        --sysconfdir %{mingw64_sysconfdir} \\\
bd0be2
        --datadir %{mingw64_datadir} \\\
bd0be2
        --includedir %{mingw64_includedir} \\\
bd0be2
        --libdir %{mingw64_libdir} \\\
bd0be2
        --libexecdir %{mingw64_libexecdir} \\\
bd0be2
        --localstatedir %{mingw64_localstatedir} \\\
bd0be2
        --sharedstatedir %{mingw64_sharedstatedir} \\\
bd0be2
        --mandir %{mingw64_mandir} \\\
bd0be2
        --infodir %{mingw64_infodir} \\\
bd0be2
        ${MINGW_MESON_ARGS} \\\
bd0be2
        ${MINGW64_MESON_ARGS} \\\
2fdaf5
        "$@" $__mingw64_topdir
bd0be2
0c1e1f
%mingw64_description This is the cross-compiled version of this library / tool.\
0c1e1f
You should only install this package if you want to cross-compile programs for \
0c1e1f
Win64 (64 bit Windows).
0c1e1f
0c1e1f
%mingw64_debug_package                                                   \
0c1e1f
%package -n %{mingw64_pkg_name}-debuginfo                                \
0c1e1f
Summary: Debug information for package %{mingw64_pkg_name}               \
0c1e1f
Group: Development/Debug                                                 \
0c1e1f
BuildArch: noarch                                                        \
0c1e1f
%description -n %{mingw64_pkg_name}-debuginfo                            \
0c1e1f
This package provides debug information for package %{mingw64_pkg_name}. \
0c1e1f
Debug information is useful when developing applications that use this   \
0c1e1f
package or when debugging this package.                                  \
0c1e1f
%files -n %{mingw64_pkg_name}-debuginfo -f mingw64-debugfiles.list       \
0c1e1f
%defattr(-,root,root,-)                                                  \
0c1e1f
%{nil}
0c1e1f