[package] fix owfs dependency and compilation failure against libpthread
[openwrt/svn-archive/archive.git] / utils / owfs / Makefile
index 0f3260fdf8cd7f324daa277457504010f44584f0..c1ca32b24d276225aedbf6e5def06e391957ca7b 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 PKG_NAME:=owfs
 PKG_VERSION:=2.7p7
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=4c189f64a1a6110bef19639a36c3b0e1
 
+PKG_FIXUP = libtool
+
 include $(INCLUDE_DIR)/package.mk
 
 
@@ -28,7 +30,7 @@ endef
 
 define Package/owfs/Server
   $(call Package/owfs/Default)
-  DEPENDS:=+owfs
+  DEPENDS:=+owfs +libpthread
   SECTION:=net
   CATEGORY:=Network
 endef
@@ -68,12 +70,6 @@ define Package/libow-capi
   TITLE:=OWFS - C-API library
 endef
 
-define Package/libow-perl
-  $(call Package/owfs/Library)
-  DEPENDS:=+libow +perlbase-autoloader +perlbase-config +perlbase-dynaloader +perlbase-essential +perlbase-io
-  TITLE:=OWFS - Perl-API library
-endef
-
 
 #
 # utilities
@@ -119,33 +115,12 @@ PKG_CONFIGURE_OPTS:= \
                --disable-parport \
                --disable-ownfsd \
                --disable-ownet \
-               --disable-owpython
-
-
-ifneq ($(CONFIG_PACKAGE_libow-perl),)
-PKG_CONFIGURE_OPTS+= --enable-libow-perl
-ENABLE_SWIG:=1
-else
-PKG_CONFIGURE_OPTS+= --disable-libow-perl
-endif
-ifneq ($(CONFIG_PACKAGE_owtcl),)
-PKG_CONFIGURE_OPTS+= --enable-owtcl
-ENABLE_SWIG:=1
-else
-PKG_CONFIGURE_OPTS+= --disable-owtcl
-PKG_CONFIGURE_OPTS+= --disable-owside
-endif
-ifneq ($(CONFIG_PACKAGE_owphp),)
-PKG_CONFIGURE_OPTS+= --enable-owphp
-ENABLE_SWIG:=1
-else
-PKG_CONFIGURE_OPTS+= --disable-owphp
-endif
-ifneq ($(ENABLE_SWIG),)
-PKG_CONFIGURE_OPTS+= --enable-swig
-else
-PKG_CONFIGURE_OPTS+= --disable-swig
-endif
+               --disable-owpython \
+               --disable-libow-perl \
+               --disable-owphp \
+               --disable-owtcl \
+               --disable-owside \
+               --disable-swig
 
 CONFIGURE_ARGS += \
        --prefix=/usr \
@@ -154,7 +129,6 @@ CONFIGURE_ARGS += \
        --enable-owserver \
        --enable-owhttpd \
        --enable-owfs \
-       --with-perl5=$(STAGING_DIR)/usr/bin/perl \
        --with-fuseinclude="$(STAGING_DIR)/usr/include" \
        --with-fuselib="$(STAGING_DIR)/usr/lib" \
        $(PKG_CONFIGURE_OPTS) \
@@ -168,10 +142,10 @@ define Build/Configure
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
                CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/usr/lib" \
                lt_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
                lt_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
-               shrext_cmds=".so"
+               shrext_cmds=".so" \
                ./configure \
                        $(CONFIGURE_ARGS) \
        );
@@ -229,22 +203,16 @@ endef
 
 define Package/libow/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/
 endef
 
 define Package/libow-capi/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/
        #$(INSTALL_DIR) $(1)/usr/include
        #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/{owcapi,owfs_config}.h $(1)/usr/include/
 endef
 
-define Package/libow-perl/install
-       install -d -m0755 $(1)/usr/lib/perl5
-       cp -fpR $(PKG_INSTALL_DIR)/usr/lib/perl5/* $(1)/usr/lib/perl5
-       -rm -f $(1)/usr/lib/perl5/*/perllocal.pod
-endef
-
 
 $(eval $(call BuildPackage,owfs))
 $(eval $(call BuildPackage,owshell))
@@ -255,4 +223,3 @@ $(eval $(call BuildPackage,owftpd))
 
 $(eval $(call BuildPackage,libow))
 $(eval $(call BuildPackage,libow-capi))
-$(eval $(call BuildPackage,libow-perl))