Browse files

Fixed things for OSX compilation.

  • Loading branch information...
1 parent e314ede commit 153212678c8a9bfa3aebb5baccfd56c04cb0a065 Dan Peori committed Nov 20, 2010
Showing with 30 additions and 5 deletions.
  1. +5 −0 depends/check-pkg-config.h
  2. +20 −0 patches/zlib-1.2.5-PPU.patch
  3. +1 −1 readme.txt
  4. +4 −4 scripts/001-zlib-1.2.5.sh
View
5 depends/check-pkg-config.h
@@ -0,0 +1,5 @@
+#!/bin/sh
+# check-pkg-config.sh by Dan Peori (danpeori@oopo.net)
+
+## Check for pkg-config.
+pkg-config --version 1> /dev/null || { echo "ERROR: Install pkg-config before continuing."; exit 1; }
View
20 patches/zlib-1.2.5-PPU.patch
@@ -0,0 +1,20 @@
+diff -burN orig.zlib-1.2.5/Makefile.in zlib-1.2.5/Makefile.in
+--- orig.zlib-1.2.5/Makefile.in 2010-04-20 01:12:21.000000000 -0300
++++ zlib-1.2.5/Makefile.in 2010-11-20 06:05:48.000000000 -0400
+@@ -168,16 +168,8 @@
+ -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
+ -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
+ cp $(STATICLIB) $(DESTDIR)$(libdir)
+- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)
+ cd $(DESTDIR)$(libdir); chmod u=rw,go=r $(STATICLIB)
+ -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
+- -@cd $(DESTDIR)$(sharedlibdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
+- chmod 755 $(SHAREDLIBV); \
+- rm -f $(SHAREDLIB) $(SHAREDLIBM); \
+- ln -s $(SHAREDLIBV) $(SHAREDLIB); \
+- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
+- ($(LDCONFIG) || true) >/dev/null 2>&1; \
+- fi
+ cp zlib.3 $(DESTDIR)$(man3dir)
+ chmod 644 $(DESTDIR)$(man3dir)/zlib.3
+ cp zlib.pc $(DESTDIR)$(pkgconfigdir)
View
2 readme.txt
@@ -12,7 +12,7 @@
1) Set up your environment by installing the following software:
- autoconf, automake, libtool, make, ps3toolchain, psl1ght, wget
+ autoconf, automake, libtool, make, pkg-config, ps3toolchain, psl1ght, wget
2) Run the library script:
View
8 scripts/001-zlib-1.2.5.sh
@@ -7,11 +7,11 @@ wget --continue http://zlib.net/zlib-1.2.5.tar.gz || { exit 1; }
## Unpack the source code.
rm -Rf zlib-1.2.5 && tar xfvz zlib-1.2.5.tar.gz && cd zlib-1.2.5 || { exit 1; }
+## Patch the source code.
+cat ../../patches/zlib-1.2.5-PPU.patch | patch -p1 || { exit 1; }
+
## Configure the build.
-AR="ppu-ar" CC="ppu-gcc" CFLAGS="-O2 -Wall" RANLIB="ppu-ranlib" ./configure --prefix="$PS3DEV/ppu" || { exit 1; }
+AR="ppu-ar" CC="ppu-gcc" CFLAGS="-O2 -Wall" RANLIB="ppu-ranlib" ./configure --prefix="$PS3DEV/ppu" --static || { exit 1; }
## Compile and install.
make -j4 && make install || { exit 1; }
-
-#remove stray .so files so libpng won't link with them.
-rm $PS3DEV/ppu/lib/*.so.* $PS3DEV/ppu/lib/*.so

0 comments on commit 1532126

Please sign in to comment.