[packages_10.03.2] re: merge r28754, r29791, r29793, r29799, r29816, r29819
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 4 Feb 2012 18:47:12 +0000 (18:47 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 4 Feb 2012 18:47:12 +0000 (18:47 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30061 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/re/Makefile

index 13c0f27..e6f9ed4 100644 (file)
@@ -1,33 +1,31 @@
-#
-# Makefile
-#
+# 
+# Copyright (C) 2010-2011 OpenWrt.org
 # Copyright (C) 2010 Alfred E. Heggestad
 #
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=re
-PKG_VERSION:=0.2.0
+PKG_VERSION:=0.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.creytiv.com/pub
-PKG_MD5SUM:=0aa00762fbee7694b9e5844675f5c57d
+PKG_MD5SUM:=77469714212b40ec7f224ad8648f91d2
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libre
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libopenssl +libpthread @BROKEN
+  DEPENDS:=+libopenssl +libpthread
   TITLE:=Generic library for real-time communications with async IO support
   URL:=http://www.creytiv.com/
 endef
 
-define Package/libre/description
-       Generic library for real-time communications with async IO support.
-endef
-
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
@@ -37,9 +35,11 @@ define Build/Compile
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
                EXTRA_LFLAGS="-lm" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$(TOOLCHAIN_DIR)" \
+               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               OS=linux \
                all install
 endef
 
@@ -49,19 +49,12 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib/
-endef
-
-define Build/UninstallDev
-       rm -rf \
-               $(STAGING_DIR)/usr/share/re \
-               $(STAGING_DIR)/usr/include/re \
-               $(STAGING_DIR)/usr/lib/libre.{a,so*}
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so} $(1)/usr/lib/
 endef
 
 define Package/libre/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libre))