diff options
-rw-r--r-- | src/binutils.mk | 27 | ||||
-rw-r--r-- | src/gcc.mk | 33 | ||||
-rw-r--r-- | src/mingwrt.mk | 21 | ||||
-rw-r--r-- | src/w32api.mk | 29 |
4 files changed, 110 insertions, 0 deletions
diff --git a/src/binutils.mk b/src/binutils.mk new file mode 100644 index 0000000..9eeffe6 --- /dev/null +++ b/src/binutils.mk @@ -0,0 +1,27 @@ +# MinGW binutils +# http://mingw.sourceforge.net/ + +PKG := binutils +$(PKG)_VERSION := 2.18.50-20080109 +$(PKG)_SUBDIR := binutils-$(firstword $(subst -, ,$($(PKG)_VERSION))) +$(PKG)_FILE := binutils-$($(PKG)_VERSION)-src.tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/mingw/$($(PKG)_FILE) +$(PKG)_DEPS := mingwrt w32api + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11290' | \ + $(SED) -n 's,.*binutils-\([0-9][^>]*\)-src\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(2)' && ./configure \ + --target='$(TARGET)' \ + --prefix='$(PREFIX)' \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --disable-nls \ + --disable-shared + $(MAKE) -C '$(2)' all install +endef diff --git a/src/gcc.mk b/src/gcc.mk new file mode 100644 index 0000000..22efe33 --- /dev/null +++ b/src/gcc.mk @@ -0,0 +1,33 @@ +# MinGW GCC +# http://mingw.sourceforge.net/ + +PKG := gcc +$(PKG)_VERSION := 4.2.1-2 +$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)-src +$(PKG)_FILE := gcc-$($(PKG)_VERSION)-src.tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/mingw/$($(PKG)_FILE) +$(PKG)_DEPS := mingwrt w32api binutils + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304' | \ + $(SED) -n 's,.*gcc-\([4-9][^>]*\)-src\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(2)' && ./configure \ + --target='$(TARGET)' \ + --prefix='$(PREFIX)' \ + --enable-languages='c,c++' \ + --enable-version-specific-runtime-libs \ + --with-gcc \ + --with-gnu-ld \ + --with-gnu-as \ + --disable-nls \ + --disable-shared \ + --without-x \ + --enable-threads=win32 \ + --disable-win32-registry \ + --enable-sjlj-exceptions + $(MAKE) -C '$(2)' all install +endef diff --git a/src/mingwrt.mk b/src/mingwrt.mk new file mode 100644 index 0000000..a16814c --- /dev/null +++ b/src/mingwrt.mk @@ -0,0 +1,21 @@ +# MinGW Runtime +# http://mingw.sourceforge.net/ + +PKG := mingwrt +$(PKG)_VERSION := 3.14 +$(PKG)_SUBDIR := . +$(PKG)_FILE := mingw-runtime-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/mingw/$($(PKG)_FILE) +$(PKG)_DEPS := + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11598' | \ + $(SED) -n 's,.*mingwrt-\([0-9][^>]*\)-src\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + mkdir -p '$(PREFIX)/$(TARGET)' + cd '$(2)' && \ + cp -rpv bin include lib '$(PREFIX)/$(TARGET)' +endef diff --git a/src/w32api.mk b/src/w32api.mk new file mode 100644 index 0000000..1a52572 --- /dev/null +++ b/src/w32api.mk @@ -0,0 +1,29 @@ +# MinGW Windows API +# http://mingw.sourceforge.net/ + +PKG := w32api +$(PKG)_VERSION := 3.11 +$(PKG)_SUBDIR := . +$(PKG)_FILE := w32api-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/mingw/$($(PKG)_FILE) +$(PKG)_DEPS := + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11550' | \ + $(SED) -n 's,.*w32api-\([0-9][^>]*\)-src\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # fix incompatibilities with gettext + $(SED) 's,\(SUBLANG_BENGALI_INDIA\t\)0x01,\10x00,' -i '$(2)/include/winnt.h' + $(SED) 's,\(SUBLANG_PUNJABI_INDIA\t\)0x01,\10x00,' -i '$(2)/include/winnt.h' + $(SED) 's,\(SUBLANG_ROMANIAN_ROMANIA\t\)0x01,\10x00,' -i '$(2)/include/winnt.h' + # fix incompatibilities with jpeg + $(SED) 's,typedef unsigned char boolean;,,' -i '$(2)/include/rpcndr.h' + # fix missing definitions for WinPcap and libdnet + $(SED) '1i\#include <wtypes.h>' -i '$(2)/include/iphlpapi.h' + $(SED) '1i\#include <wtypes.h>' -i '$(2)/include/wincrypt.h' + mkdir -p '$(PREFIX)/$(TARGET)' + cp -rpv '$(2)/include' '$(2)/lib' '$(PREFIX)/$(TARGET)' +endef |