1 diff -urN opkg-4993/configure.ac opkg-4993.new/configure.ac
2 --- opkg-4993/configure.ac 2009-05-17 18:15:52.000000000 +0200
3 +++ opkg-4993.new/configure.ac 2009-05-17 18:17:09.000000000 +0200
9 -PKG_CHECK_MODULES(CURL, libcurl)
11 + AC_HELP_STRING([--enable-curl], [Enable use of libcurl instead of wget
13 + [want_curl="$enableval"], [want_curl="yes"])
15 +if test "x$want_curl" = "xyes"; then
17 + PKG_CHECK_MODULES(CURL, libcurl)
18 + AC_DEFINE(HAVE_CURL, 1, [Define if you want to use libcurl instead of wget])
23 diff -urN opkg-4993/libopkg/opkg.c opkg-4993.new/libopkg/opkg.c
24 --- opkg-4993/libopkg/opkg.c 2009-05-17 18:15:50.000000000 +0200
25 +++ opkg-4993.new/libopkg/opkg.c 2009-05-17 18:17:09.000000000 +0200
32 #include <curl/curl.h>
35 * @brief Check the accessibility of repositories. It will try to access the repository to check if the respository is accessible throught current network status.
36 * @param opkg The opkg_t
40 err = opkg_download(opkg->conf, iter1->data, "/dev/null", NULL, NULL);
42 if (!(err == CURLE_OK ||
43 err == CURLE_HTTP_RETURNED_ERROR ||
44 err == CURLE_FILE_COULDNT_READ_FILE ||
50 str_list_elt_deinit(iter1);
53 diff -urN opkg-4993/libopkg/opkg_download.c opkg-4993.new/libopkg/opkg_download.c
54 --- opkg-4993/libopkg/opkg_download.c 2009-05-17 18:15:50.000000000 +0200
55 +++ opkg-4993.new/libopkg/opkg_download.c 2009-05-17 18:17:09.000000000 +0200
57 General Public License for more details.
61 #include <curl/curl.h>
67 setenv("no_proxy", conf->no_proxy, 1);
73 FILE * file = fopen (tmp_file_location, "w");
78 +#else /* if wget is selected */
80 + /* XXX: BUG rewrite to use execvp or else busybox's internal wget -Jamey 7/23/2002 */
81 + sprintf_alloc(&cmd, "wget --passive-ftp %s %s%s %s%s -P %s %s",
82 + (conf->http_proxy || conf->ftp_proxy) ? "--proxy=on" : "",
83 + conf->proxy_user ? "--proxy-user=" : "",
84 + conf->proxy_user ? conf->proxy_user : "",
85 + conf->proxy_passwd ? "--proxy-passwd=" : "",
86 + conf->proxy_passwd ? conf->proxy_passwd : "",
92 + opkg_message(conf,OPKG_ERROR, "%s: ERROR: Command failed with return value %d: `%s'\n",
93 + __FUNCTION__, err, cmd);
95 + unlink(tmp_file_location);
96 + free(tmp_file_location);
104 err = file_move(tmp_file_location, dest_file_name);