[mingw-readline] Added win64 support

epienbro epienbro at fedoraproject.org
Sat Mar 10 20:02:22 UTC 2012


commit e47d30e2a7b4b22cccc415ad798b6ab122f4f0f5
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sat Mar 10 21:02:11 2012 +0100

    Added win64 support
    
    - Added win64 support
    - Automatically generate debuginfo subpackage
    - Added -static subpackage

 mingw-readline.spec |  100 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 87 insertions(+), 13 deletions(-)
---
diff --git a/mingw-readline.spec b/mingw-readline.spec
index e964f35..0bcc95d 100644
--- a/mingw-readline.spec
+++ b/mingw-readline.spec
@@ -1,9 +1,11 @@
-%define __strip %{mingw32_strip}
-%define __objdump %{mingw32_objdump}
+%?mingw_package_header
+
+%global mingw_build_win32 1
+%global mingw_build_win64 1
 
 Name:           mingw-readline
 Version:        5.2
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        MinGW port of readline for editing typed command lines
 
 License:        GPLv2+
@@ -27,10 +29,15 @@ Patch13:        readline-5.2-redisplay-sigint.patch
 
 BuildArch:      noarch
 
-BuildRequires:  mingw32-filesystem
+BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
-BuildRequires:  mingw32-termcap >= 1.3.1-3
+BuildRequires:  mingw32-termcap
+
+BuildRequires:  mingw64-filesystem >= 95
+BuildRequires:  mingw64-gcc
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-termcap
 
 
 %description
@@ -44,6 +51,7 @@ commands.
 This is a port of the library and development tools to Windows.
 
 
+# Win32
 %package -n mingw32-readline
 Summary:        MinGW port of readline for editing typed command lines
 
@@ -57,6 +65,37 @@ commands.
 
 This is a port of the library and development tools to Windows.
 
+%package -n mingw32-readline-static
+Summary:        Static version of the cross compiled readline library
+Requires:       mingw32-readline = %{version}-%{release}
+
+%description -n mingw32-readline-static
+Static version of the cross compiled readline library.
+
+# Win64
+%package -n mingw64-readline
+Summary:        MinGW port of readline for editing typed command lines
+
+%description -n mingw64-readline
+The Readline library provides a set of functions that allow users to
+edit command lines. Both Emacs and vi editing modes are available. The
+Readline library includes additional functions for maintaining a list
+of previously-entered command lines for recalling or editing those
+lines, and for performing csh-like history expansion on previous
+commands.
+
+This is a port of the library and development tools to Windows.
+
+%package -n mingw64-readline-static
+Summary:        Static version of the cross compiled readline library
+Requires:       mingw64-readline = %{version}-%{release}
+
+%description -n mingw64-readline-static
+Static version of the cross compiled readline library.
+
+
+%?mingw_debug_package
+
 
 %prep
 %setup -q -n readline-%{version}
@@ -83,21 +122,26 @@ popd
 
 
 %build
-%{mingw32_configure} --enable-shared
-make SHLIB_LIBS=-ltermcap
+%mingw_configure "--enable-shared"
+%mingw_make SHLIB_LIBS=-ltermcap
 
 # Rebuild the DLLs correctly and create implibs.
-pushd shlib
+pushd build_win32/shlib
 %{mingw32_cc} -shared -o readline.dll -Wl,--out-implib,libreadline.dll.a readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so -ltermcap
 %{mingw32_cc} -shared -o history.dll -Wl,--out-implib,libhistory.dll.a history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so
 popd
 
+pushd build_win64/shlib
+%{mingw64_cc} -shared -o readline.dll -Wl,--out-implib,libreadline.dll.a readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so -ltermcap
+%{mingw64_cc} -shared -o history.dll -Wl,--out-implib,libhistory.dll.a history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so
+popd
+
 
 %install
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
 
 # Remove the fake .so files and install our DLLs and implibs.
-pushd shlib
+pushd build_win32/shlib
 rm $RPM_BUILD_ROOT%{mingw32_libdir}/lib*.so.*
 mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
 install readline.dll $RPM_BUILD_ROOT%{mingw32_bindir}
@@ -106,15 +150,24 @@ install history.dll $RPM_BUILD_ROOT%{mingw32_bindir}
 install libhistory.dll.a $RPM_BUILD_ROOT%{mingw32_libdir}
 popd
 
+pushd build_win64/shlib
+rm $RPM_BUILD_ROOT%{mingw64_libdir}/lib*.so.*
+mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
+install readline.dll $RPM_BUILD_ROOT%{mingw64_bindir}
+install libreadline.dll.a $RPM_BUILD_ROOT%{mingw64_libdir}
+install history.dll $RPM_BUILD_ROOT%{mingw64_bindir}
+install libhistory.dll.a $RPM_BUILD_ROOT%{mingw64_libdir}
+popd
+
 # Don't want the info files or manpages which duplicate the native package.
 rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
 rm -rf $RPM_BUILD_ROOT%{mingw32_infodir}
 
-# Don't want the static library.
-rm $RPM_BUILD_ROOT%{mingw32_libdir}/libhistory.a
-rm $RPM_BUILD_ROOT%{mingw32_libdir}/libreadline.a
+rm -rf $RPM_BUILD_ROOT%{mingw64_mandir}
+rm -rf $RPM_BUILD_ROOT%{mingw64_infodir}
 
 
+# Win32
 %files -n mingw32-readline
 %{mingw32_bindir}/readline.dll
 %{mingw32_bindir}/history.dll
@@ -122,8 +175,29 @@ rm $RPM_BUILD_ROOT%{mingw32_libdir}/libreadline.a
 %{mingw32_libdir}/libhistory.dll.a
 %{mingw32_includedir}/readline/
 
+%files -n mingw32-readline-static
+%{mingw32_libdir}/libhistory.a
+%{mingw32_libdir}/libreadline.a
+
+# Win64
+%files -n mingw64-readline
+%{mingw64_bindir}/readline.dll
+%{mingw64_bindir}/history.dll
+%{mingw64_libdir}/libreadline.dll.a
+%{mingw64_libdir}/libhistory.dll.a
+%{mingw64_includedir}/readline/
+
+%files -n mingw64-readline-static
+%{mingw64_libdir}/libhistory.a
+%{mingw64_libdir}/libreadline.a
+
 
 %changelog
+* Sat Mar 10 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.2-12
+- Added win64 support
+- Automatically generate debuginfo subpackage
+- Added -static subpackage
+
 * Wed Mar 07 2012 Kalev Lember <kalevlember at gmail.com> - 5.2-11
 - Renamed the source package to mingw-readline (#801022)
 - Modernize the spec file


More information about the scm-commits mailing list