[27447] trunk/dports/iphone

source_changes at macosforge.org source_changes at macosforge.org
Fri Aug 3 23:10:11 PDT 2007


Revision: 27447
          http://trac.macosforge.org/projects/macports/changeset/27447
Author:   landonf at macports.org
Date:     2007-08-03 23:10:10 -0700 (Fri, 03 Aug 2007)

Log Message:
-----------
Add an iphone zlib. Installs static & dynamic link libraries and build headers for the iphone toolchain

Added Paths:
-----------
    trunk/dports/iphone/iphone-zlib/
    trunk/dports/iphone/iphone-zlib/Portfile
    trunk/dports/iphone/iphone-zlib/files/
    trunk/dports/iphone/iphone-zlib/files/patch-Makefile-static
    trunk/dports/iphone/iphone-zlib/files/patch-configure

Added: trunk/dports/iphone/iphone-zlib/Portfile
===================================================================
--- trunk/dports/iphone/iphone-zlib/Portfile	                        (rev 0)
+++ trunk/dports/iphone/iphone-zlib/Portfile	2007-08-04 06:10:10 UTC (rev 27447)
@@ -0,0 +1,45 @@
+# $Id: $
+
+PortSystem 1.0
+name		iphone-zlib
+version		1.2.3
+categories	iphone cross
+maintainers	landonf at macports.org openmaintainer at macports.org
+description	ZLib headers and libraries for iPhone cross-compiliation
+
+long_description	iPhone cross-compile libraries and headers of ZLib. \
+			zlib is designed to be a free, general-purpose, \
+			legally unencumbered, lossless data-compression \
+			library for use on virtually any computer hardware \
+			and operating system.
+
+homepage	http://www.zlib.net/
+platforms	darwin
+
+distname	zlib-${version}
+master_sites	${homepage} \
+		http://www.gzip.org/zlib/ \
+		sourceforge:libpng
+
+use_bzip2	yes
+checksums	md5 dee233bf288ee795ac96a98cc2e369b6 \
+		sha1 967e280f284d02284b0cd8872a8e2e04bfdc7283 \
+		rmd160 cfba9984b354dcc38da49331457e6bfc861c6f51
+
+patchfiles	patch-Makefile-static \
+		patch-configure
+
+#depends_build	arm-iphone-runtime
+#depends_build	arm-iphone-cc
+
+configure.env	PATH=${prefix}/arm-iphone/bin:$env(PATH) CC=cc CFLAGS="-dynamiclib"
+configure.args	--shared --prefix=${prefix}/arm-iphone
+
+build.env	PATH=${prefix}/arm-iphone/bin:$env(PATH)
+build.target	libz.${version}.dylib
+
+destroot.destdir prefix=${destroot}${prefix}/arm-iphone/
+
+livecheck.check regex
+livecheck.url   ${homepage}
+livecheck.regex "${name}-(\\\\d+(?:\\\\.\\\\d+)*)\\\\.tar\\\\.bz2"

Added: trunk/dports/iphone/iphone-zlib/files/patch-Makefile-static
===================================================================
--- trunk/dports/iphone/iphone-zlib/files/patch-Makefile-static	                        (rev 0)
+++ trunk/dports/iphone/iphone-zlib/files/patch-Makefile-static	2007-08-04 06:10:10 UTC (rev 27447)
@@ -0,0 +1,19 @@
+--- Makefile.in.orig	2007-03-31 13:43:59.000000000 -0700
++++ Makefile.in	2007-03-31 13:45:02.000000000 -0700
+@@ -77,7 +77,7 @@
+ 	mv _match.o match.o
+ 	rm -f _match.s
+ 
+-$(SHAREDLIBV): $(OBJS)
++$(SHAREDLIBV): libz.a $(OBJS)
+ 	$(LDSHARED) -o $@ $(OBJS)
+ 	rm -f $(SHAREDLIB) $(SHAREDLIBM)
+ 	ln -s $@ $(SHAREDLIB)
+@@ -97,6 +97,7 @@
+ 	cp zlib.h zconf.h $(includedir)
+ 	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
+ 	cp $(LIBS) $(libdir)
++	cp libz.a $(libdir)
+ 	cd $(libdir); chmod 755 $(LIBS)
+ 	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
+ 	cd $(libdir); if test -f $(SHAREDLIBV); then \

Added: trunk/dports/iphone/iphone-zlib/files/patch-configure
===================================================================
--- trunk/dports/iphone/iphone-zlib/files/patch-configure	                        (rev 0)
+++ trunk/dports/iphone/iphone-zlib/files/patch-configure	2007-08-04 06:10:10 UTC (rev 27447)
@@ -0,0 +1,43 @@
+--- configure.orig	2007-08-03 21:57:47.000000000 -0700
++++ configure	2007-08-03 22:32:29.000000000 -0700
+@@ -164,32 +164,14 @@
+   esac
+ fi
+ 
+-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
+-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
+-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
+-
+-if test $shared -eq 1; then
+-  echo Checking for shared library support...
+-  # we must test in two steps (cc then ld), required at least on SunOS 4.x
+-  if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
+-     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
+-    CFLAGS="$SFLAGS"
+-    LIBS="$SHAREDLIBV"
+-    echo Building shared library $SHAREDLIBV with $CC.
+-  elif test -z "$old_cc" -a -z "$old_cflags"; then
+-    echo No shared library support.
+-    shared=0;
+-  else
+-    echo 'No shared library support; try without defining CC and CFLAGS'
+-    shared=0;
+-  fi
+-fi
+-if test $shared -eq 0; then
+-  LDSHARED="$CC"
+-  echo Building static library $LIBS version $VER with $CC.
+-else
+-  LDFLAGS="-L. ${SHAREDLIBV}"
+-fi
++shared_ext='.dylib'
++SHAREDLIB=libz$shared_ext
++SHAREDLIBV=libz.$VER$shared_ext
++SHAREDLIBM=libz.$VER1$shared_ext
++LDSHARED="$cc -dynamiclib"
++
++CFLAGS="$SFLAGS"
++LIBS="$SHAREDLIBV"
+ 
+ cat > $test.c <<EOF
+ #include <unistd.h>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070803/f6fedd63/attachment.html


More information about the macports-changes mailing list