source: scripts/untested/blfs-patches/libmpeg3-1.5.4-shared_libmpeg3-1.patch@ 873009c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 873009c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[617118d]1diff -uNr libmpeg3-1.5.4-orig/mpeg3split.c libmpeg3-1.5.4/mpeg3split.c
2--- libmpeg3-1.5.4-orig/mpeg3split.c 2003-10-14 17:54:13.000000000 +1000
3+++ libmpeg3-1.5.4/mpeg3split.c 2005-02-06 18:07:07.420359056 +1100
4@@ -2,6 +2,7 @@
5 #include <stdlib.h>
6 #include <string.h>
7
8+#include "mpeg3private.h"
9 #include "mpeg3private.inc"
10
11 void copy_data(FILE *out, FILE *in, long bytes)
12--- libmpeg3-1.5.4-orig/Makefile 2003-10-29 20:53:02.000000000 +1100
13+++ libmpeg3-1.5.4/Makefile 2005-02-06 19:20:57.473888552 +1100
14@@ -2,7 +2,10 @@
15 NASM = nasm
16 USE_MMX = 0
17 USE_CSS = 1
18-A52DIR := $(shell expr a52dec* )
19+A52DIR := /usr
20+PREFIX = /usr
21+# override this to install to lib64
22+LIBDIR = lib
23
24
25
26@@ -52,6 +55,8 @@
27 CFLAGS += -DHAVE_MMX
28 ASMOBJS = $(OBJDIR)/video/mmxidct.o
29 NASMOBJS = $(OBJDIR)/video/reconmmx.o
30+else
31+ CFLAGS += -fPIC
32 endif
33
34
35@@ -61,8 +66,7 @@
36
37 CFLAGS += \
38 -I. \
39- -I$(A52DIR)/include \
40- -I$(A52DIR)/liba52
41+ -I$(A52DIR)/include/a52dec \
42
43 #CFLAGS += -g
44
45@@ -108,6 +112,31 @@
46 $(OBJDIR)/video/vlc.o \
47 $(OBJDIR)/workarounds.o
48
49+INSTALL_HEADERS = \
50+ bitstream.h \
51+ libmpeg3.h \
52+ mpeg3atrack.h \
53+ mpeg3css.h \
54+ mpeg3demux.h \
55+ mpeg3io.h \
56+ mpeg3private.h \
57+ mpeg3private.inc \
58+ mpeg3protos.h \
59+ mpeg3title.h \
60+ mpeg3vtrack.h \
61+ timecode.h \
62+
63+INSTALL_AHEADERS = \
64+ audio/ac3.h \
65+ audio/mpeg3audio.h \
66+
67+INSTALL_VHEADERS = \
68+ video/idct.h \
69+ video/slice.h \
70+ video/mpeg3video.h
71+
72+
73+
74 #OBJS = \
75 # $(OBJDIR)/audio/ac3.o \
76 # $(OBJDIR)/audio/bit_allocation.o \
77@@ -127,18 +156,15 @@
78 $(OBJDIR)/audio \
79 $(OBJDIR)/video
80
81-include Makefile.a52
82-
83 DIRS += $(A52DIRS)
84
85
86 OUTPUT = $(OBJDIR)/libmpeg3.a
87-UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3cat
88-
89-#$(OBJDIR)/mpeg3split
90+SHAREDOUTPUT = $(OBJDIR)/libmpeg3.so
91+UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3cat $(OBJDIR)/mpeg3split
92
93
94-LIBS = -lm -lpthread
95+LIBS = -lm -lpthread -la52
96
97 $(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi )
98
99@@ -147,13 +173,14 @@
100 $(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
101 $(shell mkdir -p $(DIRS) )
102
103-all: $(OUTPUT) $(UTILS)
104+all: $(OUTPUT) $(SHAREDOUTPUT) $(UTILS)
105
106
107 $(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
108 ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
109
110-
111+$(SHAREDOUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS)
112+ $(CC) -shared -o $(SHAREDOUTPUT) $(OBJS) $(ASMOBJS) $(NASMOBJS) $(LIBS)
113
114 $(OBJDIR)/mpeg3dump: $(OUTPUT) mpeg3dump.c
115 $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(OUTPUT) $(LIBS)
116@@ -164,8 +191,8 @@
117 $(OBJDIR)/mpeg3cat: $(OUTPUT) mpeg3cat.c
118 $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(OUTPUT) $(LIBS)
119
120-#$(OBJDIR)/mpeg3split: $(OUTPUT)
121-# $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
122+$(OBJDIR)/mpeg3split: $(OUTPUT)
123+ $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
124
125 $(OBJDIR)/mpeg2qt: $(OUTPUT)
126 $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg2qt mpeg2qt.c \
127@@ -179,7 +206,17 @@
128 -ldl
129
130 install:
131- cp $(UTILS) /usr/bin
132+ install -d $(DESTDIR)${PREFIX}/bin
133+ install -d $(DESTDIR)${PREFIX}/include/libmpeg3
134+ install -d $(DESTDIR)${PREFIX}/include/libmpeg3/audio
135+ install -d $(DESTDIR)${PREFIX}/include/libmpeg3/video
136+ install -d $(DESTDIR)${PREFIX}/$(LIBDIR)
137+ install $(UTILS) $(DESTDIR)${PREFIX}/bin
138+ install -m 644 $(INSTALL_HEADERS) $(DESTDIR)${PREFIX}/include/libmpeg3
139+ install -m 644 $(INSTALL_AHEADERS) $(DESTDIR)${PREFIX}/include/libmpeg3/audio
140+ install -m 644 $(INSTALL_VHEADERS) $(DESTDIR)${PREFIX}/include/libmpeg3/video
141+ install -m 644 $(OUTPUT) $(DESTDIR)${PREFIX}/$(LIBDIR)
142+ install -m 644 $(SHAREDOUTPUT) $(DESTDIR)${PREFIX}/$(LIBDIR)
143
144 clean:
145 rm -rf $(OBJDIR)
146@@ -208,7 +245,7 @@
147 $(OBJDIR)/mpeg3demux.o: mpeg3demux.c
148 $(OBJDIR)/mpeg3ifo.o: mpeg3ifo.c
149 $(OBJDIR)/mpeg3io.o: mpeg3io.c
150-#$(OBJDIR)/mpeg3split.o: mpeg3split.c
151+$(OBJDIR)/mpeg3split.o: mpeg3split.c
152 $(OBJDIR)/mpeg3title.o: mpeg3title.c
153 $(OBJDIR)/mpeg3toc.o: mpeg3toc.c
154 $(OBJDIR)/mpeg3toc3.o: mpeg3toc3.c
Note: See TracBrowser for help on using the repository browser.