Author: thl
Update of /cvs/free/rpms/libmpeg3/F-8
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19324
Modified Files:
.cvsignore sources
Added Files:
libmpeg3-1.5.2-gnustack.patch libmpeg3-1.7-boostrap.patch
libmpeg3-1.7-cinelerra_autotools.patch
libmpeg3-1.7-cinelerra_hacking.patch
libmpeg3-1.7-fix_commented.patch libmpeg3-1.7-makefile.patch
libmpeg3-1.7-memcpy.patch libmpeg3-1.7-pkgconfig.in.patch
libmpeg3-1.7-spec_in.patch libmpeg3.spec
Log Message:
initial import from livna
libmpeg3-1.5.2-gnustack.patch:
--- NEW FILE libmpeg3-1.5.2-gnustack.patch ---
diff -ru libmpeg3-1.5.2.orig/video/mmxidct.S libmpeg3-1.5.2/video/mmxidct.S
--- libmpeg3-1.5.2.orig/video/mmxidct.S 2006-04-24 23:13:14.000000000 +0200
+++ libmpeg3-1.5.2/video/mmxidct.S 2006-04-24 23:13:47.000000000 +0200
@@ -673,3 +673,7 @@
ret
.Lfe1:
.size IDCT_mmx,.Lfe1-IDCT_mmx
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",%progbits
+#endif
diff -ru libmpeg3-1.5.2.orig/video/reconmmx.s libmpeg3-1.5.2/video/reconmmx.s
--- libmpeg3-1.5.2.orig/video/reconmmx.s 2006-04-24 23:13:14.000000000 +0200
+++ libmpeg3-1.5.2/video/reconmmx.s 2006-04-24 23:13:20.000000000 +0200
@@ -298,4 +298,6 @@
pop esi
ret
-
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
libmpeg3-1.7-boostrap.patch:
--- NEW FILE libmpeg3-1.7-boostrap.patch ---
diff -uNr libmpeg3-1.7-bootstrap/bootstrap libmpeg3-1.7/bootstrap
--- libmpeg3-1.7-bootstrap/bootstrap 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-1.7/bootstrap 2007-09-14 00:27:39.000000000 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -x
+aclocal
+libtoolize --force --copy
+autoheader
+automake --add-missing --copy
+autoconf
libmpeg3-1.7-cinelerra_autotools.patch:
--- NEW FILE libmpeg3-1.7-cinelerra_autotools.patch ---
diff -uNr libmpeg3-1.7/audio/ac3.c libmpeg3-cinelerra/audio/ac3.c
--- libmpeg3-1.7/audio/ac3.c 2006-01-11 05:42:23.000000000 +0100
+++ libmpeg3-cinelerra/audio/ac3.c 2007-07-05 00:42:40.000000000 +0200
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdio.h>
-#include "a52.h"
+#include <a52dec/a52.h>
#include "mpeg3private.h"
#include "mpeg3protos.h"
diff -uNr libmpeg3-1.7/audio/Makefile.am libmpeg3-cinelerra/audio/Makefile.am
--- libmpeg3-1.7/audio/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-cinelerra/audio/Makefile.am 2007-07-05 00:42:40.000000000 +0200
@@ -0,0 +1,12 @@
+noinst_LTLIBRARIES = libmpeg3_audio.la
+libmpeg3_audio_la_SOURCES = ac3.c dct.c huffman.c layer2.c layer3.c mpeg3audio.c pcm.c
synthesizers.c tables.c
+libmpeg3_audio_la_LDFLAGS =
+
+noinst_HEADERS = ac3.h huffman.h mpeg3audio.h tables.h
+
+AM_CFLAGS = $(CPU_CFLAGS) $(LARGEFILE_CFLAGS)
+AM_CXXFLAGS = $(CPU_CFLAGS) $(LARGEFILE_CFLAGS)
+INCLUDES=-I$(srcdir)/..
+
+LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LTC_FLAGS)
+
diff -uNr libmpeg3-1.7/configure.in libmpeg3-cinelerra/configure.in
--- libmpeg3-1.7/configure.in 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-cinelerra/configure.in 2007-09-08 23:27:17.000000000 +0200
@@ -0,0 +1,83 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(libmpeg3, 1.7)
+AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ(2.53)
+AM_CONFIG_HEADER([config.h])
+AM_PROG_AS
+AC_DISABLE_SHARED
+AC_ENABLE_STATIC
+AC_PROG_LIBTOOL
+
+LIBMPEG3_VERSION_CURRENT=1
+LIBMPEG3_VERSION_REVISION=0
+LIBMPEG3_VERSION_AGE=0
+LIBMPEG3_VERSION_INFO=$LIBMPEG3_VERSION_CURRENT:$LIBMPEG3_VERSION_REVISION:$LIBMPEG3_VERSION_AGE
+AC_SUBST(LIBMPEG3_VERSION_INFO)
+
+# Checks for programs.
+AC_PROG_CC
+
+# hack for using nasm for .S files
+CCAS="nasm --tag=$CC"
+AC_SUBST(CCAS)
+AC_SUBST(CCASFLAGS)
+
+############## MMX
+
+AC_ARG_ENABLE(mmx,
+ AC_HELP_STRING([--enable-mmx], [enables support for mmx (default is autodetect)]),
+ [ enable_mmx=$enableval ],[ enable_mmx=auto ])
+case "$target_cpu" in
+i586 | i686)
+ test "x$enable_mmx" = "xauto" && enable_mmx=yes
+
+ CPU_CFLAGS="-DX86_CPU $CPU_CFLAGS"
+
+ if test "x$enable_mmx" = "xyes"; then
+ CPU_CFLAGS="-DHAVE_MMX -DUSE_MMX $CPU_CFLAGS" # -D_MMX_ doesn't work
+ enable_mmx32=yes
+ fi
+;;
+x86_64)
+ test "x$enable_mmx" = "xauto" && enable_mmx=yes
+ CPU_CFLAGS="-DX86_CPU $CPU_CFLAGS"
+ if test "x$enable_mmx" = "xyes"; then
+ CPU_CFLAGS="-DHAVE_MMX -DUSE_MMX $CPU_CFLAGS"
+
+ fi
+;;
+esac
+
+test "x$enable_mmx" = "xauto" && enable_mmx=no
+
+AM_CONDITIONAL(USEMMX, test "x$enable_mmx" = "xyes")
+AM_CONDITIONAL(USEMMX32, test "x$enable_mmx32" = "xyes")
+AM_CONDITIONAL(TARGET_BUILTIN_VECTOR,test "x$enable_mmx" = "xyes")
+AC_SUBST(LIBDECORE_LIBADD)
+AC_SUBST(CPU_CFLAGS)
+
+############## END OF MMX
+
+LARGEFILE_CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64"
+AC_SUBST(LARGEFILE_CFLAGS)
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_STRUCT_TM
+
+# Checks for libraries.
+
+AC_CONFIG_FILES([
+Makefile
+audio/Makefile
+video/Makefile
+libmpeg3.spec
+libmpeg3.pc
+])
+AC_OUTPUT
+
diff -uNr libmpeg3-1.7/Makefile.am libmpeg3-cinelerra/Makefile.am
--- libmpeg3-1.7/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-cinelerra/Makefile.am 2007-09-08 22:58:17.000000000 +0200
@@ -0,0 +1,61 @@
+lib_LTLIBRARIES = libmpeg3.la
+AM_CFLAGS = $(CPU_CFLAGS) $(LARGEFILE_CFLAGS)
+libmpeg3_la_LDFLAGS = -version-info @LIBMPEG3_VERSION_INFO@
+libmpeg3_la_LIBADD = -la52 video/libmpeg3_video.la audio/libmpeg3_audio.la -lm \
+ -lpthread
+libmpeg3_la_SOURCES = libmpeg3.c mpeg3bits.c mpeg3atrack.c mpeg3css.c \
+ mpeg3demux.c \
+ mpeg3ifo.c \
+ mpeg3io.c \
+ mpeg3strack.c \
+ mpeg3title.c \
+ mpeg3tocutil.c \
+ mpeg3vtrack.c \
+ workarounds.c
+
+bin_PROGRAMS = mpeg3dump mpeg3peek mpeg3toc mpeg3cat # mpeg2qt
+mpeg3dump_SOURCES = mpeg3dump.c
+mpeg3dump_LDADD = libmpeg3.la
+mpeg3dump_CFLAGS = $(AM_CFLAGS)
+mpeg3peek_SOURCES = mpeg3peek.c
+mpeg3peek_LDADD = libmpeg3.la
+mpeg3peek_CFLAGS = $(AM_CFLAGS)
+mpeg3toc_SOURCES = mpeg3toc.c
+mpeg3toc_LDADD = libmpeg3.la
+mpeg3toc_CFLAGS = $(AM_CFLAGS)
+mpeg3cat_SOURCES = mpeg3cat.c
+mpeg3cat_LDADD = libmpeg3.la
+mpeg3cat_CFLAGS = $(AM_CFLAGS)
+#mpeg2qt_SOURCES = mpeg2qt.c # disabled to prevent circle dependencies
+#mpeg2qt_LDADD = libmpeg3.la -lpng -lz -ldl -lquicktime4linux
+#mpeg2qt_CFLAGS = $(AM_CFLAGS) -I$(includedir)/quicktime4linux
+
+SUBDIRS = audio video
+
+EXTRA_DIST = docs
+
+noinst_HEADERS = bitstream.h \
+ ifo.h \
+ libmpeg3.h \
+ mpeg3atrack.h \
+ mpeg3css.h \
+ mpeg3css_fake.c \
+ mpeg3demux.h \
+ mpeg3io.h \
+ mpeg3private.h \
+ mpeg3private.inc \
+ mpeg3protos.h \
+ mpeg3title.h \
+ mpeg3vtrack.h \
+ timecode.h \
+ workarounds.h
+
+dist_noinst_SCRIPTS = bootstrap
+
+pkgincludedir=$(includedir)/mpeg3
+pkginclude_HEADERS=libmpeg3.h mpeg3private.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libmpeg3.pc
+
+LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LTC_FLAGS)
diff -uNr libmpeg3-1.7/video/Makefile.am libmpeg3-cinelerra/video/Makefile.am
--- libmpeg3-1.7/video/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-cinelerra/video/Makefile.am 2007-07-05 00:42:40.000000000 +0200
@@ -0,0 +1,29 @@
+noinst_LTLIBRARIES = libmpeg3_video.la
+libmpeg3_video_la_SOURCES = getpicture.c headers.c idct.c macroblocks.c mmxtest.c
motion.c \
+ mpeg3cache.c \
+ mpeg3video.c \
+ output.c \
+ reconstruct.c \
+ seek.c \
+ slice.c \
+ subtitle.c \
+ vlc.c
+
+if USEMMX
+libmpeg3_video_la_SOURCES += mmxidct.S reconmmx.s
+else
+libmpeg3_video_la_SOURCES +=
+endif
+
+noinst_HEADERS = idct.h \
+ layerdata.h \
+ mpeg3video.h \
+ mpeg3videoprotos.h \
+ slice.h \
+ vlc.h
+
+libmpeg3_video_la_LDFLAGS=
+AM_CFLAGS = $(CPU_CFLAGS) $(LARGEFILE_CFLAGS)
+INCLUDES=-I$(srcdir)/..
+
+LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LTC_FLAGS)
libmpeg3-1.7-cinelerra_hacking.patch:
--- NEW FILE libmpeg3-1.7-cinelerra_hacking.patch ---
diff -uNr libmpeg3-1.7/libmpeg3.c libmpeg3-cinelerra/libmpeg3.c
--- libmpeg3-1.7/libmpeg3.c 2006-03-29 06:14:26.000000000 +0200
+++ libmpeg3-cinelerra/libmpeg3.c 2007-07-05 00:42:40.000000000 +0200
@@ -181,6 +181,7 @@
strncasecmp(ext, ".mpg", 4) &&
strncasecmp(ext, ".vob", 4) &&
strncasecmp(ext, ".mpeg", 4) &&
+ strncasecmp(ext, ".m2t", 4) &&
strncasecmp(ext, ".ac3", 4))
result = 0;
}
diff -uNr libmpeg3-1.7/libmpeg3.h libmpeg3-cinelerra/libmpeg3.h
--- libmpeg3-1.7/libmpeg3.h 2006-03-29 06:14:26.000000000 +0200
+++ libmpeg3-cinelerra/libmpeg3.h 2007-07-05 00:42:40.000000000 +0200
@@ -5,6 +5,7 @@
extern "C" {
#endif
+// FIXME: don't include private definitions in external header
#include "mpeg3private.h"
diff -uNr libmpeg3-1.7/mpeg3toc.c libmpeg3-cinelerra/mpeg3toc.c
--- libmpeg3-1.7/mpeg3toc.c 2005-12-23 23:54:55.000000000 +0100
+++ libmpeg3-cinelerra/mpeg3toc.c 2007-07-05 00:42:40.000000000 +0200
@@ -574,7 +574,7 @@
if(j == vtracks - 1 && l == frame_count - 1)
{
total_frames += frame_count;
- fprintf(stderr, "Video: title=%lld total_frames=%d ", title_number,
total_frames);
+ fprintf(stderr, "Video: title=%lld total_frames=%d (%.1f \%)",
title_number, total_frames,100*((float)position)/((float)
mpeg3demux_movie_size(demuxer)));
}
}
}
diff -uNr libmpeg3-1.7/video/output.c libmpeg3-cinelerra/video/output.c
--- libmpeg3-1.7/video/output.c 2006-01-07 10:55:56.000000000 +0100
+++ libmpeg3-cinelerra/video/output.c 2007-07-05 00:42:40.000000000 +0200
@@ -104,7 +104,7 @@
*data++ = 0;
#define STORE_PIXEL_RGB565 \
- *((unsigned short*)data) = \
+ *(*(unsigned short**)(&data))++ = \
((CLIP(r_l) & 0xf8) << 8) | \
((CLIP(g_l) & 0xfc) << 3) | \
((CLIP(b_l) & 0xf8) >> 3); \
diff -uNr libmpeg3-1.7/video/vlc.c libmpeg3-cinelerra/video/vlc.c
--- libmpeg3-1.7/video/vlc.c 2005-04-21 05:59:42.000000000 +0200
+++ libmpeg3-cinelerra/video/vlc.c 2007-07-05 00:42:40.000000000 +0200
@@ -1,3 +1,6 @@
+// FIXME: vlc.h redefines ERROR to 99 if and only if error is defined.
+#define ERROR
+
#include "mpeg3private.h"
#include "mpeg3protos.h"
#include "vlc.h"
libmpeg3-1.7-fix_commented.patch:
--- NEW FILE libmpeg3-1.7-fix_commented.patch ---
diff -up libmpeg3-1.7/mpeg3protos.h.commented libmpeg3-1.7/mpeg3protos.h
--- libmpeg3-1.7/mpeg3protos.h.commented 2006-03-29 06:14:26.000000000 +0200
+++ libmpeg3-1.7/mpeg3protos.h 2007-09-11 18:20:08.000000000 +0200
@@ -390,7 +390,7 @@ int mpeg3demux_open_title(mpeg3_demuxer_
/* Go to the absolute byte given */
int mpeg3demux_seek_byte(mpeg3_demuxer_t *demuxer, int64_t byte);
-/* Seek to the title and cell containing the absolute byte of the
+/* Seek to the title and cell containing the absolute byte of the */
/* demuxer. */
/* Called at the beginning of every packet. */
int mpeg3_seek_phys(mpeg3_demuxer_t *demuxer);
libmpeg3-1.7-makefile.patch:
--- NEW FILE libmpeg3-1.7-makefile.patch ---
diff -up libmpeg3-1.7/Makefile.makefile libmpeg3-1.7/Makefile
--- libmpeg3-1.7/Makefile.makefile 2006-02-15 06:09:31.000000000 +0100
+++ libmpeg3-1.7/Makefile 2007-09-08 03:16:05.000000000 +0200
@@ -9,6 +9,10 @@ ifeq ("$(PREFIX)", "")
PREFIX=/usr
endif
+ifeq ("$(LIBDIR)", "")
+LIBDIR=$(PREFIX)/lib
+endif
+
ifeq ($(origin CFLAGS), environment)
HAVE_CFLAGS := y
else
@@ -16,36 +20,13 @@ HAVE_CFLAGS := n
endif
+ifeq ("$(OBJDIR)", "")
OBJDIR := $(shell uname --machine)
-
-
-
-
-ifeq ($(OBJDIR), alpha)
- USE_MMX = 0
- ifneq ($(HAVE_CFLAGS), y)
- CFLAGS := -O4 -arch ev67 -ieee -accept c99_keywords -gcc_messages
- endif
-endif
-
-ifeq ($(OBJDIR), i686)
- USE_MMX = 1
- ifneq ($(HAVE_CFLAGS), y)
- CFLAGS := -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2
-falign-functions=2 -I/usr/local/include
- endif
- CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-endif
-
-ifeq ($(OBJDIR), x86_64)
- ifneq ($(HAVE_CFLAGS), y)
- CFLAGS := -O2 -fomit-frame-pointer -I/usr/local/include
- endif
- CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-
-
endif
+CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+
ifeq ($(USE_CSS), 1)
CFLAGS += -DHAVE_CSS
@@ -64,8 +45,7 @@ endif
CFLAGS += \
-I. \
- -I$(A52DIR)/include \
- -I$(A52DIR)/liba52
+ -I/usr/include/a52dec
@@ -136,9 +116,9 @@ DIRS := \
$(OBJDIR)/audio \
$(OBJDIR)/video
-include Makefile.a52
+#include Makefile.a52
-DIRS += $(A52DIRS)
+#DIRS += $(A52DIRS)
OUTPUT = $(OBJDIR)/libmpeg3.a
@@ -147,40 +127,40 @@ UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mp
#$(OBJDIR)/mpeg3split
-LIBS = -lm -lpthread
+LIBS = -lm -lpthread -la52
$(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi )
-$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
-$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags)
-$(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
+#(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
+#$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags)
+#$(shell echo $(OBJS) $(ASMOBJS) $(NASMOBJS) > $(OBJDIR)/objs)
$(shell mkdir -p $(DIRS) )
all: $(OUTPUT) $(UTILS)
-$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
- ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
+$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS)
+ ar rcs $(OUTPUT) $(OBJS) $(ASMOBJS) $(NASMOBJS)
$(OBJDIR)/mpeg3dump: $(OUTPUT) mpeg3dump.c
- $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(OUTPUT) $(LIBS)
+ $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(OUTPUT) $(LIBS)
$(OBJDIR)/mpeg3peek: $(OUTPUT) mpeg3peek.c
- $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3peek mpeg3peek.c $(OUTPUT) $(LIBS)
+ $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg3peek mpeg3peek.c $(OUTPUT) $(LIBS)
$(OBJDIR)/mpeg3toc: $(OUTPUT) mpeg3toc.c
- $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3toc mpeg3toc.c $(OUTPUT) $(LIBS)
+ $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg3toc mpeg3toc.c $(OUTPUT) $(LIBS)
$(OBJDIR)/mpeg3cat: $(OUTPUT) mpeg3cat.c
- $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(OUTPUT) $(LIBS)
+ $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(OUTPUT) $(LIBS)
#$(OBJDIR)/mpeg3split: $(OUTPUT)
-# $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
+# $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
$(OBJDIR)/mpeg2qt: $(OUTPUT)
- $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg2qt mpeg2qt.c \
+ $(CC) $(CFLAGS) -o $(OBJDIR)/mpeg2qt mpeg2qt.c \
$(OUTPUT) \
$(LIBS) \
-I. \
@@ -191,9 +171,12 @@ $(OBJDIR)/mpeg2qt: $(OUTPUT)
-ldl
install:
- cp $(UTILS) $(PREFIX)/bin
-# cp $(OUTPUT) $(PREFIX)/lib
-# cp libmpeg3.h mpeg3private.h $(PREFIX)/include
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp $(UTILS) $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ cp $(OUTPUT) $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ cp libmpeg3.h mpeg3private.h $(DESTDIR)$(PREFIX)/include
clean:
rm -rf $(OBJDIR)
@@ -206,13 +189,13 @@ wc:
cat *.c *.h audio/*.c audio/*.h video/*.c video/*.h | wc
$(OBJS):
- $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o
+ $(CC) -c $(CFLAGS) $(subst $(OBJDIR)/,, $*.c) -o $*.o
$(ASMOBJS):
- $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.S) -o $*.o
+ $(CC) -c $(CFLAGS) $(subst $(OBJDIR)/,, $*.S) -o $*.o
$(NASMOBJS):
$(NASM) -f elf $(subst $(OBJDIR)/,, $*.s) -o $*.o
-$(A52OBJS):
- $(CC) -c `cat $(OBJDIR)/a52_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o
+#(A52OBJS):
+# $(CC) -c $(CFLAGS) $(subst $(OBJDIR)/,, $*.c) -o $*.o
$(OBJDIR)/libmpeg3.o: libmpeg3.c
$(OBJDIR)/mpeg3atrack.o: mpeg3atrack.c
libmpeg3-1.7-memcpy.patch:
--- NEW FILE libmpeg3-1.7-memcpy.patch ---
diff -ur libmpeg3-1.7.orig/audio/mpeg3audio.c libmpeg3-1.7/audio/mpeg3audio.c
--- libmpeg3-1.7.orig/audio/mpeg3audio.c 2006-02-19 13:43:27.000000000 +0200
+++ libmpeg3-1.7/audio/mpeg3audio.c 2007-08-17 18:06:37.000000000 +0300
@@ -3,7 +3,7 @@
#include <math.h>
#include <stdlib.h>
-
+#include <string.h>
diff -ur libmpeg3-1.7.orig/video/subtitle.c libmpeg3-1.7/video/subtitle.c
--- libmpeg3-1.7.orig/video/subtitle.c 2006-02-27 06:14:00.000000000 +0200
+++ libmpeg3-1.7/video/subtitle.c 2007-08-17 18:07:00.000000000 +0300
@@ -2,6 +2,7 @@
#include "mpeg3protos.h"
#include <stdlib.h>
+#include <string.h>
static unsigned char get_nibble(unsigned char **ptr, int *nibble)
{
libmpeg3-1.7-pkgconfig.in.patch:
--- NEW FILE libmpeg3-1.7-pkgconfig.in.patch ---
diff -uNr libmpeg3-1.7_spec/libmpeg3.pc.in libmpeg3-1.7/libmpeg3.pc.in
--- libmpeg3-1.7_spec/libmpeg3.pc.in 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-1.7/libmpeg3.pc.in 2007-09-11 22:08:28.000000000 +0200
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@prefix@
+libdir=@libdir@
+includedir=@includedir@/mpeg3
+
+Name: @PACKAGE@
+Description: Decoder of various derivatives of MPEG standards
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -lmpeg3 -lpthread -la52
+Cflags: -I${includedir}
libmpeg3-1.7-spec_in.patch:
--- NEW FILE libmpeg3-1.7-spec_in.patch ---
diff -uNr libmpeg3-1.7_spec/libmpeg3.spec.in libmpeg3-1.7/libmpeg3.spec.in
--- libmpeg3-1.7_spec/libmpeg3.spec.in 1970-01-01 01:00:00.000000000 +0100
+++ libmpeg3-1.7/libmpeg3.spec.in 2007-09-11 21:34:13.000000000 +0200
@@ -0,0 +1,160 @@
+Summary: Decoder of various derivatives of MPEG standards
+Name: libmpeg3
+Version: @VERSION@
+Release: 1%{?dist}
+License: GPLv2+
+Group: System Environment/Libraries
+URL:
http://heroinewarrior.com/libmpeg3.php3
+Source:
http://dl.sf.net/heroines/libmpeg3-%{version}-src.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+#BuildRequires: nasm
+#BuildRequires: a52dec-devel
+
+#BuildRequires: autoconf, libtool, automake
+
+%description
+LibMPEG3 decodes the many many derivatives of MPEG standards into
+uncompressed data suitable for editing and playback.
+
+libmpeg3 currently decodes:
+ - MPEG-1 Layer II/III Audio and program streams
+ - MPEG-2 Layer III Audio, program streams and transport streams
+ - MPEG-1 and MPEG-2 Video
+ - AC3 Audio
+ - IFO files
+ - VOB files
+
+
+%package utils
+Summary: Utilities from libmpeg3
+Group: Applications/Multimedia
+Requires: %{name} = %{version}-%{release}
+
+%description utils
+LibMPEG3 decodes the many many derivatives of MPEG standards into
+uncompressed data suitable for editing and playback.
+
+This package contains utility programs based on libmpeg3.
+
+
+%package devel
+Summary: Development files for libmpeg3
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+LibMPEG3 decodes the many many derivatives of MPEG standards into
+uncompressed data suitable for editing and playback.
+
+This package contains files needed to build applications that will use
+libmpeg3.
+
+
+%prep
+%setup -q
+
+
+
+
+%build
+%configure --enable-shared --enable-static
+%ifarch i686 x86_64
+# --enable-mmx \
+%endif
+
+make %{?_smp_mflags}
+
+
+
+%install
+%{__rm} -rf %{buildroot}
+
+%{__make} install \
+ LIBDIR=%{_libdir} \
+ DESTDIR=%{buildroot} \
+ INSTALL="install -c -p"
+
+%{__rm} -rf %{buildroot}%{_libdir}/*.la
+
+
+%clean
+%{__rm} -rf %{buildroot}
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%defattr(-, root, root, -)
+%doc COPYING
+%{_libdir}/*.so.*
+
+%files utils
+%defattr(-, root, root, -)
+%{_bindir}/mpeg3cat
+%{_bindir}/mpeg3dump
+%{_bindir}/mpeg3peek
+%{_bindir}/mpeg3toc
+#{_bindir}/mpeg2qt
+
+%files devel
+%defattr(-, root, root,-)
+%doc docs/*
+%{_libdir}/*.so
+%{_libdir}/*.a
+%{_includedir}/mpeg3/
+%{_libdir}/pkgconfig/*.pc
+
+
+%changelog
+* Sun Sep 9 2007 kwizart < kwizart at
gmail.com > - 1.7-4
+- Add autotools support (default is still static )
+- Remove internal css
+- Build with our cflags (-fPIC is no more necessary )
+
+* Fri Sep 7 2007 kwizart < kwizart at
gmail.com > - 1.7-3
+- Add dist tag
+- modified patch for Makefile
+- Add BR's
+
+* Wed Sep 20 2006 Matthias Saou <
http://freshrpms.net/> 1.7-2
+- Run make twice since there is an EOF error that makes the first run abort.
+
+* Mon Jul 3 2006 Matthias Saou <
http://freshrpms.net/> 1.7-1
+- Update to 1.7.
+
+* Fri Mar 17 2006 Matthias Saou <
http://freshrpms.net/> 1.6-2
+- Add -fPIC to the CFLAGS to fix transcode build on x86_64.
+
+* Thu Jan 19 2006 Matthias Saou <
http://freshrpms.net/> 1.6-1
+- Update to 1.6.
+- Split "main" into "utils" (bin) and "devel" (the static
lib).
+- Add Makefile patch to ease install and get our CFLAGS used.
+- Don't enable MMX on x86_64, the x86 asm fails.
+
+* Mon Aug 15 2005 Matthias Saou <
http://freshrpms.net/> 1.5.4-5
+- Force __USE_LARGEFILE64 to fix FC4 ppc build.
+
+* Fri Apr 22 2005 Matthias Saou <
http://freshrpms.net/> 1.5.4-4
+- Add gcc4 patch.
+
+* Thu Nov 4 2004 Matthias Saou <
http://freshrpms.net/> 1.5.4-3
+- Remove unneeded /usr/bin fix, since we don't use "make install".
+- Replace -O? with -O1 in optflags since build fails with O2 and gcc 3.4.
+- Make nasm mandatory : The configure script won't run without it anyway.
+- Use libdir/*.* in order to not catch all debuginfo files too.
+- Added -devel provides for now.
+
+* Sat Jun 26 2004 Dag Wieers <dag(a)wieers.com> - 1.5.4-2
+- Fixes for x86_64.
+
+* Wed Apr 07 2004 Dag Wieers <dag(a)wieers.com> - 1.5.4-1
+- Updated to release 1.5.4.
+
+* Mon Sep 08 2003 Dag Wieers <dag(a)wieers.com> - 1.5.2-0
+- Updated to release 1.5.2.
+
+* Wed Feb 12 2003 Dag Wieers <dag(a)wieers.com> - 1.4-0
+- Initial package. (using DAR)
--- NEW FILE libmpeg3.spec ---
Summary: Decoder of various derivatives of MPEG standards
Name: libmpeg3
Version: 1.7
Release: 6%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL:
http://heroinewarrior.com/libmpeg3.php3
Source:
http://dl.sf.net/heroines/libmpeg3-%{version}-src.tar.bz2
Patch0: libmpeg3-1.7-makefile.patch
Patch1: libmpeg3-1.7-cinelerra_autotools.patch
Patch2: libmpeg3-1.7-cinelerra_hacking.patch
Patch3: libmpeg3-1.7-fix_commented.patch
Patch4: libmpeg3-1.7-spec_in.patch
Patch5: libmpeg3-1.7-pkgconfig.in.patch
Patch6: libmpeg3-1.7-boostrap.patch
# Patches 7/8 from gentoo
#http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libmpeg3/files/
Patch7: libmpeg3-1.5.2-gnustack.patch
Patch8: libmpeg3-1.7-memcpy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nasm
BuildRequires: a52dec-devel
BuildRequires: libtool
%description
LibMPEG3 decodes the many many derivatives of MPEG standards into
uncompressed data suitable for editing and playback.
libmpeg3 currently decodes:
- MPEG-1 Layer II/III Audio and program streams
- MPEG-2 Layer III Audio, program streams and transport streams
- MPEG-1 and MPEG-2 Video
- AC3 Audio
- IFO files
- VOB files
%package utils
Summary: Utilities from libmpeg3
Group: Applications/Multimedia
Requires: %{name} = %{version}-%{release}
%description utils
LibMPEG3 decodes the many many derivatives of MPEG standards into
uncompressed data suitable for editing and playback.
This package contains utility programs based on libmpeg3.
%package devel
Summary: Development files for libmpeg3
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
LibMPEG3 decodes the many many derivatives of MPEG standards into
uncompressed data suitable for editing and playback.
This package contains files needed to build applications that will use
libmpeg3.
%prep
%setup -q
#patch0 -p1 -b .makefile
# Removed unneeded files
#rm -rf a52dec-* depend.a52
# Patch autotools
%patch1 -p1
# Thoses patches was taken from cinepaint cvs
# Which have special libmpeg3
#patch2 -p1 -b .cine_hack
# Fix comments
%patch3 -p1 -b .commented
# Add spec.in
%patch4 -p1
# Add pkgconfig.in
%patch5 -p1
# Add ./bootstrap
%patch6 -p1
# gentoo patches
%patch7 -p1 -b .gnustack
%patch8 -p1 -b .memcpy
# Touch docs files:
touch INSTALL README NEWS AUTHORS ChangeLog
# Build autotools
chmod 755 bootstrap
./bootstrap
%build
# Enable USE_MMX for archs that support it, not by default on i386
%configure --enable-shared --disable-static \
%ifarch i686 x86_64
# --enable-mmx \
%endif
# This seems not to work with x86_64 on AMD64
# Error: suffix or operands invalid for `push'
#sed -i -e 's|$(CCASFLAGS)|#$(CCASFLAGS)|g' video/Makefile
make %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} install \
LIBDIR=%{_libdir} \
DESTDIR=%{buildroot} \
INSTALL="install -c -p"
%{__rm} -rf %{buildroot}%{_libdir}/*.la
%clean
%{__rm} -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root, -)
%doc COPYING
%{_libdir}/*.so.*
%files utils
%defattr(-, root, root, -)
%{_bindir}/mpeg3cat
%{_bindir}/mpeg3dump
%{_bindir}/mpeg3peek
%{_bindir}/mpeg3toc
%files devel
%doc docs/*
%defattr(-, root, root,-)
%{_libdir}/*.so
%{_includedir}/mpeg3/
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Sun Aug 03 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 1.7-6
- rebuild
* Fri Sep 28 2007 kwizart < kwizart at
gmail.com > - 1.7-5
- Add gentoo patches
7: Remove executable stacks, thanks to Martin von Gagern in gentoo #131155.
8: Fix missing include string.h for implicit declaration of memcpy.
* Thu Sep 13 2007 kwizart < kwizart at
gmail.com > - 1.7-4
- Add autotools support (default is shared )
- Remove internal css
- Build with our cflags (-fPIC is no more necessary )
- TODO build mpeg2qt
* Fri Sep 7 2007 kwizart < kwizart at
gmail.com > - 1.7-3
- Add dist tag
- modified patch for Makefile
- Add BR's
* Wed Sep 20 2006 Matthias Saou <
http://freshrpms.net/> 1.7-2
- Run make twice since there is an EOF error that makes the first run abort.
* Mon Jul 3 2006 Matthias Saou <
http://freshrpms.net/> 1.7-1
- Update to 1.7.
* Fri Mar 17 2006 Matthias Saou <
http://freshrpms.net/> 1.6-2
- Add -fPIC to the CFLAGS to fix transcode build on x86_64.
* Thu Jan 19 2006 Matthias Saou <
http://freshrpms.net/> 1.6-1
- Update to 1.6.
- Split "main" into "utils" (bin) and "devel" (the static
lib).
- Add Makefile patch to ease install and get our CFLAGS used.
- Don't enable MMX on x86_64, the x86 asm fails.
* Mon Aug 15 2005 Matthias Saou <
http://freshrpms.net/> 1.5.4-5
- Force __USE_LARGEFILE64 to fix FC4 ppc build.
* Fri Apr 22 2005 Matthias Saou <
http://freshrpms.net/> 1.5.4-4
- Add gcc4 patch.
* Thu Nov 4 2004 Matthias Saou <
http://freshrpms.net/> 1.5.4-3
- Remove unneeded /usr/bin fix, since we don't use "make install".
- Replace -O? with -O1 in optflags since build fails with O2 and gcc 3.4.
- Make nasm mandatory : The configure script won't run without it anyway.
- Use libdir/*.* in order to not catch all debuginfo files too.
- Added -devel provides for now.
* Sat Jun 26 2004 Dag Wieers <dag(a)wieers.com> - 1.5.4-2
- Fixes for x86_64.
* Wed Apr 07 2004 Dag Wieers <dag(a)wieers.com> - 1.5.4-1
- Updated to release 1.5.4.
* Mon Sep 08 2003 Dag Wieers <dag(a)wieers.com> - 1.5.2-0
- Updated to release 1.5.2.
* Wed Feb 12 2003 Dag Wieers <dag(a)wieers.com> - 1.4-0
- Initial package. (using DAR)
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/libmpeg3/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:53:00 -0000 1.1
+++ .cvsignore 4 Aug 2008 18:29:24 -0000 1.2
@@ -0,0 +1 @@
+libmpeg3-1.7-src.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/free/rpms/libmpeg3/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:53:00 -0000 1.1
+++ sources 4 Aug 2008 18:29:24 -0000 1.2
@@ -0,0 +1 @@
+4a3e8896164d59d7d0dff69b50b75352 libmpeg3-1.7-src.tar.bz2