Update cURL to 7.21.3 and fix its librtmp detection. In the process:

- disable the -Werror build option by popular demand
- do not override the user's debug and optimization settings

PR:		150854 (the debug and optimization CFLAGS)
Reported by:	Anonymous <swell.k@gmail.com>
This commit is contained in:
Peter Pentchev 2010-12-19 20:04:23 +00:00
parent f97736f66f
commit 6387b07b2f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=266593
7 changed files with 118 additions and 30 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= curl
PORTVERSION= 7.21.1
PORTVERSION= 7.21.3
CATEGORIES= ftp ipv6 www
MASTER_SITES= http://curl.haxx.se/download/ \
ftp://ftp.sunet.se/pub/www/utilities/curl/ \
@ -54,7 +54,7 @@ USE_PERL5_BUILD= yes
USE_BZIP2= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-pop3 --enable-smtp --enable-imap --enable-rtsp \
--disable-threaded-resolver
--disable-threaded-resolver --disable-werror
MAKE_JOBS_SAFE= yes
OPTIONS= CARES "Asynchronous DNS resolution via c-ares" off \
@ -71,8 +71,7 @@ OPTIONS= CARES "Asynchronous DNS resolution via c-ares" off \
CA_BUNDLE "Install CA bundle for OpenSSL" on \
PROXY "Proxy support" on \
RTMP "RTMP streams support" off \
TRACKMEMORY "Enable curl memory diagnostic output" off \
WERROR "Treat compilation warnings as errors" on
TRACKMEMORY "Enable curl memory diagnostic output" off
.include <bsd.port.pre.mk>
@ -204,12 +203,7 @@ CONFIGURE_ARGS+= --enable-proxy
CONFIGURE_ARGS+= --disable-proxy
.endif
.if defined(WITH_WERROR)
CONFIGURE_ARGS+= --enable-werror
.else
CONFIGURE_ARGS+= --disable-werror
.endif
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}"
.if defined(ADDFLAGS)
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
.endif

View file

@ -1,3 +1,2 @@
MD5 (curl-7.21.1.tar.bz2) = eafde5b933bce1c1dca82d1054c8d967
SHA256 (curl-7.21.1.tar.bz2) = 653b3214005c778a8c642af4e5dea46c74f7bf51017a568bb8725ea9eda73643
SIZE (curl-7.21.1.tar.bz2) = 2150291
SHA256 (curl-7.21.3.tar.bz2) = 4fa554c56fdb09c299185a2c4c94416560e42a7e40655335f327e4d67c48bc39
SIZE (curl-7.21.3.tar.bz2) = 2194975

View file

@ -1,11 +1,11 @@
Description: Build and install the documentation as usual, no special handling.
Forwarded: https://sourceforge.net/tracker/?func=detail&aid=2897155&group_id=976&atid=100976
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-09-12
Last-Update: 2010-12-18
--- a/Makefile.in
+++ b/Makefile.in
@@ -310,9 +310,9 @@
@@ -311,9 +311,9 @@
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
bin_SCRIPTS = curl-config
@ -18,7 +18,7 @@ Last-Update: 2010-09-12
pkgconfig_DATA = libcurl.pc
all: all-recursive
@@ -873,12 +873,10 @@
@@ -874,12 +874,10 @@
# We extend the standard install with a custom hook:
install-data-hook:
cd include && $(MAKE) install

View file

@ -1,16 +1,109 @@
Description: Fix a bashism - "test" uses "=", not "==".
Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3064939&group_id=976&atid=100976
Description: Tweak the build for a FreeBSD environment.
Respect user-supplied CFLAGS
Use the FreeBSD location of pkg-config's library directory.
Check for librtmp in sensible locations in all cases.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-09-12
Last-Update: 2010-12-19
--- a/configure
+++ b/configure
@@ -2992,7 +2992,7 @@
@@ -14201,10 +14201,10 @@
flags_dbg_all="$flags_dbg_all -gdwarf-2"
flags_dbg_all="$flags_dbg_all -gvms"
flags_dbg_yes="-g"
- flags_dbg_off="-g0"
+ flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
- flags_opt_off="-O0"
+ flags_opt_off=""
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -15041,6 +15041,9 @@
tmp_CFLAGS="$CFLAGS"
tmp_CPPFLAGS="$CPPFLAGS"
+# Do not remove the user-supplied debug flags in CFLAGS
+# PR: 150854
+if false; then
ac_var_stripped=""
for word1 in $tmp_CFLAGS; do
ac_var_strip_word="no"
@@ -15071,6 +15074,7 @@
done
tmp_CPPFLAGS="$ac_var_stripped"
squeeze tmp_CPPFLAGS
+fi
CURL_CFLAG_EXTRAS=""
-if test X"$want_werror" == Xyes; then
+if test X"$want_werror" = Xyes; then
CURL_CFLAG_EXTRAS="-Werror"
fi
#
if test "$want_debug" = "yes"; then
@@ -15283,6 +15287,9 @@
#
if test "$honor_optimize_option" = "yes"; then
+# Do not remove the user-supplied optimization flags in CFLAGS
+# PR: 150854
+if false; then
ac_var_stripped=""
for word1 in $tmp_CFLAGS; do
ac_var_strip_word="no"
@@ -15313,6 +15320,7 @@
done
tmp_CPPFLAGS="$ac_var_stripped"
squeeze tmp_CPPFLAGS
+fi
if test "$want_optimize" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5
@@ -19224,7 +19232,8 @@
PKGTEST="no"
PREFIX_OPENSSL=$OPT_SSL
- OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
+ # Use the FreeBSD location of the pkg-config libdir
+ OPENSSL_PCDIR="$LOCALBASE/libdata/pkgconfig"
{ $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
if test -e "$OPENSSL_PCDIR/openssl.pc"; then
@@ -21264,29 +21273,30 @@
;;
off)
LIB_RTMP="-lrtmp"
+ LD_RTMP=""
+ CPP_RTMP=""
+ DIR_RTMP=""
;;
*)
PREFIX_RTMP=$OPT_LIBRTMP
+ LIB_RTMP="-lrtmp"
+ LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
+ CPP_RTMP=-I${PREFIX_RTMP}/include
+ DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
;;
esac
- if test -n "$PREFIX_RTMP"; then
- LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
- CPP_RTMP=-I${PREFIX_RTMP}/include
- DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
- fi
-
LDFLAGS="$LDFLAGS $LD_RTMP"
CPPFLAGS="$CPPFLAGS $CPP_RTMP"
LIBS="$LIBS $LIB_RTMP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5
-$as_echo_n "checking for RTMP_Init in -lrtmp... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in $LIB_RTMP" >&5
+$as_echo_n "checking for RTMP_Init in $LIB_RTMP... " >&6; }
if test "${ac_cv_lib_rtmp_RTMP_Init+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrtmp $LIBS"
+LIBS="$LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

View file

@ -1,11 +1,11 @@
Description: Different handling of signals and threads.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-09-12
Last-Update: 2010-12-18
--- a/lib/url.c
+++ b/lib/url.c
@@ -842,6 +842,10 @@
@@ -857,6 +857,10 @@
data->progress.flags |= PGRS_HIDE;
data->state.current_speed = -1; /* init to negative == impossible */

View file

@ -1,11 +1,11 @@
Description: Use fstat() instead of stat() to avoid a race condition.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-09-12
Last-Update: 2010-12-18
--- a/src/main.c
+++ b/src/main.c
@@ -4842,33 +4842,34 @@
@@ -4887,33 +4887,34 @@
break;
}
@ -33,7 +33,7 @@ Last-Update: 2010-09-12
- outs.stream=(FILE *) fopen(outfile, config->resume_from?"ab":"wb");
+ /* (always open for appending, it has no effect on new files) */
+ outs.stream=(FILE *) fopen(outfile, "ab");
if (!outs.stream) {
if(!outs.stream) {
helpf(config->errors, "Can't open '%s'!\n", outfile);
free(url);
res = CURLE_WRITE_ERROR;

View file

@ -200,6 +200,8 @@ libdata/pkgconfig/libcurl.pc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simplepost.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simplessl.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smooth-gtk-thread.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smtp-multi.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/synctime.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/threaded-ssl.c
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%