From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/5] dos2unix: add target support
Date: Fri, 4 Sep 2015 11:52:18 +0100 [thread overview]
Message-ID: <55E977E2.2060901@imgtec.com> (raw)
In-Reply-To: <35a5aad580e5c2cae7eb79522f11a1aded941caf.1441253454.git.baruch@tkos.co.il>
Dear Baruch Siach,
On 09/03/2015 05:10 AM, Baruch Siach wrote:
> From: James Knight <james.knight@rockwellcollins.com>
>
> Allow the `dos2unix` utility to be built and installed on the target
> system.
>
> [baruch: properly handle target gettext]
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v3:
> * Show only if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is enabled (Peter)
> * Add busybox to _DEPENDENCIES
>
> v2:
> * Fix static build with gettext
> * Support build without locale support
> ---
> package/Config.in | 1 +
> package/dos2unix/Config.in | 11 +++++++++++
> package/dos2unix/dos2unix.mk | 25 ++++++++++++++++++++++---
> 3 files changed, 34 insertions(+), 3 deletions(-)
> create mode 100644 package/dos2unix/Config.in
>
> diff --git a/package/Config.in b/package/Config.in
> index 6ba21a1aace8..2c1325af31c5 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -115,6 +115,7 @@ menu "Development tools"
> source "package/cvs/Config.in"
> if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
> source "package/diffutils/Config.in"
> + source "package/dos2unix/Config.in"
> source "package/findutils/Config.in"
> endif
> source "package/flex/Config.in"
> diff --git a/package/dos2unix/Config.in b/package/dos2unix/Config.in
> new file mode 100644
> index 000000000000..fdcd0700509b
> --- /dev/null
> +++ b/package/dos2unix/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_DOS2UNIX
> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
> + depends on BR2_USE_WCHAR # gettext
> + bool "dos2unix"
> + help
> + dos2unix converts text file line endings between CRLF and LF
> +
> + http://freshmeat.net/projects/dos2unix
> +
> +comment "dos2unix needs a toolchain w/ wchar"
> + depends on !BR2_USE_WCHAR
> diff --git a/package/dos2unix/dos2unix.mk b/package/dos2unix/dos2unix.mk
> index 2d7fcbbc6958..b1d21f27364d 100644
> --- a/package/dos2unix/dos2unix.mk
> +++ b/package/dos2unix/dos2unix.mk
> @@ -6,17 +6,36 @@
>
> DOS2UNIX_VERSION = 7.0
> DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix
> -DOS2UNIX_DEPENDENCIES = host-gettext
> DOS2UNIX_LICENSE = BSD-2c
> DOS2UNIX_LICENSE_FILES = COPYING.txt
> +DOS2UNIX_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
> +HOST_DOS2UNIX_DEPENDENCIES = host-gettext
> +
> +ifeq ($(BR2_ENABLE_LOCALE),)
> +DOS2UNIX_MAKE_OPTS += ENABLE_NLS=
> +endif
> +
> +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
> +DOS2UNIX_DEPENDENCIES += gettext
> +DOS2UNIX_MAKE_OPTS += LIBS_EXTRA=-lintl
> +endif
> +
> +define DOS2UNIX_BUILD_CMDS
> + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(DOS2UNIX_MAKE_OPTS)
> +endef
> +
> +define DOS2UNIX_INSTALL_TARGET_CMDS
> + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
> + $(DOS2UNIX_MAKE_OPTS) install
> +endef
>
> define HOST_DOS2UNIX_BUILD_CMDS
> $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
> endef
>
> define HOST_DOS2UNIX_INSTALL_CMDS
> - $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> - install DESTDIR=$(HOST_DIR)
> + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) install
> endef
>
> +$(eval $(generic-package))
> $(eval $(host-generic-package))
>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Compile test for MIPS architecture:
$ grep ^DOS2UNIX_VERSION package/dos2unix/dos2unix.mk
DOS2UNIX_VERSION = 7.0
$ file output/target/usr/bin/dos2unix
output/target/usr/bin/dos2unix: ELF 32-bit MSB executable, MIPS, MIPS32
rel2 version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.32, with unknown capability 0x41000000 = 0xf676e75, with
unknown capability 0x10000 = 0x70401, stripped
Regards,
Vincent.
next prev parent reply other threads:[~2015-09-04 10:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 4:10 [Buildroot] [PATCH v3 1/5] dos2unix: add target support Baruch Siach
2015-09-03 4:10 ` [Buildroot] [PATCH v3 2/5] dos2unix: bump to version 7.3 Baruch Siach
2015-09-04 10:52 ` Vicente Olivert Riera
2015-09-03 4:10 ` [Buildroot] [PATCH v3 3/5] dos2unix: remove WCHAR dependency Baruch Siach
2015-09-04 10:52 ` Vicente Olivert Riera
2015-09-04 12:16 ` Baruch Siach
2015-09-03 4:10 ` [Buildroot] [PATCH v3 4/5] dos2unix: remove host-gettext dependency from host package Baruch Siach
2015-09-04 10:52 ` Vicente Olivert Riera
2015-09-03 4:10 ` [Buildroot] [PATCH v3 5/5] dos2unix: update homepage link Baruch Siach
2015-09-04 10:52 ` Vicente Olivert Riera
2015-09-04 10:52 ` Vicente Olivert Riera [this message]
2015-09-04 15:07 ` [Buildroot] [PATCH v3 1/5] dos2unix: add target support Peter Korsgaard
2015-09-06 9:36 ` Baruch Siach
2015-09-06 9:42 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E977E2.2060901@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox