Fix build on alpha arch: do not use i386 specific patches on alpha
This commit is contained in:
parent
3348a55d01
commit
faced7ffa0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82182
10 changed files with 68 additions and 144 deletions
|
@ -44,6 +44,11 @@ LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a
|
|||
##
|
||||
.if ${ARCH} != "i386"
|
||||
WITHOUT_MMX= yes
|
||||
.else
|
||||
# only for i386
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile \
|
||||
${FILESDIR}/extra-bktr-patch-libavformat::avformat.h \
|
||||
${FILESDIR}/extra-bktr-patch-ffmpeg.c
|
||||
.endif
|
||||
|
||||
## lib detection
|
||||
|
@ -136,6 +141,7 @@ pre-everything::
|
|||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec'
|
||||
.endif
|
||||
.if ${ARCH} == "i386"
|
||||
.if !(defined(WITH_BKTR_FORMAT) && defined(WITH_BKTR_DEV))
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} 'If you want to capture from a bktr(4) supported card'
|
||||
|
@ -147,23 +153,23 @@ pre-everything::
|
|||
@${ECHO_MSG} 'Warning: invalid settings will probably dump cores'
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
.endif # ${ARCH} == i386
|
||||
|
||||
post-extract:
|
||||
.if ${ARCH} == "i386"
|
||||
# install booktree extension
|
||||
@${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
|
||||
.endif # ${ARCH} == i386
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s!/etc/ffserver.conf!${PREFIX}/etc/ffserver.conf!g" \
|
||||
${WRKSRC}/ffserver.c
|
||||
.if ${ARCH} == "i386"
|
||||
# we support "v4l" per default through Steve O'Hara-Smith's bktr(4)
|
||||
# patch
|
||||
@${REINPLACE_CMD} -E -e \
|
||||
's|^(v4l).*$$|\1="yes"|' \
|
||||
${WRKSRC}/configure
|
||||
# malloc.h was deprecated in favor of stdlib.h
|
||||
@${FIND} ${WRKSRC} -type f | \
|
||||
${XARGS} -n 10 ${REINPLACE_CMD} -e \
|
||||
's|malloc.h|stdlib.h|'
|
||||
.ifdef(WITH_BKTR_FORMAT)
|
||||
@${REINPLACE_CMD} -e \
|
||||
"s!VIDEO_FORMAT NTSC!VIDEO_FORMAT ${WITH_BKTR_FORMAT}!" \
|
||||
|
@ -174,6 +180,11 @@ post-patch:
|
|||
"s!VIDEO_INPUT METEOR_INPUT_DEV0!VIDEO_INPUT METEOR_INPUT_DEV${WITH_BKTR_DEV}!" \
|
||||
${WRKSRC}/libavformat/grab_bsdbktr.c
|
||||
.endif
|
||||
.endif # ${ARCH} == i386
|
||||
# malloc.h was deprecated in favor of stdlib.h
|
||||
@${FIND} ${WRKSRC} -type f | \
|
||||
${XARGS} -n 10 ${REINPLACE_CMD} -e \
|
||||
's|malloc.h|stdlib.h|'
|
||||
.ifndef(WITHOUT_LIBA52)
|
||||
@${REINPLACE_CMD} -e 's|-ldl||' \
|
||||
${WRKSRC}/configure
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
--- ffmpeg.c.orig Wed Jan 1 20:56:06 2003
|
||||
+++ ffmpeg.c Wed Jan 1 20:56:41 2003
|
||||
@@ -35,6 +35,7 @@
|
||||
#define INFINITY HUGE_VAL
|
||||
#endif
|
||||
|
||||
+#define INT64_C(x) x##LL
|
||||
#define MAXINT64 INT64_C(0x7fffffffffffffff)
|
||||
|
||||
typedef struct {
|
||||
@@ -158,7 +159,7 @@
|
||||
const char *audio_device = "none";
|
||||
#endif
|
||||
#ifndef CONFIG_VIDEO4LINUX
|
||||
-const char *v4l_device = "none";
|
||||
+const char *video_device = "none";
|
||||
#endif
|
||||
|
||||
typedef struct AVOutputStream {
|
||||
@@ -1842,7 +1843,7 @@
|
||||
|
||||
void opt_video_device(const char *arg)
|
||||
{
|
||||
- v4l_device = strdup(arg);
|
||||
+ video_device = strdup(arg);
|
||||
}
|
||||
|
||||
void opt_audio_device(const char *arg)
|
||||
@@ -2428,7 +2429,7 @@
|
||||
/* by now video grab has one stream */
|
||||
ic->streams[0]->r_frame_rate = ap->frame_rate;
|
||||
input_files[nb_input_files] = ic;
|
||||
- dump_format(ic, nb_input_files, v4l_device, 0);
|
||||
+ dump_format(ic, nb_input_files, video_device, 0);
|
||||
nb_input_files++;
|
||||
}
|
||||
if (has_audio) {
|
|
@ -0,0 +1,19 @@
|
|||
--- libavcodec/alpha/simple_idct_alpha.c.bak Fri Dec 27 12:35:23 2002
|
||||
+++ libavcodec/alpha/simple_idct_alpha.c Tue May 13 21:21:42 2003
|
||||
@@ -24,8 +24,16 @@
|
||||
* and Falk Hueffner <falk@debian.org>
|
||||
*/
|
||||
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+
|
||||
#include "asm.h"
|
||||
#include "../dsputil.h"
|
||||
+
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version < 500000
|
||||
+typedef __int32_t int_fast32_t;
|
||||
+#endif
|
||||
|
||||
extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
|
||||
int line_size);
|
|
@ -1,20 +0,0 @@
|
|||
--- libavformat/Makefile.orig Wed Jan 1 21:00:22 2003
|
||||
+++ libavformat/Makefile Wed Jan 1 21:01:27 2003
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
VPATH=$(SRC_PATH)/libavformat
|
||||
|
||||
-CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
||||
+CFLAGS= $(OPTFLAGS) -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
||||
|
||||
OBJS= utils.o cutils.o allformats.o
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VIDEO4LINUX),yes)
|
||||
-OBJS+= grab.o
|
||||
+OBJS+= grab_bsdbktr.o
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AUDIO_OSS),yes)
|
|
@ -1,11 +0,0 @@
|
|||
--- libavformat/avformat.h.orig Wed Jan 1 21:03:56 2003
|
||||
+++ libavformat/avformat.h Wed Jan 1 21:04:02 2003
|
||||
@@ -329,7 +329,7 @@
|
||||
int video_grab_init(void);
|
||||
int audio_init(void);
|
||||
|
||||
-extern const char *v4l_device;
|
||||
+extern const char *video_device;
|
||||
extern const char *audio_device;
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
|
@ -44,6 +44,11 @@ LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a
|
|||
##
|
||||
.if ${ARCH} != "i386"
|
||||
WITHOUT_MMX= yes
|
||||
.else
|
||||
# only for i386
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile \
|
||||
${FILESDIR}/extra-bktr-patch-libavformat::avformat.h \
|
||||
${FILESDIR}/extra-bktr-patch-ffmpeg.c
|
||||
.endif
|
||||
|
||||
## lib detection
|
||||
|
@ -136,6 +141,7 @@ pre-everything::
|
|||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec'
|
||||
.endif
|
||||
.if ${ARCH} == "i386"
|
||||
.if !(defined(WITH_BKTR_FORMAT) && defined(WITH_BKTR_DEV))
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} 'If you want to capture from a bktr(4) supported card'
|
||||
|
@ -147,23 +153,23 @@ pre-everything::
|
|||
@${ECHO_MSG} 'Warning: invalid settings will probably dump cores'
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
.endif # ${ARCH} == i386
|
||||
|
||||
post-extract:
|
||||
.if ${ARCH} == "i386"
|
||||
# install booktree extension
|
||||
@${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/
|
||||
.endif # ${ARCH} == i386
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s!/etc/ffserver.conf!${PREFIX}/etc/ffserver.conf!g" \
|
||||
${WRKSRC}/ffserver.c
|
||||
.if ${ARCH} == "i386"
|
||||
# we support "v4l" per default through Steve O'Hara-Smith's bktr(4)
|
||||
# patch
|
||||
@${REINPLACE_CMD} -E -e \
|
||||
's|^(v4l).*$$|\1="yes"|' \
|
||||
${WRKSRC}/configure
|
||||
# malloc.h was deprecated in favor of stdlib.h
|
||||
@${FIND} ${WRKSRC} -type f | \
|
||||
${XARGS} -n 10 ${REINPLACE_CMD} -e \
|
||||
's|malloc.h|stdlib.h|'
|
||||
.ifdef(WITH_BKTR_FORMAT)
|
||||
@${REINPLACE_CMD} -e \
|
||||
"s!VIDEO_FORMAT NTSC!VIDEO_FORMAT ${WITH_BKTR_FORMAT}!" \
|
||||
|
@ -174,6 +180,11 @@ post-patch:
|
|||
"s!VIDEO_INPUT METEOR_INPUT_DEV0!VIDEO_INPUT METEOR_INPUT_DEV${WITH_BKTR_DEV}!" \
|
||||
${WRKSRC}/libavformat/grab_bsdbktr.c
|
||||
.endif
|
||||
.endif # ${ARCH} == i386
|
||||
# malloc.h was deprecated in favor of stdlib.h
|
||||
@${FIND} ${WRKSRC} -type f | \
|
||||
${XARGS} -n 10 ${REINPLACE_CMD} -e \
|
||||
's|malloc.h|stdlib.h|'
|
||||
.ifndef(WITHOUT_LIBA52)
|
||||
@${REINPLACE_CMD} -e 's|-ldl||' \
|
||||
${WRKSRC}/configure
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
--- ffmpeg.c.orig Wed Jan 1 20:56:06 2003
|
||||
+++ ffmpeg.c Wed Jan 1 20:56:41 2003
|
||||
@@ -35,6 +35,7 @@
|
||||
#define INFINITY HUGE_VAL
|
||||
#endif
|
||||
|
||||
+#define INT64_C(x) x##LL
|
||||
#define MAXINT64 INT64_C(0x7fffffffffffffff)
|
||||
|
||||
typedef struct {
|
||||
@@ -158,7 +159,7 @@
|
||||
const char *audio_device = "none";
|
||||
#endif
|
||||
#ifndef CONFIG_VIDEO4LINUX
|
||||
-const char *v4l_device = "none";
|
||||
+const char *video_device = "none";
|
||||
#endif
|
||||
|
||||
typedef struct AVOutputStream {
|
||||
@@ -1842,7 +1843,7 @@
|
||||
|
||||
void opt_video_device(const char *arg)
|
||||
{
|
||||
- v4l_device = strdup(arg);
|
||||
+ video_device = strdup(arg);
|
||||
}
|
||||
|
||||
void opt_audio_device(const char *arg)
|
||||
@@ -2428,7 +2429,7 @@
|
||||
/* by now video grab has one stream */
|
||||
ic->streams[0]->r_frame_rate = ap->frame_rate;
|
||||
input_files[nb_input_files] = ic;
|
||||
- dump_format(ic, nb_input_files, v4l_device, 0);
|
||||
+ dump_format(ic, nb_input_files, video_device, 0);
|
||||
nb_input_files++;
|
||||
}
|
||||
if (has_audio) {
|
|
@ -0,0 +1,19 @@
|
|||
--- libavcodec/alpha/simple_idct_alpha.c.bak Fri Dec 27 12:35:23 2002
|
||||
+++ libavcodec/alpha/simple_idct_alpha.c Tue May 13 21:21:42 2003
|
||||
@@ -24,8 +24,16 @@
|
||||
* and Falk Hueffner <falk@debian.org>
|
||||
*/
|
||||
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+
|
||||
#include "asm.h"
|
||||
#include "../dsputil.h"
|
||||
+
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version < 500000
|
||||
+typedef __int32_t int_fast32_t;
|
||||
+#endif
|
||||
|
||||
extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
|
||||
int line_size);
|
|
@ -1,20 +0,0 @@
|
|||
--- libavformat/Makefile.orig Wed Jan 1 21:00:22 2003
|
||||
+++ libavformat/Makefile Wed Jan 1 21:01:27 2003
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
VPATH=$(SRC_PATH)/libavformat
|
||||
|
||||
-CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
||||
+CFLAGS= $(OPTFLAGS) -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
||||
|
||||
OBJS= utils.o cutils.o allformats.o
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VIDEO4LINUX),yes)
|
||||
-OBJS+= grab.o
|
||||
+OBJS+= grab_bsdbktr.o
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AUDIO_OSS),yes)
|
|
@ -1,11 +0,0 @@
|
|||
--- libavformat/avformat.h.orig Wed Jan 1 21:03:56 2003
|
||||
+++ libavformat/avformat.h Wed Jan 1 21:04:02 2003
|
||||
@@ -329,7 +329,7 @@
|
||||
int video_grab_init(void);
|
||||
int audio_init(void);
|
||||
|
||||
-extern const char *v4l_device;
|
||||
+extern const char *video_device;
|
||||
extern const char *audio_device;
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
Loading…
Reference in a new issue