From 55f70939b839cd5ad826ea01fcb6d363d63ee15d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 10 Aug 2010 19:08:10 +0200 Subject: Fix util-linux build on MIPS As reported in bug #635, util-linux doesn't build due to missing constant definitions related to the a.out binary format. We fix this by hardcoding these constant definitions, as done in newer versions of util-linux. Obviously, the long term fix is to upgrade to util-linux-ng, but this is probably not acceptable for 2010.08. Signed-off-by: Thomas Petazzoni --- ...linux-2.13-pre17-hardcode-a-out-constants.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch (limited to 'package') diff --git a/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch b/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch new file mode 100644 index 000000000..b115c410e --- /dev/null +++ b/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch @@ -0,0 +1,41 @@ +Hardcode a.out related constants + +The OMAGIC, NMAGIC and ZMAGIC constants, related to the legacy a.out +binary format, are no longer available in the headers of all +architectures, due to this binary format being deprecated. For that +reason, util-linux fails to build. + +We therefore take the approach used in newer versions of +util-linux-ng: hardcoding those values. See +http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4 + +Signed-off-by: Thomas Petazzoni +--- + text-utils/more.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +Index: util-linux-2.13-pre7/text-utils/more.c +=================================================================== +--- util-linux-2.13-pre7.orig/text-utils/more.c ++++ util-linux-2.13-pre7/text-utils/more.c +@@ -53,7 +53,6 @@ + #include + #include + #include +-#include + #include + #include "xstrncpy.h" + #include "nls.h" +@@ -504,9 +503,9 @@ + + if (fread(twobytes, 2, 1, f) == 1) { + switch(twobytes[0] + (twobytes[1]<<8)) { +- case OMAGIC: /* 0407 */ +- case NMAGIC: /* 0410 */ +- case ZMAGIC: /* 0413 */ ++ case 0407: /* a.out obj */ ++ case 0410: /* a.out exec */ ++ case 0413: /* a.out demand exec */ + case 0405: + case 0411: + case 0177545: -- cgit v1.2.3 From e0f441a234dc2e0e8b49272ab608da2e7c69f2a7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 10 Aug 2010 19:15:26 +0200 Subject: Add dependency from util-linux on ncurses util-linux can build without ncurses, but when ncurses is available, additional features can be built (such as the more command). Therefore, in util-linux.mk, when ncurses is available, mark it as a dependency. Signed-off-by: Thomas Petazzoni --- package/util-linux/util-linux.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'package') diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk index f330447fb..445b4d1c7 100644 --- a/package/util-linux/util-linux.mk +++ b/package/util-linux/util-linux.mk @@ -23,6 +23,10 @@ UTIL-LINUX_DEPENDENCIES += gettext libintl UTIL-LINUX_MAKE_OPT = LIBS=-lintl endif +ifeq ($(BR2_PACKAGE_NCURSES),y) +UTIL-LINUX_DEPENDENCIES += ncurses +endif + $(DL_DIR)/$(UTIL-LINUX_SOURCE): $(call DOWNLOAD,$(UTIL-LINUX_SITE),$(UTIL-LINUX_SOURCE)) -- cgit v1.2.3 From a22d4082eac385cf5386f19d8c9207ee1fd381c1 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Wed, 11 Aug 2010 11:07:01 -0300 Subject: Update busybox 1.17.1 fixes New shell_common fix and sed fix. Signed-off-by: Gustavo Zacarias --- .../busybox-1.17.1/busybox-1.17.1-sed.patch | 66 ++++++++++++++++++++++ .../busybox-1.17.1/busybox-1.17.1-shell.patch | 19 +++++++ 2 files changed, 85 insertions(+) create mode 100644 package/busybox/busybox-1.17.1/busybox-1.17.1-sed.patch (limited to 'package') diff --git a/package/busybox/busybox-1.17.1/busybox-1.17.1-sed.patch b/package/busybox/busybox-1.17.1/busybox-1.17.1-sed.patch new file mode 100644 index 000000000..1b523c2ce --- /dev/null +++ b/package/busybox/busybox-1.17.1/busybox-1.17.1-sed.patch @@ -0,0 +1,66 @@ +diff -urpN busybox-1.17.1/editors/sed.c busybox-1.17.1-sed/editors/sed.c +--- busybox-1.17.1/editors/sed.c 2010-07-06 04:25:53.000000000 +0200 ++++ busybox-1.17.1-sed/editors/sed.c 2010-08-01 04:15:39.000000000 +0200 +@@ -61,6 +61,10 @@ + #include "libbb.h" + #include "xregex.h" + ++enum { ++ OPT_in_place = 1 << 0, ++}; ++ + /* Each sed command turns into one of these structures. */ + typedef struct sed_cmd_s { + /* Ordered by alignment requirements: currently 36 bytes on x86 */ +@@ -938,8 +942,11 @@ static void process_files(void) + + if (matched) { + /* once matched, "n,xxx" range is dead, disabling it */ +- if (sed_cmd->beg_line > 0) ++ if (sed_cmd->beg_line > 0 ++ && !(option_mask32 & OPT_in_place) /* but not for -i */ ++ ) { + sed_cmd->beg_line = -2; ++ } + sed_cmd->in_match = !( + /* has the ending line come, or is this a single address command? */ + (sed_cmd->end_line ? +@@ -1270,9 +1277,6 @@ static void add_cmd_block(char *cmdstr) + int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int sed_main(int argc UNUSED_PARAM, char **argv) + { +- enum { +- OPT_in_place = 1 << 0, +- }; + unsigned opt; + llist_t *opt_e, *opt_f; + int status = EXIT_SUCCESS; +@@ -1292,6 +1296,7 @@ int sed_main(int argc UNUSED_PARAM, char + opt_e = opt_f = NULL; + opt_complementary = "e::f::" /* can occur multiple times */ + "nn"; /* count -n */ ++ /* -i must be first, to match OPT_in_place definition */ + opt = getopt32(argv, "irne:f:", &opt_e, &opt_f, + &G.be_quiet); /* counter for -n */ + //argc -= optind; +diff -urpN busybox-1.17.1/testsuite/sed.tests busybox-1.17.1-sed/testsuite/sed.tests +--- busybox-1.17.1/testsuite/sed.tests 2010-07-06 04:25:54.000000000 +0200 ++++ busybox-1.17.1-sed/testsuite/sed.tests 2010-08-01 04:19:26.000000000 +0200 +@@ -270,11 +270,16 @@ testing "sed a cmd ended by double backs + | two \\ + ' + +-# fisrt three lines are deleted; 4th line is matched and printed by "2,3" and by "4" ranges ++# first three lines are deleted; 4th line is matched and printed by "2,3" and by "4" ranges + testing "sed with N skipping lines past ranges on next cmds" \ + "sed -n '1{N;N;d};1p;2,3p;3p;4p'" \ + "4\n4\n" "" "1\n2\n3\n4\n" + ++testing "sed -i with address modifies all files, not only first" \ ++ "cp input input2; sed -i -e '1s/foo/bar/' input input2 && cat input input2; rm input2" \ ++ "bar\nbar\n" "foo\n" "" ++ ++ + # testing "description" "arguments" "result" "infile" "stdin" + + exit $FAILCOUNT diff --git a/package/busybox/busybox-1.17.1/busybox-1.17.1-shell.patch b/package/busybox/busybox-1.17.1/busybox-1.17.1-shell.patch index 04adc8f1d..5279b1202 100644 --- a/package/busybox/busybox-1.17.1/busybox-1.17.1-shell.patch +++ b/package/busybox/busybox-1.17.1/busybox-1.17.1-shell.patch @@ -84,3 +84,22 @@ diff -urpN busybox-1.17.1/shell/hush_test/hush-trap/signal7.tests busybox-1.17.1 +&& test x"$REAL_CHILD" = x"$PARENTS_IDEA_OF_CHILD" +echo "Bug detected: $?" +} +diff -urpN busybox-1.17.1/shell/shell_common.c busybox-1.17.1-shell/shell/shell_common.c +--- busybox-1.17.1/shell/shell_common.c 2010-07-06 04:25:54.000000000 +0200 ++++ busybox-1.17.1-shell/shell/shell_common.c 2010-07-27 08:41:43.000000000 +0200 +@@ -428,9 +428,14 @@ shell_builtin_ulimit(char **argv) + val <<= l->factor_shift; + } + //bb_error_msg("opt %c val_str:'%s' val:%lld", opt_char, val_str, (long long)val); ++ /* from man bash: "If neither -H nor -S ++ * is specified, both the soft and hard ++ * limits are set. */ ++ if (!opts) ++ opts = OPT_hard + OPT_soft; + if (opts & OPT_hard) + limit.rlim_max = val; +- if ((opts & OPT_soft) || opts == 0) ++ if (opts & OPT_soft) + limit.rlim_cur = val; + //bb_error_msg("setrlimit(%d, %lld, %lld)", l->cmd, (long long)limit.rlim_cur, (long long)limit.rlim_max); + if (setrlimit(l->cmd, &limit) < 0) { -- cgit v1.2.3 From 30887f616a11e74b786677a66226d3a5d47d8f8a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 12 Aug 2010 15:57:02 +0200 Subject: imagemagick: don't create useless debugging file For some reason, the imagemagick Buildroot .mk file creates a "datefile" file in the Buildroot source directory, probably an ancient debugging thing that has been left here for no reason. Let's get rid of it. Signed-off-by: Thomas Petazzoni --- package/imagemagick/imagemagick.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'package') diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk index 00895f593..9eb9d694d 100644 --- a/package/imagemagick/imagemagick.mk +++ b/package/imagemagick/imagemagick.mk @@ -88,7 +88,6 @@ $(IMAGEMAGICK_DIR)/.libinstall: $(IMAGEMAGICK_LIB) touch $@ $(TARGET_DIR)/usr/bin/animate: $(IMAGEMAGICK_LIB) - ls -l $(IMAGEMAGICK_LIB) >> datefile $(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-animate $(TARGET_DIR)/usr/bin/animate -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/animate touch $@ -- cgit v1.2.3 From 0ec4298153bd93f8d7efbd1890896fbac5046a7b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 12 Aug 2010 15:59:14 +0200 Subject: libglib2: add patch to rework clock_gettime() test The test for clock_gettime() in configure.in doesn't work properly when a previous package has loaded the shared configuration cache with informations about the availability of clock_gettime. A package such as ctorrent does so, which means that compiling ctorrent *then* libglib2 currently fails. According to people on the Autoconf mailing list, the libglib2 test is likely the one that needs to be fixed. The problem is that the AC_CHECK_FUNCS() test assumes that if it finds clock_gettime() it means that there's no need to add any -lrt flag to the build. Unfortunately, due to the shared configuration cache, this test is already done with -lrt, so the test succeeds, and libglib2 does not know that it needs to add -lrt to G_THREAD_LIBS and G_THREAD_LIBS_FOR_GTHREAD. So instead, we remplace the test with an AC_SEARCH_LIBS() test, followed by a test on the result of this AC_SEARCH_LIBS() test to add the necessary -lrt to G_THREAD_LIBS and G_THREAD_LIBS_FOR_GTHREAD. Therefore, even if the result for the AC_SEARCH_LIBS() test is cached due to the prior execution ctorrent ./configure script, libglib2 ./configure will properly add -lrt to the appropriate variables. Obviously, as this patch modifies the configure.in file, we enable the autoreconf step for the libglib2 package. Signed-off-by: Thomas Petazzoni --- .../libglib2-fix-clock-gettime-check.patch | 51 ++++++++++++++++++++++ package/libglib2/libglib2.mk | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 package/libglib2/libglib2-fix-clock-gettime-check.patch (limited to 'package') diff --git a/package/libglib2/libglib2-fix-clock-gettime-check.patch b/package/libglib2/libglib2-fix-clock-gettime-check.patch new file mode 100644 index 000000000..da2e4856c --- /dev/null +++ b/package/libglib2/libglib2-fix-clock-gettime-check.patch @@ -0,0 +1,51 @@ +Rework clock_gettime() test + +The test for clock_gettime() in configure.in doesn't work properly +when a previous package has loaded the shared configuration cache with +informations about the availability of clock_gettime. A package such +as ctorrent does so, which means that compiling ctorrent *then* +libglib2 currently fails. + +According to people on the Autoconf mailing list, the libglib2 test is +likely the one that needs to be fixed. The problem is that the +AC_CHECK_FUNCS() test assumes that if it finds clock_gettime() it +means that there's no need to add any -lrt flag to the +build. Unfortunately, due to the shared configuration cache, this test +is already done with -lrt, so the test succeeds, and libglib2 does not +know that it needs to add -lrt to G_THREAD_LIBS and +G_THREAD_LIBS_FOR_GTHREAD. + +So instead, we remplace the test with an AC_SEARCH_LIBS() test, +followed by a test on the result of this AC_SEARCH_LIBS() test to add +the necessary -lrt to G_THREAD_LIBS and +G_THREAD_LIBS_FOR_GTHREAD. Therefore, even if the result for the +AC_SEARCH_LIBS() test is cached due to the prior execution ctorrent +./configure script, libglib2 ./configure will properly add -lrt to the +appropriate variables. + +Signed-off-by: Thomas Petazzoni + +Index: glib-2.24.1/configure.in +=================================================================== +--- glib-2.24.1.orig/configure.in 2010-08-11 19:29:20.530916023 +0200 ++++ glib-2.24.1/configure.in 2010-08-11 19:46:41.308866269 +0200 +@@ -2392,13 +2392,14 @@ + LIBS="$glib_save_LIBS" + fi + +-AC_CHECK_FUNCS(clock_gettime, [], [ +- AC_CHECK_LIB(rt, clock_gettime, [ +- AC_DEFINE(HAVE_CLOCK_GETTIME, 1) ++AC_SEARCH_LIBS([clock_gettime], [rt], [ ++ AC_DEFINE(HAVE_CLOCK_GETTIME, 1,[Have clock_gettime]) ++]) ++ ++if test "$ac_cv_search_clock_gettime" = "-lrt"; then + G_THREAD_LIBS="$G_THREAD_LIBS -lrt" + G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS_FOR_GTHREAD -lrt" +- ]) +-]) ++fi + + AC_CACHE_CHECK(for monotonic clocks, + glib_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index 8dc1fcb83..61e8c1c38 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -9,7 +9,7 @@ LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).$(LIBGLIB2_VERSION_MINOR) LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.bz2 LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR) -LIBGLIB2_AUTORECONF = NO +LIBGLIB2_AUTORECONF = YES LIBGLIB2_LIBTOOL_PATCH = NO LIBGLIB2_INSTALL_STAGING = YES LIBGLIB2_INSTALL_TARGET = YES -- cgit v1.2.3 From 7fe50869fb98d045cca7a21ebb695f17aa2afd1a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 12 Aug 2010 21:03:28 +0200 Subject: lzo: fix host-lzo build failure when config cache is filled When the configuration cache has been filled with a value for ac_cv_host, host-lzo fails to detect the target system name. This is due to misbehaving code in the ./configure script. Therefore, we need to autoreconf the package, which in turn requires : * a little fix to the configure.ac file * a little fix to src/Makefile.am * an extraction of important parts of aclocal.m4 into acinclude.m4 Signed-off-by: Thomas Petazzoni --- package/lzo/lzo-2.03-acinclude-m4.patch | 377 ++++++++++++++++++++++++++++ package/lzo/lzo-2.03-fix-configure-ac.patch | 21 ++ package/lzo/lzo-2.03-fix-makefile-am.patch | 24 ++ package/lzo/lzo.mk | 6 + 4 files changed, 428 insertions(+) create mode 100644 package/lzo/lzo-2.03-acinclude-m4.patch create mode 100644 package/lzo/lzo-2.03-fix-configure-ac.patch create mode 100644 package/lzo/lzo-2.03-fix-makefile-am.patch (limited to 'package') diff --git a/package/lzo/lzo-2.03-acinclude-m4.patch b/package/lzo/lzo-2.03-acinclude-m4.patch new file mode 100644 index 000000000..8f860f4cc --- /dev/null +++ b/package/lzo/lzo-2.03-acinclude-m4.patch @@ -0,0 +1,377 @@ +The lzo tarball only contains an aclocal.m4, which is the result from +running aclocal. Unfortunately, it lacks the acinclude.m4 file which +would allow us to do an autoreconf of the package. Therefore, this +patch extracts from aclocal.m4 the parts that are specific to this lzo +package, and put them into an acinclude.m4 so that autoreconf on this +package will work. + +Signed-off-by: Thomas Petazzoni +--- + acinclude.m4 | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 360 insertions(+) + +Index: lzo-2.03/acinclude.m4 +=================================================================== +--- /dev/null ++++ lzo-2.03/acinclude.m4 +@@ -0,0 +1,360 @@ ++# /*********************************************************************** ++# // standard ACC macros ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ ++AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) ++])# ++ ++AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ ++AC_HEADER_TIME ++AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) ++])# ++ ++AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ ++AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) ++])# ++ ++ ++AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ ++AC_CHECK_SIZEOF(short) ++AC_CHECK_SIZEOF(int) ++AC_CHECK_SIZEOF(long) ++ ++AC_CHECK_SIZEOF(long long) ++AC_CHECK_SIZEOF(__int16) ++AC_CHECK_SIZEOF(__int32) ++AC_CHECK_SIZEOF(__int64) ++ ++AC_CHECK_SIZEOF(void *) ++AC_CHECK_SIZEOF(size_t) ++AC_CHECK_SIZEOF(ptrdiff_t) ++])# ++ ++ ++# /*********************************************************************** ++# // Check for ACC_conformance ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_ACC_ACCCHK], [ ++mfx_tmp=$1 ++mfx_save_CPPFLAGS=$CPPFLAGS ++dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here ++test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ++AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#define ACC_CONFIG_NO_HEADER 1 ++#include "acc/acc.h" ++#include "acc/acc_incd.h" ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++static void test_acc_compile_time_assert(void) { ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++} ++#undef NDEBUG ++#include ++static int test_acc_run_time_assert(int r) { ++#define ACCCHK_ASSERT(expr) assert(expr); ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++return r; ++} ++]], [[ ++test_acc_compile_time_assert(); ++if (test_acc_run_time_assert(1) != 1) return 1; ++]] ++)]) ++ ++mfx_tmp=FAILED ++_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) ++rm -f conftest.$ac_ext conftest.$ac_objext ++ ++CPPFLAGS=$mfx_save_CPPFLAGS ++ ++AC_MSG_RESULT([$mfx_tmp]) ++case x$mfx_tmp in ++ xpassed | xyes) ;; ++ *) ++ AC_MSG_NOTICE([]) ++ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) ++ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) ++ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) ++ AC_MSG_NOTICE([Thanks for your support.]) ++ AC_MSG_NOTICE([]) ++ AC_MSG_ERROR([ACC conformance test failed. Stop.]) ++dnl AS_EXIT ++ ;; ++esac ++])# mfx_ACC_ACCCHK ++ ++ ++# /*********************************************************************** ++# // Check for ACC_conformance ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_MINIACC_ACCCHK], [ ++mfx_tmp=$1 ++mfx_save_CPPFLAGS=$CPPFLAGS ++dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here ++test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ++AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#define ACC_CONFIG_NO_HEADER 1 ++#define ACC_WANT_ACC_INCD_H 1 ++#include $2 ++ ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) ++#include $2 ++ ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) ++static void test_acc_compile_time_assert(void) { ++#include $2 ++} ++ ++#undef NDEBUG ++#include ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) assert(expr); ++static int test_acc_run_time_assert(int r) { ++#include $2 ++return r; ++} ++]], [[ ++test_acc_compile_time_assert(); ++if (test_acc_run_time_assert(1) != 1) return 1; ++]] ++)]) ++ ++mfx_tmp=FAILED ++_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) ++rm -f conftest.$ac_ext conftest.$ac_objext ++ ++CPPFLAGS=$mfx_save_CPPFLAGS ++ ++AC_MSG_RESULT([$mfx_tmp]) ++case x$mfx_tmp in ++ xpassed | xyes) ;; ++ *) ++ AC_MSG_NOTICE([]) ++ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) ++ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) ++ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) ++ AC_MSG_NOTICE([Thanks for your support.]) ++ AC_MSG_NOTICE([]) ++ AC_MSG_ERROR([ACC conformance test failed. Stop.]) ++dnl AS_EXIT ++ ;; ++esac ++])# mfx_MINIACC_ACCCHK ++ ++ ++ ++# serial 1 ++ ++AC_DEFUN([mfx_PROG_CPPFLAGS], [ ++AC_MSG_CHECKING([whether the C preprocessor needs special flags]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#include ++#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) ++# include "your C preprocessor is broken 1" ++#elif (0xffffu == 0xfffffffful) ++# include "your C preprocessor is broken 2" ++#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) ++# include "your C preprocessor is broken 3" ++#endif ++]], [[ ]] ++)]) ++ ++mfx_save_CPPFLAGS=$CPPFLAGS ++mfx_tmp=ERROR ++for mfx_arg in "" -no-cpp-precomp ++do ++ CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" ++ _AC_COMPILE_IFELSE([], ++[mfx_tmp=$mfx_arg ++break]) ++done ++CPPFLAGS=$mfx_save_CPPFLAGS ++rm -f conftest.$ac_ext conftest.$ac_objext ++case x$mfx_tmp in ++ x) ++ AC_MSG_RESULT([none needed]) ;; ++ xERROR) ++ AC_MSG_RESULT([ERROR]) ++ AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) ++ ;; ++ *) ++ AC_MSG_RESULT([$mfx_tmp]) ++ CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ;; ++esac ++])# mfx_PROG_CPPFLAGS ++ ++# serial 3 ++ ++AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ ++AC_CACHE_CHECK([whether limits.h is sane], ++mfx_cv_header_sane_limits_h, ++[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ++#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) ++# if defined(__APPLE__) && defined(__GNUC__) ++# error "your preprocessor is broken - use compiler option -no-cpp-precomp" ++# else ++# include "your preprocessor is broken" ++# endif ++#endif ++#define MFX_0xffff 0xffff ++#define MFX_0xffffffffL 4294967295ul ++#if !defined(CHAR_BIT) || (CHAR_BIT != 8) ++# include "error CHAR_BIT" ++#endif ++#if !defined(UCHAR_MAX) ++# include "error UCHAR_MAX 1" ++#endif ++#if !defined(USHRT_MAX) ++# include "error USHRT_MAX 1" ++#endif ++#if !defined(UINT_MAX) ++# include "error UINT_MAX 1" ++#endif ++#if !defined(ULONG_MAX) ++# include "error ULONG_MAX 1" ++#endif ++#if !defined(SHRT_MAX) ++# include "error SHRT_MAX 1" ++#endif ++#if !defined(INT_MAX) ++# include "error INT_MAX 1" ++#endif ++#if !defined(LONG_MAX) ++# include "error LONG_MAX 1" ++#endif ++#if (UCHAR_MAX < 1) ++# include "error UCHAR_MAX 2" ++#endif ++#if (USHRT_MAX < 1) ++# include "error USHRT_MAX 2" ++#endif ++#if (UINT_MAX < 1) ++# include "error UINT_MAX 2" ++#endif ++#if (ULONG_MAX < 1) ++# include "error ULONG_MAX 2" ++#endif ++#if (UCHAR_MAX < 0xff) ++# include "error UCHAR_MAX 3" ++#endif ++#if (USHRT_MAX < MFX_0xffff) ++# include "error USHRT_MAX 3" ++#endif ++#if (UINT_MAX < MFX_0xffff) ++# include "error UINT_MAX 3" ++#endif ++#if (ULONG_MAX < MFX_0xffffffffL) ++# include "error ULONG_MAX 3" ++#endif ++#if (USHRT_MAX > UINT_MAX) ++# include "error USHRT_MAX vs UINT_MAX" ++#endif ++#if (UINT_MAX > ULONG_MAX) ++# include "error UINT_MAX vs ULONG_MAX" ++#endif ++]], [[ ++#if (USHRT_MAX == MFX_0xffff) ++{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } ++#elif (USHRT_MAX >= MFX_0xffff) ++{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } ++#endif ++#if (UINT_MAX == MFX_0xffff) ++{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } ++#elif (UINT_MAX >= MFX_0xffff) ++{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } ++#endif ++#if (ULONG_MAX == MFX_0xffff) ++{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } ++#elif (ULONG_MAX >= MFX_0xffff) ++{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } ++#endif ++#if !defined(_CRAY1) /* CRAY PVP systems */ ++#if (USHRT_MAX == MFX_0xffffffffL) ++{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } ++#elif (USHRT_MAX >= MFX_0xffffffffL) ++{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } ++#endif ++#endif /* _CRAY1 */ ++#if (UINT_MAX == MFX_0xffffffffL) ++{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } ++#elif (UINT_MAX >= MFX_0xffffffffL) ++{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } ++#endif ++#if (ULONG_MAX == MFX_0xffffffffL) ++{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } ++#elif (ULONG_MAX >= MFX_0xffffffffL) ++{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } ++#endif ++]])], ++[mfx_cv_header_sane_limits_h=yes], ++[mfx_cv_header_sane_limits_h=no])]) ++]) ++ ++# /*********************************************************************** ++# // standard ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ ++AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) ++])# ++ ++ ++# /*********************************************************************** ++# // ++# ************************************************************************/ ++ ++dnl more types which are not yet covered by ACC ++ ++AC_DEFUN([mfx_CHECK_SIZEOF], [ ++AC_CHECK_SIZEOF(__int32) ++AC_CHECK_SIZEOF(intmax_t) ++AC_CHECK_SIZEOF(uintmax_t) ++AC_CHECK_SIZEOF(intptr_t) ++AC_CHECK_SIZEOF(uintptr_t) ++ ++AC_CHECK_SIZEOF(float) ++AC_CHECK_SIZEOF(double) ++AC_CHECK_SIZEOF(long double) ++ ++AC_CHECK_SIZEOF(dev_t) ++AC_CHECK_SIZEOF(fpos_t) ++AC_CHECK_SIZEOF(mode_t) ++AC_CHECK_SIZEOF(off_t) ++AC_CHECK_SIZEOF(ssize_t) ++AC_CHECK_SIZEOF(time_t) ++])# ++ ++ ++ ++AC_DEFUN([mfx_CHECK_LIB_WINMM], [ ++if test "X$GCC" = Xyes; then ++case $host_os in ++cygwin* | mingw* | pw32*) ++ test "X$LIBS" != "X" && LIBS="$LIBS " ++ LIBS="${LIBS}-lwinmm" ;; ++*) ++ ;; ++esac ++fi ++])# diff --git a/package/lzo/lzo-2.03-fix-configure-ac.patch b/package/lzo/lzo-2.03-fix-configure-ac.patch new file mode 100644 index 000000000..26aece7b4 --- /dev/null +++ b/package/lzo/lzo-2.03-fix-configure-ac.patch @@ -0,0 +1,21 @@ +_AC_SRCPATHS doesn't exist in autoconf, _AC_SRCDIRS should be used +instead according to many reports found by Google. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: lzo-2.03/configure.ac +=================================================================== +--- lzo-2.03.orig/configure.ac ++++ lzo-2.03/configure.ac +@@ -48,7 +48,7 @@ + AM_MAINTAINER_MODE + + if test -z "$ac_abs_top_srcdir"; then +- _AC_SRCPATHS(.) ++ _AC_SRCDIRS(.) + fi + if test -r .Conf.settings1; then + . ./.Conf.settings1 diff --git a/package/lzo/lzo-2.03-fix-makefile-am.patch b/package/lzo/lzo-2.03-fix-makefile-am.patch new file mode 100644 index 000000000..9f23e40db --- /dev/null +++ b/package/lzo/lzo-2.03-fix-makefile-am.patch @@ -0,0 +1,24 @@ +Makefile.am is not allowed to override CFLAGS/CPPFLAGS, it must use +AM_CFLAGS and AM_CPPFLAGS. This is needed in order for autoreconf to +work on this package. + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: lzo-2.03/src/Makefile.am +=================================================================== +--- lzo-2.03.orig/src/Makefile.am ++++ lzo-2.03/src/Makefile.am +@@ -7,8 +7,8 @@ + SUFFIXES = .S + + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) +-CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) +-CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) ++AM_CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) ++AM_CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) + + lib_LTLIBRARIES = liblzo2.la + diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk index ed300562e..bfa66792d 100644 --- a/package/lzo/lzo.mk +++ b/package/lzo/lzo.mk @@ -7,6 +7,12 @@ LZO_VERSION:=2.03 LZO_SOURCE:=lzo-$(LZO_VERSION).tar.gz LZO_SITE:=http://www.oberhumer.com/opensource/lzo/download LZO_AUTORECONF = NO + +# lzo's configure was generated by an old autoconf, and the +# AC_CANONICAL_TARGET check fails in host-lzo when the cache has been +# filled with ac_cv_build and ac_cv_host. +HOST_LZO_AUTORECONF = YES + LZO_INSTALL_STAGING = YES LZO_INSTALL_TARGET = YES LZO_INSTALL_STAGING_OPT = CC="$(TARGET_CC)" DESTDIR=$(STAGING_DIR) install -- cgit v1.2.3 From a022ab5e0199ff5168393487c13dd9e8a95ae2c0 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Mon, 9 Aug 2010 11:44:09 -0300 Subject: Security bump php to 5.2.14 Signed-off-by: Gustavo Zacarias --- package/php/php.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package') diff --git a/package/php/php.mk b/package/php/php.mk index 962547f6f..9396311ef 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -4,7 +4,7 @@ # ############################################################# -PHP_VERSION = 5.2.13 +PHP_VERSION = 5.2.14 PHP_SOURCE = php-$(PHP_VERSION).tar.bz2 PHP_SITE = http://www.php.net/distributions PHP_INSTALL_STAGING = YES -- cgit v1.2.3 From c56087e65c60ac13f7853d67de8e70d15b811df5 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 13 Aug 2010 12:46:19 +0200 Subject: netcat: prevent build system from adding a prefix to binaries Fixes bug #2239. Signed-off-by: Thomas Petazzoni --- package/netcat/netcat.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'package') diff --git a/package/netcat/netcat.mk b/package/netcat/netcat.mk index 31f6b716c..f8263ef35 100644 --- a/package/netcat/netcat.mk +++ b/package/netcat/netcat.mk @@ -10,5 +10,6 @@ NETCAT_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/netc NETCAT_AUTORECONF:=NO NETCAT_INSTALL_STAGING:=NO NETCAT_INSTALL_TARGET:=YES +NETCAT_CONF_OPT = --program-prefix='' $(eval $(call AUTOTARGETS,package,netcat)) -- cgit v1.2.3 From 0b876d39776fdec69762b988216e5ed64dbe6ba8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 13 Aug 2010 15:35:11 +0200 Subject: libxml-parser-perl/intltool: mark as host only packages libxml-parser-perl and intltool were originally added to be built on the host, and we don't support building them on the target. So, let's mark them as such in the configuration, so that a random package configuration does not pick them up. We might later add target support for them. Signed-off-by: Thomas Petazzoni --- package/intltool/Config.in | 3 +++ package/libxml-parser-perl/Config.in | 3 +++ 2 files changed, 6 insertions(+) (limited to 'package') diff --git a/package/intltool/Config.in b/package/intltool/Config.in index 94b34f7c4..990a22712 100644 --- a/package/intltool/Config.in +++ b/package/intltool/Config.in @@ -1,5 +1,8 @@ config BR2_PACKAGE_INTLTOOL bool "intltool" + # Hide from configuration as we only support the host package + # for the moment + depends on BR2_HOST_ONLY help Utility scripts for internationalizing XML diff --git a/package/libxml-parser-perl/Config.in b/package/libxml-parser-perl/Config.in index d20a401d8..e90e50ed8 100644 --- a/package/libxml-parser-perl/Config.in +++ b/package/libxml-parser-perl/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_LIBXML_PARSER_PERL bool "libxml-parser-perl" select BR2_PACKAGE_EXPAT + # Hide from configuration as we only support the host package + # for the moment + depends on BR2_HOST_ONLY help The Perl XML::Parser module. -- cgit v1.2.3 From 66ab67661607bda03f5f2e31da9239048becbfba Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Thu, 5 Aug 2010 22:58:10 +0200 Subject: Add new upstream Lua patches and rename all patches for consistency Several new upstream patches against the latest version of Lua have appeared on http://www.lua.org/bugs.html. This commit adds them to Buildroot, and also renames the other patches to have a coherent patch naming: lua-bugX, where X is the identifier of the bug as visible on http://www.lua.org/bugs.html. Note that bug 1 and 2 are not associated with patches, which explains why the first patch is labeled lua-bug3. Fixes bug #2365. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- package/lua/lua-boolean_expression.patch | 48 --------------------------- package/lua/lua-bug3-boolean_expression.patch | 48 +++++++++++++++++++++++++++ package/lua/lua-bug4-table.patch | 22 ++++++++++++ package/lua/lua-bug5-debug_getfenv.patch | 10 ++++++ package/lua/lua-bug6-gc_performance.patch | 14 ++++++++ package/lua/lua-bug7-string_format.patch | 20 +++++++++++ package/lua/lua-bug8-io_read.patch | 14 ++++++++ package/lua/lua-debug_getfenv.patch | 10 ------ package/lua/lua-gc_performance.patch | 14 -------- package/lua/lua-table.patch | 22 ------------ 10 files changed, 128 insertions(+), 94 deletions(-) delete mode 100644 package/lua/lua-boolean_expression.patch create mode 100644 package/lua/lua-bug3-boolean_expression.patch create mode 100644 package/lua/lua-bug4-table.patch create mode 100644 package/lua/lua-bug5-debug_getfenv.patch create mode 100644 package/lua/lua-bug6-gc_performance.patch create mode 100644 package/lua/lua-bug7-string_format.patch create mode 100644 package/lua/lua-bug8-io_read.patch delete mode 100644 package/lua/lua-debug_getfenv.patch delete mode 100644 package/lua/lua-gc_performance.patch delete mode 100644 package/lua/lua-table.patch (limited to 'package') diff --git a/package/lua/lua-boolean_expression.patch b/package/lua/lua-boolean_expression.patch deleted file mode 100644 index f04eb8507..000000000 --- a/package/lua/lua-boolean_expression.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3 -+++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34 -@@ -544,15 +544,18 @@ - pc = NO_JUMP; /* always true; do nothing */ - break; - } -- case VFALSE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - invertjump(fs, e); - pc = e->u.s.info; - break; - } -+ case VFALSE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 0); - break; -@@ -572,14 +575,17 @@ - pc = NO_JUMP; /* always false; do nothing */ - break; - } -- case VTRUE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - pc = e->u.s.info; - break; - } -+ case VTRUE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 1); - break; - diff --git a/package/lua/lua-bug3-boolean_expression.patch b/package/lua/lua-bug3-boolean_expression.patch new file mode 100644 index 000000000..f04eb8507 --- /dev/null +++ b/package/lua/lua-bug3-boolean_expression.patch @@ -0,0 +1,48 @@ +--- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3 ++++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34 +@@ -544,15 +544,18 @@ + pc = NO_JUMP; /* always true; do nothing */ + break; + } +- case VFALSE: { +- pc = luaK_jump(fs); /* always jump */ +- break; +- } + case VJMP: { + invertjump(fs, e); + pc = e->u.s.info; + break; + } ++ case VFALSE: { ++ if (!hasjumps(e)) { ++ pc = luaK_jump(fs); /* always jump */ ++ break; ++ } ++ /* else go through */ ++ } + default: { + pc = jumponcond(fs, e, 0); + break; +@@ -572,14 +575,17 @@ + pc = NO_JUMP; /* always false; do nothing */ + break; + } +- case VTRUE: { +- pc = luaK_jump(fs); /* always jump */ +- break; +- } + case VJMP: { + pc = e->u.s.info; + break; + } ++ case VTRUE: { ++ if (!hasjumps(e)) { ++ pc = luaK_jump(fs); /* always jump */ ++ break; ++ } ++ /* else go through */ ++ } + default: { + pc = jumponcond(fs, e, 1); + break; + diff --git a/package/lua/lua-bug4-table.patch b/package/lua/lua-bug4-table.patch new file mode 100644 index 000000000..9ffc1bb28 --- /dev/null +++ b/package/lua/lua-bug4-table.patch @@ -0,0 +1,22 @@ +--- lua-5.1.4.orig/src/lvm.c 2007/12/28 15:32:23 2.63.1.3 ++++ lua-5.1.4/src/lvm.c 2009/07/01 20:36:59 +@@ -133,6 +133,7 @@ + + void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { + int loop; ++ TValue temp; + for (loop = 0; loop < MAXTAGLOOP; loop++) { + const TValue *tm; + if (ttistable(t)) { /* `t' is a table? */ +@@ -152,7 +153,9 @@ + callTM(L, tm, t, key, val); + return; + } +- t = tm; /* else repeat with `tm' */ ++ /* else repeat with `tm' */ ++ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */ ++ t = &temp; + } + luaG_runerror(L, "loop in settable"); + } + diff --git a/package/lua/lua-bug5-debug_getfenv.patch b/package/lua/lua-bug5-debug_getfenv.patch new file mode 100644 index 000000000..fce4d47db --- /dev/null +++ b/package/lua/lua-bug5-debug_getfenv.patch @@ -0,0 +1,10 @@ +--- lua-5.1.4.orig/src/ldblib.c 2007/12/28 15:32:23 2.63.1.3 ++++ lua-5.1.4/src/ldblib.c 2010/02/23 12:36:59 +@@ -45,6 +45,7 @@ + + + static int db_getfenv (lua_State *L) { ++ luaL_checkany(L, 1); + lua_getfenv(L, 1); + return 1; + } diff --git a/package/lua/lua-bug6-gc_performance.patch b/package/lua/lua-bug6-gc_performance.patch new file mode 100644 index 000000000..3c78525b0 --- /dev/null +++ b/package/lua/lua-bug6-gc_performance.patch @@ -0,0 +1,14 @@ +--- lua-5.1.4.orig/src/llex.c 2007/12/28 15:32:23 2.63.1.3 ++++ lua-5.1.4/src/llex.c 2010/02/23 12:36:59 +@@ -118,8 +118,10 @@ + lua_State *L = ls->L; + TString *ts = luaS_newlstr(L, str, l); + TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */ +- if (ttisnil(o)) ++ if (ttisnil(o)) { + setbvalue(o, 1); /* make sure `str' will not be collected */ ++ luaC_checkGC(L); ++ } + return ts; + } + diff --git a/package/lua/lua-bug7-string_format.patch b/package/lua/lua-bug7-string_format.patch new file mode 100644 index 000000000..68f31977f --- /dev/null +++ b/package/lua/lua-bug7-string_format.patch @@ -0,0 +1,20 @@ +--- lua-5.1.4.orig/src/lstrlib.c 2008/07/11 17:27:21 1.132.1.4 ++++ lua-5.1.4/src/lstrlib.c 2010/05/14 15:12:53 +@@ -754,6 +754,7 @@ + + + static int str_format (lua_State *L) { ++ int top = lua_gettop(L); + int arg = 1; + size_t sfl; + const char *strfrmt = luaL_checklstring(L, arg, &sfl); +@@ -768,7 +769,8 @@ + else { /* format item */ + char form[MAX_FORMAT]; /* to store the format (`%...') */ + char buff[MAX_ITEM]; /* to store the formatted item */ +- arg++; ++ if (++arg > top) ++ luaL_argerror(L, arg, "no value"); + strfrmt = scanformat(L, strfrmt, form); + switch (*strfrmt++) { + case 'c': { diff --git a/package/lua/lua-bug8-io_read.patch b/package/lua/lua-bug8-io_read.patch new file mode 100644 index 000000000..fb56bcf31 --- /dev/null +++ b/package/lua/lua-bug8-io_read.patch @@ -0,0 +1,14 @@ +--- lua-5.1.4.orig/src/liolib.c 2008/01/18 17:47:43 2.73.1.3 ++++ lua-5.1.4.orig/src/liolib.c 2010/05/14 15:29:29 +@@ -276,7 +276,10 @@ + lua_pushnumber(L, d); + return 1; + } +- else return 0; /* read fails */ ++ else { ++ lua_pushnil(L); /* "result" to be removed */ ++ return 0; /* read fails */ ++ } + } + + diff --git a/package/lua/lua-debug_getfenv.patch b/package/lua/lua-debug_getfenv.patch deleted file mode 100644 index fce4d47db..000000000 --- a/package/lua/lua-debug_getfenv.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lua-5.1.4.orig/src/ldblib.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/ldblib.c 2010/02/23 12:36:59 -@@ -45,6 +45,7 @@ - - - static int db_getfenv (lua_State *L) { -+ luaL_checkany(L, 1); - lua_getfenv(L, 1); - return 1; - } diff --git a/package/lua/lua-gc_performance.patch b/package/lua/lua-gc_performance.patch deleted file mode 100644 index 3c78525b0..000000000 --- a/package/lua/lua-gc_performance.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- lua-5.1.4.orig/src/llex.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/llex.c 2010/02/23 12:36:59 -@@ -118,8 +118,10 @@ - lua_State *L = ls->L; - TString *ts = luaS_newlstr(L, str, l); - TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */ -- if (ttisnil(o)) -+ if (ttisnil(o)) { - setbvalue(o, 1); /* make sure `str' will not be collected */ -+ luaC_checkGC(L); -+ } - return ts; - } - diff --git a/package/lua/lua-table.patch b/package/lua/lua-table.patch deleted file mode 100644 index 9ffc1bb28..000000000 --- a/package/lua/lua-table.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- lua-5.1.4.orig/src/lvm.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/lvm.c 2009/07/01 20:36:59 -@@ -133,6 +133,7 @@ - - void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { - int loop; -+ TValue temp; - for (loop = 0; loop < MAXTAGLOOP; loop++) { - const TValue *tm; - if (ttistable(t)) { /* `t' is a table? */ -@@ -152,7 +153,9 @@ - callTM(L, tm, t, key, val); - return; - } -- t = tm; /* else repeat with `tm' */ -+ /* else repeat with `tm' */ -+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */ -+ t = &temp; - } - luaG_runerror(L, "loop in settable"); - } - -- cgit v1.2.3 From e6c4ce6cef9f260226081f043b4f03dd4b0ad949 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Thu, 5 Aug 2010 16:36:34 +0200 Subject: luafilesystem: remove LARGE_FILE constraint Add a patch to luafilesystem so that it builds correctly when large files are not supported. This allows to remove the dependency of luafilesystem on large file support on the toolchain. Packages such as cgilua, wsapi and xavante, which depend on luafilesystem, also get their dependency on large file support removed. Fixes bug #2359. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni Acked-by: Gustavo Zacarias --- package/cgilua/Config.in | 4 ---- package/luafilesystem/Config.in | 6 +----- .../luafilesystem-without_large_file.patch | 20 ++++++++++++++++++++ package/luafilesystem/luafilesystem.mk | 6 +++++- package/wsapi/Config.in | 4 ---- package/xavante/Config.in | 4 ---- 6 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 package/luafilesystem/luafilesystem-without_large_file.patch (limited to 'package') diff --git a/package/cgilua/Config.in b/package/cgilua/Config.in index a74e49f53..b43ba97d1 100644 --- a/package/cgilua/Config.in +++ b/package/cgilua/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_CGILUA bool "cgilua" - depends on BR2_LARGEFILE select BR2_PACKAGE_LUA_SHARED_LIBRARY select BR2_PACKAGE_LUAFILESYSTEM help @@ -8,6 +7,3 @@ config BR2_PACKAGE_CGILUA and manipulating input data from Web forms. http://luaforge.net/projects/cgilua/ - -comment "cgilua requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/luafilesystem/Config.in b/package/luafilesystem/Config.in index 6cb6c2475..edcb414a9 100644 --- a/package/luafilesystem/Config.in +++ b/package/luafilesystem/Config.in @@ -1,12 +1,8 @@ config BR2_PACKAGE_LUAFILESYSTEM bool "luafilesystem" - depends on BR2_LARGEFILE select BR2_PACKAGE_LUA_SHARED_LIBRARY help LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. - http://luaforge.net/projects/luafilesystem/ - -comment "luafilesystem requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE + http://keplerproject.github.com/luafilesystem/ diff --git a/package/luafilesystem/luafilesystem-without_large_file.patch b/package/luafilesystem/luafilesystem-without_large_file.patch new file mode 100644 index 000000000..b1f41c09d --- /dev/null +++ b/package/luafilesystem/luafilesystem-without_large_file.patch @@ -0,0 +1,20 @@ +diff --git a/src/lfs.c b/src/lfs.c +index 85f01e3..ed49f50 100644 +--- a/src/lfs.c ++++ b/src/lfs.c +@@ -22,13 +22,13 @@ + + #ifndef _WIN32 + #ifndef _AIX +-#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ ++//#define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ + #else + #define _LARGE_FILES 1 /* AIX */ + #endif + #endif + +-#define _LARGEFILE64_SOURCE ++//#define _LARGEFILE64_SOURCE + + #include + #include diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk index a27080cd6..e68873414 100644 --- a/package/luafilesystem/luafilesystem.mk +++ b/package/luafilesystem/luafilesystem.mk @@ -8,8 +8,12 @@ LUAFILESYSTEM_VERSION = 1.5.0 LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem LUAFILESYSTEM_DEPENDENCIES = lua +ifeq ($(BR2_LARGEFILE),y) +LFS_CFLAGS = -D_FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE +endif + define LUAFILESYSTEM_BUILD_CMDS - $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -fPIC" + $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) $(LFS_CFLAGS) -fPIC" endef define LUAFILESYSTEM_INSTALL_TARGET_CMDS diff --git a/package/wsapi/Config.in b/package/wsapi/Config.in index 472bbfcee..362164848 100644 --- a/package/wsapi/Config.in +++ b/package/wsapi/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_WSAPI bool "wsapi" - depends on BR2_LARGEFILE # luafilesystem select BR2_PACKAGE_COXPCALL select BR2_PACKAGE_LUAFILESYSTEM select BR2_PACKAGE_RINGS @@ -8,6 +7,3 @@ config BR2_PACKAGE_WSAPI API that abstracts the web server from Lua web applications. http://keplerproject.github.com/wsapi/ - -comment "wsapi requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/xavante/Config.in b/package/xavante/Config.in index a1b47c33b..a7df53021 100644 --- a/package/xavante/Config.in +++ b/package/xavante/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XAVANTE bool "xavante" - depends on BR2_LARGEFILE # luafilesystem select BR2_PACKAGE_LUA_SHARED_LIBRARY select BR2_PACKAGE_CGILUA select BR2_PACKAGE_COPAS @@ -13,6 +12,3 @@ config BR2_PACKAGE_XAVANTE architecture based on URI mapped handlers. http://keplerproject.github.com/xavante/ - -comment "xavante requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE -- cgit v1.2.3 From 8305f6ffbc391b25a24b25257089c1e0c99bd9aa Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 22 Aug 2010 08:01:55 +0200 Subject: lua: make sure that CFLAGS are passed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were passing a custom MYCFLAGS value to Lua's Makefile, but because of $(TARGET_CONFIGURE_OPTS), we were also passing a CFLAGS variable, which was overriding Lua's internal CFLAGS variable. The result was that MYCFLAGS wasn't taken into account. Extracted from the patch proposed by François Perrad in bug #2353. Signed-off-by: Thomas Petazzoni --- package/lua/lua.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/lua/lua.mk b/package/lua/lua.mk index d66be9fd3..598eea140 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -24,7 +24,9 @@ endif define LUA_BUILD_CMDS sed -i -e 's/-O2//' $(@D)/src/Makefile sed -i -e 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc - $(MAKE) $(TARGET_CONFIGURE_OPTS) MYCFLAGS="$(LUA_MYCFLAGS)" \ + $(MAKE) \ + CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ + MYCFLAGS="$(TARGET_CFLAGS) $(LUA_MYCFLAGS)" \ MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \ PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all endef -- cgit v1.2.3 From d3de556d28b0e92541ade939a58706bc94ed8ab4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 22 Aug 2010 08:28:02 +0200 Subject: sysvinit: make sure to link against libcrypt sysvinit Makefile checks if /usr/lib/libcrypt.a exists to determine whether it should link against libcrypt or not. This test fails on distributions such as Fedora, in which /usr/lib/libcrypt.a does not exist (it is in /usr/lib64), but where libcrypt is available on the target. As libcrypt is available in both uClibc and gclibc, we just force sysvinit to link against libcrypt. Fixes bug #2401. Signed-off-by: Thomas Petazzoni --- package/sysvinit/sysvinit.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk index 0b827e615..09aaf741f 100644 --- a/package/sysvinit/sysvinit.mk +++ b/package/sysvinit/sysvinit.mk @@ -21,7 +21,9 @@ $(SYSVINIT_DIR)/.unpacked: $(DL_DIR)/$(SYSVINIT_SOURCE) touch $@ $(SYSVINIT_DIR)/$(SYSVINIT_BINARY): $(SYSVINIT_DIR)/.unpacked - CFLAGS="$(TARGET_CFLAGS)" $(MAKE) CC="$(TARGET_CC)" -C $(SYSVINIT_DIR)/src + # Force sysvinit to link against libcrypt as it otherwise + # use an incorrect test to see if it's available + CFLAGS="$(TARGET_CFLAGS)" $(MAKE) CC="$(TARGET_CC)" LCRYPT="-lcrypt" -C $(SYSVINIT_DIR)/src $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY): $(SYSVINIT_DIR)/$(SYSVINIT_BINARY) for x in halt init shutdown; do \ -- cgit v1.2.3 From 311e0a6fc49a2135a3a5e1e63fe8b77c184cb8c9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 22 Aug 2010 08:38:36 +0200 Subject: sysvinit: remove unneeded dependency on ncurses Signed-off-by: Thomas Petazzoni --- package/sysvinit/Config.in | 1 - package/sysvinit/sysvinit.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'package') diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in index 82826dc93..34ec391c5 100644 --- a/package/sysvinit/Config.in +++ b/package/sysvinit/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_SYSVINIT bool "sysvinit" - select BR2_PACKAGE_NCURSES help /sbin/init - parent of all processes diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk index 09aaf741f..ef7c71321 100644 --- a/package/sysvinit/sysvinit.mk +++ b/package/sysvinit/sysvinit.mk @@ -30,7 +30,7 @@ $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY): $(SYSVINIT_DIR)/$(SYSVINIT_BINARY) install -D $(SYSVINIT_DIR)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ done -sysvinit: ncurses $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY) +sysvinit: $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY) sysvinit-source: $(DL_DIR)/$(SYSVINIT_SOURCE) -- cgit v1.2.3