[packages_10.03.2] re, baresip, restund: merge r30325
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Feb 2012 10:22:57 +0000 (10:22 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Feb 2012 10:22:57 +0000 (10:22 +0000)
SVN-Revision: 30326

libs/re/Makefile
net/baresip/Makefile
net/restund/Makefile
utils/zoneinfo/Makefile [new file with mode: 0644]

index e6f9ed4ce51add3d1c770a4e4ecb8e201d0c9c7b..86d3088744f61987351343f751e388f746fae5ab 100644 (file)
@@ -35,7 +35,7 @@ define Build/Compile
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
                EXTRA_LFLAGS="-lm" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
index 02f6885eef3847e7df8c667a273723c9f24b24c6..d3ec1c61a01bfd6f9fc9d5494c6da6b5ea003e14 100644 (file)
@@ -79,7 +79,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
index 551eac0ff36cc77fab6bd5ba9bd47706bdfc5486..0f343ecce6d3b513d49485dfef5f858a833ae96e 100644 (file)
@@ -51,7 +51,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
diff --git a/utils/zoneinfo/Makefile b/utils/zoneinfo/Makefile
new file mode 100644 (file)
index 0000000..741e64b
--- /dev/null
@@ -0,0 +1,254 @@
+#
+# Copyright (C) 2007-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# Author: Michael Geddes
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zoneinfo
+PKG_VERSION:=2011n
+PKG_VERSION_CODE:=2011i
+PKG_RELEASE:=1
+
+PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
+PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
+PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
+PKG_MD5SUM:=20dbfb28efa008ddbf6dd34601ea40fa
+
+include $(INCLUDE_DIR)/package.mk
+
+define Download/tzcode
+   FILE=$(PKG_SOURCE_CODE)
+   URL=$(PKG_SOURCE_URL)
+   MD5SUM=cf7f4335b7c8682899fa2814e711c1b2
+endef
+
+$(eval $(call Download,tzcode))
+
+define Package/zoneinfo/Default
+  SUBMENU:=zoneinfo
+  TITLE:=Zone Information
+  SECTION:=utils
+  CATEGORY:=Utilities
+endef
+
+define Package/zoneinfo-core
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (core)
+endef
+
+define Package/zoneinfo-simple
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (simple)
+endef
+
+define Package/zoneinfo-africa
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Africa)
+endef
+
+define Package/zoneinfo-northamerica
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (NorthAmerica)
+endef
+
+define Package/zoneinfo-southamerica
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (SouthAmerica)
+endef
+
+define Package/zoneinfo-poles
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Arctic, Antarctic)
+endef
+
+define Package/zoneinfo-asia
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Asia)
+endef
+
+define Package/zoneinfo-atlantic
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Atlantic)
+endef
+
+define Package/zoneinfo-australia-nz
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Australia-NZ)
+endef
+
+define Package/zoneinfo-pacific
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Pacific)
+endef
+
+define Package/zoneinfo-europe
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (Europe)
+endef
+
+define Package/zoneinfo-india
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (India)
+endef
+
+define Package/zoneinfo-middleeast
+$(call Package/zoneinfo/Default)
+  TITLE:=Zone Information (MiddleEast)
+endef
+
+define Build/Prepare
+       (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE))
+endef
+
+define Build/Compile
+       CFLAGS="$(HOST_CFLAGS)" \
+       $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \
+               $(HOST_CONFIGURE_OPTS) \
+               CC="$(HOSTCC)" \
+               LD="\$$$$(CC)" \
+               CPPFLAGS="$(HOST_CPPFLAGS)" \
+               LDFLAGS="$(HOST_LDFLAGS)" \
+               TOPDIR="$(PKG_INSTALL_DIR)" \
+               TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \
+               install
+endef
+
+
+define Package/zoneinfo-core/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in \
+               CET CST6CDT EET EST EST5EDT GB-Eire Eire \
+               GB    GMT   GMT+0 GMT-0 GMT0  Greenwich  \
+               HST   MET   MST   MST7MDT                \
+               PRC   PST8PDT ROC ROK     UCT   UTC      \
+               Universal W-SU WET Zulu Etc/* zone.tab ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-simple/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Pacific/Honolulu     \
+               America/Anchorage   America/Los_Angeles America/Denver   \
+               America/Chicago     America/New_York    America/Caracas  \
+               America/Sao_Paulo   Europe/London       Europe/Paris     \
+               Africa/Cairo        Europe/Moscow       Asia/Dubai       \
+               Asia/Karachi        Asia/Dhaka          Asia/Bankok      \
+               Asia/Hong_Kong      Asia/Tokyo          Australia/Darwin \
+               Australia/Adelaide  Australia/Brisbane  Australia/Sydney \
+               Australia/Perth     Pacific/Noumea ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-africa/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa
+       $(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \
+             $(1)/usr/share/zoneinfo/Africa
+endef
+
+define Package/zoneinfo-northamerica/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in US America Canada Mexico Cuba Jamaica Navajo ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+       rm  -rf $(1)/usr/share/zoneinfo/America/Argentina
+endef
+
+define Package/zoneinfo-southamerica/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Brazil Chile ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina
+       $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \
+             $(1)/usr/share/zoneinfo/America/Argentina
+endef
+
+define Package/zoneinfo-poles/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Antarctica Arctic ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-asia/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Asia Japan Singapore Hongkong ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-atlantic/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Atlantic Iceland ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-australia-nz/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in NZ NZ-CHAT Australia ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-pacific/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Pacific Kwajalein ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-europe/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Europe Portugal Poland ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+
+define Package/zoneinfo-india/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Indian ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+define Package/zoneinfo-middleeast/install
+       $(INSTALL_DIR) $(1)/usr/share/zoneinfo
+       for i in Egypt Libya Iran Israel Turkey Mideast ; do \
+         $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \
+             $(1)/usr/share/zoneinfo ; \
+       done
+endef
+
+$(eval $(call BuildPackage,zoneinfo-simple))
+$(eval $(call BuildPackage,zoneinfo-core))
+$(eval $(call BuildPackage,zoneinfo-africa))
+$(eval $(call BuildPackage,zoneinfo-northamerica))
+$(eval $(call BuildPackage,zoneinfo-southamerica))
+$(eval $(call BuildPackage,zoneinfo-poles))
+$(eval $(call BuildPackage,zoneinfo-asia))
+$(eval $(call BuildPackage,zoneinfo-atlantic))
+$(eval $(call BuildPackage,zoneinfo-australia-nz))
+$(eval $(call BuildPackage,zoneinfo-pacific))
+$(eval $(call BuildPackage,zoneinfo-europe))
+$(eval $(call BuildPackage,zoneinfo-india))
+$(eval $(call BuildPackage,zoneinfo-middleeast))
+