Wed Jun 26 21:59:10 2013 UTC ()
Fix locale usage on NetBSD/current.


(joerg)
diff -r1.4 -r1.5 pkgsrc/multimedia/mlt/distinfo
diff -r0 -r1.1 pkgsrc/multimedia/mlt/patches/patch-src_framework_mlt__properties.c
diff -r0 -r1.1 pkgsrc/multimedia/mlt/patches/patch-src_framework_mlt__property.c
diff -r0 -r1.1 pkgsrc/multimedia/mlt/patches/patch-src_framework_mlt__property.h

cvs diff -r1.4 -r1.5 pkgsrc/multimedia/mlt/distinfo (expand / switch to unified diff)

--- pkgsrc/multimedia/mlt/distinfo 2012/11/21 22:24:27 1.4
+++ pkgsrc/multimedia/mlt/distinfo 2013/06/26 21:59:10 1.5
@@ -1,7 +1,10 @@ @@ -1,7 +1,10 @@
1$NetBSD: distinfo,v 1.4 2012/11/21 22:24:27 abs Exp $ 1$NetBSD: distinfo,v 1.5 2013/06/26 21:59:10 joerg Exp $
2 2
3SHA1 (mlt-0.8.6.tar.gz) = 616e807ba9f8fd8d6c9f87cb04416885c471596c 3SHA1 (mlt-0.8.6.tar.gz) = 616e807ba9f8fd8d6c9f87cb04416885c471596c
4RMD160 (mlt-0.8.6.tar.gz) = 354130bdd1d42e55f01703d2eac25a947d86f377 4RMD160 (mlt-0.8.6.tar.gz) = 354130bdd1d42e55f01703d2eac25a947d86f377
5Size (mlt-0.8.6.tar.gz) = 1104163 bytes 5Size (mlt-0.8.6.tar.gz) = 1104163 bytes
6SHA1 (patch-configure) = 52cc702fd561d45699bb7d5dce2b43a80fb9d474 6SHA1 (patch-configure) = 52cc702fd561d45699bb7d5dce2b43a80fb9d474
 7SHA1 (patch-src_framework_mlt__properties.c) = b8113fc58f0dce0d70cb4a0ba7534723e7924ad5
 8SHA1 (patch-src_framework_mlt__property.c) = 61ea83f6d20c139741d5bb95456f0d1a4a9b3fa4
 9SHA1 (patch-src_framework_mlt__property.h) = b6aec829f7f9f876711984c2edaba245a968e90d
7SHA1 (patch-src_modules_videostab_stab_estimate.c) = 58549c2ee2780604c043637a25dd39e92f90b7ce 10SHA1 (patch-src_modules_videostab_stab_estimate.c) = 58549c2ee2780604c043637a25dd39e92f90b7ce

File Added: pkgsrc/multimedia/mlt/patches/patch-src_framework_mlt__properties.c
$NetBSD: patch-src_framework_mlt__properties.c,v 1.1 2013/06/26 21:59:10 joerg Exp $

--- src/framework/mlt_properties.c.orig	2013-06-26 21:38:59.000000000 +0000
+++ src/framework/mlt_properties.c
@@ -138,7 +138,7 @@ int mlt_properties_set_lcnumeric( mlt_pr
 	{
 		property_list *list = self->local;
 
-#if defined(__linux__) || defined(__DARWIN__)
+#if defined(__linux__) || defined(__DARWIN__) || (defined(__NetBSD__) && defined(LC_C_LOCALE))
 		if ( list->locale )
 			freelocale( list->locale );
 		list->locale = newlocale( LC_NUMERIC_MASK, locale, NULL );
@@ -1332,7 +1332,7 @@ void mlt_properties_close( mlt_propertie
 				free( list->name[ index ] );
 			}
 
-#if defined(__linux__) || defined(__DARWIN__)
+#if defined(__linux__) || defined(__DARWIN__) || (defined(__NetBSD__) && defined(LC_C_LOCALE))
 			// Cleanup locale
 			if ( list->locale )
 				freelocale( list->locale );

File Added: pkgsrc/multimedia/mlt/patches/Attic/patch-src_framework_mlt__property.c
$NetBSD: patch-src_framework_mlt__property.c,v 1.1 2013/06/26 21:59:10 joerg Exp $

--- src/framework/mlt_property.c.orig	2013-06-26 21:38:25.000000000 +0000
+++ src/framework/mlt_property.c
@@ -282,7 +282,7 @@ static int time_clock_to_frames( const c
 	s = copy;
 	pos = strrchr( s, ':' );
 	if ( pos ) {
-#if defined(__GLIBC__) || defined(__DARWIN__)
+#if defined(__GLIBC__) || defined(__DARWIN__) || (defined(__NetBSD__) && defined(LC_C_LOCALE))
 		if ( locale )
 			seconds = strtod_l( pos + 1, NULL, locale );
 		else
@@ -300,7 +300,7 @@ static int time_clock_to_frames( const c
 		}
 	}
 	else {
-#if defined(__GLIBC__) || defined(__DARWIN__)
+#if defined(__GLIBC__) || defined(__DARWIN__) || (defined(__NetBSD__) && defined(LC_C_LOCALE))
 		if ( locale )
 			seconds = strtod_l( s, NULL, locale );
 		else
@@ -455,7 +455,7 @@ static double mlt_property_atof( const c
 	}
 	else
 	{
-#if defined(__GLIBC__) || defined(__DARWIN__)
+#if defined(__GLIBC__) || defined(__DARWIN__) || (defined(__NetBSD__) && defined(LC_C_LOCALE))
 		if ( locale )
 			return strtod_l( value, NULL, locale );
 #endif

File Added: pkgsrc/multimedia/mlt/patches/patch-src_framework_mlt__property.h
$NetBSD: patch-src_framework_mlt__property.h,v 1.1 2013/06/26 21:59:10 joerg Exp $

--- src/framework/mlt_property.h.orig	2013-06-26 21:36:42.000000000 +0000
+++ src/framework/mlt_property.h
@@ -31,8 +31,10 @@
 #include <sys/param.h>
 #endif
 
+#include <locale.h>
 #if defined(__GLIBC__) || defined(__DARWIN__) || (__FreeBSD_version >= 900506)
 #include <xlocale.h>
+#elif defined(__NetBSD__) && defined(LC_C_LOCALE)
 #else
 typedef void* locale_t;
 #endif