Enable C++ compilers. Split cpp & c++ into sub-RPMs. Add gettext and iconv
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 4 Sep 2008 10:24:59 +0000 (06:24 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 4 Sep 2008 10:24:59 +0000 (06:24 -0400)
gcc/mingw-gcc.spec
gettext/mingw-gettext.spec [new file with mode: 0644]
iconv/mingw-iconv.spec [new file with mode: 0644]

index 57a16ea..b7e0489 100644 (file)
@@ -3,10 +3,10 @@
 Name:           mingw-gcc
 Version:        4.3.2
 Release:        3%{?dist}
-Summary:        MinGW Windows cross-compiler (GCC) for C and C++
+Summary:        MinGW Windows cross-compiler (GCC) for C
 
 License:        GPLv2+
-Group:          Development/Libraries
+Group:          Development/Languages
 URL:            http://www.mingw.org/
 Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
 Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2
@@ -24,10 +24,26 @@ BuildRequires:  libgomp
 Requires:       mingw-binutils
 Requires:       mingw-runtime
 Requires:       mingw-w32api
+Requires:       mingw-cpp
 
 
 %description
-MinGW Windows cross-compiler (GCC) for C and C++.
+MinGW Windows cross-compiler (GCC) for C
+
+%package -n mingw-cpp
+Summary: MinGW Windows cross-C Preprocessor.
+Group: Development/Languages
+
+%description -n mingw-cpp
+MinGW Windows cross-C Preprocessor
+
+%package c++
+Summary: MinGW Windows cross-compiler for C++
+Group: Development/Languages
+
+%description c++
+MinGW Windows cross-compiler for C++
+
 
 
 %prep
@@ -41,8 +57,8 @@ cd gcc-%{version}
 mkdir -p build
 cd build
 
-#languages="c,c++"
-languages="c"
+languages="c,c++"
+#languages="c"
 # XXX C++ disabled for now because of a strange GCC bug.
 
 CC="%{__cc} ${RPM_OPT_FLAGS}" \
@@ -81,6 +97,8 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty*
 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
 
+mkdir -p $RPM_BUILD_ROOT/lib
+ln -sf ..%{_prefix}/bin/i686-pc-mingw-cpp $RPM_BUILD_ROOT/lib/i686-pc-mingw32-cpp
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -88,12 +106,57 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
+%{_bindir}/i686-pc-mingw32-gcc
+%{_bindir}/i686-pc-mingw32-gcc-%{version}
+%{_bindir}/i686-pc-mingw32-gccbug
+%{_bindir}/i686-pc-mingw32-gcov
 %{_prefix}/i686-pc-mingw32/lib/libiberty.a
-%{_libdir}/gcc/i686-pc-mingw32
-%{_libexecdir}/gcc/i686-pc-mingw32
-%{_bindir}/i686-pc-mingw32-*
-%{_mandir}/man1/i686-pc-mingw32-*
-
+%dir %{_libdir}/gcc/i686-pc-mingw32
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtbegin.o
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtend.o
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/crtfastmath.o
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcc.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libgcov.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp.la
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libssp_nonshared.la
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed/README
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/include-fixed/*.h
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/*.h
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/ssp/*.h
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
+%dir %{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools
+%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/install-tools/*
+%{_mandir}/man1/i686-pc-mingw32-gcc.1*
+%{_mandir}/man1/i686-pc-mingw32-gcov.1*
+
+%files -n mingw-cpp
+%defattr(-,root,root)
+/lib/i686-pc-mingw32-cpp
+%{_bindir}/i686-pc-mingw32-cpp
+%{_mandir}/man1/i686-pc-mingw32-cpp.1*
+%dir %{_libdir}/gcc/i686-pc-mingw32
+%dir %{_libdir}/gcc/i686-pc-mingw32/%{version}
+%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1
+
+%files c++
+%defattr(-,root,root)
+%{_bindir}/i686-pc-mingw32-g++
+%{_bindir}/i686-pc-mingw32-c++
+%{_mandir}/man1/i686-pc-mingw32-g++.1*
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/include/c++/
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libstdc++.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libstdc++.la
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libsupc++.a
+%{_libdir}/gcc/i686-pc-mingw32/%{version}/libsupc++.la
+%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/cc1plus
+%{_libexecdir}/gcc/i686-pc-mingw32/%{version}/collect2
 
 %changelog
 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.1-3
diff --git a/gettext/mingw-gettext.spec b/gettext/mingw-gettext.spec
new file mode 100644 (file)
index 0000000..81f05fe
--- /dev/null
@@ -0,0 +1,135 @@
+%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+
+Name:      mingw-gettext
+Version:   0.17
+Release:   1%{?dist}
+Summary:   GNU libraries and utilities for producing multi-lingual messages
+
+License:   GPLv2+ and LGPLv2+
+Group:     Development/Libraries
+URL:       http://www.gnu.org/software/gettext/
+Source0:   http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: mingw-gcc
+BuildRequires: mingw-gcc-c++
+BuildRequires: mingw-binutils
+BuildRequires: mingw-iconv
+
+Requires:       mingw-runtime
+
+%description
+MinGW Windows Gettext library
+
+%prep
+%setup -q -n gettext-%{version}
+
+%build
+CFLAGS="-O2 -g -Wall -pipe" \
+./configure \
+  --build=%_build \
+  --host=i686-pc-mingw32 \
+  --prefix=%{_prefix}/i686-pc-mingw32/sys-root/mingw \
+  --disable-java \
+  --disable-native-java \
+  --disable-csharp \
+  --enable-threads=win32
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+rm -f $RPM_BUILD_ROOT%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/locale/locale.alias
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/autopoint
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/envsubst.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/gettext.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/gettext.sh
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/gettextize
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libasprintf-0.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libgettextlib-0-17.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libgettextpo-0.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libgettextsrc-0-17.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libintl-8.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/msg*.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/ngettext.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/recode-sr-latin.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/xgettext.exe
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/autosprintf.h
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/gettext-po.h
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/libintl.h
+
+%dir %{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/gettext/
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/gettext/hostname.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/gettext/project-id
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/gettext/urlget.exe
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/gettext/user-email
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/charset.alias
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libasprintf.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libasprintf.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libasprintf.la
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextlib.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextlib.la
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextpo.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextpo.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextpo.la
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextsrc.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgettextsrc.la
+
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libintl.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libintl.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libintl.la
+
+%dir %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc/gettext
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc/gettext/*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc/libasprintf/*
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/emacs/site-lisp/*
+
+%dir %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/gettext/
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/gettext/*
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/aclocal/*m4
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/info/autosprintf.info
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/info/gettext.info
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/locale/*/LC_MESSAGES/gettext-tools.mo
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/locale/*/LC_MESSAGES/gettext-runtime.mo
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/autopoint.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/envsubst.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/gettext.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/gettextize.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/msg*1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/ngettext.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/recode-sr-latin.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/xgettext.1*
+
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/bind_textdomain_codeset.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/bindtextdomain.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/dcgettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/dcngettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/dgettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/dngettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/gettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/ngettext.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/textdomain.3*
+
+
+%changelog
+* Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.17-1
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/iconv/mingw-iconv.spec b/iconv/mingw-iconv.spec
new file mode 100644 (file)
index 0000000..7863f1d
--- /dev/null
@@ -0,0 +1,67 @@
+%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+
+Name:      mingw-iconv
+Version:   1.12
+Release:   1%{?dist}
+Summary:   GNU libraries and utilities for producing multi-lingual messages
+
+License:   GPLv2+ and LGPLv2+
+Group:     Development/Libraries
+URL:       http://www.gnu.org/software/iconv/
+Source0:   http://ftp.gnu.org/pub/gnu/iconv/libiconv-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: mingw-gcc
+BuildRequires: mingw-binutils
+
+Requires:       mingw-runtime
+
+%description
+MinGW Windows Iconv library
+
+%prep
+%setup -q -n libiconv-%{version}
+
+%build
+CFLAGS="-O2 -g -Wall -pipe" \
+./configure \
+  --build=%_build \
+  --host=i686-pc-mingw32 \
+  --prefix=%{_prefix}/i686-pc-mingw32/sys-root/mingw
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/iconv
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libcharset-1.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libiconv-2.dll
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/iconv.h
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/libcharset.h
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/localcharset.h
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/charset.alias
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libcharset.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libcharset.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libcharset.la
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libiconv.dll.a
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libiconv.la
+%dir %{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc/libiconv/
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/doc/libiconv/*.html
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man1/iconv.1*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/iconv.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/iconv_close.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/iconv_open.3*
+%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/man/man3/iconvctl.3*
+
+
+%changelog
+* Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.17-1
+- Initial RPM release, largely based on earlier work from several sources.