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