Index: files/patch-Makefile.diff
===================================================================
--- files/patch-Makefile.diff	(revision 0)
+++ files/patch-Makefile.diff	(revision 0)
@@ -0,0 +1,32 @@
+--- Makefile.orig	2011-04-18 21:26:53.000000000 -0400
++++ Makefile	2011-04-18 21:27:20.000000000 -0400
+@@ -1,8 +1,8 @@
+-VERSION=v2.3
++VERSION=2.3
+ 
+-prefix=/usr/local
++prefix=/opt/local
+ 
+-CC=$(CROSS_COMPILE)gcc
++CC=/usr/bin/gcc-4.2
+ LD=$(CROSS_COMPILE)ld
+ 
+ SYS=posix
+@@ -25,7 +25,7 @@
+ 
+ bindir=$(prefix)/bin
+ sbindir=$(prefix)/sbin
+-mandir=$(prefix)/man
++mandir=$(prefix)/share/man
+ 
+ BINDIR=$(DESTDIR)$(bindir)
+ SBINDIR=$(DESTDIR)$(sbindir)
+@@ -40,7 +40,7 @@
+ THREADLIB=$(THREADLIB_$(SYS))
+ SLIBS=$(THREADLIB) $(LIBS)
+ 
+-LIBRTMP=librtmp/librtmp.a
++LIBRTMP=librtmp/librtmp.dylib
+ INCRTMP=librtmp/rtmp_sys.h librtmp/rtmp.h librtmp/log.h librtmp/amf.h
+ 
+ EXT_posix=
Index: files/patch-librtmp-Makefile.diff
===================================================================
--- files/patch-librtmp-Makefile.diff	(revision 0)
+++ files/patch-librtmp-Makefile.diff	(revision 0)
@@ -0,0 +1,63 @@
+--- librtmp/Makefile.orig	2011-04-18 21:26:56.000000000 -0400
++++ librtmp/Makefile	2011-04-18 21:27:35.000000000 -0400
+@@ -1,6 +1,7 @@
+-VERSION=v2.3
++VERSION=2.3
++VERSION_MAJOR=2
+ 
+-prefix=/usr/local
++prefix=/opt/local
+ 
+ CC=$(CROSS_COMPILE)gcc
+ LD=$(CROSS_COMPILE)ld
+@@ -25,13 +26,13 @@
+ CRYPTO_REQ=$(REQ_$(CRYPTO))
+ CRYPTO_DEF=$(DEF_$(CRYPTO))
+ 
+-SO_posix=so.0
++SO_posix=dylib
+ SO_mingw=dll
+ SO_EXT=$(SO_$(SYS))
+ 
+ SHARED=yes
+ SODEF_yes=-fPIC
+-SOLIB_yes=librtmp.$(SO_EXT)
++SOLIB_yes=librtmp.$(VERSION).$(SO_EXT)
+ SOINST_yes=install_$(SO_EXT)
+ SO_DEF=$(SODEF_$(SHARED))
+ SO_LIB=$(SOLIB_$(SHARED))
+@@ -44,7 +45,7 @@
+ incdir=$(prefix)/include/librtmp
+ bindir=$(prefix)/bin
+ libdir=$(prefix)/lib
+-mandir=$(prefix)/man
++mandir=$(prefix)/share/man
+ BINDIR=$(DESTDIR)$(bindir)
+ INCDIR=$(DESTDIR)$(incdir)
+ LIBDIR=$(DESTDIR)$(libdir)
+@@ -60,9 +61,9 @@
+ librtmp.a: $(OBJS)
+ 	$(AR) rs $@ $?
+ 
+-librtmp.$(SO_EXT): $(OBJS)
+-	$(CC) -shared -Wl,-soname,$@ $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB)
+-	ln -sf $@ librtmp.so
++$(SO_LIB): $(OBJS)
++	$(CC) -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -install_name  $(prefix)/lib/$@ -compatibility_version $(VERSION_MAJOR) -current_version $(VERSION) -Wl,-single_module $(LDFLAGS) -o $@ $^ $> $(CRYPTO_LIB)
++	ln -sf $@ librtmp.$(SO_EXT)
+ 
+ log.o: log.c log.h Makefile
+ rtmp.o: rtmp.c rtmp.h rtmp_sys.h handshake.h dh.h log.h amf.h Makefile
+@@ -83,9 +84,9 @@
+ 	cp librtmp.pc $(LIBDIR)/pkgconfig
+ 	cp librtmp.3 $(MANDIR)/man3
+ 
+-install_so.0:	librtmp.so.0
+-	cp librtmp.so.0 $(LIBDIR)
+-	cd $(LIBDIR); ln -sf librtmp.so.0 librtmp.so
++install_$(SO_EXT):	librtmp.$(SO_EXT)
++	cp librtmp.$(VERSION).$(SO_EXT) $(LIBDIR)
++	cd $(LIBDIR); ln -sf librtmp.$(VERSION).$(SO_EXT) librtmp.$(SO_EXT)
+ 
+ install_dll:	librtmp.dll
+ 	cp librtmp.dll $(BINDIR)
Index: Portfile
===================================================================
--- Portfile	(revision 77982)
+++ Portfile	(working copy)
@@ -4,8 +4,7 @@
 PortSystem 1.0
 
 name                rtmpdump
-version             2.2
-revision            1
+version             2.3
 categories          www net
 platforms           darwin
 depends_lib         port:openssl
@@ -20,25 +19,26 @@
 homepage            http://rtmpdump.mplayerhq.hu/
 master_sites        ${homepage}download/
 
-checksums           md5     1ce6753c95754d1a72b635d488757096 \
-                    sha1    80ad4878b5b48c59cb6754fac31f811b8a7d399d \
-                    rmd160  673e9baf426d8fe0d32471d101648660080e996d
+checksums           md5     eb961f31cd55f0acf5aad1a7b900ef59 \
+                    sha1    b65ce7708ae79adb51d1f43dd0b6d987076d7c42 \
+                    rmd160  1d48925e6567783806fa68819d6a695cd06138bc
 
-use_bzip2           yes
+extract.suffix      .tgz
 
+patchfiles          patch-Makefile.diff \
+                    patch-librtmp-Makefile.diff
+
 post-patch {
     reinplace "s|CC=.*\$|CC=${configure.cc}|" ${worksrcpath}/Makefile
-    reinplace "s|CXX=.*\$|CXX=${configure.cxx}|" ${worksrcpath}/Makefile
+    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/Makefile
+    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/librtmp/Makefile
 }
+
 use_configure       no
 
-build.target        osx
+build.target        SYS=posix
 build.pre_args-delete -w
 
-destroot {
-    xinstall -m 755 -W ${worksrcpath} rtmpdump rtmpsuck rtmpsrv rtmpgw ${destroot}${prefix}/bin
-}
-
 livecheck.url       [lindex ${master_sites} 0]
 livecheck.type      regex
 livecheck.regex     ${name}-(\[0-9a-z.\]+)\\.
