[mingw-pkg-config] Added support for win64
epienbro
epienbro at fedoraproject.org
Mon Feb 27 17:11:57 UTC 2012
commit d66487ff01e6ca7fa485ef5ff9f729b922022b00
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Mon Feb 27 18:11:53 2012 +0100
Added support for win64
mingw-pkg-config.spec | 74 ++++++++++++++++++++++++++++++++++--------------
1 files changed, 52 insertions(+), 22 deletions(-)
---
diff --git a/mingw-pkg-config.spec b/mingw-pkg-config.spec
index 834554f..a3eed68 100644
--- a/mingw-pkg-config.spec
+++ b/mingw-pkg-config.spec
@@ -1,7 +1,7 @@
Name: mingw-pkg-config
Version: 0.26
-Release: 2%{?dist}
-Summary: MinGW Windows pkg-config tool for cross compiling
+Release: 3%{?dist}
+Summary: A tool for determining compilation options
License: GPLv2+
Group: Development/Tools
@@ -10,7 +10,8 @@ Source0: http://www.freedesktop.org/software/pkgconfig/releases/pkg-confi
BuildRequires: glib2-devel
BuildRequires: popt-devel
-BuildRequires: mingw32-filesystem
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw64-filesystem >= 95
%description
@@ -18,25 +19,26 @@ The pkgconfig tool determines compilation options. For each required
library, it reads the configuration file and outputs the necessary
compiler and linker flags.
-This package contains pkg-config tool for cross compiling with the MinGW
-toolchain.
-
# Mingw32
%package -n mingw32-pkg-config
-Summary: %{summary}
-
-# Make sure that the mingw32-filesystem package doesn't
-# contain the pkg-config wrapper anymore
-Requires: mingw32-filesystem >= 69-12
+Summary: A tool for determining compilation options for the win32 target
+Requires: mingw32-filesystem >= 95
%description -n mingw32-pkg-config
The pkgconfig tool determines compilation options. For each required
library, it reads the configuration file and outputs the necessary
compiler and linker flags.
-This package contains pkg-config tool for cross compiling with the MinGW
-toolchain.
+# Mingw64
+%package -n mingw64-pkg-config
+Summary: A tool for determining compilation options for the win64 target
+Requires: mingw64-filesystem >= 95
+
+%description -n mingw64-pkg-config
+The pkgconfig tool determines compilation options. For each required
+library, it reads the configuration file and outputs the necessary
+compiler and linker flags.
%prep
@@ -44,16 +46,36 @@ toolchain.
%build
-%configure \
- --program-prefix=%{_mingw32_target}- \
- --with-installed-popt \
- --with-pc-path=%{_mingw32_libdir}/pkgconfig:%{_mingw32_datadir}/pkgconfig
-
-make %{?_smp_mflags}
+mkdir build_win32
+pushd build_win32
+ CFLAGS="$RPM_OPT_FLAGS" \
+ ../configure \
+ --prefix=%{_prefix} \
+ --disable-shared \
+ --program-prefix=%{mingw32_target}- \
+ --with-installed-popt \
+ --with-pc-path=%{mingw32_libdir}/pkgconfig:%{mingw32_datadir}/pkgconfig
+
+ make %{?_smp_mflags}
+popd
+
+mkdir build_win64
+pushd build_win64
+ CFLAGS="$RPM_OPT_FLAGS" \
+ ../configure \
+ --prefix=%{_prefix} \
+ --disable-shared \
+ --program-prefix=%{mingw64_target}- \
+ --with-installed-popt \
+ --with-pc-path=%{mingw64_libdir}/pkgconfig:%{mingw64_datadir}/pkgconfig
+
+ make %{?_smp_mflags}
+popd
%install
-make install DESTDIR=$RPM_BUILD_ROOT
+make install -C build_win32 DESTDIR=$RPM_BUILD_ROOT
+make install -C build_win64 DESTDIR=$RPM_BUILD_ROOT
# These files conflict with ordinary pkg-config.
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/aclocal
@@ -62,11 +84,19 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/pkg-config
%files -n mingw32-pkg-config
%doc AUTHORS README NEWS COPYING pkg-config-guide.html
-%{_bindir}/%{_mingw32_target}-pkg-config
-%{_mandir}/man1/%{_mingw32_target}-pkg-config.1*
+%{_bindir}/%{mingw32_target}-pkg-config
+%{_mandir}/man1/%{mingw32_target}-pkg-config.1*
+
+%files -n mingw64-pkg-config
+%doc AUTHORS README NEWS COPYING pkg-config-guide.html
+%{_bindir}/%{mingw64_target}-pkg-config
+%{_mandir}/man1/%{mingw64_target}-pkg-config.1*
%changelog
+* Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 0.26-3
+- Added support for win64
+
* Tue Jan 31 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 0.26-2
- Dropped the configure argument --with-installed-glib as it's not needed
anymore as of pkg-config 0.26
More information about the mingw
mailing list