mingw-gcc stable port information

Package: mingw-gcc
Version: 4.1.0
Revision: 3
Description: GNU GCC for MinGW
License: LGPL
Maintainer: None

Depends: <<
mingw-binutils (>= 2.16.91-20050827-1-1),
mingw-runtime (>= 3.8-1),
mingw-w32api (>= 3.3-1)
<<
BuildDepends: tar (>=1.14-2), fink (>= 0.24.12)

Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
Source-MD5: 88785071f29ed0e0b6b61057a1079442
SourceDirectory: gcc-%v

PatchFile: %n.patch
PatchFile-MD5: 2e0a043611b2613d0787159b2f87ed82
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
/usr/bin/sed -i.bak \
-e 's|LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/w32api|LIBGCC2_INCLUDES = -I%p/lib/mingw/i686-pc-mingw32|' \
-e '12s|^$|CRTSTUFF_CFLAGS += -isystem %p/lib/mingw/i686-pc-mingw32|' \
gcc/config/i386/t-cygming
<<

##
ConfigureParams: <<
--target=i686-pc-mingw32 \
--host=%m-apple-darwin`uname -r|cut -f1 -d.` \
--prefix=%p/lib/mingw \
--bindir=%p/bin --mandir=%p/share/man --infodir=%p/share/info --libexecdir=%p/lib \
--enable-languages=c,c++,objc,java \
--disable-shared \
--disable-nls \
--enable-threads \
--enable-libgcj \
--disable-multilib \
--with-included-gettext \
--with-as=%p/bin/i686-pc-mingw32-as \
--with-ld=%p/bin/i686-pc-mingw32-ld \
--disable-win32-registry \
--enable-sjlj-exceptions \
--without-x \
--without-newlib
<<

CompileScript: <<
#!/bin/sh -ev
# ulimit -S -s unlimited
mkdir darwin
cd darwin
../configure %c
make
<<

InstallScript: <<
#!/bin/bash -ev
cd darwin
/usr/bin/make install DESTDIR=%d

## FIX ME -- somehow build dir was included into libtools file.
/usr/bin/sed -i.bak \
-e 's|-L%b/darwin/i686-pc-mingw32/libstdc++-v3/src ||' \
-e 's|-L%b/darwin/i686-pc-mingw32/libstdc++-v3/src/.libs ||' \
-e 's|-L%b/darwin/i686-pc-mingw32/libjava ||' \
-e 's|-L%b/darwin/i686-pc-mingw32/libjava/.libs ||' \
-e 's|-L%b/darwin/./gcc||' \
%i/lib/mingw/i686-pc-mingw32/lib/libstdc++.la \
%i/lib/mingw/i686-pc-mingw32/lib/libsupc++.la \
%i/lib/mingw/i686-pc-mingw32/lib/libgcj.la \
%i/lib/mingw/i686-pc-mingw32/lib/libgij.la
/bin/rm -f %i/lib/mingw/i686-pc-mingw32/lib/lib{stdc++,supc++,gcj,gij}.la.bak

/bin/rm -f %i/lib/mingw/lib/libiberty.a
/bin/rm -f %i/share/info/standards.info
/bin/rm -f %i/share/info/configure.info*
/bin/rm -rf %i/share/man/man7
for file_name in %i/share/info/*; do
new_file_name=`/bin/echo ${file_name} |
/usr/bin/sed -e "s|%i/share/info/|%i/share/info/i686-pc-mingw32-|g"`
mv ${file_name} ${new_file_name}
done
<<

DocFiles: COPYING* ChangeLog MAINTAINERS README*
InfoDocs: i686-pc-mingw32-fastjar.info i686-pc-mingw32-gccinstall.info

Homepage: http://gcc.gnu.org/
DescPort: <<
Like 'avr-gcc' package, lib & include folders have been moved to
/sw/share/mingw and the binaries are put into /sw/bin .

All xxx.info files renamed to i686-pc-mingw32-xxx.info to avoid clashes
with other potential toolchains.

Patch configure to fix broken texinfo detection code

TODO: Native Language Support
<<
DescUsage: <<
Case 1: GCC
1. Write a code.
$ cat > hello.c
#include

int WINAPI WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR szCmdLine,
int iCmdShow)
{
MessageBox (NULL, "Hello World!", "Hello", MB_OK);
return (0);
}
^D
2. Compile.
$ i686-pc-mingw32-gcc -o hello.exe hello.c -mwindows
3. Run.

Case 2: GCJ
1. Write a code.
$ cat > HelloWorld.java
public class HelloWorld {
public static void main (String[] args) {
System.out.println("Hello, world!");
}
}
^D
2. Compile.
$ i686-pc-mingw32-gcj --main=HelloWorld HelloWorld.java
3. Complain about its not running; then give feedback to the Maintainer ;-)
<<

mingw-gcc stable port .patch

diff -ru gcc-4.1.0/configure gcc-4.1.0-patched/configure
--- gcc-4.1.0/configure 2005-12-16 13:57:40.000000000 +0100
+++ gcc-4.1.0-patched/configure 2011-05-02 14:07:34.000000000 +0200
@@ -3543,7 +3543,7 @@
# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.([2-9]|[1-9][0-9])|[5-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"

mingw-gcc _unstable_ port .patch