From 7fd13ee610bbbf7615209f874a7856e98ef0f2ad Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sun, 20 Sep 2009 09:04:57 +0000 Subject: [PATCH] *** empty log message *** --- sources | 2 +- vlc-1.0-bugfix-bp-font_family.patch | 195 ---------------------------- vlc-1.0-bugfix-bp_zip_qt4.patch | 50 ------- vlc-1.0.2-compiler.patch | 9 ++ vlc.spec | 15 ++- 5 files changed, 22 insertions(+), 249 deletions(-) delete mode 100644 vlc-1.0-bugfix-bp-font_family.patch delete mode 100644 vlc-1.0-bugfix-bp_zip_qt4.patch create mode 100644 vlc-1.0.2-compiler.patch diff --git a/sources b/sources index c40fc70..544ccd6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 +6e9383e1684506ee2bfbfae011821fdd vlc-1.0.2.tar.bz2 diff --git a/vlc-1.0-bugfix-bp-font_family.patch b/vlc-1.0-bugfix-bp-font_family.patch deleted file mode 100644 index d97793a..0000000 --- a/vlc-1.0-bugfix-bp-font_family.patch +++ /dev/null @@ -1,195 +0,0 @@ -diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c -index 7e45866..a0c3a93 100644 ---- a/modules/misc/freetype.c -+++ b/modules/misc/freetype.c -@@ -70,6 +70,8 @@ - - #ifdef HAVE_FONTCONFIG - #include -+#undef DEFAULT_FONT -+#define DEFAULT_FONT FC_DEFAULT_FONT - #endif - - #include -@@ -81,7 +83,13 @@ static int Create ( vlc_object_t * ); - static void Destroy( vlc_object_t * ); - - #define FONT_TEXT N_("Font") --#define FONT_LONGTEXT N_("Filename for the font you want to use") -+ -+#ifdef HAVE_FONTCONFIG -+#define FONT_LONGTEXT N_("Font family for the font you want to use") -+#else -+#define FONT_LONGTEXT N_("Fontfile for the font you want to use") -+#endif -+ - #define FONTSIZE_TEXT N_("Font size in pixels") - #define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \ - "that will be rendered on the video. " \ -@@ -284,9 +292,15 @@ static int Create( vlc_object_t *p_this ) - { - filter_t *p_filter = (filter_t *)p_this; - filter_sys_t *p_sys; -- char *psz_fontfile = NULL; -- int i_error; -- vlc_value_t val; -+ char *psz_fontfile=NULL; -+ char *psz_fontfamily=NULL; -+ int i_error,fontindex; -+ -+#ifdef HAVE_FONTCONFIG -+ FcPattern *fontpattern, *fontmatch; -+ FcResult fontresult; -+#endif -+ - - /* Allocate structure */ - p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); -@@ -297,52 +311,88 @@ static int Create( vlc_object_t *p_this ) - p_sys->i_font_size = 0; - p_sys->i_display_height = 0; - -- var_Create( p_filter, "freetype-font", -- VLC_VAR_STRING | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-fontsize", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); - var_Create( p_filter, "freetype-rel-fontsize", - VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-opacity", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Create( p_filter, "freetype-effect", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Get( p_filter, "freetype-opacity", &val ); -- p_sys->i_font_opacity = __MAX( __MIN( val.i_int, 255 ), 0 ); -- var_Create( p_filter, "freetype-color", -- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); -- var_Get( p_filter, "freetype-color", &val ); -- p_sys->i_font_color = __MAX( __MIN( val.i_int, 0xFFFFFF ), 0 ); -- p_sys->i_effect = var_GetInteger( p_filter, "freetype-effect" ); -- -- /* Look what method was requested */ -- var_Get( p_filter, "freetype-font", &val ); -- psz_fontfile = val.psz_string; -- if( !psz_fontfile || !*psz_fontfile ) -- { -- free( psz_fontfile ); -- psz_fontfile = (char *)malloc( PATH_MAX + 1 ); -- if( !psz_fontfile ) -- goto error; --#ifdef WIN32 -- GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); -- strcat( psz_fontfile, "\\fonts\\arial.ttf" ); --#elif defined(__APPLE__) -- strcpy( psz_fontfile, DEFAULT_FONT ); -+ -+ psz_fontfamily = var_CreateGetString( p_filter, "freetype-font" ); -+ p_sys->i_default_font_size = var_CreateGetInteger( p_filter, "freetype-fontsize" ); -+ p_sys->i_effect = var_CreateGetInteger( p_filter, "freetype-effect" ); -+ p_sys->i_font_opacity = var_CreateGetInteger( p_filter,"freetype-opacity" ); -+ p_sys->i_font_opacity = __MAX( __MIN( p_sys->i_font_opacity, 255 ), 0 ); -+ p_sys->i_font_color = var_CreateGetInteger( p_filter, "freetype-color" ); -+ p_sys->i_font_color = __MAX( __MIN( p_sys->i_font_color , 0xFFFFFF ), 0 ); -+ -+ fontindex=0; -+ if( !psz_fontfamily || !*psz_fontfamily ) -+ { -+#ifdef HAVE_FONTCONFIG -+ free( psz_fontfamily); -+ psz_fontfamily=strdup( DEFAULT_FONT ); - #else -- msg_Err( p_filter, "user didn't specify a font" ); -- goto error; -+ free( psz_fontfamily ); -+ psz_fontfamily = (char *)malloc( PATH_MAX + 1 ); -+ if( !psz_fontfamily ) -+ goto error; -+# ifdef WIN32 -+ GetWindowsDirectory( psz_fontfamily , PATH_MAX + 1 ); -+ strcat( psz_fontfamily, "\\fonts\\arial.ttf" ); -+# else -+ strcpy( psz_fontfamily, DEFAULT_FONT ); -+# endif -+ msg_Err( p_filter,"User didn't specify fontfile, using %s", psz_fontfamily); - #endif - } - -+#ifdef HAVE_FONTCONFIG -+ /* Lets find some fontfile from freetype-font variable family */ -+ char *psz_fontsize; -+ if( asprintf( &psz_fontsize, "%d", p_sys->i_default_font_size ) == -1 ) -+ goto error; -+ fontpattern = FcPatternCreate(); -+ FcPatternAddString( fontpattern, FC_FAMILY, psz_fontfamily); -+ FcPatternAddString( fontpattern, FC_SIZE, psz_fontsize ); -+ -+ if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse ) -+ { -+ FcPatternDestroy( fontpattern ); -+ free( psz_fontsize ); -+ goto error; -+ } -+ FcDefaultSubstitute( fontpattern ); -+ -+ fontmatch = FcFontMatch( NULL, fontpattern, &fontresult ); -+ if( fontresult == FcResultNoMatch ) -+ { -+ free( psz_fontsize ); -+ FcPatternDestroy( fontpattern ); -+ FcPatternDestroy( fontmatch ); -+ goto error; -+ } -+ -+ FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile); -+ FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex ); -+ free( psz_fontsize ); -+ if( !psz_fontfile ) -+ { -+ FcPatternDestroy( fontpattern ); -+ FcPatternDestroy( fontmatch ); -+ goto error; -+ } -+ msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile); -+#else -+ psz_fontfile = psz_fontfamily; -+#endif -+ - i_error = FT_Init_FreeType( &p_sys->p_library ); - if( i_error ) - { - msg_Err( p_filter, "couldn't initialize freetype" ); - goto error; - } -+ - i_error = FT_New_Face( p_sys->p_library, psz_fontfile ? psz_fontfile : "", -- 0, &p_sys->p_face ); -+ fontindex, &p_sys->p_face ); -+ - if( i_error == FT_Err_Unknown_File_Format ) - { - msg_Err( p_filter, "file %s have unknown format", psz_fontfile ); -@@ -369,11 +419,8 @@ static int Create( vlc_object_t *p_this ) - - p_sys->i_use_kerning = FT_HAS_KERNING( p_sys->p_face ); - -- var_Get( p_filter, "freetype-fontsize", &val ); -- p_sys->i_default_font_size = val.i_int; - if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error; - -- free( psz_fontfile ); - - p_sys->pp_font_attachments = NULL; - p_sys->i_font_attachments = 0; -@@ -381,10 +428,13 @@ static int Create( vlc_object_t *p_this ) - p_filter->pf_render_text = RenderText; - #ifdef HAVE_FONTCONFIG - p_filter->pf_render_html = RenderHtml; -+ FcPatternDestroy( fontmatch ); -+ FcPatternDestroy( fontpattern ); - #else - p_filter->pf_render_html = NULL; - #endif - -+ free( psz_fontfamily ); - LoadFontsFromAttachments( p_filter ); - - return VLC_SUCCESS; diff --git a/vlc-1.0-bugfix-bp_zip_qt4.patch b/vlc-1.0-bugfix-bp_zip_qt4.patch deleted file mode 100644 index 19fda7c..0000000 --- a/vlc-1.0-bugfix-bp_zip_qt4.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c -index 0250312..59b3f74 100644 ---- a/modules/access/zip/zipstream.c -+++ b/modules/access/zip/zipstream.c -@@ -205,8 +205,8 @@ int StreamOpen( vlc_object_t *p_this ) - if( !p_sys->zipFile ) - { - msg_Warn( s, "unable to open file" ); -- free( p_sys ); - free( p_sys->fileFunctions ); -+ free( p_sys ); - return VLC_EGENERIC; - } - -@@ -214,8 +214,8 @@ int StreamOpen( vlc_object_t *p_this ) - char *psz_tmp; - if( asprintf( &psz_tmp, "%s.xspf", s->psz_path ) == -1 ) - { -- free( p_sys ); - free( p_sys->fileFunctions ); -+ free( p_sys ); - return VLC_ENOMEM; - } - p_sys->psz_path = s->psz_path; -@@ -310,7 +310,7 @@ static int Control( stream_t *s, int i_query, va_list args ) - return VLC_EGENERIC; - else - { -- p_sys->i_len = (size_t) i_position; -+ p_sys->i_pos = (size_t) i_position; - return VLC_SUCCESS; - } - } - -diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp -index 97aca1a..31b990a 100644 ---- a/modules/gui/qt4/main_interface.cpp -+++ b/modules/gui/qt4/main_interface.cpp -@@ -1134,8 +1134,8 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play ) - - if( s.length() > 0 ) { - playlist_Add( THEPL, qtu(s), NULL, -- PLAYLIST_APPEND | (first ? PLAYLIST_GO: 0), -- PLAYLIST_END, true, false ); -+ PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE), -+ PLAYLIST_END, true, pl_Unlocked ); - first = false; - RecentsMRL::getInstance( p_intf )->addRecent( s ); - } - diff --git a/vlc-1.0.2-compiler.patch b/vlc-1.0.2-compiler.patch new file mode 100644 index 0000000..d374dba --- /dev/null +++ b/vlc-1.0.2-compiler.patch @@ -0,0 +1,9 @@ +diff -up vlc-1.0.2/modules/access/bd/Modules.am.compiler vlc-1.0.2/modules/access/bd/Modules.am +--- vlc-1.0.2/modules/access/bd/Modules.am.compiler 2009-09-18 00:23:37.000000000 +0200 ++++ vlc-1.0.2/modules/access/bd/Modules.am 2009-09-20 10:35:40.107945580 +0200 +@@ -8,3 +8,5 @@ SOURCES_access_bd = \ + + libvlc_LTLIBRARIES += libaccess_bd_plugin.la + ++libaccess_bd_plugin_la_CFLAGS = -O0 ++ diff --git a/vlc.spec b/vlc.spec index f332bd2..8578632 100644 --- a/vlc.spec +++ b/vlc.spec @@ -8,7 +8,7 @@ Summary: Multi-platform MPEG, DVD, and DivX player Name: vlc Version: 1.0.2 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org @@ -22,6 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch Patch2: 0002-Default-aout-for-pulse.patch Patch3: 300_all_pic.patch Patch4: 310_all_mmx_pic.patch +Patch5: vlc-1.0.2-compiler.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -143,7 +144,6 @@ Requires: vlc-core%{_isa} = %{version}-%{release} %if 0%{?fedora} > 10 Requires: dejavu-sans-fonts -Requires: dejavu-serif-fonts %else Requires: dejavu-fonts %endif @@ -238,7 +238,13 @@ VLC plugin for libdc1394 %patch3 -p1 -b .dmo_pic sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in %patch4 -p1 -b .mmx_pic +%ifarch %{ix86} x86_64 +#https://bugzilla.redhat.com/show_bug.cgi?id=524439 +%patch5 -p1 -b .compiler +%endif +#Workaround internal compiler bug in bd.c +sed -i -e 's/screen bd zip/screen zip/' modules/access/Modules.am rm modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h @@ -264,7 +270,7 @@ popd %configure \ --disable-dependency-tracking \ --disable-rpath \ - --enable-release \ + --enable-debug \ --with-binary-version=%{version}-%{release} \ --with-tuning=no \ --enable-switcher \ @@ -548,6 +554,9 @@ fi || : %changelog +* Sun Sep 20 2009 kwizart < kwizart at gmail.com > - 1.0.2-1.1 +- Workaround the compiler bug on x86 x86_64 by disabling optimization. + * Sat Sep 19 2009 kwizart < kwizart at gmail.com > - 1.0.2-1 - Update to 1.0.2