From 20bc694f2104c26846fd26f3703b2b3226f68492 Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 18 May 2009 04:33:28 +0000 Subject: Only use mremap() on systems that have it. On others, like NetBSD 4.0, fall back to munmap() and a fresh mmap(). Fixes PR 38164. Theoretically a build fix, but bump PKGREVISION as a precaution. --- audio/libvisual-plugins/Makefile | 4 +- audio/libvisual-plugins/distinfo | 8 +- audio/libvisual-plugins/patches/patch-ac | 262 ++++++++++++++++++++++++++++++- audio/libvisual-plugins/patches/patch-ad | 29 +++- audio/libvisual-plugins/patches/patch-ae | 34 ++++ audio/libvisual-plugins/patches/patch-af | 17 ++ 6 files changed, 340 insertions(+), 14 deletions(-) create mode 100644 audio/libvisual-plugins/patches/patch-ae create mode 100644 audio/libvisual-plugins/patches/patch-af (limited to 'audio/libvisual-plugins') diff --git a/audio/libvisual-plugins/Makefile b/audio/libvisual-plugins/Makefile index 594629a87f9..3a079b2b376 100644 --- a/audio/libvisual-plugins/Makefile +++ b/audio/libvisual-plugins/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.21 2009/01/04 22:32:04 shattered Exp $ +# $NetBSD: Makefile,v 1.22 2009/05/18 04:33:28 dholland Exp $ # DISTNAME= libvisual-plugins-0.4.0 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= audio graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libvisual/} diff --git a/audio/libvisual-plugins/distinfo b/audio/libvisual-plugins/distinfo index ef625e7c0a2..00e08aafdec 100644 --- a/audio/libvisual-plugins/distinfo +++ b/audio/libvisual-plugins/distinfo @@ -1,9 +1,11 @@ -$NetBSD: distinfo,v 1.8 2007/10/10 09:26:21 rillig Exp $ +$NetBSD: distinfo,v 1.9 2009/05/18 04:33:28 dholland Exp $ SHA1 (libvisual-plugins-0.4.0.tar.gz) = 20490573c282d900ec0bd05133cb3707640254f5 RMD160 (libvisual-plugins-0.4.0.tar.gz) = f7a82f4a9e4dec3e877833612ece570ffbf2404d Size (libvisual-plugins-0.4.0.tar.gz) = 828631 bytes SHA1 (patch-aa) = 9c84c7d8af69d603ea8ce4077247a217952c0cb3 SHA1 (patch-ab) = 31a380ed59ed9eed1e5516c44fec54c1e7dcf25c -SHA1 (patch-ac) = dea36f303b2b3f8d5aea970b22c06743490d07cc -SHA1 (patch-ad) = 569785ee5c26cf7e58abbf0ff2e08e20bb515675 +SHA1 (patch-ac) = b431acd28d9ff7c8bf5a8655fe4969f08ad80772 +SHA1 (patch-ad) = 9f9adc7bc9074b6474b83a245be67f1db753d645 +SHA1 (patch-ae) = ce54b7682f0d7a184a15392ee8f3a7cd2510be13 +SHA1 (patch-af) = 35e2b6517a7c7bd5605fd6593a113f184d8dc1b3 diff --git a/audio/libvisual-plugins/patches/patch-ac b/audio/libvisual-plugins/patches/patch-ac index 3f821a9a35a..3b9e7a522c7 100644 --- a/audio/libvisual-plugins/patches/patch-ac +++ b/audio/libvisual-plugins/patches/patch-ac @@ -1,8 +1,260 @@ -$NetBSD: patch-ac,v 1.1 2006/07/03 23:36:05 wiz Exp $ +$NetBSD: patch-ac,v 1.2 2009/05/18 04:33:28 dholland Exp $ ---- configure.orig 2006-07-03 22:48:54.000000000 +0000 -+++ configure -@@ -23466,11 +23466,11 @@ fi +Respin from autoconf after changes in patch-ae. +(Note: must use autoconf-2.59, not current.) + +--- configure.orig 2006-03-20 13:48:36.000000000 -0500 ++++ configure 2009-05-18 00:11:15.000000000 -0400 +@@ -4911,7 +4911,8 @@ fi + + + +-for ac_func in floor gettimeofday memmove memset pow sqrt ++ ++for ac_func in floor gettimeofday memmove memset pow sqrt mremap + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 +@@ -6211,7 +6212,7 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 6214 "configure"' > conftest.$ac_ext ++ echo '#line 6215 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -7716,11 +7717,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7719: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7720: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7723: \$? = $ac_status" >&5 ++ echo "$as_me:7724: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -7978,11 +7979,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7981: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7982: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7985: \$? = $ac_status" >&5 ++ echo "$as_me:7986: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -8040,11 +8041,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8043: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8044: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:8047: \$? = $ac_status" >&5 ++ echo "$as_me:8048: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -9425,7 +9426,7 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 9428 "configure"' > conftest.$ac_ext ++ echo '#line 9429 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -10296,7 +10297,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&5) ++ (eval echo "\"\$as_me:12646: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:12649: \$? = $ac_status" >&5 ++ echo "$as_me:12650: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -12704,11 +12705,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:12707: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:12708: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:12711: \$? = $ac_status" >&5 ++ echo "$as_me:12712: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -13219,7 +13220,7 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 13222 "configure"' > conftest.$ac_ext ++ echo '#line 13223 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -14090,7 +14091,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&5) ++ (eval echo "\"\$as_me:15077: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:15080: \$? = $ac_status" >&5 ++ echo "$as_me:15081: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -15135,11 +15136,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15138: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15139: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:15142: \$? = $ac_status" >&5 ++ echo "$as_me:15143: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -16500,7 +16501,7 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 16503 "configure"' > conftest.$ac_ext ++ echo '#line 16504 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -17273,11 +17274,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:17276: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17277: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:17280: \$? = $ac_status" >&5 ++ echo "$as_me:17281: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -17535,11 +17536,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:17538: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17539: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:17542: \$? = $ac_status" >&5 ++ echo "$as_me:17543: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -17597,11 +17598,11 @@ else + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:17600: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17601: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:17604: \$? = $ac_status" >&5 ++ echo "$as_me:17605: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -18982,7 +18983,7 @@ linux*) + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) +- echo '#line 18985 "configure"' > conftest.$ac_ext ++ echo '#line 18986 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -19853,7 +19854,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&2;} -@@ -23559,10 +23559,10 @@ fi +@@ -23559,10 +23560,10 @@ fi if test "$HAVE_GSTREAMER" = "yes"; then build_actor_plugins="$build_actor_plugins gstreamer" else diff --git a/audio/libvisual-plugins/patches/patch-ad b/audio/libvisual-plugins/patches/patch-ad index 5a1d476cf16..0889103748a 100644 --- a/audio/libvisual-plugins/patches/patch-ad +++ b/audio/libvisual-plugins/patches/patch-ad @@ -1,11 +1,16 @@ -$NetBSD: patch-ad,v 1.1 2007/10/10 09:26:21 rillig Exp $ +$NetBSD: patch-ad,v 1.2 2009/05/18 04:33:28 dholland Exp $ ---- plugins/input/mplayer/input_mplayer.c.orig 2006-01-22 13:25:27.000000000 +0000 -+++ plugins/input/mplayer/input_mplayer.c 2007-10-10 09:20:05.000000000 +0000 -@@ -176,6 +176,10 @@ int inp_mplayer_init( VisPluginData *plu +NetBSD's mremap takes an extra argument; also not everything, +including NetBSD 4.x, has mremap at all. + +--- plugins/input/mplayer/input_mplayer.c.orig 2006-01-22 08:25:27.000000000 -0500 ++++ plugins/input/mplayer/input_mplayer.c 2009-05-17 23:40:38.000000000 -0400 +@@ -176,9 +176,28 @@ int inp_mplayer_init( VisPluginData *plu return -6; } ++#ifdef HAVE_MREMAP ++ +#if defined(__NetBSD__) +# define mremap(a, b, c, d) (mremap)((a), (b), NULL, (c), (d)) +#endif @@ -13,3 +18,19 @@ $NetBSD: patch-ad,v 1.1 2007/10/10 09:26:21 rillig Exp $ priv->mmap_area = mremap( priv->mmap_area, sizeof( mplayer_data_t ), sizeof( mplayer_data_t ) + priv->mmap_area->bs, 0 ); ++ ++#else /* no mremap() */ ++ ++ { ++ size_t size = priv->mmap_area->bs; ++ ++ munmap(priv->mmap_area, sizeof(mplayer_data_t)); ++ priv->mmap_area = mmap(NULL, sizeof(mplayer_data_t) + size, ++ PROT_READ, MAP_SHARED, priv->fd, 0); ++ } ++ ++#endif ++ + if ( (int)priv->mmap_area == -1 ) + { + visual_log( VISUAL_LOG_CRITICAL, diff --git a/audio/libvisual-plugins/patches/patch-ae b/audio/libvisual-plugins/patches/patch-ae new file mode 100644 index 00000000000..a0478db9ee4 --- /dev/null +++ b/audio/libvisual-plugins/patches/patch-ae @@ -0,0 +1,34 @@ +$NetBSD: patch-ae,v 1.1 2009/05/18 04:33:28 dholland Exp $ + +Don't treat version numbers as shell variables (formerly only in patch-ac). +Check for existence of mremap(). + +--- configure.ac.orig 2006-03-16 11:50:41.000000000 -0500 ++++ configure.ac 2009-05-18 00:09:52.000000000 -0400 +@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([fcntl.h unistd.h stdli + + dnl Library functions. + AC_FUNC_MALLOC +-AC_CHECK_FUNCS([floor gettimeofday memmove memset pow sqrt]) ++AC_CHECK_FUNCS([floor gettimeofday memmove memset pow sqrt mremap]) + AC_CHECK_FUNC([munmap], lv_have_munmap=yes, lv_have_munmap=no) + AC_FUNC_MMAP + +@@ -127,7 +127,7 @@ if test "$ENABLE_PLUGIN_GDKPIXBUF" = "ye + if test "$HAVE_GTK" = "yes"; then + build_actor_plugins="$build_actor_plugins gdkpixbuf" + else +- AC_MSG_WARN([*** GTK+ >= ${gtk_required_version} is not found. ++ AC_MSG_WARN([*** GTK+ >= gtk_required_version is not found. + The libvisual GdkPixbuf image loader plugin won't be build. + GdkPixbuf is included within gtk-2.0 and newer, which can be + downloaded at http://www.gtk.org/]) +@@ -148,7 +148,7 @@ if test "$ENABLE_GSTREAMER_PLUGIN" = "ye + if test "$HAVE_GSTREAMER" = "yes"; then + build_actor_plugins="$build_actor_plugins gstreamer" + else +- AC_MSG_WARN([*** GStreamer >= ${gst_required_version} is not found. ++ AC_MSG_WARN([*** GStreamer >= gst_required_version is not found. + The libvisual GStreamer viewer plugin won't be build. + GStreamer can be downloaded from http://www.gstreamer.org/]) + fi diff --git a/audio/libvisual-plugins/patches/patch-af b/audio/libvisual-plugins/patches/patch-af new file mode 100644 index 00000000000..f34b111c10c --- /dev/null +++ b/audio/libvisual-plugins/patches/patch-af @@ -0,0 +1,17 @@ +$NetBSD: patch-af,v 1.1 2009/05/18 04:33:29 dholland Exp $ + +Respin from autoheader after changes in patch-ae. +(Note: must use autoconf-2.59, not current.) + +--- config.h.in.orig 2009-05-18 00:15:06.000000000 -0400 ++++ config.h.in 2009-05-18 00:15:10.000000000 -0400 +@@ -74,6 +74,9 @@ + /* Define to 1 if you have a working `mmap' system call. */ + #undef HAVE_MMAP + ++/* Define to 1 if you have the `mremap' function. */ ++#undef HAVE_MREMAP ++ + /* Define to 1 if you have the `pow' function. */ + #undef HAVE_POW + -- cgit v1.2.3