From 7747417c57398e0da848b080567a5550fdbe4d78 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 10 Mar 2012 20:43:49 +0100 Subject: [PATCH] Added win64 support - Added win64 support - Use mingw macros without leading underscore --- mingw-libjpeg-turbo.spec | 117 ++++++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/mingw-libjpeg-turbo.spec b/mingw-libjpeg-turbo.spec index 7ebfe5d..a636377 100644 --- a/mingw-libjpeg-turbo.spec +++ b/mingw-libjpeg-turbo.spec @@ -1,6 +1,7 @@ -%global __strip %{_mingw32_strip} -%global __objdump %{_mingw32_objdump} -%define __debug_install_post %{_mingw32_debug_install_post} +%?mingw_package_header + +%global mingw_build_win32 1 +%global mingw_build_win64 1 # Build the programs like cjpeg, etc. # https://bugzilla.redhat.com/show_bug.cgi?id=467401#c7 @@ -8,7 +9,7 @@ Name: mingw-libjpeg-turbo Version: 1.1.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: MinGW Windows Libjpeg-turbo library License: wxWidgets @@ -24,12 +25,20 @@ Patch0: libjpeg-turbo-dont-conflict-with-basetsd-h.diff BuildArch: noarch -BuildRequires: mingw32-filesystem >= 68 +BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-binutils BuildRequires: mingw32-libpng BuildRequires: mingw32-zlib + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw64-binutils +BuildRequires: mingw64-libpng +BuildRequires: mingw64-zlib + BuildRequires: nasm BuildRequires: cmake @@ -37,26 +46,44 @@ BuildRequires: cmake MinGW Windows cross compiled Libjpeg-turbo library. -%package -n %{_mingw32_pkg_name} +# Win32 +%package -n mingw32-libjpeg-turbo Summary: MinGW Windows Libjpeg-turbo library Obsoletes: mingw32-libjpeg < 7-4 Provides: mingw32-libjpeg = 7-4 -%description -n %{_mingw32_pkg_name} +%description -n mingw32-libjpeg-turbo MinGW Windows cross compiled Libjpeg-turbo library. - -%package -n %{_mingw32_pkg_name}-static +%package -n mingw32-libjpeg-turbo-static Summary: Static version of the MinGW Windows Libjpeg-turbo library Requires: mingw32-libjpeg-turbo = %{version}-%{release} Obsoletes: mingw32-libjpeg-static < 7-4 Provides: mingw32-libjpeg-static = 7-4 -%description -n %{_mingw32_pkg_name}-static +%description -n mingw32-libjpeg-turbo-static +Static version of the MinGW Windows cross compiled Libjpeg-turbo library. + +# Win64 +%package -n mingw64-libjpeg-turbo +Summary: MinGW Windows Libjpeg-turbo library +Obsoletes: mingw64-libjpeg < 8a-2%{?dist} +Provides: mingw64-libjpeg = 8a-2%{?dist} + +%description -n mingw64-libjpeg-turbo +MinGW Windows cross compiled Libjpeg-turbo library. + +%package -n mingw64-libjpeg-turbo-static +Summary: Static version of the MinGW Windows Libjpeg-turbo library +Requires: mingw64-libjpeg-turbo = %{version}-%{release} +Obsoletes: mingw64-libjpeg-static < 8a-2%{?dist} +Provides: mingw64-libjpeg-static = 8a-2%{?dist} + +%description -n mingw64-libjpeg-turbo-static Static version of the MinGW Windows cross compiled Libjpeg-turbo library. -%{?_mingw32_debug_package} +%?mingw_debug_package %prep @@ -65,49 +92,77 @@ Static version of the MinGW Windows cross compiled Libjpeg-turbo library. %build -%{_mingw32_cmake} -make %{?_smp_mflags} +%mingw_cmake +%mingw_make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +%mingw_make_install DESTDIR=$RPM_BUILD_ROOT # Remove manual pages which duplicate Fedora native. -rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} # The CMake build system also installed some docs -rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/doc +rm -rf $RPM_BUILD_ROOT%{mingw32_prefix}/doc +rm -rf $RPM_BUILD_ROOT%{mingw64_prefix}/doc # Remove win32 native binaries if wanted %if %build_programs == 0 -rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/*.exe +rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/*.exe +rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/*.exe %endif # Fix perms chmod -x README-turbo.txt -%files -n %{_mingw32_pkg_name} +# Win32 +%files -n mingw32-libjpeg-turbo %doc README README-turbo.txt change.log ChangeLog.txt LGPL.txt LICENSE.txt %if %build_programs -%{_mingw32_bindir}/*.exe +%{mingw32_bindir}/*.exe %endif -%{_mingw32_bindir}/libjpeg-62.dll -%{_mingw32_bindir}/libturbojpeg.dll -%{_mingw32_includedir}/jconfig.h -%{_mingw32_includedir}/jerror.h -%{_mingw32_includedir}/jmorecfg.h -%{_mingw32_includedir}/jpeglib.h -%{_mingw32_includedir}/turbojpeg.h -%{_mingw32_libdir}/libjpeg.dll.a -%{_mingw32_libdir}/libturbojpeg.dll.a +%{mingw32_bindir}/libjpeg-62.dll +%{mingw32_bindir}/libturbojpeg.dll +%{mingw32_includedir}/jconfig.h +%{mingw32_includedir}/jerror.h +%{mingw32_includedir}/jmorecfg.h +%{mingw32_includedir}/jpeglib.h +%{mingw32_includedir}/turbojpeg.h +%{mingw32_libdir}/libjpeg.dll.a +%{mingw32_libdir}/libturbojpeg.dll.a -%files -n %{_mingw32_pkg_name}-static -%{_mingw32_libdir}/libjpeg.a -%{_mingw32_libdir}/libturbojpeg.a +%files -n mingw32-libjpeg-turbo-static +%{mingw32_libdir}/libjpeg.a +%{mingw32_libdir}/libturbojpeg.a + +# Win64 +%files -n mingw64-libjpeg-turbo +%doc README README-turbo.txt change.log ChangeLog.txt LGPL.txt LICENSE.txt +%if %build_programs +%{mingw64_bindir}/*.exe +%endif +%{mingw64_bindir}/libjpeg-62.dll +%{mingw64_bindir}/libturbojpeg.dll +%{mingw64_includedir}/jconfig.h +%{mingw64_includedir}/jerror.h +%{mingw64_includedir}/jmorecfg.h +%{mingw64_includedir}/jpeglib.h +%{mingw64_includedir}/turbojpeg.h +%{mingw64_libdir}/libjpeg.dll.a +%{mingw64_libdir}/libturbojpeg.dll.a + +%files -n mingw64-libjpeg-turbo-static +%{mingw64_libdir}/libjpeg.a +%{mingw64_libdir}/libturbojpeg.a %changelog +* Sat Mar 10 2012 Erik van Pienbroek - 1.1.1-8 +- Added win64 support +- Use mingw macros without leading underscore + * Mon Feb 27 2012 Erik van Pienbroek - 1.1.1-7 - Rebuild against the mingw-w64 toolchain