strongswan: add missing patch for avoiding collisions with uclibc functions
[openwrt/svn-archive/archive.git] / net / ctorrent / Makefile
index 960b405fb8b797fd1acd8d74f3cdd08c5c79953e..16504e2a34b24d19311e2b72de5dced30275bd3f 100644 (file)
@@ -4,29 +4,30 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ctorrent
-PKG_VERSION:=dnh3.3
-PKG_RELEASE:=1
+PKG_VERSION:=dnh3.3.2
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/dtorrent \
        http://www.rahul.net/dholmes/ctorrent/
-PKG_MD5SUM:=f87e36c89a2b5092be30bfbddc742b27
+PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
 
-PKG_FIXUP = libtool
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ctorrent/Default
   SUBMENU:=BitTorrent
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+uclibcxx
+  DEPENDS:=$(CXX_DEPENDS)
   TITLE:=console-based BitTorrent client
+  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
   URL:=http://www.rahul.net/dholmes/ctorrent/
 endef
 
@@ -38,64 +39,46 @@ endef
 
 define Package/ctorrent
 $(call Package/ctorrent/Default)
-  TITLE+= (with builtin SHA-1 support)
+  TITLE+= (with OpenSSL support)
+  DEPENDS+=+libopenssl
+  VARIANT:=ssl
 endef
 
 define Package/ctorrent/description
 $(call Package/ctorrent/Default/description)
- This package is built with builtin (Steve Reid's public-domain) SHA-1 support
+ This package is built with OpenSSL support.
 endef
 
-define Package/ctorrent-openssl
+define Package/ctorrent-nossl
 $(call Package/ctorrent/Default)
-  DEPENDS+= +libopenssl
-  TITLE+= (with OpenSSL support)
+  TITLE+= (with builtin SHA-1)
+  VARIANT:=nossl
 endef
 
-define Package/ctorrent-openssl/description
+define Package/ctorrent-nossl/description
 $(call Package/ctorrent/Default/description)
- This package is built with OpenSSL support.
+ This package is built with builtin (Steve Reid's public-domain) SHA-1 support
 endef
 
-define Build/Template
-
-$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
-       -$(MAKE) -C $(PKG_BUILD_DIR) clean
-       $(call Build/Configure/Default,$(3))
-       $(MAKE) -C $(PKG_BUILD_DIR)
-       ( cd $(PKG_BUILD_DIR); mv -f $(PKG_NAME) $(PKG_NAME)-$(2) )
-       touch $$@
+CONFIGURE_VARS += \
+       CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
 
-$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
+ifeq ($(BUILD_VARIANT),ssl)
+       CONFIGURE_ARGS += \
+               --with-ssl="$(STAGING_DIR)/usr"
+endif
 
-define Package/$(1)/install
-       $(INSTALL_DIR) $$(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME)
-endef
+ifeq ($(BUILD_VARIANT),nossl)
+       CONFIGURE_ARGS += \
+               --with-ssl=no
+endif
 
+define Package/ctorrent/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
 endef
 
-CONFIGURE_VARS += \
-       CXX="g++-uc" \
-       CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),)
-  define Build/with-ssl
-    $(call Build/Template,ctorrent,with-ssl, \
-       --with-ssl=no \
-    )
-  endef
-endif
-$(eval $(Build/with-ssl))
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent-openssl),)
-  define Build/with-openssl
-    $(call Build/Template,ctorrent-openssl,with-openssl, \
-       --with-ssl="$(STAGING_DIR)/usr" \
-    )  
-  endef
-endif
-$(eval $(Build/with-openssl))
+Package/ctorrent-nossl/install = $(Package/ctorrent/install)
 
 $(eval $(call BuildPackage,ctorrent))
-$(eval $(call BuildPackage,ctorrent-openssl))
+$(eval $(call BuildPackage,ctorrent-nossl))