Commit Graph

14 Commits

Author SHA1 Message Date
Thomas De Schampheleire
f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Jörg Krause
a29129201b package/nodejs: bump to version 0.10.32
Signed-off-by: Jörg Krause <jkrause@posteo.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-17 22:55:49 +02:00
Thomas Petazzoni
78ad429cfb nodejs: fix build of host-nodejs
In commit 89fae0d05d ("nodejs: Add
dependency on zlib"), Paul added a dependency of host-nodejs on
host-zlib. When host-zlib is built, the host variant of zlib is
installed in $(HOST_DIR)/usr/lib. However, even though
-L$(HOST_DIR)/usr/lib is passed to the LDFLAGS of host-nodejs
configure script, those LDFLAGS are not re-used at build and install
time. This is because nodejs does not use the autotools and its
configure script does not "save" the environment variables such as
LDFLAGS. This is causing build failures such as:

  http://autobuild.buildroot.org/results/802/802134ceb92d82d2d4ef6a81c67ad1c98696663a/

due to the fact that the host zlib cannot be found.

This commit fixes that by passing $(HOST_CONFIGURE_OPTS) explicitly at
both build time and install time of host-nodejs. This approach was
already used for the target variant of nodejs.

Cc: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-06 22:17:18 +02:00
Jörg Krause
8254051f6f package/nodejs: bump to version 0.10.31
Signed-off-by: Jörg Krause <jkrause@posteo.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-04 17:13:43 +02:00
Paul Cercueil
89fae0d05d nodejs: Add dependency on zlib
Prior to this commit, nodejs would build zlib itself and link statically
to it.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-17 09:24:46 +02:00
Jordi Llonch
ce69cc9172 nodejs: updated to 0.10.30
Signed-off-by: Jordi Llonch <jordi.llonch@rochsystems.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-08-06 19:59:30 +02:00
Thomas Petazzoni
7e91d2b0e3 nodejs: fix build when python3 is selected in Buildroot
When Python 3 is selected in Buildroot, the host/usr/bin/python
symlink of the host Python interpreter points to python3. Packages
that need to use the host Python 2 interpreter have to use python2.

In commit 40218a1652 ("nodejs: force
python interpreter"), Samuel made some changes to the nodejs package
to use python2. One part of the changes is to sed a .gyp file to
replace the string 'python' by the path to python2. However, this
operation is done *after* calling the configure script, so it has in
fact no effect. Putting this sed before calling the configure script
fixes the problem.

However, there is a better solution: the nodejs build system has a
mechanism of variables, and it already defines a python variable
according to the environment variable PYTHON being passed. So this
patch instead adds a new patch to nodejs to use this python variable.

Fixes:

  http://autobuild.buildroot.org/results/aff/affd7300895ec400de50a33d51b4e94e15d63341/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-21 10:34:29 +02:00
Thomas Petazzoni
f565796fbb Revert "host-nodejs: use g++ as linker"
This reverts commit ea737fb100, which in
the end didn't fix the autobuilder problem. Since then,
fb80d28341 ('nodejs: add a patch forcing
link command to use CXX') was added, and was successfully tested.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-20 19:35:47 +02:00
Samuel Martin
ea737fb100 host-nodejs: use g++ as linker
Fixes:
  http://autobuild.buildroot.net/results/f6b/f6b80ae32acf7f89bb1c12999679ff1be9733d44/

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-16 19:10:52 +02:00
Samuel Martin
40218a1652 nodejs: force python interpreter
nodejs build system is based on python, and it does not support python3.

This patch makes sure python2 is used for the build.

Note that, setting PYTHON=... at configure time or in the make
environment is not enough to override all the hard-coded python call, so
we have to sed some python scripts to avoid being screwed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-15 23:18:00 +02:00
Samuel Martin
bde585518e nodejs: use the standard configure/make options
Also cleanup leading whitespace.

Note that overloading LD in required to avoid linker failures.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-15 23:17:10 +02:00
Paul Cercueil
8e7dacf766 nodejs: Bump to version 0.10.12
This makes building on mipsel possible (hard-float variant only).

[Peter: also adjust dependenciess for comment]
Signed-Off-By: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-17 17:01:57 +01:00
Alexandre Belloni
8dfd59d114 Normalize separator size to 80
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 22:30:24 +02:00
Daniel Price
b31bc7d438 nodejs: new package
Based off of patches posted by (and Signed-off-by:) Jonathan Liu <net147@gmail.com>

[Peter: fix Config.in whitespace]
Signed-off-by: Daniel Price <daniel.price@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-18 09:42:46 +01:00