From 262de9100673ec3e0846ee14c25386a4dc49b2a3 Mon Sep 17 00:00:00 2001 From: naddy Date: Sun, 20 Feb 2005 03:28:27 +0000 Subject: [PATCH] * Fix build after removal of inter-library dependencies from ffmpeg. * Use -pthread instead of -lpthread in configure. * Fix a few pointer to int casts. From: Jacob Meuser --- x11/vlc/Makefile | 13 +- x11/vlc/patches/patch-configure_ac | 13 ++ .../patches/patch-include_vlc_threads_funcs_h | 111 ++++++++++++++++++ x11/vlc/pkg/PLIST | 4 +- 4 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 x11/vlc/patches/patch-configure_ac create mode 100644 x11/vlc/patches/patch-include_vlc_threads_funcs_h diff --git a/x11/vlc/Makefile b/x11/vlc/Makefile index 3a178aac9b0..aa239cf3f0e 100644 --- a/x11/vlc/Makefile +++ b/x11/vlc/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.18 2004/12/30 16:14:35 espie Exp $ +# $OpenBSD: Makefile,v 1.19 2005/02/20 03:28:27 naddy Exp $ -NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} +SHARED_ONLY= Yes COMMENT= "videolan client; multimedia player" V= 0.8.1 DISTNAME= vlc-${V} -PKGNAME= ${DISTNAME}p0 +PKGNAME= ${DISTNAME}p1 CATEGORIES= x11 MASTER_SITES= http://download.videolan.org/pub/videolan/vlc/${V}/ @@ -19,7 +19,8 @@ PERMIT_DISTFILES_FTP= Yes USE_X11= Yes -WANTLIB= GL GLU X11 Xext Xinerama Xv c freetype m pthread usbhid z +WANTLIB= GL GLU X11 Xext Xinerama Xv c freetype m mp3lame \ + ossaudio pthread usbhid z MODULES= devel/gettext @@ -33,14 +34,14 @@ LIB_DEPENDS= SDL.3.0::devel/sdl \ ogg.5.2::audio/libogg \ vorbis.3.0,vorbisenc.2.0::audio/libvorbis \ mpeg2.0.0::graphics/libmpeg2 \ - avcodec.4.9,avformat.4.9::graphics/ffmpeg \ + avcodec.5.0,avformat.5.0,postproc.5.0::graphics/ffmpeg \ fribidi.0.0::devel/fribidi \ faad.0.0::audio/faad CONFIGURE_STYLE=autoconf AUTOCONF_VERSION=2.59 CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \ - LIBS="-logg -lm" \ + LIBS="-lpostproc -lmp3lame -la52 -lvorbisenc -lvorbis -logg -lossaudio -lm -lz -pthread" \ WXCONFIG="${LOCALBASE}/bin/wxgtk2-2.4-config" \ CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/libpng" CONFIGURE_ARGS+=--disable-altivec \ diff --git a/x11/vlc/patches/patch-configure_ac b/x11/vlc/patches/patch-configure_ac new file mode 100644 index 00000000000..f61b1a29d41 --- /dev/null +++ b/x11/vlc/patches/patch-configure_ac @@ -0,0 +1,13 @@ +$OpenBSD: patch-configure_ac,v 1.1 2005/02/20 03:28:27 naddy Exp $ +--- configure.ac.orig Mon Feb 14 17:17:36 2005 ++++ configure.ac Mon Feb 14 17:17:53 2005 +@@ -526,6 +526,9 @@ if test "${SYS}" != "mingw32"; then + dnl Check for pthreads - borrowed from XMMS + THREAD_LIB=error + if test "${THREAD_LIB}" = "error"; then ++ AC_CHECK_LIB(pthread,main,THREAD_LIB="-pthread") ++fi ++if test "${THREAD_LIB}" = "error"; then + AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread") + fi + if test "${THREAD_LIB}" = "error"; then diff --git a/x11/vlc/patches/patch-include_vlc_threads_funcs_h b/x11/vlc/patches/patch-include_vlc_threads_funcs_h new file mode 100644 index 00000000000..7ea0a55f619 --- /dev/null +++ b/x11/vlc/patches/patch-include_vlc_threads_funcs_h @@ -0,0 +1,111 @@ +$OpenBSD: patch-include_vlc_threads_funcs_h,v 1.1 2005/02/20 03:28:27 naddy Exp $ +--- include/vlc_threads_funcs.h.orig Sat Nov 6 08:36:33 2004 ++++ include/vlc_threads_funcs.h Mon Feb 14 20:32:03 2005 +@@ -69,7 +69,7 @@ static inline int __vlc_mutex_lock( char + { + int i_result; + /* In case of error : */ +- int i_thread = -1; ++ long i_thread = -1; + const char * psz_error = ""; + + #if defined( PTH_INIT_IN_PTH_H ) +@@ -111,7 +111,7 @@ static inline int __vlc_mutex_lock( char + i_result = pthread_mutex_lock( &p_mutex->mutex ); + if ( i_result ) + { +- i_thread = (int)pthread_self(); ++ i_thread = (long)pthread_self(); + psz_error = strerror(i_result); + } + +@@ -124,7 +124,7 @@ static inline int __vlc_mutex_lock( char + if( i_result ) + { + msg_Err( p_mutex->p_this, +- "thread %d: mutex_lock failed at %s:%d (%d:%s)", ++ "thread %ld: mutex_lock failed at %s:%d (%d:%s)", + i_thread, psz_file, i_line, i_result, psz_error ); + } + return i_result; +@@ -141,7 +141,7 @@ static inline int __vlc_mutex_unlock( ch + { + int i_result; + /* In case of error : */ +- int i_thread = -1; ++ long i_thread = -1; + const char * psz_error = ""; + + #if defined( PTH_INIT_IN_PTH_H ) +@@ -184,7 +184,7 @@ static inline int __vlc_mutex_unlock( ch + i_result = pthread_mutex_unlock( &p_mutex->mutex ); + if ( i_result ) + { +- i_thread = (int)pthread_self(); ++ i_thread = (long)pthread_self(); + psz_error = strerror(i_result); + } + +@@ -197,7 +197,7 @@ static inline int __vlc_mutex_unlock( ch + if( i_result ) + { + msg_Err( p_mutex->p_this, +- "thread %d: mutex_unlock failed at %s:%d (%d:%s)", ++ "thread %ld: mutex_unlock failed at %s:%d (%d:%s)", + i_thread, psz_file, i_line, i_result, psz_error ); + } + +@@ -227,7 +227,7 @@ static inline int __vlc_cond_signal( cha + { + int i_result; + /* In case of error : */ +- int i_thread = -1; ++ long i_thread = -1; + const char * psz_error = ""; + + #if defined( PTH_INIT_IN_PTH_H ) +@@ -322,7 +322,7 @@ static inline int __vlc_cond_signal( cha + i_result = pthread_cond_signal( &p_condvar->cond ); + if ( i_result ) + { +- i_thread = (int)pthread_self(); ++ i_thread = (long)pthread_self(); + psz_error = strerror(i_result); + } + +@@ -339,7 +339,7 @@ static inline int __vlc_cond_signal( cha + if( i_result ) + { + msg_Err( p_condvar->p_this, +- "thread %d: cond_signal failed at %s:%d (%d:%s)", ++ "thread %ld: cond_signal failed at %s:%d (%d:%s)", + i_thread, psz_file, i_line, i_result, psz_error ); + } + +@@ -357,7 +357,7 @@ static inline int __vlc_cond_wait( char + { + int i_result; + /* In case of error : */ +- int i_thread = -1; ++ long i_thread = -1; + const char * psz_error = ""; + + #if defined( PTH_INIT_IN_PTH_H ) +@@ -512,7 +512,7 @@ static inline int __vlc_cond_wait( char + + if ( i_result ) + { +- i_thread = (int)pthread_self(); ++ i_thread = (long)pthread_self(); + psz_error = strerror(i_result); + } + +@@ -525,7 +525,7 @@ static inline int __vlc_cond_wait( char + if( i_result ) + { + msg_Err( p_condvar->p_this, +- "thread %d: cond_wait failed at %s:%d (%d:%s)", ++ "thread %ld: cond_wait failed at %s:%d (%d:%s)", + i_thread, psz_file, i_line, i_result, psz_error ); + } + diff --git a/x11/vlc/pkg/PLIST b/x11/vlc/pkg/PLIST index c42d5354ff5..8ad1e612b36 100644 --- a/x11/vlc/pkg/PLIST +++ b/x11/vlc/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.11 2004/12/16 07:40:20 jolan Exp $ +@comment $OpenBSD: PLIST,v 1.12 2005/02/20 03:28:27 naddy Exp $ %%SHARED%% %%i386%% bin/vlc @@ -168,8 +168,6 @@ share/doc/vlc/intf-cdda.txt share/doc/vlc/intf-vcd.txt share/locale/da/LC_MESSAGES/vlc.mo share/locale/de/LC_MESSAGES/vlc.mo -share/locale/en_GB/ -share/locale/en_GB/LC_MESSAGES/ share/locale/en_GB/LC_MESSAGES/vlc.mo share/locale/es/LC_MESSAGES/vlc.mo share/locale/fr/LC_MESSAGES/vlc.mo