Hey guys,

Why is libavutil not linked to libavcodec and libswscale?  I had
removed all library interdependencies in this port, but now
there are lots of library interdependencies in this port.  I bet
libavutil not being linked to libswscale is what's causing the problem 
kurt had with vlc.

btw, there are several bogus library interdependencies in the port now, 
(e.g. run 'objdump -p libpostproc.so.* | grep NEEDED' and then 'nm 
libpostproc.so.* | grep -i 'U ') but that is mostly because the ffmpeg 
folks only have 1 variable for the 'extralibs' instead of one 'extralibs' 
variable each for libavcodec, libavformat, libpostproc, etc.  fixing that 
is a pain, especially now that other external libs (ogg, vorbis, etc) are 
being used in the port.

once that is fixed, probably multimedia/transcode, multimedia/libquicktime 
and any other port that adds libraries when linking in libavcodec should 
be cleaned up too.  just don't forget that avcodec always needs to be 
linked with -pthread.

ciao
-- 
jakemsr


On Wed, Apr 11, 2007 at 12:27:17PM +0200, Antoine Jacoutot wrote:
> Hi.
> 
> The included diff
> - updates ffmpeg to CVS version 20070407
> - adds x264 support
> 
> Note that adding libtheora and xvid support could be interesting too, 
> but I leave this to the maintainer ;-)
> Tested under i386.
> 
> Comments, Ok?
> 
> -- 
> Antoine

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
> retrieving revision 1.26
> diff -u -r1.26 Makefile
> --- Makefile  2 Mar 2007 23:38:28 -0000       1.26
> +++ Makefile  11 Apr 2007 10:22:01 -0000
> @@ -2,8 +2,8 @@
>  
>  COMMENT=     "audio/video converter and streamer with bktr(4) support"
>  
> -DISTNAME=            ffmpeg-cvs-20070110
> -PKGNAME=             ${DISTNAME:S/-cvs//}p1
> +DISTNAME=            ffmpeg-cvs-20070407
> +PKGNAME=             ${DISTNAME:S/-cvs//}
>  SHARED_LIBS=         avutil          2.0 \
>                       avcodec         8.0 \
>                       avformat        8.0 \
> @@ -27,7 +27,9 @@
>                       faac::audio/faac \
>                       faad::audio/faad \
>                       mp3lame.>=0.1::audio/lame \
> -                     vorbis.>=4.0,vorbisenc.>=2.0::audio/libvorbis
> +                     vorbis.>=4.0,vorbisenc.>=2.0::audio/libvorbis \
> +                     a52::audio/liba52 \
> +                     x264::multimedia/x264
>  
>  WANTLIB=             X11 Xext c freetype m pthread ogg ossaudio usbhid z
>  
> @@ -43,16 +45,17 @@
>  CONFIGURE_ARGS+=     ${CONFIGURE_SHARED} \
>                       --cc=${CC} \
>                       --disable-opts \
> -                     --enable-a52 \
> +                     --enable-liba52 \
>                       --enable-pp \
>                       --enable-gpl \
>                       --enable-pthreads \
>                       --disable-debug \
> -                     --enable-faac \
> -                     --enable-faad \
> -                     --enable-mp3lame \
> +                     --enable-libfaac \
> +                     --enable-libfaad \
> +                     --enable-libmp3lame \
>                       --enable-libogg \
> -                     --enable-vorbis \
> +                     --enable-libvorbis \
> +                     --enable-x264 \
>                       --extra-libs="-L${LOCALBASE}/lib" \
>                       --extra-cflags=-I${LOCALBASE}/include
>  
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/distinfo,v
> retrieving revision 1.12
> diff -u -r1.12 distinfo
> --- distinfo  5 Apr 2007 16:19:55 -0000       1.12
> +++ distinfo  11 Apr 2007 10:22:01 -0000
> @@ -1,5 +1,5 @@
> -MD5 (ffmpeg-cvs-20070110.tar.gz) = r3KEoeT0mi+FjlxlN7N2/w==
> -RMD160 (ffmpeg-cvs-20070110.tar.gz) = oIacGOJ5H5jR55HkZfmyA4mTSXw=
> -SHA1 (ffmpeg-cvs-20070110.tar.gz) = 1MuBCqHaZ7wjHhAJVEMV32JRBeo=
> -SHA256 (ffmpeg-cvs-20070110.tar.gz) = 
> TA5XN14puseXcV7JEcX3RQJq1rWB4tXYecZ0kBMdWrk=
> -SIZE (ffmpeg-cvs-20070110.tar.gz) = 2471143
> +MD5 (ffmpeg-cvs-20070407.tar.gz) = om00SbfOQ3b9RcuKdZAl3A==
> +RMD160 (ffmpeg-cvs-20070407.tar.gz) = 1rkRqTcQipwN/u7ezIKpqDq1Y9s=
> +SHA1 (ffmpeg-cvs-20070407.tar.gz) = xE49MUKgqdb9Eh3lvAEDzGklO0Y=
> +SHA256 (ffmpeg-cvs-20070407.tar.gz) = 
> W/t54NrmSt2VF1BConxhqpZqowlRFzkVE9lEHcD66nE=
> +SIZE (ffmpeg-cvs-20070407.tar.gz) = 2623030
> Index: patches/patch-common_mak
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-common_mak,v
> retrieving revision 1.3
> diff -u -r1.3 patch-common_mak
> --- patches/patch-common_mak  23 Jan 2007 09:34:45 -0000      1.3
> +++ patches/patch-common_mak  11 Apr 2007 10:22:01 -0000
> @@ -1,12 +1,12 @@
>  $OpenBSD: patch-common_mak,v 1.3 2007/01/23 09:34:45 robert Exp $
> ---- common.mak.orig  Tue Jan  2 18:27:55 2007
> -+++ common.mak       Tue Jan  2 18:28:19 2007
> -@@ -63,13 +63,7 @@ install-libs: $(INSTLIBTARGETS)
> +--- common.mak.orig  Wed Apr 11 10:21:45 2007
> ++++ common.mak       Wed Apr 11 10:22:23 2007
> +@@ -64,13 +64,7 @@ install-libs: $(INSTLIBTARGETS)
>   
>   install-lib-shared: $(SLIBNAME)
>       install -d "$(shlibdir)"
> --    install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
> --            "$(shlibdir)/$(SLIBNAME_WITH_VERSION)"
> +-    install -m 755 $(SLIBNAME) "$(shlibdir)/$(SLIBNAME_WITH_VERSION)"
> +-    $(STRIP) "$(shlibdir)/$(SLIBNAME_WITH_VERSION)"
>  -    cd "$(shlibdir)" && \
>  -            ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
>  -    cd "$(shlibdir)" && \
> Index: patches/patch-libavcodec_Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavcodec_Makefile,v
> retrieving revision 1.13
> diff -u -r1.13 patch-libavcodec_Makefile
> --- patches/patch-libavcodec_Makefile 23 Jan 2007 09:34:45 -0000      1.13
> +++ patches/patch-libavcodec_Makefile 11 Apr 2007 10:22:01 -0000
> @@ -1,16 +1,15 @@
>  $OpenBSD: patch-libavcodec_Makefile,v 1.13 2007/01/23 09:34:45 robert Exp $
> ---- libavcodec/Makefile.orig Mon Jan  8 01:24:14 2007
> -+++ libavcodec/Makefile      Mon Jan  8 13:43:41 2007
> -@@ -402,11 +402,9 @@ CFLAGS += $(CFLAGS-yes)
> - OBJS += $(OBJS-yes)
> - ASM_OBJS += $(ASM_OBJS-yes)
> +--- libavcodec/Makefile.orig Wed Apr 11 10:16:20 2007
> ++++ libavcodec/Makefile      Wed Apr 11 10:16:49 2007
> +@@ -401,10 +401,8 @@ ASM_OBJS-$(TARGET_ARCH_BFIN)           += bfin/pixels_
> +                                           bfin/idct_bfin.o   \
> +                                           bfin/fdct_bfin.o   \
>   
>  -EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
>  -
>   NAME=avcodec
> - ifeq ($(BUILD_SHARED),yes)
>  -LIBVERSION=$(LAVCVERSION)
>  +LIBVERSION=$(LIBavcodec_VERSION)
>   LIBMAJOR=$(LAVCMAJOR)
> - endif
>   
> + TESTS= imgresample-test fft-test dct-test
> Index: patches/patch-libavformat_Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavformat_Makefile,v
> retrieving revision 1.12
> diff -u -r1.12 patch-libavformat_Makefile
> --- patches/patch-libavformat_Makefile        23 Jan 2007 09:34:45 -0000      
> 1.12
> +++ patches/patch-libavformat_Makefile        11 Apr 2007 10:22:01 -0000
> @@ -1,12 +1,12 @@
>  $OpenBSD: patch-libavformat_Makefile,v 1.12 2007/01/23 09:34:45 robert Exp $
> ---- libavformat/Makefile.orig        Sun Dec 24 06:51:43 2006
> -+++ libavformat/Makefile     Tue Jan  2 18:22:01 2007
> -@@ -195,7 +195,7 @@ OBJS += $(OBJS-yes)
> +--- libavformat/Makefile.orig        Wed Apr 11 10:27:57 2007
> ++++ libavformat/Makefile     Wed Apr 11 10:28:38 2007
> +@@ -160,7 +160,7 @@ OBJS-$(CONFIG_NETWORK)                   += udp.o tcp.
> +                                             rtpproto.o mpegts.o rtp_h264.o
>   
>   NAME=avformat
> - ifeq ($(BUILD_SHARED),yes)
>  -LIBVERSION=$(LAVFVERSION)
>  +LIBVERSION=$(LIBavformat_VERSION)
>   LIBMAJOR=$(LAVFMAJOR)
> - endif
>   
> + include ../common.mak
> Index: patches/patch-libavformat_utils_c
> ===================================================================
> RCS file: patches/patch-libavformat_utils_c
> diff -N patches/patch-libavformat_utils_c
> --- patches/patch-libavformat_utils_c 23 Jan 2007 09:34:45 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,31 +0,0 @@
> -$OpenBSD: patch-libavformat_utils_c,v 1.1 2007/01/23 09:34:45 robert Exp $
> ---- libavformat/utils.c.orig Mon Jan  8 16:44:13 2007
> -+++ libavformat/utils.c      Wed Jan 10 14:38:27 2007
> -@@ -1781,7 +1781,7 @@ int av_find_stream_info(AVFormatContext 
> -     AVPacketList *pktl=NULL, **ppktl;
> -     int64_t last_dts[MAX_STREAMS];
> -     int duration_count[MAX_STREAMS]={0};
> --    double duration_error[MAX_STREAMS][MAX_STD_TIMEBASES]={{0}}; //FIXME 
> malloc()?
> -+    double (*duration_error)[MAX_STD_TIMEBASES] = av_mallocz(MAX_STREAMS * 
> sizeof(*duration_error));
> - 
> -     for(i=0;i<ic->nb_streams;i++) {
> -         st = ic->streams[i];
> -@@ -1893,7 +1893,7 @@ int av_find_stream_info(AVFormatContext 
> - //                if(st->codec->codec_type == CODEC_TYPE_VIDEO)
> - //                    av_log(NULL, AV_LOG_ERROR, "%f\n", dur);
> -                 if(duration_count[index] < 2)
> --                    memset(duration_error, 0, sizeof(duration_error));
> -+                    memset(duration_error, 0, MAX_STREAMS * 
> sizeof(*duration_error));
> -                 for(i=1; i<MAX_STD_TIMEBASES; i++){
> -                     int framerate= get_std_framerate(i);
> -                     int ticks= lrintf(dur*framerate/(1001*12));
> -@@ -2013,6 +2013,9 @@ int av_find_stream_info(AVFormatContext 
> -         }
> -     }
> - #endif
> -+
> -+    av_freep(&duration_error);
> -+
> -     return ret;
> - }
> - 
> Index: patches/patch-libavutil_Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavutil_Makefile,v
> retrieving revision 1.2
> diff -u -r1.2 patch-libavutil_Makefile
> --- patches/patch-libavutil_Makefile  23 Jan 2007 09:34:45 -0000      1.2
> +++ patches/patch-libavutil_Makefile  11 Apr 2007 10:22:01 -0000
> @@ -1,12 +1,12 @@
>  $OpenBSD: patch-libavutil_Makefile,v 1.2 2007/01/23 09:34:45 robert Exp $
> ---- libavutil/Makefile.orig  Tue Nov 14 03:02:30 2006
> -+++ libavutil/Makefile       Mon Dec 11 14:01:08 2006
> -@@ -22,7 +22,7 @@ HEADERS = avutil.h common.h mathematics.
> +--- libavutil/Makefile.orig  Wed Apr 11 10:15:07 2007
> ++++ libavutil/Makefile       Wed Apr 11 10:15:42 2007
> +@@ -21,7 +21,7 @@ HEADERS = avutil.h common.h mathematics.h integer.h ra
> +           random.h mem.h base64.h
>   
>   NAME=avutil
> - ifeq ($(BUILD_SHARED),yes)
>  -LIBVERSION=$(LAVUVERSION)
>  +LIBVERSION=$(LIBavutil_VERSION)
>   LIBMAJOR=$(LAVUMAJOR)
> - endif
>   
> + include ../common.mak
> Index: patches/patch-libpostproc_Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libpostproc_Makefile,v
> retrieving revision 1.1
> diff -u -r1.1 patch-libpostproc_Makefile
> --- patches/patch-libpostproc_Makefile        23 Jan 2007 09:34:45 -0000      
> 1.1
> +++ patches/patch-libpostproc_Makefile        11 Apr 2007 10:22:01 -0000
> @@ -1,12 +1,12 @@
>  $OpenBSD: patch-libpostproc_Makefile,v 1.1 2007/01/23 09:34:45 robert Exp $
> ---- libpostproc/Makefile.orig        Mon Dec  4 14:38:30 2006
> -+++ libpostproc/Makefile     Mon Dec  4 14:38:48 2006
> -@@ -8,7 +8,7 @@ EXTRALIBS := -L$(BUILD_ROOT)/libavutil -
> +--- libpostproc/Makefile.orig        Wed Apr 11 10:17:05 2007
> ++++ libpostproc/Makefile     Wed Apr 11 10:17:14 2007
> +@@ -7,7 +7,7 @@ incdir=$(prefix)/include/postproc
> + EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
>   
>   NAME=postproc
> - ifeq ($(BUILD_SHARED),yes)
>  -LIBVERSION=$(SPPVERSION)
>  +LIBVERSION=$(LIBpostproc_VERSION)
>   LIBMAJOR=$(SPPMAJOR)
> - endif
>   
> + STATIC_OBJS=postprocess.o
> Index: patches/patch-libswscale_Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libswscale_Makefile,v
> retrieving revision 1.1
> diff -u -r1.1 patch-libswscale_Makefile
> --- patches/patch-libswscale_Makefile 23 Jan 2007 09:34:45 -0000      1.1
> +++ patches/patch-libswscale_Makefile 11 Apr 2007 10:22:01 -0000
> @@ -1,16 +1,15 @@
>  $OpenBSD: patch-libswscale_Makefile,v 1.1 2007/01/23 09:34:45 robert Exp $
> ---- libswscale/Makefile.orig Tue Jan  2 19:01:04 2007
> -+++ libswscale/Makefile      Tue Jan  2 19:02:35 2007
> -@@ -3,11 +3,9 @@ include ../config.mak
> +--- libswscale/Makefile.orig Wed Apr 11 10:20:59 2007
> ++++ libswscale/Makefile      Wed Apr 11 10:21:23 2007
> +@@ -2,10 +2,8 @@
> + include ../config.mak
>   
>   NAME=swscale
> - ifeq ($(BUILD_SHARED),yes)
>  -LIBVERSION=$(SWSVERSION)
>  +LIBVERSION=$(LIBswscale_VERSION)
>   LIBMAJOR=$(SWSMAJOR)
> - endif
>  -
>  -EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
>   
>   OBJS= swscale.o rgb2rgb.o
> - ifeq ($(TARGET_ALTIVEC),yes)
> + 
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/pkg/PLIST,v
> retrieving revision 1.11
> diff -u -r1.11 PLIST
> --- pkg/PLIST 2 Mar 2007 23:38:28 -0000       1.11
> +++ pkg/PLIST 11 Apr 2007 10:22:01 -0000
> @@ -9,14 +9,18 @@
>  include/ffmpeg/avformat.h
>  include/ffmpeg/avio.h
>  include/ffmpeg/avutil.h
> +include/ffmpeg/base64.h
>  include/ffmpeg/common.h
>  include/ffmpeg/fifo.h
>  include/ffmpeg/integer.h
>  include/ffmpeg/intfloat_readwrite.h
>  include/ffmpeg/log.h
> +include/ffmpeg/lzo.h
>  include/ffmpeg/mathematics.h
>  include/ffmpeg/md5.h
> +include/ffmpeg/mem.h
>  include/ffmpeg/opt.h
> +include/ffmpeg/random.h
>  include/ffmpeg/rational.h
>  include/ffmpeg/rgb2rgb.h
>  include/ffmpeg/rtp.h


-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to