d9ff62c4cd
It's been ages (5 years at the next release) that we've not installed host packages in $(HOST_DIR)/usr, but we still have a few packages that reference it or install things in there. Drop all of those in one fell swoop. The run-time test still succeeds, and the following defconfig, which should exercise all touched packages [*], does build: BR2_x86_i686=y BR2_TOOLCHAIN_EXTERNAL=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_GAWK=y BR2_PACKAGE_GETTEXT=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_DBUS_PYTHON=y BR2_PACKAGE_OLA=y BR2_PACKAGE_JIMTCL=y BR2_PACKAGE_LUA=y # BR2_PACKAGE_LUA_32BITS is not set BR2_PACKAGE_ARGPARSE=y BR2_PACKAGE_PERL=y BR2_PACKAGE_PHP=y BR2_PACKAGE_PHP_APCU=y BR2_PACKAGE_PHP_LUA=y BR2_PACKAGE_PHP_PAM=y BR2_PACKAGE_PHP_PECL_DBUS=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y BR2_PACKAGE_PYTHON_PLY=y BR2_PACKAGE_PYTHON_PYBIND=y BR2_PACKAGE_LIBVA=y BR2_PACKAGE_BIND=y BR2_PACKAGE_BIND_SERVER=y BR2_PACKAGE_BIND_TOOLS=y BR2_PACKAGE_APPARMOR=y BR2_PACKAGE_APPARMOR_BINUTILS=y BR2_PACKAGE_APPARMOR_UTILS=y BR2_PACKAGE_APPARMOR_UTILS_EXTRA=y BR2_PACKAGE_APPARMOR_PROFILES=y BR2_PACKAGE_REFPOLICY=y BR2_PACKAGE_URANDOM_SCRIPTS=y BR2_PACKAGE_BASH=y # embiggen-disk to exercise go BR2_PACKAGE_EMBIGGEN_DISK=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_I386_PC=y BR2_TARGET_GRUB2_I386_EFI=y [*] exceptions: - zfs was not tested: it needs a kernel to be built; - compiler-rt was not tsted: it needs llvm to be built, that takes ages, and other packages already reference the correct location for llvm-config, so it was assumed that is OK. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com> Cc: Anisse Astier <anisse@astier.eu> Cc: Antoine Tenart <atenart@kernel.org> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Asaf Kahlon <asafka7@gmail.com> Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Cc: Christian Stewart <christian@paral.in> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Cc: Francois Perrad <francois.perrad@gadz.org> Cc: Guillaume William Brs <guillaume.bressaix@gmail.com> Cc: Hervé Codina <herve.codina@bootlin.com> Cc: James Hilliard <james.hilliard1@gmail.com> Cc: José Luis Salvador Rufo <salvador.joseluis@gmail.com> Cc: Julien Boibessot <julien.boibessot@armadeus.com> Cc: Julien Olivain <ju.o@free.fr> Cc: Matt Weber <matthew.weber@collins.com> Cc: Nicolas Carrier <nicolas.carrier@orolia.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Vadim Kochan <vadim4j@gmail.com> Cc: Yegor Yefremov <yegorslists@googlemail.com> Reviewed-by: Romain Naour <romain.naour@smile.fr> --- Changes v1 -> v2: - fix new instance that have crept in (Romain)
104 lines
2.7 KiB
Makefile
104 lines
2.7 KiB
Makefile
################################################################################
|
|
#
|
|
# jimtcl
|
|
#
|
|
################################################################################
|
|
|
|
JIMTCL_VERSION = 0.81
|
|
JIMTCL_SITE = $(call github,msteveb,jimtcl,$(JIMTCL_VERSION))
|
|
JIMTCL_INSTALL_STAGING = YES
|
|
JIMTCL_LICENSE = BSD-2-Clause
|
|
JIMTCL_LICENSE_FILES = LICENSE
|
|
|
|
JIMTCL_HEADERS_TO_INSTALL = \
|
|
jim.h \
|
|
jim-eventloop.h \
|
|
jim-signal.h \
|
|
jim-subcmd.h \
|
|
jim-win32compat.h \
|
|
jim-config.h
|
|
|
|
ifeq ($(BR2_PACKAGE_TCL),)
|
|
define JIMTCL_LINK_TCLSH
|
|
ln -sf jimsh $(TARGET_DIR)/usr/bin/tclsh
|
|
endef
|
|
endif
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
define JIMTCL_INSTALL_LIB
|
|
$(INSTALL) -m 0644 -D $(@D)/libjim.a $(1)/usr/lib/libjim.a
|
|
endef
|
|
else
|
|
JIMTCL_SHARED = --shared
|
|
define JIMTCL_INSTALL_LIB
|
|
$(INSTALL) -m 0755 -D $(@D)/libjim.so.$(JIMTCL_VERSION) \
|
|
$(1)/usr/lib/libjim.so.$(JIMTCL_VERSION)
|
|
ln -sf libjim.so.$(JIMTCL_VERSION) $(1)/usr/lib/libjim.so
|
|
endef
|
|
endif
|
|
|
|
# build system doesn't use autotools, but does use an old version of
|
|
# gnuconfig which doesn't know all the architectures supported by
|
|
# Buildroot, so update config.guess / config.sub like we do in
|
|
# pkg-autotools.mk
|
|
JIMTCL_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
|
HOST_JIMTCL_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
|
|
|
# jimtcl really wants to find a existing $CXX, so feed it false
|
|
# when we do not have one.
|
|
define JIMTCL_CONFIGURE_CMDS
|
|
(cd $(@D); \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
CCACHE=none \
|
|
$(if $(BR2_INSTALL_LIBSTDCPP),,CXX=false) \
|
|
./configure --prefix=/usr \
|
|
--host=$(GNU_TARGET_NAME) \
|
|
--build=$(GNU_HOST_NAME) \
|
|
$(JIMTCL_SHARED) \
|
|
)
|
|
endef
|
|
|
|
# -fPIC is mandatory to build shared libraries on certain architectures
|
|
# (e.g. SPARC) and causes no harm or drawbacks on other architectures
|
|
define JIMTCL_BUILD_CMDS
|
|
SH_CFLAGS="-fPIC" \
|
|
SHOBJ_CFLAGS="-fPIC" \
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define JIMTCL_INSTALL_STAGING_CMDS
|
|
for i in $(JIMTCL_HEADERS_TO_INSTALL); do \
|
|
cp -a $(@D)/$$i $(STAGING_DIR)/usr/include/ || exit 1 ; \
|
|
done; \
|
|
$(call JIMTCL_INSTALL_LIB,$(STAGING_DIR))
|
|
endef
|
|
|
|
define JIMTCL_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D $(@D)/jimsh $(TARGET_DIR)/usr/bin/jimsh
|
|
$(call JIMTCL_INSTALL_LIB,$(TARGET_DIR))
|
|
$(JIMTCL_LINK_TCLSH)
|
|
endef
|
|
|
|
define HOST_JIMTCL_CONFIGURE_CMDS
|
|
cd $(@D) && \
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
CCACHE=none \
|
|
./configure --prefix=$(HOST_DIR) --shared
|
|
endef
|
|
|
|
define HOST_JIMTCL_BUILD_CMDS
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define HOST_JIMTCL_INSTALL_CMDS
|
|
for i in $(JIMTCL_HEADERS_TO_INSTALL); do \
|
|
cp -a $(@D)/$$i $(HOST_DIR)/include/ || exit 1 ; \
|
|
done;
|
|
$(INSTALL) -m 0755 -D $(@D)/libjim.so.$(JIMTCL_VERSION) \
|
|
$(HOST_DIR)/lib/libjim.so.$(JIMTCL_VERSION)
|
|
ln -sf libjim.so.$(JIMTCL_VERSION) $(HOST_DIR)/lib/libjim.so
|
|
endef
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(host-generic-package))
|