2013-06-05 17:53:30 -06:00
|
|
|
################################################################################
|
2002-10-23 06:54:42 -06:00
|
|
|
#
|
|
|
|
# gawk
|
|
|
|
#
|
2013-06-05 17:53:30 -06:00
|
|
|
################################################################################
|
2002-10-23 06:54:42 -06:00
|
|
|
|
2022-10-29 12:47:42 -06:00
|
|
|
GAWK_VERSION = 5.2.0
|
2013-09-06 00:14:15 -06:00
|
|
|
GAWK_SOURCE = gawk-$(GAWK_VERSION).tar.xz
|
2010-06-07 08:35:58 -06:00
|
|
|
GAWK_SITE = $(BR2_GNU_MIRROR)/gawk
|
2015-12-06 04:13:58 -07:00
|
|
|
GAWK_DEPENDENCIES = host-gawk
|
2017-03-30 07:43:33 -06:00
|
|
|
GAWK_LICENSE = GPL-3.0+
|
2012-12-26 22:39:08 -07:00
|
|
|
GAWK_LICENSE_FILES = COPYING
|
2002-10-23 06:54:42 -06:00
|
|
|
|
2016-02-21 10:34:57 -07:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSIGSEGV),y)
|
|
|
|
GAWK_DEPENDENCIES += libsigsegv
|
|
|
|
endif
|
|
|
|
|
2015-12-06 04:13:58 -07:00
|
|
|
# --with-mpfr requires an argument so just let
|
|
|
|
# configure find it automatically
|
|
|
|
ifeq ($(BR2_PACKAGE_MPFR),y)
|
|
|
|
GAWK_DEPENDENCIES += mpfr
|
|
|
|
else
|
|
|
|
GAWK_CONF_OPTS += --without-mpfr
|
|
|
|
endif
|
|
|
|
|
2015-12-06 04:13:59 -07:00
|
|
|
# --with-readline requires an argument so just let
|
|
|
|
# configure find it automatically
|
|
|
|
ifeq ($(BR2_PACKAGE_READLINE),y)
|
|
|
|
GAWK_DEPENDENCIES += readline
|
|
|
|
else
|
|
|
|
GAWK_CONF_OPTS += --without-readline
|
|
|
|
endif
|
|
|
|
|
package/gawk: do not use readeline ormpfr in host variant
gawk has an optional dependency on mpfr (and thus gmp) and readline,
and will probe for them. If they are present, they are used; if they
are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM"
support on gawk; readline is used by the gawk debugger.
However, mpfr (bringing gmp) are also host-packages in Buildroot, but in
the standard build order (i.e. a plain 'make'), they are built after
gawk. Ditto readline (from ncurses).
If the user has the development files for gmp and mpfr, then gawk is
linked to them. Ditto readline.
Now, further on in the build, we build gmp and mpfr (for gcci or guile),
so we install them in the host dir. Ditto readline (for gdb, ncurses
itself and a few other packages...)
But because we forcibly set an RPATH tag on all our host binaries, our
host gawk will now dynamically link with our versions, when it was in
fact built against the host ones.
This did not seem to cause any harm so far, but is far from ideal.
Since we do not really need BIGNUM or the debugger in our host gawk, we
just forcibly disable them and configure gawk without readline or mpfr
(there's no switch for gmp, but it's not a direct dependency, it comes
just with mpfr).
[Adjust comment as suggested by Thomas/Yann]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-01 15:19:07 -07:00
|
|
|
HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr
|
|
|
|
|
2010-09-01 15:23:40 -06:00
|
|
|
define GAWK_CREATE_SYMLINK
|
2018-07-25 05:18:10 -06:00
|
|
|
ln -sf gawk $(TARGET_DIR)/usr/bin/awk
|
2010-09-01 15:23:40 -06:00
|
|
|
endef
|
|
|
|
|
|
|
|
GAWK_POST_INSTALL_TARGET_HOOKS += GAWK_CREATE_SYMLINK
|
2002-10-23 06:54:42 -06:00
|
|
|
|
2021-06-15 08:03:02 -06:00
|
|
|
define HOST_GAWK_CREATE_SYMLINK
|
2022-07-16 15:04:49 -06:00
|
|
|
ln -sf gawk $(HOST_DIR)/bin/awk
|
2021-06-15 08:03:02 -06:00
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GAWK_POST_INSTALL_HOOKS += HOST_GAWK_CREATE_SYMLINK
|
|
|
|
|
2012-07-02 16:07:32 -06:00
|
|
|
$(eval $(autotools-package))
|
2012-07-02 16:06:54 -06:00
|
|
|
$(eval $(host-autotools-package))
|