summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:40 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:44 +0100
commita94d74d9c875b4a1c07945bf9af282221d0178b3 (patch)
treedaa2be873d758ad77006696efde6e76982f24d20 /package
parent74663fdbbd1dc92dd91f6f88dbc4f972df12c404 (diff)
rework prereq check
The new prereq check is completely implemented in POSIX shell in scripts/prereq.sh. It combines the old features from Makefile, scan-tools.sh, scan-pkgs.sh, reloc.sh and some wrappers for tools. The big benefit is to have all portability stuff in one place. Furthermore we can compile GNU make and bash on the fly, for systems lacking the required tools. All changes on the host are detected on the fly, no make prereq required anymore. The build process is separated in following three phases: 1. small wrapper Makefile is used for BSD make or GNU make 2. prereq.sh is called, doing all checking, calling Makefile.adk 3. old logic in Makefile.adk or mk/build.mk is used Tested successfully on Linux, MacOS X, Cygwin, FreeBSD, OpenBSD and NetBSD. An old depmaker bug was fixed, only optional host tools are compiled. For example, even when a host provides xz, a local xz was compiled in the past, because other packages had a build dependency on it. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Diffstat (limited to 'package')
-rw-r--r--package/Makefile10
-rw-r--r--package/adk-helper/src/makedevs.c2
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/glib/Makefile6
-rw-r--r--package/openssl/Makefile4
-rw-r--r--package/pkgconf/Makefile5
-rw-r--r--package/squashfs/Makefile1
-rw-r--r--package/xz/Makefile2
8 files changed, 16 insertions, 16 deletions
diff --git a/package/Makefile b/package/Makefile
index 9f4aff970..8416fbced 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -50,19 +50,19 @@ install: base-files-install $(INSTALL_ICONV) $(INSTALL_PACKAGES)
endif
%-download:
- $(START_TRACE) "package/$(patsubst %-download,%,$@)-download: "
+ $(START_TRACE) "package/$(patsubst %-download,%,$@)-download.. "
$(MAKE) -C $(patsubst %-download,%,$@) fetch
$(CMD_TRACE) " done"
$(END_TRACE)
%-host-compile:
- $(START_TRACE) "package/$(patsubst %-host-compile,%,$@)-host-compile: "
+ $(START_TRACE) "package/$(patsubst %-host-compile,%,$@)-host.. "
$(MAKE) -C $(patsubst %-host-compile,%,$@) hostpackage
$(CMD_TRACE) " done"
$(END_TRACE)
%-compile:
- $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile: "
+ $(START_TRACE) "package/$(patsubst %-compile,%,$@)-compile.. "
@if test -f $(ADK_TOPDIR)/.rebuild.$(patsubst %-compile,%,$@); then \
$(MAKE) -C $(patsubst %-compile,%,$@) clean ; \
rm $(ADK_TOPDIR)/.rebuild.$(patsubst %-compile,%,$@) ; \
@@ -72,13 +72,13 @@ endif
$(END_TRACE)
%-install:
- $(START_TRACE) "package/$(patsubst %-install,%,$@)-install: "
+ $(START_TRACE) "package/$(patsubst %-install,%,$@)-install.. "
$(MAKE) -C $(patsubst %-install,%,$@) install
$(CMD_TRACE) " done"
$(END_TRACE)
%-clean:
- $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean: "
+ $(START_TRACE) "package/$(patsubst %-clean,%,$@)-clean.. "
$(MAKE) -C $(patsubst %-clean,%,$@) clean
$(CMD_TRACE) " done"
$(END_TRACE)
diff --git a/package/adk-helper/src/makedevs.c b/package/adk-helper/src/makedevs.c
index 78a4c70ba..63b5e8055 100644
--- a/package/adk-helper/src/makedevs.c
+++ b/package/adk-helper/src/makedevs.c
@@ -31,7 +31,7 @@
#include <stdarg.h>
#include <sys/stat.h>
#include <sys/types.h>
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#include <sys/sysmacros.h> /* major() and minor() */
#endif
#include <ftw.h>
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index d1fc86f10..9f6550be3 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -11,7 +11,7 @@ PKG_DESCR:= core utilities for embedded systems
PKG_SECTION:= base/apps
PKG_BUILDDEP:= bzip2-host
PKG_URL:= http://www.busybox.net/
-PKG_SITES:= http://www.busybox.net/downloads/
+PKG_SITES:= https://www.busybox.net/downloads/
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
diff --git a/package/glib/Makefile b/package/glib/Makefile
index 732ccfd00..29a48734e 100644
--- a/package/glib/Makefile
+++ b/package/glib/Makefile
@@ -14,7 +14,7 @@ PKG_BUILDDEP:= glib-host libffi gettext-tiny zlib libelf dbus
HOST_BUILDDEP:= libffi-host gettext-tiny-host python2-host
PKG_NEEDS:= threads
PKG_URL:= http://www.gtk.org/
-PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/glib/$(PKG_EXTRAVER)/
+PKG_SITES:= http://gensho.acc.umu.se/pub/gnome/sources/glib/$(PKG_EXTRAVER)/
PKG_NOPARALLEL:= 1
PKG_OPTS:= dev noscripts
@@ -36,10 +36,10 @@ CONFIGURE_ENV+= glib_cv_long_long_format=ll \
ac_cv_func_posix_getgrgid_r=yes
HOST_STYLE:= auto
-ifneq ($(OStype),CYGWIN)
+ifneq ($(OS_FOR_BUILD),CYGWIN)
HOST_CFLAGS+= -fPIC
endif
-ifneq ($(OStype),Darwin)
+ifneq ($(OS_FOR_BUILD),Darwin)
HOST_CONFIGURE_ARGS+= --with-libiconv=no
endif
HOST_CONFIGURE_ARGS+= --disable-fam \
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index d5f96035e..c9f13fe43 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -70,10 +70,10 @@ ifeq ($(ADK_TARGET_ARCH_X86_64),y)
CONFIG:= linux-x86_64
endif
-ifneq (,$(filter CYGWIN%,${OStype}))
+ifneq (,$(filter CYGWIN%,${OS_FOR_BUILD}))
HOSTCONFIG:= Cygwin-x86_64
endif
-ifeq ($(OStype),Darwin)
+ifeq ($(OS_FOR_BUILD),Darwin)
HOSTCONFIG:= darwin64-x86_64-cc
endif
diff --git a/package/pkgconf/Makefile b/package/pkgconf/Makefile
index 0d0e123e6..47c2b7b78 100644
--- a/package/pkgconf/Makefile
+++ b/package/pkgconf/Makefile
@@ -9,6 +9,7 @@ PKG_RELEASE:= 1
PKG_HASH:= 8f5f48e52ddef0c3cbffe93f32d5148041e0030b8798b49b0b5fe72f4968d7ec
PKG_DESCR:= smart pkg-config replacement
PKG_SECTION:= dev/tools
+HOST_BUILDDEP:= sed-host
PKG_URL:= https://github.com/pkgconf/pkgconf
PKG_SITES:= http://rabbit.dereferenced.org/~nenolod/distfiles/
@@ -23,9 +24,9 @@ $(eval $(call PKG_template,PKGCONF,pkgconf,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D
hostpost-install:
$(CP) ./files/pkg-config $(STAGING_HOST_DIR)/usr/bin
ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
- $(SED) "s#@@OPTS@@#--static#" $(STAGING_HOST_DIR)/usr/bin/pkg-config
+ PATH="$(HOST_PATH)" $(SED) "s#@@OPTS@@#--static#" $(STAGING_HOST_DIR)/usr/bin/pkg-config
else
- $(SED) "s#@@OPTS@@##" $(STAGING_HOST_DIR)/usr/bin/pkg-config
+ PATH="$(HOST_PATH)" $(SED) "s#@@OPTS@@##" $(STAGING_HOST_DIR)/usr/bin/pkg-config
endif
(cd $(STAGING_HOST_DIR)/usr/bin && ln -sf pkg-config $(GNU_TARGET_NAME)-pkg-config)
diff --git a/package/squashfs/Makefile b/package/squashfs/Makefile
index 1f27e50a6..cef5b75d1 100644
--- a/package/squashfs/Makefile
+++ b/package/squashfs/Makefile
@@ -8,7 +8,6 @@ PKG_VERSION:= 4.2
PKG_RELEASE:= 1
PKG_HASH:= d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96
PKG_DESCR:= squashfs filesystem utilities
-HOST_BUILDDEP:= xz-host
PKG_SECTION:= sys/fs
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/}
diff --git a/package/xz/Makefile b/package/xz/Makefile
index b639d0769..cce0f93bf 100644
--- a/package/xz/Makefile
+++ b/package/xz/Makefile
@@ -10,9 +10,9 @@ PKG_HASH:= 73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2
PKG_DESCR:= compression utility
PKG_SECTION:= app/archive
PKG_DEPENDS:= libxz
+HOST_BUILDDEP:= heirloom-cpio-host
PKG_URL:= http://tukaani.org/xz/
PKG_SITES:= http://tukaani.org/xz/
-PKG_OPTS:= dev
PKG_LIBNAME:= libxz
PKG_OPTS:= dev
PKG_BB:= 1