revert r22372 and r22405, dependency on host libtool causes problems

SVN-Revision: 22406
This commit is contained in:
Jo-Philipp Wich 2010-07-28 02:18:16 +00:00
parent ceeb9a8013
commit e47a8a001c
4 changed files with 18 additions and 63 deletions

View file

@ -1,20 +1,17 @@
# #
# Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2006,2007 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
# #
# where to build (and put) .ipk packages # where to build (and put) .ipk packages
OPKG:= \ IPKG:= \
IPKG_TMP=$(TMP_DIR)/ipkg \ IPKG_TMP=$(TMP_DIR)/ipkg \
IPKG_INSTROOT=$(TARGET_DIR) \ IPKG_INSTROOT=$(TARGET_DIR) \
IPKG_CONF_DIR=$(STAGING_DIR)/etc \ IPKG_CONF_DIR=$(STAGING_DIR)/etc \
IPKG_OFFLINE_ROOT=$(TARGET_DIR) \ IPKG_OFFLINE_ROOT=$(TARGET_DIR) \
$(STAGING_DIR_HOST)/bin/opkg \ $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
-f $(STAGING_DIR)/etc/opkg.conf \
--force-depends \
--force-overwrite
# invoke ipkg-build with some default options # invoke ipkg-build with some default options
IPKG_BUILD:= \ IPKG_BUILD:= \
@ -79,7 +76,7 @@ ifeq ($(DUMP),)
rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) rm -rf $(STAGING_DIR_ROOT)/tmp-$(1)
touch $$@ touch $$@
$$(IPKG_$(1)): $(STAGING_DIR)/etc/opkg.conf $(STAMP_BUILT) $$(IPKG_$(1)): $(STAGING_DIR)/etc/ipkg.conf $(STAMP_BUILT)
@rm -f $(PACKAGE_DIR)/$(1)_* @rm -f $(PACKAGE_DIR)/$(1)_*
rm -rf $$(IDIR_$(1)) rm -rf $$(IDIR_$(1))
mkdir -p $$(IDIR_$(1))/CONTROL mkdir -p $$(IDIR_$(1))/CONTROL
@ -114,8 +111,7 @@ ifeq ($(DUMP),)
@[ -f $$(IPKG_$(1)) ] || false @[ -f $$(IPKG_$(1)) ] || false
$$(INFO_$(1)): $$(IPKG_$(1)) $$(INFO_$(1)): $$(IPKG_$(1))
@[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp $(IPKG) install $$(IPKG_$(1))
$(OPKG) install $$(IPKG_$(1))
$(1)-clean: $(1)-clean:
rm -f $(PACKAGE_DIR)/$(1)_* rm -f $(PACKAGE_DIR)/$(1)_*
@ -124,11 +120,9 @@ ifeq ($(DUMP),)
endef endef
$(STAGING_DIR)/etc/opkg.conf: $(STAGING_DIR)/etc/ipkg.conf:
mkdir -p $(STAGING_DIR)/etc mkdir -p $(STAGING_DIR)/etc
( echo "dest root /" > $@; \ echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf
echo "arch all 100" >> $@; \ echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf
echo "arch $(PKGARCH) 200" >> $@; \
echo "option offline_root $(TARGET_DIR)" >> $@ )
endif endif

View file

@ -12,7 +12,6 @@ $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
ifeq ($(SDK),1) ifeq ($(SDK),1)
$(curdir)/builddirs-install:=. $(curdir)/builddirs-install:=.
else else
$(curdir)/base-files/compile += $(curdir)/opkg/host/compile
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m)) $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m)) $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
$(curdir)/builddirs-install:=. $(sort $(package-y)) $(curdir)/builddirs-install:=. $(sort $(package-y))
@ -89,9 +88,9 @@ $(curdir)/index: FORCE
$(curdir)/flags-install:= -j1 $(curdir)/flags-install:= -j1
$(eval $(call stampfile,$(curdir),package,prereq,.config)) $(eval $(call stampfile,$(curdir),package,prereq,.config))
$(eval $(call stampfile,$(curdir),package,cleanup)) $(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),package,compile)) $(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),package,install)) $(eval $(call stampfile,$(curdir),package,install,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),package,rootfs-prepare)) $(eval $(call stampfile,$(curdir),package,rootfs-prepare,$(TMP_DIR)/.build))
$(eval $(call subdir,$(curdir))) $(eval $(call subdir,$(curdir)))

View file

@ -18,9 +18,7 @@ PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION)
PKG_SOURCE_URL:=http://opkg.googlecode.com/svn/trunk/ PKG_SOURCE_URL:=http://opkg.googlecode.com/svn/trunk/
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_FIXUP = libtool PKG_FIXUP = libtool
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/opkg define Package/opkg
SECTION:=base SECTION:=base
@ -82,25 +80,3 @@ define Build/InstallDev
endef endef
$(eval $(call BuildPackage,opkg)) $(eval $(call BuildPackage,opkg))
HOST_CONFIGURE_ARGS += \
--disable-curl \
--disable-gpg \
--with-opkgetcdir=/etc \
--with-opkglockfile=/tmp/opkg.lock
define Host/Configure
(cd $(HOST_BUILD_DIR); autoreconf -v --install || exit 1)
$(call Host/Configure/Default)
endef
define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) CC="$(HOSTCC)" all
endef
define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/opkg-cl $(STAGING_DIR_HOST)/bin/opkg
endef
$(eval $(call HostBuild))

View file

@ -52,15 +52,12 @@ help: FORCE
# override variables from rules.mk # override variables from rules.mk
PACKAGE_DIR:=$(TOPDIR)/packages PACKAGE_DIR:=$(TOPDIR)/packages
OPKG:= \ IPKG:= \
IPKG_TMP="$(TOPDIR)/tmp/ipkgtmp" \ IPKG_TMP="$(TOPDIR)/tmp/ipkgtmp" \
IPKG_INSTROOT="$(TARGET_DIR)" \ IPKG_INSTROOT="$(TARGET_DIR)" \
IPKG_CONF_DIR="$(TOPDIR)/tmp" \ IPKG_CONF_DIR="$(TOPDIR)/tmp" \
IPKG_OFFLINE_ROOT="$(TARGET_DIR)" \ IPKG_OFFLINE_ROOT="$(TARGET_DIR)" \
$(STAGING_DIR_HOST)/bin/opkg \ $(SCRIPT_DIR)/ipkg -force-defaults
-f $(TOPDIR)/tmp/opkg.conf \
--force-depends \
--force-overwrite
define Profile define Profile
$(eval $(call Profile/Default)) $(eval $(call Profile/Default))
@ -82,18 +79,10 @@ _call_info: FORCE
echo 'Available Profiles:' echo 'Available Profiles:'
echo; $(PROFILE_LIST) echo; $(PROFILE_LIST)
$(TOPDIR)/tmp/opkg.conf: FORCE $(TOPDIR)/tmp/ipkg.conf: FORCE
@mkdir -p $(TOPDIR)/tmp @mkdir -p $(TOPDIR)/tmp
@mkdir -p $(TARGET_DIR)/tmp
@echo 'dest root /' > $@ @echo 'dest root /' > $@
@echo 'src packages file:$(PACKAGE_DIR)' >> $@ @echo 'src packages file:$(PACKAGE_DIR)' >> $@
@echo 'arch all 100' >> $@
ifneq ($(CONFIG_TARGET_adm5120),y)
@echo 'arch $(BOARD) 200' >> $@
else
@echo 'arch $(BOARD)_$(ARCH) 200' >> $@
endif
@echo 'option offline_root $(TARGET_DIR)' >> $@
BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(USER_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(USER_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list # "-pkgname" in the package list means remove "pkgname" from the package list
@ -113,18 +102,18 @@ endif
$(MAKE) package_postinst $(MAKE) package_postinst
$(MAKE) build_image $(MAKE) build_image
package_index: $(TOPDIR)/tmp/opkg.conf FORCE package_index: $(TOPDIR)/tmp/ipkg.conf FORCE
@echo @echo
@echo Building package index... @echo Building package index...
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \ (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
gzip -9c Packages > Packages.gz \ gzip -9c Packages > Packages.gz \
) >/dev/null 2>/dev/null ) >/dev/null 2>/dev/null
$(OPKG) update $(IPKG) update
package_install: FORCE package_install: FORCE
@echo @echo
@echo Installing packages... @echo Installing packages...
$(OPKG) install $(BUILD_PACKAGES) $(IPKG) install $(BUILD_PACKAGES)
copy_files: FORCE copy_files: FORCE
@echo @echo
@ -132,9 +121,6 @@ copy_files: FORCE
$(CP) $(USER_FILES)/* $(TARGET_DIR)/ $(CP) $(USER_FILES)/* $(TARGET_DIR)/
package_postinst: FORCE package_postinst: FORCE
@echo
@echo Cleaning up
@rm -f $(TARGET_DIR)/tmp/opkg.lock
@echo @echo
@echo Activating init scripts @echo Activating init scripts
@( \ @( \