add proper build depends
authorFelix Fietkau <nbd@openwrt.org>
Tue, 30 May 2006 17:09:21 +0000 (17:09 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 30 May 2006 17:09:21 +0000 (17:09 +0000)
SVN-Revision: 3841

openwrt/package/Makefile
openwrt/package/ppp/Makefile
openwrt/package/rules.mk
openwrt/scripts/gen_deps.pl
openwrt/scripts/gen_menuconfig.pl

index af746715bace17867a576b27e7b4d0902a34e704..0dc2670174ff5f48a26a74b144b3cdd333285e1d 100644 (file)
@@ -20,7 +20,7 @@ $(STAMP_DIR) $(TARGET_DIR):
        $(MAKE) -C $(patsubst %-clean,%,$@) clean
 
 
-.pkgdeps: $(TOPDIR)/.pkginfo FORCE
+.pkgdeps: $(TOPDIR)/.pkginfo
        @$(TOPDIR)/scripts/gen_deps.pl < $< > $@ || rm -f $@
 
 all: compile
index 1542a8b5d7a409fc234ad9eec4b66bbfd67116d6..0139eb051f73a0f7b872756f35900a1742507b87 100644 (file)
@@ -5,6 +5,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.3
 PKG_RELEASE:=7
+PKG_BUILDDEP:=libpcap
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -19,7 +20,6 @@ include $(TOPDIR)/package/rules.mk
 define Package/ppp
  SECTION:=net
  CATEGORY:=Network
- NEEDS:=libpcap
  MENU:=1
  DEFAULT:=y
  TITLE:=PPP daemon
index 9b551728b3a97e7ad84d84763083a6b9a6daf0f7..55066610d012b2f661441197027a7566b78ded97 100644 (file)
@@ -49,7 +49,6 @@ define Package/Default
   SECTION:=opt
   CATEGORY:=Extra packages
   DEPENDS:=
-  NEEDS:=
   MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
   SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
   VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
@@ -92,7 +91,6 @@ define BuildPackage
   endif
 
   IDEPEND_$(1):=$$(strip $$(DEPENDS))
-  INEED_$(1):=$$(strip $$(NEEDS))
 
   DUMPINFO += \
        echo "Package: $(1)"; 
@@ -110,7 +108,7 @@ define BuildPackage
   DUMPINFO += \
        echo "Version: $(VERSION)"; \
        echo "Depends: $$(IDEPEND_$(1))"; \
-       echo "Needs: $$(INEED_$(1))"; \
+       echo "Build-Depends: $(PKG_BUILDDEP)"; \
        echo "Category: $(CATEGORY)"; \
        echo "Title: $(TITLE)"; \
        echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
@@ -134,8 +132,7 @@ define BuildPackage
        mkdir -p $$(IDIR_$(1))/CONTROL
        echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
        echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
-       #FIXME: there should be a better way to do it
-       D="$$(IDEPEND_$(1))"; D="$$$${D}$$$${D:+, }$$(INEED_$(1))"; echo "Depends: $$$${D}" >> $$(IDIR_$(1))/CONTROL/control
+       echo "Depends: $$(IDEPEND_$(1))" >> $$(IDIR_$(1))/CONTROL/control
        echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
        echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
        echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
@@ -156,8 +153,6 @@ define BuildPackage
   $$(INFO_$(1)): $$(IPKG_$(1))
        $(IPKG) install $$(IPKG_$(1))
 
-  compile-targets: $(PKG_BUILD_DIR)/.dev-installed
-
   $(1)-clean:
        rm -f $(PACKAGE_DIR)/$(1)_*
 
@@ -259,7 +254,7 @@ else
   prepare: $(PKG_BUILD_DIR)/.prepared
   configure: $(PKG_BUILD_DIR)/.configured
 
-  compile-targets:
+  compile-targets: $(PKG_BUILD_DIR)/.dev-installed
   compile: compile-targets
 
   install-targets:
index ef49fa3f418cb9b9a251d4ce33019fb1453c232b..40153bde3d10f6d96c01df1a74e145740237303d 100755 (executable)
@@ -18,8 +18,8 @@ while ($line = <>) {
                defined $pkg{$name} or $pkg{$name} = {};
                $pkg{$name}->{src} = $src;
        };
-       $line =~ /^Depends: \s*(.+)\s*$/ and do {
-               my @dep = split /,\s*/, $1;
+       $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
+               my @dep = split /,\s*/, $2;
                $pkg{$name}->{depends} = \@dep;
        };
 }
index e304f188139fae83e495f441042d7a7f60a2b78f..e282ee3ed2d95a8b96f210af5af392eade2af32d 100755 (executable)
@@ -28,9 +28,6 @@ sub print_category($) {
                        foreach my $depend (@{$pkg->{depends}}) {
                                print "\t\tdepends PACKAGE_$depend\n";
                        }
-                       foreach my $need (@{$pkg->{needs}}) {
-                               print "\t\tselect PACKAGE_$need\n";
-                       }
                        print "\t\thelp\n";
                        print $pkg->{description};
                        print "\n";
@@ -66,10 +63,6 @@ while ($line = <>) {
                my @dep = split /,\s*/, $1;
                $pkg->{depends} = \@dep;
        };
-       $line =~ /^Needs: \s*(.+)\s*$/ and do {
-               my @need = split /,\s*/, $1;
-               $pkg->{needs} = \@need;
-       };
        $line =~ /^Category: \s*(.+)\s*$/ and do {
                $pkg->{category} = $1;
                defined $category{$1} or $category{$1} = {};