Commit graph

67 commits

Author SHA1 Message Date
Vadim Kochan 2bce7d7de9 package/pkg-autotools: disable NLS for host packages by default
There is no need for language translaion feature for the host
packages, anyway some of them disable it explicitly, so lets do it
automatically at least for the host-autotools- kind of packages.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-04 22:47:25 +02:00
Arnout Vandecappelle 8529a7d9a7 pkg-autotools: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix
Remove the redundant usr/ component of the HOST_DIR paths. Since a
previous commit added a symlink from $(HOST_DIR)/usr to $(HOST_DIR),
everything keeps on working.

Build-tested with a bunch of autotools packages.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 11:49:08 +02:00
Thomas Petazzoni 8d603626a8 package: rename DISABLE_NLS to NLS_OPTS
We are going to use DISABLE_NLS not only for disabling NLS support,
but also to explicitly enable it. Therefore, this preparatory commit
renames it to NLS_OPTS, which is consistent with other foo_OPTS
variables defined in package/Makefile.in.

While at it, we replace the := assignments by regular = assignments.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-04 19:09:53 +02:00
Ignacy Gawędzki 630c335868 pkg-autotools: don't disable dependency tracking if using <pkg>_OVERRIDE_SRCDIR
Include the --disable-dependency-tracking option in <pkg>_CONFIGURE_CMDS
only on the condition that <pkg>_OVERRIDE_SRCDIR is empty. Dependency
tracking is very welcome while developing in order to properly rebuild
when calling make <pkg>-rebuild for instance.

Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
2017-03-05 22:48:04 +01:00
Waldemar Brodkorb 7485ff4607 pkg-autotools: search in the entire source directory for ltmain.sh
Fixes static linking of berkeleydb package, where ltmain.sh
is not in the sub-directory that contains configure.
Always search the complete source directory.

Fixes:
 http://autobuild.buildroot.net/results/f0a96f671644d9f9efcf245b354affdc84f7d7da

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-07 20:03:48 +01:00
Sam bobroff 41444d7f89 pkg-autotools: generic configure fix for powerpc64
Many (100+) packages supported by buildroot contain old configure
scripts (or build them from old versions of autotools) that are unable
to determine how to link shared libraries on powerpc64 and
powerpc64le. This causes that test to erroneously fail on toolchains
that are not "bi-endian" (which is the case for toolchains built by
buildroot), which causes configure to build static libraries instead
of dynamic ones. Although these builds succeed, they tend to cause
linker failures in binaries later linked against them.

Because affected configure files can be discovered automatically, this
patch introduces a hook (enabled only when building for powerpc64 and
powerpc64le) that uses a script to scan and fix each package.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-05 22:51:17 +01:00
Romain Naour ba4af1a06d core/pkg-autotools: don't use APPLY_PATCHES for libtool patches
Since [1] <package>-reconfigure target is broken.

$ make elementary-reconfigure
Applying buildroot-libtool-v2.4.4.patch using patch:
Error: duplicate filename 'buildroot-libtool-v2.4.4.patch'
Conflicting files are:
  already applied: buildroot/support/libtool/buildroot-libtool-v2.4.4.patch
  to be applied  : buildroot/support/libtool/buildroot-libtool-v2.4.4.patch

When a package uses AUTORECONF, the libtool patch can be applied a
second time on the same ltmain.sh in the same directory as the
<package>-reconfigure target is called. This is not a problem since
autoreconf will overwrite the previously patched files. But with the
check introduced by [1], apply-patches.sh throw an error when the
package is reconfigured since the libtool patch is already present in
.applied_patches_list.

In addition to this, the .applied_patches_list file generated by
apply-patches.sh while patching ltmain.sh is not in the top-level
package source directory. Instead a duplicated .applied_patches_list
is generated beside the patched ltmain.sh which can be in a
subdirectory.

As noticed by Arnout Vandecappelle [2], the apply-patches.sh script
doesn't bring anything for the libtool patches.

"apply_patches.sh does the following:

* It handles directories -> not needed here.
* It handles compressed patches and tarballs -> not needed.
* It handles series files -> not needed.
* It handles errors in case of multiple patches -> not needed since
it's only one patch.
* It detects errors based on *.rej files -> not needed since it's only
a single patch so patch exit code is OK.
* It writes the patch list -> for libtool, this is quite silly because
it will be written in the directory where ltmain.sh is found, not in the
top-level directory, so you have these patch lists spread over the
source tree."

So use patch directly rather than apply-patches.

[1] 1924159814
[2] http://lists.busybox.net/pipermail/buildroot/2016-August/169810.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-18 23:52:47 +02:00
Julien Floret 4bdb067e38 infra: remove auto derivation of host dependencies
This feature consists in automatically deducing dependencies of a host
package from the dependencies of the target variant.

However, it causes some issues, and many host packages need different
dependencies than their target variants.

Now that host dependencies are explicitly set for all packages, we can
remove it.

Signed-off-by: Julien Floret <julien.floret@6wind.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-03 10:24:02 +02:00
Yann E. MORIN 7d6858dd74 core/pkg-autotools: align host configure commands to target one
The host configure commands are not indented the same way as the target
ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-23 18:36:35 +01:00
Yann E. MORIN 67f8138a46 pkg-infra: munging .la files is not limited to autotools packages
Currently, we're only fixing libtool's .la files for autotools packages,
and even more so, only for those that do not define their own
_INSTALL_STAGING_CMDS.

However, .la files might also be installed by non-autotools packages,
like the NVidia GPU binary blob (libGL.la).

So, move that code into the global build rule, so all packages get their
.la files fixed, whether they be autotools packages or not, and whether
they define their own _INSTALL_STAGING_CMDS or not.

Also print a message.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-19 11:53:01 +02:00
Maxime Hadjinlian 7a6b83a211 skeleton: New package
Create a proper package for the skeleton.

The main Makefile is modified to remove the skeleton support.
The 'dirs' target, will create the $(TARGET_DIR).
The file 'output/target/.root' doesn't exists anymore, as there's no
Make rule to statisfy.

The infrastructure are modified to filter host-skeleton.
It's needed becauses the host-dependencies are derived from the
dependencies of the target package where 'host-' is preprended to the
depedency name.

In the pkg-generic we add skeleton as a dependency to every package.

The whole system/system.mk is now removed at the profit of
package/skeleton/skeleton.mk

[Thomas:
  - rebase on top of master and fix some minor conflicts
  - remove the 'select BR2_PACKAGE_SKELETON' in
    BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since
    anyway the skeleton package is always enabled.
  - fixup a few mistakes in the getty handling due to misnamed
    variables.]

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 18:08:23 +02:00
Maxime Hadjinlian 44c48b1274 pkg-autotools: Remove useless space
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-12 17:40:14 +02:00
Danomi Manchego 5eb23c9b88 pkg-autotools: fix whitespace regex in libtool patch hook
The first sed line for ltmain_version attempts to match whitespace before
VERSION with [ space_character tab_character ]. The second sed line used to
make ltmain_patchlevel has only space characters in the whitespace expression,
possibly due to a smart editor automatically converting tabs to spaces. Make
these lines consistent with each other and more resilient against accidental
loss of tab characters by replacing the tabs with '\t'.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-07-09 07:58:02 +02:00
Danomi Manchego 9917e48d7e pkg-autotools: fix patching libtool for version 2.4
If the libtool used by the package is 2.4 (i.e. with no patchlevel), we
end up with error messages like this one, seen when building ntp-4.2.8p3:

    /bin/sh: line 0: test: 2.4: integer expression expected

That's because the current sed expression "[0-9].[0-9]." only deletes content
like "2.4.", so it leaves "2.4" (no patch level *and* no second period) intact,
resulting in an ltmain_patchlevel of "2.4", not empty, and not "0".  Then the
shell line goes bad, because the built in shell test -gt operates on integers
only, and fails on floating point numbers (like "2.4").

Additionally, the existing sed lines are problematic in other ways, because the
current expression "[0-9].[0-9]" will match "234" as well as "2.4", as an unescaped
period matches any character, not just a period.  Also, the lack of an asterisk
after the first character may be a problem in the future, if a two digit initial
number is used.

So, this patch changes the sed regex as follows:

* Match a string of digits when searching for a number.  I.e. "[0-9]*"
* Match specifically a period in between two numbers.  I.e. "\."
* When searching for a patch level, make the second period optional.  I.e. "\.*"

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-07-06 18:12:55 +02:00
Johan Oudinet 0552a367db Remove --{enable, disable}-debug configure flags.
Adding this flag when BR2_ENABLE_DEBUG is activated make several
packages to produce binaries that do not work as expected (e.g., dhcp,
lame, nano). Moreover, the help message of BR2_ENABLE_DEBUG does not
say it is adding this flag. It is supposed to build packages with
debugging symbols enabled. So, let it do that only.

* package/Makefile.in: Do not add --{enable,disable}-debug flags.
* package/pkg-autotools.mk: Remove ENABLE_DEBUG as it is not set
  anymore.

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-06-05 16:24:54 +02:00
Arnout Vandecappelle 8c48821138 autotools-package: also handle pre-installed external toolchain in .la fixup
The .la fixup handling looks for paths starting with /usr and assumes
that they are missing the installation prefix (i.e. $(STAGING_DIR)). It
already handles the cases that $(STAGING_DIR) itself and $(BASE_DIR)
are under /usr, but it does not yet handle the case that a
pre-installed external toolchain is under /usr (and tracks that fact
in some .la file). For instance, if you use buildroot to generate a
toolchain with HOST_DIR=/usr/local/some_path, this problem will occur.

Fix this in the same way as $(STAGING_DIR) and $(BASE_DIR), but in
addition check that TOOLCHAIN_EXTERNAL_INSTALL_DIR is non-empty. For
internal toolchains, it is empty and the sed expression would fail.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reported-by: Carlos Soto <csotoalonso@gmail.com>
Cc: Carlos Soto <csotoalonso@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-05-04 14:38:02 +02:00
Gustavo Zacarias cd4e48386e package infra: drop non-IPv6 support
Now that IPv6 is mandatory remove support for non-IPv6 tweaks/variables
in the package infra.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-22 23:06:55 +02:00
Gustavo Zacarias c0d6625e5e package infra: drop non-lfs support
Now that largefile is mandatory remove support for non-lfs
tweaks/variables in the package infra and the gcc build.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-01 22:43:01 +02:00
Bernd Kuhls 356584ca70 Apply --disable-gtk-doc-html to all packages
Move this option to package/pkg-autotools.mk so it applies to all packages.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-03 15:25:21 +01:00
Yann E. MORIN 383287ce33 pkg-autotools: fix patching libtool for version 2.4
If the libtool used by the package is 2.4 (i.e. with no patchlevel), we
end up with a confusing message:

    /bin/sh: line 0: test: -gt: unary operator expected

That's because patchlevel is empty, and thus there is nothing to comapre
to 2, and test complains.

Fake a patchlevel of 0 (which is really what a missing patchlevel means
anyway) in that case.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-01 22:25:25 +01:00
Gustavo Zacarias 4a28e3523d support/libtool: add patch for newer versions
Add patch to support newer (>2.4.2) versions.
Adjust patch logic to check for patchlevel greater than 2 (apply new patch) or
not (apply current patch).
Some people/distributions used unreleased versions, with the string being
2.4.2.x, this packages are AUTORECONFed and have to be kept like this since
the up-to-2.4.2 patch doesn't work, neither does the from-2.4.3 version patch.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-21 13:21:56 +01:00
Yann E. MORIN 452c8da326 pkg-autotools: only apply libtool patch at the right moment
Currently, we apply the libtool patch at post-patch time, always. If we
need to autoreconf, we also apply it after autoreconf is done.

Obviously, in that second case, we do not need to apply it at
post-patch time. This has no impact on the result, as autoreconf will
overwrite the just patched files, and they will be patched yet again.
But it is not nice to the user that will see a double "Patching libtool"
message.

So, we apply the libtool patch at post-patch time only if we are not
autoreconfiguring the package.

[Thomas: fix minor typo s/casse/case/ in the commit log.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:37:52 +01:00
Yann E. MORIN b3b2222fa7 pkg-autotools: fold the libtool patching code directly into the hook
We now have only one caller of the libtool patching code, which is the
hook itself.

So, there is no longer any need to extract this code into a utility
function, and it can be folded into the hook itself.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:37:01 +01:00
Yann E. MORIN 2fceab73f1 pkg-autotools: remove redundant shell conditional
The libtool patching function checks whether patching libtool is wanted
before doing the actual patching.

This is redundant now, as all callers are now protected by a conditional
block.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:36:42 +01:00
Johan Oudinet d2ae901036 pkg-autotools: move the libtool patching call out of the autoreconf hook
Call it as a standalone hook, like is done for post-patch.

[Thomas: change back the author to Johan. Yann mistakenly changed it
when submitting the patch series.]

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
[yann.morin.1998@free.fr: split the patch into semantically separate
patches]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:35:58 +01:00
Johan Oudinet f2d0052f3b pkg-autotools: commonalise the libtool patching code
Currently, the heuristic to patch libtool scripts is duplicated both in
the libtool post-patch hook and the autoreconf pre-configure hook.

Move that code into a single function that gets called from both hooks.

[Thomas: change back the author to Johan. Yann mistakenly changed it
when submitting the patch series.]

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
[yann.morin.1998@free.fr: split the patch into semantically separate
patches]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:35:04 +01:00
Yann E. MORIN 59c647e37d pkg-autotools: re-order cleaning up the host dependencies
Move the host dependencies cleanup out from in-between all the hooks, so
it is easier to see how the hooks all work together.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:34:31 +01:00
Johan Oudinet 3a82b1ec3d pkg-autotools: move common macros
Currently, the common macros used for the various hooks are defined for
each and every autotools packages, even though the macros are completely
generic.

Besides being completely useless, it tends to slow down make, as the
variables are redefined over and over again.

Move their definitions out of inner-autotools-package.

Note: we remove the double-$ because we no longer are in a
define-in-a-define block, just a define block.

[Thomas: change back the author to Johan. Yann mistakenly changed it
when submitting the patch series.]

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
[yann.morin.1998@free.fr: split the patch into semantically separate
patches]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 20:33:42 +01:00
Jerzy Grzegorek 1769933d98 package: indentation cleanup
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-26 05:47:05 +01:00
Fabio Porcedda 1586ce3a3d apply-patches.sh: Use the "APPLY_PATCHES" variable to call the script
To easy up adding optional parameters when calling the
"apply-patches.sh" add and use the "APPLY_PATCHES" variable to execute
the script.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-25 01:31:32 +02:00
Bernd Kuhls 822a757456 infra: Move --enable/--disable-debug to package/Makefile.in
A lot of packages ignored BR2_ENABLE_DEBUG. This patch simplifies the handling of
this option by adding the corresponding configure option to the global Makefile
for target packages.

For host packages --disable-debug is added to the global Makefile.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-19 17:07:14 +02:00
Jörg Krause b3ed7c2d68 package/pkg-autotools.mk: set --localstatedir=/var by default
`localstatedir` is a common autoconf variable like prefix and sysconfdir. At
this time 25 autotools and one generic package uses this Makefile variable. 22
of the autotools packages use --localstatedir=/var, the remaining use custom
settings.

Setting `localstatedir` to /var is consistent with the Filesystem Hierarchy
Standard (FHS). So it's time to move it as a common definition in the
autotools infrastructure.

Signed-off-by: Jörg Krause <jkrause@posteo.de>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-18 19:27:28 +02:00
Thomas De Schampheleire 35886e5c90 packages: rename FOO_GETTEXTIZE_OPT into FOO_GETTEXTIZE_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_GETTEXTIZE_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_GETTEXTIZE_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:42 +02:00
Thomas De Schampheleire aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_CONF_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:54:16 +02:00
Thomas De Schampheleire 1d2574ac6f packages: rename FOO_AUTORECONF_OPT into FOO_AUTORECONF_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_AUTORECONF_OPT.

Sed command used:
    find * -type f | xargs sed -i 's#_AUTORECONF_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:53:25 +02:00
Thomas De Schampheleire d6c32da881 packages: rename FOO_INSTALL_STAGING_OPT into FOO_INSTALL_STAGING_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_INSTALL_STAGING_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_INSTALL_STAGING_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:49:36 +02:00
Thomas De Schampheleire 57f2b8d255 packages: rename FOO_INSTALL_TARGET_OPT into FOO_INSTALL_TARGET_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_INSTALL_TARGET_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_INSTALL_TARGET_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:48:33 +02:00
Thomas De Schampheleire b199343034 packages: rename FOO_INSTALL_OPT into FOO_INSTALL_OPTS
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS,
make the same change for FOO_INSTALL_OPT.

Sed command used:
   find * -type f | xargs sed -i 's#_INSTALL_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 18:47:37 +02:00
Thomas De Schampheleire 0518a98ac3 packages: rename FOO_MAKE_OPT into FOO_MAKE_OPTS
While the autotools infrastructure was using FOO_MAKE_OPT, generic packages
were typically using FOO_MAKE_OPTS. This inconsistency becomes a problem
when a new infrastructure is introduced that wants to make use of
FOO_MAKE_OPT(S), and can live alongside either generic-package or
autotools-package. The new infrastructure will have to choose between either
OPT or OPTS, and thus rule out transparent usage by respectively generic
packages or generic packages. An example of such an infrastructure is
kconfig-package, which provides kconfig-related make targets.

The OPTS variant is more logical, as there are typically multiple options.

This patch renames all occurrences of FOO_MAKE_OPT in FOO_MAKE_OPTS.
Sed command used:
    find * -type f | xargs sed -i 's#_MAKE_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 15:07:23 +02:00
Romain Naour f8d4fe376c package/pkg-autotools: don't use config.site when cross-compiling
On fedora 20 64bits host, the file /usr/share/config.site contains
a fix for installing libraries into /lib/lib64 on 64bits systems
that redefine libdir in the generated Makefile

For safety and avoid the bug #7262 [1], disable loading this file
when running the configure script for the target and the host.

Note: configure scripts generated with autoconf < 2.65 will source
the /dev/null and print this line:
"configure: loading site script /dev/null"

[1]: https://bugs.busybox.net/show_bug.cgi?id=7262

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-15 00:35:58 +02:00
Thomas Petazzoni 3e37b0fc6c pkg-autotools: use --disable-dependency-tracking
By default, automake does "dependency tracking", which allows the
generated Makefile to contain the necessary dependencies to
automatically rebuild the appropriate C files when included header
files are changed. This dependency tracking is nice when doing active
development on the package, but not really useful when doing a
one-time build of the package. According to automake's
documentation[1], disabling the dependency tracking provides a small
speed-up.

In some very unscientific measurements (i.e repeated only once), we
have noticed a ~3.6% reduction of the total build time of a Buildroot
toolchain after applying this patch.

[1] http://www.gnu.org/software/automake/manual/html_node/Dependency-Tracking.html

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-29 09:17:33 +02:00
Thomas De Schampheleire 60714bb2ed trivial: fix typo 'informations'
In English, unlike in French, almost all usages of the word 'information'
are uncountable, meaning that 'informations' is invalid.
This patch fixes this typo throughout the tree, except in CHANGES and
docs/news.html (historic text).

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-24 22:31:20 +02:00
Thomas De Schampheleire 5bd9ed6fe6 trivial: fix typo 'an host'
In English, unlike in French, the 'h' in 'host' is pronounced, meaning that
the article should be 'a' instead of 'an'.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-24 22:29:54 +02:00
Rick Taylor 5af28fe6a1 pkg-autotools: add support for <pkg>_AUTORECONF_ENV
This commit improves the autotools-package infrastructure to support a
<pkg>_AUTORECONF_ENV variable, which allows a package maintainer to
pass additional variables in the environment of the autoreconf
execution. This is useful in the situation where configure.ac contains
shell commands using environment variables that are only executed when
autoreconf is run.

Signed-off-by: Rick Taylor <rick.taylor@cassidian.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-23 23:49:10 +02:00
Yann E. MORIN bea8f267d5 infra/pkg-autotools: cleanup the gettextize step
Align the way we call gettextize to the way we call autoreconf:
  - provide the $(GETTEXTIZE) variable
  - pass $(HOST_CONFIGURE_OPTS) in the environment
  - pass the fully-qualified path to autom4te
  - use of -f even if the package provides its own options

Some eye-candy in the output of gettextize.

Thanks to Gustavo for pointing out the discrepancy between the way we
call gettextize and the way we call autoreconf, and to Thomas for the
live debug session. ;-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-19 11:35:22 +02:00
Gustavo Zacarias eada19f244 pkg-autotools: fix bad GETTEXTIZE_OPT assignment
HOST_PKG_GETTEXTIZE_OPT should get assigned PKG_GETTEXTIZE_OPT and not
PKG_GETTEXTIZE. Fixes:
http://autobuild.buildroot.net/results/087/087e860173069f58fa9ceb2460d7455d31b2dff8/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-17 17:30:26 +02:00
Yann E. MORIN 899258344f pkg-autotools: add support to gettextize a package
In case a package comes with a gettext infra which is different from
the one Buildroot provides, we'd get autoreconf errors, like:
    http://autobuild.buildroot.net/results/c0f/c0f7c801f61fdc310cde64342060b00a70155431/

To avoid that, we need to gettextize the package prior to running
autoreconf.

Provide the necessary infrastructure in the autotools infrastructure,
so we can do it consistently across packages.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-17 09:49:25 +02:00
Thomas De Schampheleire 18a0e07350 infra: fix autotools .la fixing when no .la files are present
Commit 6f638ea9c9 ("infra: /usr support:
STAGING_DIR can be outside BASE_DIR") changed a for-construct around 'sed
-i' in a 'find | xargs sed -i'. However, if the find returns no results,
sed complains with:
    '/bin/sed: no input files'

This commit adds the extra parameter -r / --no-run-if-empty to the xargs
call, effectively fixing this problem case.

Reported-by: Rohit Kumar <rkthebest@gmail.com>
Fix-suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-06 22:22:52 +02:00
Thomas De Schampheleire 6f638ea9c9 infra: /usr support: STAGING_DIR can be outside BASE_DIR
If the user sets a custom BR2_HOST_DIR, then STAGING_DIR is not under
BASE_DIR. The .pc/.la file fixup commands incorrectly made this assumption
and thus should be corrected.

Additionally, this patch:
- rewords the comment in pkg-autotools that explains the replacements.
- removes a for statement in favor of xargs

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-04 15:49:59 +02:00
Thomas De Schampheleire 7701fc53d1 infra: support buildroot being located in /usr
pkg-generic and pkg-autotools both perform sed replacements of /usr to
$(STAGING_DIR)/usr, in .pc and .la files respectively. However, if buildroot
itself is located in /usr, then STAGING_DIR also starts with /usr, and naive
replacements of '/usr' can result in paths of the form:
    /usr/buildroot/.../sysroot/usr/buildroot/.../sysroot/...

This patch makes the replacements more careful, by first replacing the known
paths BASE_DIR and STAGING_DIR to tokens, then performing the actual
replacement, and finally replacing the tokens with the corresponding paths.

Additionally it removes the unnecessary making of a backup copy in
pkg-autotools.

Partially fixes bug #5750 (https://bugs.busybox.net/show_bug.cgi?id=5750)

[Thomas: improve pkg-autotools.mk by including the explanation comment
proposed by Arnout.]

Partially-based-on-a-patch-from: Ben Stoltz <benstoltz@gmail.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-29 12:38:17 +02:00