From 2cce10cbcbb6c5e913fbd1ebf8c46b8ebfe7eeb2 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Mon, 10 Aug 2009 13:24:12 +0200 Subject: improved version recognition for sourceforge packages --- Makefile | 8 ++++++++ src/binutils.mk | 4 ++-- src/boost.mk | 5 ++--- src/cppunit.mk | 5 ++--- src/expat.mk | 5 ++--- src/freetype.mk | 5 ++--- src/gcc-core.mk | 5 ++--- src/gcc-fortran.mk | 5 ++--- src/gcc-g++.mk | 5 ++--- src/gcc-gmp.mk | 5 ++--- src/gcc-mpfr.mk | 5 ++--- src/gcc-objc.mk | 5 ++--- src/gcc.mk | 5 ++--- src/giflib.mk | 5 ++--- src/glew.mk | 5 ++--- src/libdnet.mk | 5 ++--- src/libpng.mk | 7 ++++--- src/libusb.mk | 5 ++--- src/mingwrt.mk | 5 ++--- src/pcre.mk | 5 ++--- src/pdcurses.mk | 5 ++--- src/w32api.mk | 4 ++-- src/wxwidgets.mk | 5 ++--- src/xmlwrapp.mk | 5 ++--- src/zlib.mk | 5 ++--- 25 files changed, 58 insertions(+), 70 deletions(-) diff --git a/Makefile b/Makefile index 95a4395..7d16206 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,14 @@ DOWNLOAD_PKG_ARCHIVE = \ || wget -c -O '$(PKG_DIR)/$($(1)_FILE)' '$($(1)_URL_2)', \ wget -c -O '$(PKG_DIR)/$($(1)_FILE)' '$($(1)_URL)') +SOURCEFORGE_FILES = \ + wget -q -O- '$(1)' | \ + grep 'title="/' | \ + $(SED) -n 's,.*title="\(/[^:]*\).*released on \([^ "]* [^ "]* [^ "]*\)",\2 \1,p' | \ + while read d1 d2 d3 url; do echo "`date -d "$$d1 $$d2 $$d3" +%Y-%m-%d`" "$$url"; done | \ + sort | \ + $(SED) 's,^[^ ]* ,,' + .PHONY: all all: $(PKGS) diff --git a/src/binutils.mk b/src/binutils.mk index c28f5a9..70babf2 100644 --- a/src/binutils.mk +++ b/src/binutils.mk @@ -10,9 +10,9 @@ $(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' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/mingw/files/GNU%20Binutils/) | \ $(SED) -n 's,.*binutils-\([0-9][^>]*\)-src\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/boost.mk b/src/boost.mk index 2d08a5d..aef06d7 100644 --- a/src/boost.mk +++ b/src/boost.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/boost/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib bzip2 expat define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041' | \ - grep 'boost_' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/boost/files/boost/) | \ $(SED) -n 's,.*boost_\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/cppunit.mk b/src/cppunit.mk index 0620829..c54cbb6 100644 --- a/src/cppunit.mk +++ b/src/cppunit.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/cppunit/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=11795&package_id=11019' | \ - grep 'cppunit-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/cppunit/files/cppunit/) | \ $(SED) -n 's,.*cppunit-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/expat.mk b/src/expat.mk index b35d33a..6c3ce66 100644 --- a/src/expat.mk +++ b/src/expat.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/expat/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=10127&package_id=10780' | \ - grep 'expat-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/expat/files/expat/) | \ $(SED) -n 's,.*expat-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/freetype.mk b/src/freetype.mk index 1672a9b..9de7e64 100644 --- a/src/freetype.mk +++ b/src/freetype.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/freetype/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=3157&package_id=3121' | \ - grep 'freetype-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/freetype/files/freetype2/) | \ $(SED) -n 's,.*freetype-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/gcc-core.mk b/src/gcc-core.mk index b1b42ef..faf82ec 100644 --- a/src/gcc-core.mk +++ b/src/gcc-core.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'gcc-core-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gcc-core-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc-fortran.mk b/src/gcc-fortran.mk index cef898b..000bbe2 100644 --- a/src/gcc-fortran.mk +++ b/src/gcc-fortran.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'gcc-fortran-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gcc-fortran-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc-g++.mk b/src/gcc-g++.mk index a4bebab..3e04de8 100644 --- a/src/gcc-g++.mk +++ b/src/gcc-g++.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'gcc-g++-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gcc-g++-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc-gmp.mk b/src/gcc-gmp.mk index b99f699..9ce1363 100644 --- a/src/gcc-gmp.mk +++ b/src/gcc-gmp.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'gmp-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc-mpfr.mk b/src/gcc-mpfr.mk index fd850f8..ff295f1 100644 --- a/src/gcc-mpfr.mk +++ b/src/gcc-mpfr.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'mpfr-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*mpfr-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc-objc.mk b/src/gcc-objc.mk index 252f6ce..2ea0ede 100644 --- a/src/gcc-objc.mk +++ b/src/gcc-objc.mk @@ -10,8 +10,7 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238462' | \ - grep 'gcc-objc-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gcc-objc-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef diff --git a/src/gcc.mk b/src/gcc.mk index c808d27..252e499 100644 --- a/src/gcc.mk +++ b/src/gcc.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/tdm-gcc/$($(PKG)_FILE) $(PKG)_DEPS := pkg_config mingwrt w32api binutils gcc-gmp gcc-mpfr gcc-core gcc-g++ gcc-objc gcc-fortran define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238347' | \ - grep 'gcc-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/tdm-gcc/files/Sources/) | \ $(SED) -n 's,.*gcc-\([0-9][^>]*\)-srcbase[-0-9]*\.zip.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/giflib.mk b/src/giflib.mk index 7c10f57..5f16562 100644 --- a/src/giflib.mk +++ b/src/giflib.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/giflib/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=102202&package_id=119585' | \ - grep 'giflib-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/giflib/files/giflib 4.x/) | \ $(SED) -n 's,.*giflib-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/glew.mk b/src/glew.mk index 4541027..03d611f 100644 --- a/src/glew.mk +++ b/src/glew.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/glew/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=67586&package_id=67942' | \ - grep 'glew-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/glew/files/glew/) | \ $(SED) -n 's,.*glew-\([0-9][^>]*\)-src\.tgz.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/libdnet.mk b/src/libdnet.mk index 8473a5f..049751d 100644 --- a/src/libdnet.mk +++ b/src/libdnet.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libdnet/$($(PKG)_FILE) $(PKG)_DEPS := gcc winpcap define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=36243&package_id=28560' | \ - grep 'libdnet-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/libdnet/files/libdnet/) | \ $(SED) -n 's,.*libdnet-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/libpng.mk b/src/libpng.mk index 13d0e7d..b0fe8ed 100644 --- a/src/libpng.mk +++ b/src/libpng.mk @@ -10,9 +10,10 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libpng/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=5624' | \ - grep 'package_id=5683&release_id=' | \ - $(SED) -n 's,.*>\([0-9][^<]*\)<.*,\1,p' | \ + wget -q -O- 'http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng;a=tags' | \ + grep ']*>v\([0-9][^>]*\)<.*,\1,p' | \ + grep -v beta | \ head -1 endef diff --git a/src/libusb.mk b/src/libusb.mk index 0e1a524..744dfbc 100644 --- a/src/libusb.mk +++ b/src/libusb.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libusb-win32/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=78138&package_id=79216' | \ - grep 'libusb-win32-src-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/) | \ $(SED) -n 's,.*libusb-win32-src-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/mingwrt.mk b/src/mingwrt.mk index e05af77..a13f2b4 100644 --- a/src/mingwrt.mk +++ b/src/mingwrt.mk @@ -10,10 +10,9 @@ $(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' | \ - grep 'mingwrt-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/mingw/files/MinGW Runtime/) | \ $(SED) -n 's,.*mingwrt-\([0-9][^>]*\)-dev\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/pcre.mk b/src/pcre.mk index 58f340a..a43d45e 100644 --- a/src/pcre.mk +++ b/src/pcre.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/pcre/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=10194&package_id=9960' | \ - grep 'pcre-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/pcre/files/pcre/) | \ $(SED) -n 's,.*pcre-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/pdcurses.mk b/src/pdcurses.mk index 781b14e..9eb17e4 100644 --- a/src/pdcurses.mk +++ b/src/pdcurses.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/pdcurses/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=30480&package_id=22452' | \ - grep 'PDCurses-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/pdcurses/files/pdcurses/) | \ $(SED) -n 's,.*PDCurses-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/w32api.mk b/src/w32api.mk index d6d8645..3a4633d 100644 --- a/src/w32api.mk +++ b/src/w32api.mk @@ -10,9 +10,9 @@ $(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' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/mingw/files/MinGW API for MS-Windows/) | \ $(SED) -n 's,.*w32api-\([0-9][^>]*\)-src\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk index d8e5692..c033c13 100644 --- a/src/wxwidgets.mk +++ b/src/wxwidgets.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/wxwindows/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv libpng jpeg tiff sdl tre zlib expat define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=9863&package_id=14078' | \ - grep 'wxMSW-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/wxwindows/files/wxMSW/) | \ $(SED) -n 's,.*wxMSW-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/xmlwrapp.mk b/src/xmlwrapp.mk index 39a7fb9..c876a5b 100644 --- a/src/xmlwrapp.mk +++ b/src/xmlwrapp.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/xmlwrapp/$($(PKG)_FILE) $(PKG)_DEPS := gcc libxml2 libxslt define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=142403&package_id=156331' | \ - grep 'xmlwrapp-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/xmlwrapp/files/xmlwrapp/) | \ $(SED) -n 's,.*xmlwrapp-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD diff --git a/src/zlib.mk b/src/zlib.mk index 6c5d609..3911606 100644 --- a/src/zlib.mk +++ b/src/zlib.mk @@ -10,10 +10,9 @@ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/libpng/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - wget -q -O- 'http://sourceforge.net/project/showfiles.php?group_id=5624&package_id=14274' | \ - grep 'zlib-' | \ + $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/libpng/files/zlib/) | \ $(SED) -n 's,.*zlib-\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 + tail -1 endef define $(PKG)_BUILD -- cgit v0.12