summaryrefslogtreecommitdiff
path: root/data/x264/darwin.diff
blob: f5dd7cd58bc92a65506605b362a598811d860c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff -ru x264-snapshot-20080226-2245/configure x264-snapshot-20080226-2245+iPhone/configure
--- x264-snapshot-20080226-2245/configure	2008-02-26 21:45:02.000000000 +0000
+++ x264-snapshot-20080226-2245+iPhone/configure	2008-05-19 12:49:10.000000000 +0000
@@ -182,8 +182,8 @@
     ;;
   darwin*)
     SYS="MACOSX"
-    CFLAGS="$CFLAGS -falign-loops=16"
-    LDFLAGS="$LDFLAGS -lm -lmx"
+    CFLAGS="$CFLAGS -falign-loops=16 -fno-common"
+    LDFLAGS="$LDFLAGS -lm"
     ;;
   freebsd*)
     SYS="FREEBSD"
@@ -454,10 +454,10 @@
 
 if [ "$shared" = "yes" ]; then
     API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
-    echo "SONAME=libx264.so.$API" >> config.mak
+    echo "SONAME=libx264.dylib.$API" >> config.mak
     echo 'default: $(SONAME)' >> config.mak
     if [ "$gtk" = "yes" ]; then
-        echo "SONAMEGTK=libx264gtk.so.$API" >> gtk/config.mak
+        echo "SONAMEGTK=libx264gtk.dylib.$API" >> gtk/config.mak
     fi
 fi
 
diff -ru x264-snapshot-20080226-2245/Makefile x264-snapshot-20080226-2245+iPhone/Makefile
--- x264-snapshot-20080226-2245/Makefile	2008-02-26 21:45:02.000000000 +0000
+++ x264-snapshot-20080226-2245+iPhone/Makefile	2008-05-19 12:48:00.000000000 +0000
@@ -74,11 +74,11 @@
 default: $(DEP) x264$(EXE)
 
 libx264.a: .depend $(OBJS) $(OBJASM)
-	ar rc libx264.a $(OBJS) $(OBJASM)
-	ranlib libx264.a
+	"$${PKG_TARG}-ar" rc libx264.a $(OBJS) $(OBJASM)
+	"$${PKG_TARG}-ranlib" libx264.a
 
 $(SONAME): .depend $(OBJS) $(OBJASM)
-	$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
+	$(CC) -dynamiclib -o $@ $(OBJS) $(OBJASM) -install_name $(libdir)/$(SONAME) $(LDFLAGS)
 
 x264$(EXE): $(OBJCLI) libx264.a 
 	$(CC) -o $@ $+ $(LDFLAGS)
@@ -156,8 +156,8 @@
 	install -m 644 libx264.a $(DESTDIR)$(libdir)
 	install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
 	install x264 $(DESTDIR)$(bindir)
-	ranlib $(DESTDIR)$(libdir)/libx264.a
-	$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
+	"$${PKG_TARG}-ranlib" $(DESTDIR)$(libdir)/libx264.a
+	$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.dylib)
 	$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
 
 install-gtk: libx264gtk.a
@@ -166,7 +166,7 @@
 uninstall:
 	rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a
 	rm -f $(DESTDIR)$(bindir)/x264 $(DESTDIR)$(libdir)/pkgconfig/x264.pc
-	$(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.so)
+	$(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.dylib)
 	$(MAKE) -C gtk uninstall
 
 etags: TAGS