glibc: switch to downloading version 2.22 via tarball instead of git to improve mirro...
[openwrt/svn-archive/archive.git] / toolchain / glibc / common.mk
index bc50fcb69eaf9f529088e9cdd2181173649babe3..14063bf9df2843a66b182f44f41174542065079c 100644 (file)
@@ -8,13 +8,20 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glibc
 PKG_VERSION:=$(call qstrip,$(CONFIG_GLIBC_VERSION))
-PKG_REVISION:=$(call qstrip,$(CONFIG_GLIBC_REVISION))
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://sourceware.org/git/glibc.git
-PKG_SOURCE_VERSION:=$(PKG_REVISION)
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_REVISION)
-PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
+ifeq ($(PKG_VERSION),2.22)
+  PKG_SOURCE_URL:=http://ftpmirror.gnu.org/libc
+  PKG_MD5SUM:=eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948
+  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+  PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+else
+  PKG_REVISION:=$(call qstrip,$(CONFIG_GLIBC_REVISION))
+  PKG_SOURCE_PROTO:=git
+  PKG_SOURCE_URL:=git://sourceware.org/git/glibc.git
+  PKG_SOURCE_VERSION:=$(PKG_REVISION)
+  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_REVISION)
+  PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
+endif
 
 GLIBC_PATH:=
 ifneq ($(CONFIG_EGLIBC_VERSION_2_19),)