summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Config.in4
-rw-r--r--package/Makefile.in6
-rw-r--r--package/Makefile.package.in6
-rw-r--r--package/busybox/Config.in6
-rw-r--r--package/busybox/busybox-1.17.0/busybox-1.17.0-dos2unix.patch12
-rw-r--r--package/busybox/busybox.mk8
-rw-r--r--package/dhcp/Config.in8
-rw-r--r--package/dhcp/dhcp.mk126
-rw-r--r--package/dhcp/dhcp_xecute.patch452
-rw-r--r--package/mysql_client/mysql_client-5.1.47-ac_cache_check.patch151
-rw-r--r--package/mysql_client/mysql_client-5.1.47-configure-ps-cache-check.patch35
-rw-r--r--package/mysql_client/mysql_client-5.1.47-use-new-readline-iface.patch17
-rw-r--r--package/mysql_client/mysql_client.mk18
-rw-r--r--package/sdl/sdl.mk17
14 files changed, 290 insertions, 576 deletions
diff --git a/package/Config.in b/package/Config.in
index eba21da0c..fe9693933 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -75,11 +75,11 @@ endmenu
menu "Games"
source "package/games/ace_of_penguins/Config.in"
-source "package/games/doom-wad/Config.in"
source "package/games/gnuchess/Config.in"
-source "package/games/lxdoom/Config.in"
source "package/games/magiccube4d/Config.in"
+source "package/games/lxdoom/Config.in"
source "package/games/prboom/Config.in"
+source "package/games/doom-wad/Config.in"
source "package/games/rubix/Config.in"
endmenu
diff --git a/package/Makefile.in b/package/Makefile.in
index 189806d7b..1962466e2 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -127,10 +127,10 @@ TARGET_RANLIB = $(TARGET_CROSS)ranlib
TARGET_OBJCOPY = $(TARGET_CROSS)objcopy
TARGET_OBJDUMP = $(TARGET_CROSS)objdump
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-TARGET_LDCONFIG = $(TARGET_CROSS)ldconfig
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+ifeq ($(shell $(SHELL) -c "command -v $(TARGET_CROSS)ldconfig"),)
TARGET_LDCONFIG = /sbin/ldconfig
+else
+TARGET_LDCONFIG = $(TARGET_CROSS)ldconfig
endif
ifeq ($(BR2_STRIP_strip),y)
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index c476de98d..d76b7913d 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -41,17 +41,17 @@ UPPERCASE = $(strip $(eval __tmp := $1) \
$(__tmp))
define KCONFIG_ENABLE_OPT
- $(SED) "/$(1)/d" $(2)
+ $(SED) "/\\<$(1)\\>/d" $(2)
echo "$(1)=y" >> $(2)
endef
define KCONFIG_SET_OPT
- $(SED) "/$(1)/d" $(3)
+ $(SED) "/\\<$(1)\\>/d" $(3)
echo "$(1)=$(2)" >> $(3)
endef
define KCONFIG_DISABLE_OPT
- $(SED) "/$(1)/d" $(2)
+ $(SED) "/\\<$(1)\\>/d" $(2)
echo "# $(1) is not set" >> $(2)
endef
diff --git a/package/busybox/Config.in b/package/busybox/Config.in
index a513380b6..001640651 100644
--- a/package/busybox/Config.in
+++ b/package/busybox/Config.in
@@ -79,12 +79,6 @@ config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
Show packages in menuconfig that are potentially also provided
by busybox.
-config BR2_PACKAGE_BUSYBOX_SKELETON
- bool "use minimal target skeleton"
- help
- Use a minimal target skeleton. Make sure to select mdev
- which is used to populate /dev/.
-
endif
if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
diff --git a/package/busybox/busybox-1.17.0/busybox-1.17.0-dos2unix.patch b/package/busybox/busybox-1.17.0/busybox-1.17.0-dos2unix.patch
new file mode 100644
index 000000000..dde59e046
--- /dev/null
+++ b/package/busybox/busybox-1.17.0/busybox-1.17.0-dos2unix.patch
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.17.0/coreutils/dos2unix.c busybox-1.17.0-dos2unix/coreutils/dos2unix.c
+--- busybox-1.17.0/coreutils/dos2unix.c 2010-06-24 04:40:43.000000000 +0200
++++ busybox-1.17.0-dos2unix/coreutils/dos2unix.c 2010-07-17 22:40:21.021422169 +0200
+@@ -92,7 +92,7 @@ int dos2unix_main(int argc UNUSED_PARAM,
+ do {
+ /* might be convert(NULL) if there is no filename given */
+ convert(*argv, conv_type);
+- } while (*++argv);
++ } while (*argv && *++argv);
+
+ return 0;
+ }
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 78bf21a40..d7b86cbd2 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -85,13 +85,6 @@ define BUSYBOX_PREFER_STATIC
endef
endif
-# Enable mdev for busybox skeleton
-ifeq ($(BR2_PACKAGE_BUSYBOX_SKELETON),y)
-define BUSYBOX_SKELETON
- $(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
# Disable usage of inetd if netkit-base package is selected
ifeq ($(BR2_PACKAGE_NETKITBASE),y)
define BUSYBOX_NETKITBASE
@@ -120,7 +113,6 @@ define BUSYBOX_CONFIGURE_CMDS
$(BUSYBOX_SET_IPV6)
$(BUSYBOX_SET_RPC)
$(BUSYBOX_PREFER_STATIC)
- $(BUSYBOX_SKELETON)
$(BUSYBOX_NETKITBASE)
$(BUSYBOX_NETKITTELNET)
@yes "" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE="$(TARGET_CROSS)" \
diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in
index caf273fbb..eeb237c5b 100644
--- a/package/dhcp/Config.in
+++ b/package/dhcp/Config.in
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_ISC_DHCP
+config BR2_PACKAGE_DHCP
bool "DHCP support"
help
DHCP relay agent from the ISC DHCP distribution.
@@ -7,21 +7,21 @@ config BR2_PACKAGE_ISC_DHCP
config BR2_PACKAGE_DHCP_SERVER
bool "dhcp server"
- depends on BR2_PACKAGE_ISC_DHCP
+ depends on BR2_PACKAGE_DHCP
help
DHCP server from the ISC DHCP distribution.
config BR2_PACKAGE_DHCP_RELAY
bool "dhcp relay"
- depends on BR2_PACKAGE_ISC_DHCP
+ depends on BR2_PACKAGE_DHCP
help
DHCP relay agent from the ISC DHCP distribution.
config BR2_PACKAGE_DHCP_CLIENT
bool "dhcp client"
- depends on BR2_PACKAGE_ISC_DHCP
+ depends on BR2_PACKAGE_DHCP
help
DHCP client from the ISC DHCP distribution.
diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
index 57e0a5dcd..bf3f775bd 100644
--- a/package/dhcp/dhcp.mk
+++ b/package/dhcp/dhcp.mk
@@ -3,108 +3,56 @@
# dhcp
#
#############################################################
-DHCP_VERSION:=3.0.5
-DHCP_SOURCE:=dhcp-$(DHCP_VERSION).tar.gz
-DHCP_SITE:=ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history
-DHCP_CAT:=$(ZCAT)
-DHCP_DIR:=$(BUILD_DIR)/dhcp-$(DHCP_VERSION)
-DHCP_SERVER_BINARY:=work.linux-2.2/server/dhcpd
-DHCP_RELAY_BINARY:=work.linux-2.2/relay/dhcrelay
-DHCP_CLIENT_BINARY:=work.linux-2.2/client/dhclient
-DHCP_SERVER_TARGET_BINARY:=usr/sbin/dhcpd
-DHCP_RELAY_TARGET_BINARY:=usr/sbin/dhcrelay
-DHCP_CLIENT_TARGET_BINARY:=usr/sbin/dhclient
-BVARS=PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
- -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\"' \
- VARDB=/var/lib/dhcp
+DHCP_VERSION = 4.1.1-P1
+DHCP_SOURCE = dhcp-$(DHCP_VERSION).tar.gz
+DHCP_SITE = http://ftp.isc.org/isc/dhcp/
+DHCP_CONF_ENV = ac_cv_file__dev_random=yes
+DHCP_CONF_OPT = \
+ --localstatedir=/var/lib/dhcp \
+ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
+ --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
+ --with-srv-pid-file=/var/run/dhcpd.pid \
+ --with-cli-pid-file=/var/run/dhclient.pid \
+ --with-relay-pid-file=/var/run/dhcrelay.pid \
+ --disable-dhcpv6
-$(DL_DIR)/$(DHCP_SOURCE):
- $(call DOWNLOAD,$(DHCP_SITE),$(DHCP_SOURCE))
-
-dhcp-source: $(DL_DIR)/$(DHCP_SOURCE)
-
-dhcp_server-source: dhcp-source
-dhcp_relay-source: dhcp-source
-dhcp_client-source: dhcp-source
-
-$(DHCP_DIR)/.unpacked: $(DL_DIR)/$(DHCP_SOURCE)
- $(DHCP_CAT) $(DL_DIR)/$(DHCP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(DHCP_DIR) package/dhcp/ dhcp\*.patch
- touch $@
-
-$(DHCP_DIR)/.configured: $(DHCP_DIR)/.unpacked
- (cd $(DHCP_DIR); \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure; \
- )
- touch $@
-
-$(DHCP_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_DIR)/.configured
- $(MAKE) $(TARGET_CONFIGURE_OPTS) $(BVARS) -C $(DHCP_DIR)
- $(STRIPCMD) $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
-
-$(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
+ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
+define DHCP_INSTALL_SERVER
mkdir -p $(TARGET_DIR)/var/lib
- (cd $(TARGET_DIR)/var/lib; \
- ln -snf /tmp dhcp; \
- )
- $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_SERVER_BINARY) \
- $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY)
- mkdir -p $(TARGET_DIR)/etc/init.d
- $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server \
- $(TARGET_DIR)/etc/init.d
+ (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
+ $(INSTALL) -m 0755 -D $(@D)/server/dhcpd $(TARGET_DIR)/usr/sbin/dhcpd
+ $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server $(TARGET_DIR)/etc/init.d
mkdir -p $(TARGET_DIR)/etc/dhcp
- $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \
- $(TARGET_DIR)/etc/dhcp/dhcpd.conf
- rm -rf $(TARGET_DIR)/share/locale
+ $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf $(TARGET_DIR)/etc/dhcp/dhcpd.conf
+endef
+endif
-$(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
+ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
+define DHCP_INSTALL_RELAY
mkdir -p $(TARGET_DIR)/var/lib
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
- $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_RELAY_BINARY) \
- $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
- mkdir -p $(TARGET_DIR)/etc/init.d
- $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay \
- $(TARGET_DIR)/etc/init.d
+ $(INSTALL) -m 0755 -D $(DHCP_DIR)/relay/dhcrelay $(TARGET_DIR)/usr/sbin/
+ $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay $(TARGET_DIR)/etc/init.d
+endef
+endif
-$(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
+ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
+define DHCP_INSTALL_CLIENT
mkdir -p $(TARGET_DIR)/var/lib
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
- $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_CLIENT_BINARY) \
- $(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY)
+ $(INSTALL) -m 0755 -D $(DHCP_DIR)/client/dhclient $(TARGET_DIR)/usr/sbin
mkdir -p $(TARGET_DIR)/etc/dhcp
$(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
$(TARGET_DIR)/etc/dhcp/dhclient.conf
$(INSTALL) -m 0755 -D package/dhcp/dhclient-script \
$(TARGET_DIR)/sbin/dhclient-script
+endef
+endif
-dhcp_server: $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY)
-
-dhcp_relay: $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
-
-dhcp_client: $(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY)
-
-dhcp-clean:
- -$(MAKE) -C $(DHCP_DIR) clean
-
-dhcp-dirclean:
- rm -rf $(DHCP_DIR)
+define DHCP_INSTALL_TARGET_CMDS
+ $(DHCP_INSTALL_RELAY)
+ $(DHCP_INSTALL_SERVER)
+ $(DHCP_INSTALL_CLIENT)
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-#ifeq ($(BR2_PACKAGE_ISC_DHCP),y)
-#TARGETS+=dhcp
-#endif
-ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
-TARGETS+=dhcp_server
-endif
-ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
-TARGETS+=dhcp_relay
-endif
-ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
-TARGETS+=dhcp_client
-endif
+$(eval $(call AUTOTARGETS,package,dhcp))
diff --git a/package/dhcp/dhcp_xecute.patch b/package/dhcp/dhcp_xecute.patch
deleted file mode 100644
index 0daff103f..000000000
--- a/package/dhcp/dhcp_xecute.patch
+++ /dev/null
@@ -1,452 +0,0 @@
-diff -urN dhcp-3.0.2.orig/common/conflex.c dhcp-3.0.2/common/conflex.c
---- dhcp-3.0.2.orig/common/conflex.c 2004-11-24 10:39:15.000000000 -0700
-+++ dhcp-3.0.2/common/conflex.c 2005-02-24 12:32:12.000000000 -0700
-@@ -676,6 +676,8 @@
- return EVAL;
- if (!strcasecmp (atom + 1, "ncapsulate"))
- return ENCAPSULATE;
-+ if (!strcasecmp (atom + 1, "xecute"))
-+ return EXECUTE;
- break;
- case 'f':
- if (!strcasecmp (atom + 1, "atal"))
-diff -urN dhcp-3.0.2.orig/common/dhcp-eval.5 dhcp-3.0.2/common/dhcp-eval.5
---- dhcp-3.0.2.orig/common/dhcp-eval.5 2005-01-19 13:00:52.000000000 -0700
-+++ dhcp-3.0.2/common/dhcp-eval.5 2005-02-24 12:32:12.000000000 -0700
-@@ -409,7 +409,32 @@
- Rebind - DHCP client is in the REBINDING state - it has an IP address,
- and is trying to contact any server to renew it. The next message to
- be sent will be a DHCPREQUEST, which will be broadcast.
--.RE
-+.PP
-+.B execute (\fIcommand-path\fB, \fIdata-expr1\fB ... \fIdata-exprN\fB)\fR
-+.PP
-+External command execution is possibly through execute expressions. Execute
-+takes a variable number of arguments, where the first is the command
-+name (full path or only the name of the executable) and following zero
-+or more are data-expressions which values will be passed as external
-+arguments. It returns the return code of the external command.
-+.PP
-+Execute is synchronous, and the program will block until the external
-+command being run has finished. Please note that lengthy program
-+execution (for example, in an "on commit" in the dhcpd) may result in
-+bad performance and timed out clients. Try keeping the execution times
-+short.
-+.PP
-+Passing user-supplied data might be dangerous. Check input buffers
-+and make sure the external command handles all kinds of "unusual"
-+characters (shell special characters in sh-scripts etc) correctly.
-+.PP
-+It is possible to use the execute expression in any context, not only
-+on events. If you put it in a regular scope in the configuration file
-+you will execute that command every time a scope is evaluated.
-+.PP
-+The execute expression is only available if you have defined ENABLE_EXECUTE
-+in site.h before compilation.
-+RE
- .SH REFERENCE: LOGGING
- Logging statements may be used to send information to the standard logging
- channels. A logging statement includes an optional priority (\fBfatal\fR,
-diff -urN dhcp-3.0.2.orig/common/parse.c dhcp-3.0.2/common/parse.c
---- dhcp-3.0.2.orig/common/parse.c 2004-09-30 14:38:31.000000000 -0600
-+++ dhcp-3.0.2/common/parse.c 2005-02-24 12:32:12.000000000 -0700
-@@ -3639,7 +3639,56 @@
- return 0;
- }
- break;
--
-+ #ifdef ENABLE_EXECUTE
-+ case EXECUTE:
-+ token = next_token (&val, (unsigned *)0, cfile);
-+
-+ if (!expression_allocate (expr, MDL))
-+ log_fatal ("can't allocate expression.");
-+
-+ token = next_token (&val, (unsigned *)0, cfile);
-+ if (token != LPAREN) {
-+ parse_warn (cfile, "left parenthesis expected.");
-+ skip_to_semi (cfile);
-+ *lose = 1;
-+ return 0;
-+ }
-+ token = next_token (&val, (unsigned *)0, cfile);
-+ (*expr) -> data.funcall.name =
-+ dmalloc (strlen (val) + 1, MDL);
-+ if (!(*expr)->data.funcall.name)
-+ log_fatal ("can't allocate command name");
-+ strcpy ((*expr) -> data.funcall.name, val);
-+ token = next_token (&val, (unsigned *)0, cfile);
-+ ep = &((*expr) -> data.funcall.arglist);
-+ while (token == COMMA) {
-+ if (!expression_allocate (ep, MDL))
-+ log_fatal ("can't allocate expression");
-+ if (!parse_data_expression (&(*ep) -> data.arg.val,
-+ cfile, lose)) {
-+ skip_to_semi (cfile);
-+ *lose = 1;
-+ return 0;
-+ }
-+ ep = &((*ep) -> data.arg.next);
-+ token = next_token (&val, (unsigned *)0, cfile);
-+ }
-+ (*expr) -> op = expr_execute;
-+ if (token != RPAREN) {
-+ parse_warn (cfile, "right parenthesis expected.");
-+ skip_to_semi (cfile);
-+ *lose = 1;
-+ return 0;
-+ }
-+ break;
-+ #else
-+ case EXECUTE:
-+ parse_warn (cfile, "define ENABLE_EXECUTE in site.h to enable execute expressions.");
-+ skip_to_semi (cfile);
-+ *lose = 1;
-+ return 0;
-+ break;
-+ #endif
- case ENCODE_INT:
- token = next_token (&val, (unsigned *)0, cfile);
- token = next_token (&val, (unsigned *)0, cfile);
-diff -urN dhcp-3.0.2.orig/common/print.c dhcp-3.0.2/common/print.c
---- dhcp-3.0.2.orig/common/print.c 2004-06-17 14:54:39.000000000 -0600
-+++ dhcp-3.0.2/common/print.c 2005-02-24 12:32:12.000000000 -0700
-@@ -459,6 +459,7 @@
- {
- unsigned rv, left;
- const char *s;
-+ struct expression* next_arg;
-
- switch (expr -> op) {
- case expr_none:
-@@ -483,7 +484,8 @@
- return rv;
- }
- break;
--
-+
-+
- case expr_equal:
- if (len > 6) {
- rv = 4;
-@@ -1024,6 +1026,29 @@
- buf [rv++] = 0;
- return rv;
- }
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ rv = 11 + strlen (expr -> data.funcall.name);
-+ if (len > rv + 2) {
-+ sprintf (buf,
-+ "(execute \"%s\"",
-+ expr -> data.funcall.name);
-+ for(next_arg = expr -> data.funcall.arglist;
-+ next_arg;
-+ next_arg = next_arg -> data.arg.next) {
-+ if (len > rv + 3)
-+ buf [rv++] = ' ';
-+ rv += print_subexpression (next_arg ->
-+ data.arg.val,
-+ buf + rv,
-+ len - rv - 2);
-+ }
-+ buf [rv++] = ')';
-+ buf [rv] = 0;
-+ return rv;
-+ }
-+ break;
-+ #endif
- }
- return 0;
- }
-diff -urN dhcp-3.0.2.orig/common/tree.c dhcp-3.0.2/common/tree.c
---- dhcp-3.0.2.orig/common/tree.c 2004-11-24 10:39:16.000000000 -0700
-+++ dhcp-3.0.2/common/tree.c 2005-02-24 12:32:12.000000000 -0700
-@@ -50,6 +50,113 @@
- int resolver_inited = 0;
- #endif
-
-+#ifdef ENABLE_EXECUTE
-+static unsigned long execute (char** args)
-+{
-+pid_t p = fork();
-+if (p > 0) {
-+int status;
-+waitpid (p, &status, 0);
-+return WEXITSTATUS(status);
-+}
-+else if(p == 0) {
-+execvp (args[0], args);
-+log_error ("Unable to execute %s: %s", args[0],
-+strerror(errno));
-+_exit(127);
-+} else {
-+log_fatal ("unable to fork");
-+}
-+return 1; /* never reached */
-+}
-+
-+#define CAPACITY_INCREMENT 8
-+static void append_to_ary (char*** ary_ptr, int* ary_size, int* ary_capacity,
-+char* new_element)
-+{
-+(*ary_size)++;
-+if (*ary_size > *ary_capacity) {
-+char** new_ary;
-+int new_ary_capacity = *ary_capacity + CAPACITY_INCREMENT;
-+new_ary = dmalloc(new_ary_capacity*sizeof(char *), MDL);
-+if (!new_ary)
-+log_fatal ("no memory for array.");
-+if (*ary_ptr != NULL) {
-+memcpy (new_ary, *ary_ptr,
-+(*ary_capacity)*sizeof(char *));
-+dfree (*ary_ptr, MDL);
-+}
-+*ary_ptr = new_ary;
-+*ary_capacity = new_ary_capacity;
-+}
-+(*ary_ptr)[*ary_size-1] = new_element;
-+}
-+
-+static char* data_string_to_char_string (struct data_string* d)
-+{
-+char* str = dmalloc (d->len+1, MDL);
-+if (!str)
-+log_fatal ("no memory for string.");
-+/* FIXME: should one use d -> buffer -> data or d -> data? are
-+they equivalent? */
-+strncpy (str, d -> data, d -> len);
-+str[d->len] = '\0';
-+return str;
-+}
-+
-+static int evaluate_execute (unsigned long* result, struct packet *packet,
-+struct lease *lease,
-+struct client_state *client_state,
-+struct option_state *in_options,
-+struct option_state *cfg_options,
-+struct binding_scope **scope,
-+struct expression* expr)
-+{
-+int status;
-+int cmd_status;
-+int i;
-+struct data_string ds;
-+struct expression* next_arg;
-+char** arg_ary = NULL;
-+int arg_ary_size = 0;
-+int arg_ary_capacity = 0;
-+append_to_ary (&arg_ary, &arg_ary_size, &arg_ary_capacity,
-+ expr -> data.funcall.name);
-+for(next_arg = expr -> data.funcall.arglist;
-+next_arg;
-+next_arg = next_arg -> data.arg.next) {
-+memset (&ds, 0, sizeof ds);
-+status = (evaluate_data_expression
-+(&ds, packet,
-+lease, client_state, in_options,
-+cfg_options, scope,
-+next_arg -> data.arg.val,
-+MDL));
-+if (!status) {
-+if (arg_ary) {
-+for (i=1; i<arg_ary_size; i++)
-+dfree (arg_ary[i], MDL);
-+dfree(arg_ary, MDL);
-+}
-+return 0;
-+}
-+append_to_ary (&arg_ary, &arg_ary_size, &arg_ary_capacity,
-+ data_string_to_char_string(&ds));
-+data_string_forget (&ds, MDL);
-+}
-+#if defined (DEBUG_EXPRESSIONS)
-+log_debug ("exec: execute");
-+#endif
-+append_to_ary (&arg_ary, &arg_ary_size, &arg_ary_capacity, NULL);
-+*result = execute (arg_ary);
-+for (i=1; i<arg_ary_size-1; i++)
-+dfree (arg_ary[i], MDL);
-+dfree(arg_ary, MDL);
-+return 1;
-+}
-+#endif
-+
-+
- pair cons (car, cdr)
- caddr_t car;
- pair cdr;
-@@ -861,6 +968,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_const_int:
- case expr_lease_time:
- case expr_dns_transaction:
-@@ -1224,6 +1334,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_const_int:
- case expr_lease_time:
- case expr_dns_transaction:
-@@ -2087,6 +2200,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_const_int:
- case expr_lease_time:
- case expr_dns_transaction:
-@@ -2595,7 +2711,12 @@
- #endif
- return 0;
- }
--
-+#ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ return evaluate_execute (result, packet, lease,
-+ client_state, in_options,
-+ cfg_options, scope, expr);
-+#endif
- case expr_ns_add:
- case expr_ns_delete:
- case expr_ns_exists:
-@@ -3008,6 +3129,9 @@
- return (expr -> op == expr_extract_int8 ||
- expr -> op == expr_extract_int16 ||
- expr -> op == expr_extract_int32 ||
-+ #ifdef ENABLE_EXECUTE
-+ expr -> op == expr_execute ||
-+ #endif
- expr -> op == expr_const_int ||
- expr -> op == expr_lease_time ||
- expr -> op == expr_dns_transaction ||
-@@ -3043,6 +3167,9 @@
- expr -> op == expr_extract_int8 ||
- expr -> op == expr_extract_int16 ||
- expr -> op == expr_extract_int32 ||
-+ #ifdef ENABLE_EXECUTE
-+ expr -> op == expr_execute ||
-+ #endif
- expr -> op == expr_dns_transaction);
- }
-
-@@ -3069,6 +3196,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_encode_int8:
- case expr_encode_int16:
- case expr_encode_int32:
-@@ -3165,6 +3295,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_encode_int8:
- case expr_encode_int16:
- case expr_encode_int32:
-@@ -3225,6 +3358,8 @@
- int firstp;
- {
- struct expression *e;
-+ struct expression* next_arg;
-+
- const char *s;
- char obuf [65];
- int scol;
-@@ -3696,7 +3831,27 @@
- expr -> data.variable);
- col = token_print_indent (file, col, indent, "", "", ")");
- break;
--
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ col = token_print_indent (file, col, indent, "", "","execute");
-+ col = token_print_indent (file, col, indent, " ", "","(");
-+ scol = col;
-+ /* FIXME: use token_print_indent_concat() here? */
-+ col = token_print_indent (file, col, scol, "", "","\"");
-+ col = token_print_indent (file, col, scol, "", "",expr -> data.funcall.name);
-+ col = token_print_indent (file, col, scol, "", "","\"");
-+ for(next_arg = expr -> data.funcall.arglist;
-+ next_arg;
-+ next_arg = next_arg -> data.arg.next) {
-+ col = token_print_indent (file, col, scol, "", " ",",");
-+ col = write_expression (file,
-+ next_arg -> data.arg.val,
-+ col, scol, 0);
-+ }
-+ col = token_print_indent (file, col, indent, "", "",")");
-+
-+ break;
-+#endif
- default:
- log_fatal ("invalid expression type in print_expression: %d",
- expr -> op);
-@@ -3915,6 +4070,9 @@
- case expr_extract_int8:
- case expr_extract_int16:
- case expr_extract_int32:
-+ #ifdef ENABLE_EXECUTE
-+ case expr_execute:
-+ #endif
- case expr_encode_int8:
- case expr_encode_int16:
- case expr_encode_int32:
-diff -urN dhcp-3.0.2.orig/includes/dhctoken.h dhcp-3.0.2/includes/dhctoken.h
---- dhcp-3.0.2.orig/includes/dhctoken.h 2004-09-21 13:25:38.000000000 -0600
-+++ dhcp-3.0.2/includes/dhctoken.h 2005-02-24 12:33:21.000000000 -0700
-@@ -308,7 +308,8 @@
- DOMAIN_NAME = 613,
- DO_FORWARD_UPDATE = 614,
- KNOWN_CLIENTS = 615,
-- ATSFP = 616
-+ ATSFP = 616,
-+ EXECUTE = 616
- };
-
- #define is_identifier(x) ((x) >= FIRST_TOKEN && \
-diff -urN dhcp-3.0.2.orig/includes/site.h dhcp-3.0.2/includes/site.h
---- dhcp-3.0.2.orig/includes/site.h 2002-03-12 11:33:39.000000000 -0700
-+++ dhcp-3.0.2/includes/site.h 2005-02-24 12:32:12.000000000 -0700
-@@ -167,6 +167,12 @@
-
- /* #define DHCPD_LOG_FACILITY LOG_DAEMON */
-
-+/* Define this if you want to be able to execute external commands
-+ during conditional evaluation. */
-+
-+/* #define ENABLE_EXECUTE */
-+
-+
- /* Define this if you aren't debugging and you want to save memory
- (potentially a _lot_ of memory) by allocating leases in chunks rather
- than one at a time. */
-diff -urN dhcp-3.0.2.orig/includes/tree.h dhcp-3.0.2/includes/tree.h
---- dhcp-3.0.2.orig/includes/tree.h 2004-06-10 11:59:31.000000000 -0600
-+++ dhcp-3.0.2/includes/tree.h 2005-02-24 12:32:12.000000000 -0700
-@@ -150,6 +150,9 @@
- expr_hardware,
- expr_packet,
- expr_const_data,
-+ #ifdef ENABLE_EXECUTE
-+ expr_execute,
-+ #endif
- expr_extract_int8,
- expr_extract_int16,
- expr_extract_int32,
diff --git a/package/mysql_client/mysql_client-5.1.47-ac_cache_check.patch b/package/mysql_client/mysql_client-5.1.47-ac_cache_check.patch
new file mode 100644
index 000000000..6bdfeaef3
--- /dev/null
+++ b/package/mysql_client/mysql_client-5.1.47-ac_cache_check.patch
@@ -0,0 +1,151 @@
+Patch borrowed from
+http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493.
+
+It allows to override through ac_cv_* variables various checks that
+cannot be performed when cross-compiling.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+diff -Naur mysql-5.1.47-old/storage/innodb_plugin/plug.in mysql-5.1.47-new/storage/innodb_plugin/plug.in
+--- mysql-5.1.47-old/storage/innodb_plugin/plug.in 2010-05-20 09:55:10.000000000 -0700
++++ mysql-5.1.47-new/storage/innodb_plugin/plug.in 2010-05-20 09:56:12.000000000 -0700
+@@ -53,9 +53,10 @@
+ esac
+ AC_SUBST(INNODB_DYNAMIC_CFLAGS)
+
+- AC_MSG_CHECKING(whether GCC atomic builtins are available)
++ AC_CACHE_CHECK([whether GCC atomic builtins are available],
++ [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS],
+ # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ int main()
+ {
+@@ -95,18 +96,23 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
+- [GCC atomic builtins are available])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
++ [GCC atomic builtins are available])
++ fi
+
+- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
++ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC],
+ # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ #include <pthread.h>
+ #include <string.h>
+@@ -126,14 +132,18 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
+- [pthread_t can be used by GCC atomic builtins])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
++ [pthread_t can be used by GCC atomic builtins])
++ fi
+
+ AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
+ # either define HAVE_IB_SOLARIS_ATOMICS or not
+@@ -147,9 +157,10 @@
+ are available])
+ )
+
+- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
++ AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions],
++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS],
+ # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ #include <pthread.h>
+ #include <string.h>
+@@ -180,28 +191,33 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
+- [pthread_t can be used by solaris atomics])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
++ [pthread_t can be used by solaris atomics])
++ fi
+
+ # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
+ # to use in the source
+ AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
+
+ # Check for x86 PAUSE instruction
+- AC_MSG_CHECKING(for x86 PAUSE instruction)
++ AC_CACHE_CHECK([for x86 PAUSE instruction],
++ [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION],
+ # We have to actually try running the test program, because of a bug
+ # in Solaris on x86_64, where it wrongly reports that PAUSE is not
+ # supported when trying to run an application. See
+ # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
+ # We use ib_ prefix to avoid collisoins if this code is added to
+ # mysql's configure.in.
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ int main() {
+ __asm__ __volatile__ ("pause");
+@@ -209,16 +225,21 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
++ fi
+ ])
+
+ # vim: set ft=config:
diff --git a/package/mysql_client/mysql_client-5.1.47-configure-ps-cache-check.patch b/package/mysql_client/mysql_client-5.1.47-configure-ps-cache-check.patch
new file mode 100644
index 000000000..d7bf6285e
--- /dev/null
+++ b/package/mysql_client/mysql_client-5.1.47-configure-ps-cache-check.patch
@@ -0,0 +1,35 @@
+Patch borrowed from
+http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch
+
+It allows to specify through ac_cv_FIND_PROC how ps should be used on
+the target to find the PID of a program.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: mysql-4.1.22/configure.in
+===================================================================
+--- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000
++++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000
+@@ -471,8 +471,8 @@
+
+ # Lock for PS
+ AC_PATH_PROG(PS, ps, ps)
+-AC_MSG_CHECKING("how to check if pid exists")
+-PS=$ac_cv_path_PS
++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
++[
+ # Linux style
+ if $PS p $$ 2> /dev/null | grep $0 > /dev/null
+ then
+@@ -511,8 +511,9 @@
+ AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
+ esac
+ fi
+-AC_SUBST(FIND_PROC)
+-AC_MSG_RESULT("$FIND_PROC")
++ac_cv_FIND_PROC="$FIND_PROC"
++])
++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
diff --git a/package/mysql_client/mysql_client-5.1.47-use-new-readline-iface.patch b/package/mysql_client/mysql_client-5.1.47-use-new-readline-iface.patch
new file mode 100644
index 000000000..34bc035e6
--- /dev/null
+++ b/package/mysql_client/mysql_client-5.1.47-use-new-readline-iface.patch
@@ -0,0 +1,17 @@
+Tell MySQL to use the new readline interface even when an external
+readline is being used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: mysql_client-5.1.47/configure.in
+===================================================================
+--- mysql_client-5.1.47.orig/configure.in 2010-07-15 23:49:35.000000000 +0200
++++ mysql_client-5.1.47/configure.in 2010-07-15 23:50:03.000000000 +0200
+@@ -2700,6 +2700,7 @@
+ # this way we avoid linking commercial source with GPL readline
+ readline_link="-lreadline"
+ want_to_use_readline="yes"
++ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
+ elif [test "$mysql_cv_libedit_interface" = "yes"]
+ then
+ # Use libedit
diff --git a/package/mysql_client/mysql_client.mk b/package/mysql_client/mysql_client.mk
index 44036531e..377df89d8 100644
--- a/package/mysql_client/mysql_client.mk
+++ b/package/mysql_client/mysql_client.mk
@@ -3,23 +3,31 @@
# MySQL 5.1 Client
#
#############################################################
-MYSQL_CLIENT_VERSION = 5.1.23-rc
+MYSQL_CLIENT_VERSION = 5.1.47
MYSQL_CLIENT_SOURCE = mysql-$(MYSQL_CLIENT_VERSION).tar.gz
-MYSQL_CLIENT_SITE = http://mirrors.24-7-solutions.net/pub/mysql/Downloads/MySQL-5.1
+MYSQL_CLIENT_SITE = http://downloads.mysql.com/archives/mysql-5.1/
MYSQL_CLIENT_INSTALL_TARGET = YES
MYSQL_CLIENT_INSTALL_STAGING = YES
MYSQL_CLIENT_DEPENDENCIES = readline ncurses
+MYSQL_CLIENT_AUTORECONF=YES
+
+MYSQL_CLIENT_CONF_ENV = \
+ ac_cv_sys_restartable_syscalls=yes \
+ ac_cv_path_PS=/bin/ps \
+ ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
+ mysql_cv_new_rl_interface=yes
-MYSQL_CLIENT_CONF_ENV = ac_cv_sys_restartable_syscalls=yes
MYSQL_CLIENT_CONF_OPT = \
--program-prefix="" \
--without-ndb-binlog \
--without-server \
--without-docs \
--without-man \
- --without-readline \
--without-libedit \
- --with-readline=$(STAGING_DIR)/usr \
+ --without-readline \
--with-low-memory \
--enable-thread-safe-client \
$(ENABLE_DEBUG)
diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk
index 87c753370..4fd3ad433 100644
--- a/package/sdl/sdl.mk
+++ b/package/sdl/sdl.mk
@@ -44,13 +44,22 @@ endif
SDL_CONF_OPT += --enable-pulseaudio=no \
--disable-arts \
--disable-esd \
- --disable-nasm
+ --disable-nasm \
+ --disable-video-ps3
-define SDL_POST_INSTALL_STAGING_HOOKS
- $(SED) 's^libdir=\$${exec_prefix}^libdir=/usr^' \
- $(STAGING_DIR)/usr/bin/sdl-config
+# Fixup prefix= and exec_prefix= in sdl-config, and remove the
+# -Wl,-rpath option.
+define SDL_FIXUP_SDL_CONFIG
+ $(SED) 's%prefix=/usr%prefix=$(STAGING_DIR)/usr%' \
+ $(STAGING_DIR)/usr/bin/sdl-config
+ $(SED) 's%exec_prefix=/usr%exec_prefix=$(STAGING_DIR)/usr%' \
+ $(STAGING_DIR)/usr/bin/sdl-config
+ $(SED) 's%-Wl,-rpath,\$${libdir}%%' \
+ $(STAGING_DIR)/usr/bin/sdl-config
endef
+SDL_POST_INSTALL_STAGING_HOOKS+=SDL_FIXUP_SDL_CONFIG
+
define SDL_INSTALL_TARGET_CMDS
cp -dpf $(STAGING_DIR)/usr/lib/libSDL*.so* $(TARGET_DIR)/usr/lib/
endef