ffmpeg{-devel} + grab + amd64 - works fine
Vladimir Kushnir
vkushnir at i.kiev.ua
Sun Jun 12 23:07:29 GMT 2005
Hello,
At present ffmpeg (and ffmpeg-devel) grab-wise are marked as i386-only. At
least on my -CURRENT amd64 box ffmpeg-devel grabs fairly well with very
minor changes to port (mostly adding amd64 to Makefile, plus
__FreeBSD__ -> __FreeBSD_version in grab_bsdbktr.c, patch included).
Plus a minor patch to check for lrintf(3) to quiet down gcc warnings.
Regards (and thanks),
Vladimir
-------------- next part --------------
*** Makefile.orig Sun Jun 12 11:36:04 2005
--- Makefile Mon Jun 13 01:28:40 2005
***************
*** 28,33 ****
--- 28,38 ----
--enable-shared \
--source-path=${WRKSRC}
+ .include <bsd.port.pre.mk>
+
+ .if ${ARCH} == "amd64"
+ CFLAGS+= -fpic -fPIC -DPIC
+ .endif
FFMPEG_CFLAGS= \
-I${WRKSRC}/libavcodec \
-I${WRKSRC}/libavcodec/i386 \
***************
*** 76,82 ****
# libraries
LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a
! .include <bsd.port.pre.mk>
##
## default options
--- 81,87 ----
# libraries
LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a
! #.include <bsd.port.pre.mk>
##
## default options
***************
*** 94,100 ****
##
## arch detection
##
! .if ${ARCH} != "i386"
WITHOUT_MMX= yes
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile
--- 99,105 ----
##
## arch detection
##
! .if ${ARCH} != "i386" && ${ARCH} != "amd64"
WITHOUT_MMX= yes
.else
EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile
***************
*** 413,419 ****
@${ECHO_MSG} 'Define WITH_VORBIS to enable XVID codec'
@${ECHO_MSG}
.endif
! .if ${ARCH} == "i386"
. ifndef(WITH_VIDEO_CAPTURE)
@${ECHO_MSG} 'Define WITH_VIDEO_CAPTURE to enable bktr(4) driver'
@${ECHO_MSG} 'video capture'
--- 418,424 ----
@${ECHO_MSG} 'Define WITH_VORBIS to enable XVID codec'
@${ECHO_MSG}
.endif
! .if ${ARCH} == "i386" || ${ARCH} == "amd64"
. ifndef(WITH_VIDEO_CAPTURE)
@${ECHO_MSG} 'Define WITH_VIDEO_CAPTURE to enable bktr(4) driver'
@${ECHO_MSG} 'video capture'
***************
*** 434,440 ****
.endif # ${ARCH} == i386
post-extract:
! .if ${ARCH} == "i386"
# install booktree extension
@${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
.endif # ${ARCH} == i386
--- 439,445 ----
.endif # ${ARCH} == i386
post-extract:
! .if ${ARCH} == "i386" || ${ARCH} == "amd64"
# install booktree extension
@${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
.endif # ${ARCH} == i386
***************
*** 459,465 ****
-e 's|^(texi2html=)no|\1yes|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
! .if ${ARCH} == "i386"
.ifdef(WITH_VIDEO_CAPTURE)
# we support "v4l" per default through Steve O'Hara-Smith's bktr(4)
# patch
--- 464,470 ----
-e 's|^(texi2html=)no|\1yes|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
! .if ${ARCH} == "i386" || ${ARCH} == "amd64"
.ifdef(WITH_VIDEO_CAPTURE)
# we support "v4l" per default through Steve O'Hara-Smith's bktr(4)
# patch
***************
*** 541,552 ****
--- 546,573 ----
.endif
post-configure:
+ .if ${ARCH} == "amd64"
+ @${REINPLACE_CMD} -E \
+ -e 's|TARGET_ARCH_X86|TARGET_ARCH_X86_64|' \
+ ${WRKSRC}/config.mak
+ @${REINPLACE_CMD} -E \
+ -e 's|ARCH_X86|ARCH_X86_64|' \
+ ${WRKSRC}/config.h
+ .endif
.ifdef(WITH_DTS)
+ .if ${ARCH} == "amd64"
+ @${REINPLACE_CMD} -E \
+ -e 's|-ldts|${LOCALBASE}/lib/libdts_pic.a|' \
+ -e 's|(-lx264)|-L${LOCALBASE}/lib \1|' \
+ ${WRKSRC}/config.mak \
+ ${WRKSRC}/libavcodec/Makefile
+ .else
@${REINPLACE_CMD} -E \
-e 's|-ldts|${LOCALBASE}/lib/libdts.a|' \
-e 's|(-lx264)|-L${LOCALBASE}/lib \1|' \
${WRKSRC}/config.mak \
${WRKSRC}/libavcodec/Makefile
+ .endif
.endif
.ifndef(WITH_THEORA)
@${REINPLACE_CMD} -E \
*** files/grab_bsdbktr.c.orig Mon Jun 13 00:41:31 2005
--- files/grab_bsdbktr.c Mon Jun 13 00:41:44 2005
***************
*** 28,34 ****
#include <dev/video/meteor/ioctl_meteor.h>
#include <dev/video/bktr/ioctl_bt848.h>
#else
! #if __FreeBSD__ >= 502100
#include <dev/bktr/ioctl_meteor.h>
#include <dev/bktr/ioctl_bt848.h>
#else
--- 28,34 ----
#include <dev/video/meteor/ioctl_meteor.h>
#include <dev/video/bktr/ioctl_bt848.h>
#else
! #if __FreeBSD_version >= 502100
#include <dev/bktr/ioctl_meteor.h>
#include <dev/bktr/ioctl_bt848.h>
#else
*** files/patch-configure.orig Mon Jun 13 02:03:19 2005
--- files/patch-configure Mon Jun 13 01:38:40 2005
***************
*** 1,11 ****
! --- configure.orig Fri May 13 01:19:02 2005
! +++ configure Fri May 13 01:19:42 2005
! @@ -935,6 +935,8 @@
! builtin_vector=no
! if $cc -o $TMPO $TMPC 2> /dev/null ; then
! builtin_vector=yes
! +else
! + builtin_vector=no
! fi
!
! # dlopen/dlfcn.h probing
--- 1,30 ----
! *** configure.orig Mon May 30 01:11:05 2005
! --- configure Mon Jun 13 01:35:43 2005
! ***************
! *** 906,912 ****
! EOF
!
! have_lrintf="no"
! ! if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
! have_lrintf="yes"
! # allanc at chickenandporn.com: cannot execute cross-compiled
! # code on the host. Only execute if not cross-compiling.
! --- 906,912 ----
! EOF
!
! have_lrintf="no"
! ! if $cc -lm -o $TMPE $TMPC 2> /dev/null ; then
! have_lrintf="yes"
! # allanc at chickenandporn.com: cannot execute cross-compiled
! # code on the host. Only execute if not cross-compiling.
! ***************
! *** 940,945 ****
! --- 940,947 ----
! builtin_vector=no
! if $cc -msse -o $TMPO $TMPC 2> /dev/null ; then
! builtin_vector=yes
! + else
! + builtin_vector=no
! fi
!
! # dlopen/dlfcn.h probing
More information about the freebsd-multimedia
mailing list