- Fix architecture recognition [1]

- Remove ARCH hack and rename ARCH to FFMPEG_ARCH (fixes powerpc64 build)
- Synchronize patches between ffmpeg and ffmpeg-devel

PR:		ports/148200 [1]
Submitted by:	Nathan Whitehorn <nwhitehorn@freebsd.org> [1]
This commit is contained in:
Martin Matuska 2010-08-01 20:41:26 +00:00
parent 0bb8b24e2a
commit abff9e46a8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258607
7 changed files with 92 additions and 10 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= ffmpeg
DISTVERSION= 2010-07-25
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= mm
@ -304,7 +304,6 @@ post-patch:
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e 's|-ldl||; s|$$(LIBMAJOR)|${SHLIB_VER}|g;' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@cd ${WRKSRC}/libavcodec && ${LN} -s x86 i386 && ${LN} -s x86 amd64
.ifdef(WITH_SDL)
@${REINPLACE_CMD} -E \
-e 's|sdl-config|${SDL_CONFIG}|g' \

View file

@ -0,0 +1,31 @@
--- configure.orig 2010-07-21 20:28:42.000000000 +0200
+++ configure 2010-08-01 21:21:24.326222886 +0200
@@ -1517,7 +1517,7 @@
nm_opts='-g'
# machine
-arch_default=$(uname -m)
+arch_default=$(uname -p)
cpu="generic"
# OS
@@ -2717,8 +2717,8 @@
fi
fi
-check_header linux/videodev.h
-check_header linux/videodev2.h
+#check_header linux/videodev.h
+#check_header linux/videodev2.h
check_header sys/videoio.h
check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
@@ -3020,7 +3020,7 @@
SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path
BUILD_ROOT="$PWD"
-ARCH=$arch
+FFMPEG_ARCH=$arch
CC=$cc
AS=$as
LD=$ld

View file

@ -0,0 +1,11 @@
--- libavcodec/Makefile.orig 2010-07-21 14:37:37.000000000 +0200
+++ libavcodec/Makefile 2010-08-01 21:19:55.324513241 +0200
@@ -615,7 +615,7 @@
# well.
OBJS-$(!CONFIG_SMALL) += inverse.o
--include $(SUBDIR)$(ARCH)/Makefile
+-include $(SUBDIR)$(FFMPEG_ARCH)/Makefile
SKIPHEADERS = %_tablegen.h
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h

View file

@ -0,0 +1,13 @@
--- libavutil/common.h.orig 2010-07-07 19:27:45.000000000 +0200
+++ libavutil/common.h 2010-08-01 22:27:42.964629491 +0200
@@ -36,6 +36,10 @@
#include <string.h>
#include "attributes.h"
+#ifndef UINT64_C
+#define UINT64_C(c) (c ## UL)
+#endif
+
//rounded division & shift
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
/* assume b>0 */

View file

@ -7,7 +7,7 @@
PORTNAME= ffmpeg
PORTVERSION= 0.6
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= http://ffmpeg.org/releases/
@ -311,7 +311,6 @@ post-patch:
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e 's|-ldl||; s|$$(LIBMAJOR)|${SHLIB_VER}|g;' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@cd ${WRKSRC}/libavcodec && ${LN} -s x86 i386 && ${LN} -s x86 amd64
.ifdef(WITH_SDL)
@${REINPLACE_CMD} -E \
-e 's|sdl-config|${SDL_CONFIG}|g' \

View file

@ -1,8 +1,17 @@
--- configure.orig 2010-01-19 12:18:19.265327412 +0100
+++ configure 2010-01-19 12:18:30.429242416 +0100
@@ -2097,8 +2097,8 @@
}
EOF
--- configure.orig 2010-06-15 21:44:30.000000000 +0200
+++ configure 2010-08-01 20:32:42.201110812 +0200
@@ -1469,7 +1469,7 @@
nm_opts='-g'
# machine
-arch_default=$(uname -m)
+arch_default=$(uname -p)
cpu="generic"
# OS
@@ -2678,8 +2678,8 @@
fi
fi
-check_header linux/videodev.h
-check_header linux/videodev2.h
@ -10,4 +19,13 @@
+#check_header linux/videodev2.h
check_header sys/videoio.h
check_func_headers "windows.h vfw.h" capCreateCaptureWindow -lvfw32
check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
@@ -2986,7 +2986,7 @@
SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path
BUILD_ROOT="$PWD"
-ARCH=$arch
+FFMPEG_ARCH=$arch
CC=$cc
AS=$as
LD=$ld

View file

@ -0,0 +1,11 @@
--- libavcodec/Makefile.orig 2010-08-01 20:33:53.484907333 +0200
+++ libavcodec/Makefile 2010-08-01 20:34:26.190893400 +0200
@@ -590,7 +590,7 @@
OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
--include $(SUBDIR)$(ARCH)/Makefile
+-include $(SUBDIR)$(FFMPEG_ARCH)/Makefile
SKIPHEADERS = %_tablegen.h
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h