Index: trunk/dports/devel/libmd/Portfile
===================================================================
--- trunk/dports/devel/libmd/Portfile	(revision 14686)
+++ trunk/dports/devel/libmd/Portfile	(revision 14686)
@@ -0,0 +1,28 @@
+# $Id: Portfile,v 1.1 2005/10/18 08:53:07 mww Exp $
+
+PortSystem 1.0
+
+name			libmd
+version			0.3
+categories		devel
+platforms		darwin
+maintainers		mww@opendarwin.org
+description		Libmd is a cryptographic message digest library
+long_description	${description}
+
+homepage		http://www.penguin.cz/~mhi/libmd/
+master_sites	ftp://ftp.penguin.cz/pub/users/mhi/libmd/
+checksums		md5 1db1795b7e87bbda542e4c33b6ce5566
+use_bzip2		yes
+patchfiles		patch-Makefile.in patch-rmd160.h
+
+configure.args	--host=powerpc-apple-freebsd
+
+platform darwin 8 {
+	configure.env	CC=/usr/bin/gcc-4.0
+}
+
+post-destroot {
+	set ln	"ln -sf libmd.1.0.dylib"
+	system "cd ${destroot}${prefix}/lib && ${ln} libmd.1.dylib && ${ln} libmd.dylib"
+}
Index: trunk/dports/devel/libmd/files/patch-Makefile.in
===================================================================
--- trunk/dports/devel/libmd/files/patch-Makefile.in	(revision 14686)
+++ trunk/dports/devel/libmd/files/patch-Makefile.in	(revision 14686)
@@ -0,0 +1,94 @@
+--- Makefile.in	2000-05-10 15:39:03.000000000 +0200
++++ Makefile.in	2005-10-18 10:41:31.000000000 +0200
+@@ -2,6 +2,7 @@
+       sha.c shahl.c rmd160.c rmd160hl.c
+ OBJ = $(SRC:.c=.o)
+ 
++PREFIX	= @prefix@
+ CC      = @CC@
+ CFLAGS  = -O3 -fPIC -I.
+ RANLIB  = @RANLIB@
+@@ -15,10 +16,10 @@
+ OUTDIR=$(PWD)/..
+ SRCDIR=$(PWD)
+ 
+-all:	libmd.so.1.0 md2.3 md4.3 md5.3 libmd.a docs
++all:	libmd.1.0.dylib md2.3 md4.3 md5.3 libmd.a docs
+ 
+ clean:
+-	rm -f *.o core libmd.a libmd.so* md[245]hl.c md[245].3\
++	rm -f *.o core libmd.a libmd.*dylib md[245]hl.c md[245].3\
+         shahl.c rmd160hl.c mddriver
+ 	(cd docs;make clean)
+ 
+@@ -31,18 +32,18 @@
+ test:	mddriver
+ 	./mddriver
+ 
+-install:	libmd.so.1.0 libmd.so.1 libmd.so
+-	mkdir -p $(BUILDROOT)/usr/include
+-	mkdir -p $(BUILDROOT)/usr/lib
+-	mkdir -p $(BUILDROOT)/usr/man/man3
+-	$(INSTALL) -g root -o root -m 644 md2.h md4.h md5.h sha.h rmd160.h \
+-		   $(BUILDROOT)/usr/include
+-	$(INSTALL) -g root -o root -m 644 md2.3 md4.3 md5.3 \
+-		   $(BUILDROOT)/usr/man/man3
+-	$(INSTALL) -g root -o root -m 755 libmd.so.1.0 $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.so.1 $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.so $(BUILDROOT)/usr/lib
+-	$(INSTALL) -g root -o root -m 755 libmd.a $(BUILDROOT)/usr/lib
++install:	libmd.1.0.dylib libmd.1.dylib libmd.dylib
++	mkdir -p $(DESTDIR)$(PREFIX)/include
++	mkdir -p $(DESTDIR)$(PREFIX)/lib
++	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man3
++	$(INSTALL) -m 644 md2.h md4.h md5.h sha.h rmd160.h \
++		   $(DESTDIR)$(PREFIX)/include
++	$(INSTALL) -m 644 md2.3 md4.3 md5.3 \
++		   $(DESTDIR)$(PREFIX)/share/man/man3
++	$(INSTALL) -m 755 libmd.1.0.dylib $(DESTDIR)$(PREFIX)/lib
++	$(INSTALL) -m 755 libmd.1.dylib $(DESTDIR)$(PREFIX)/lib
++	$(INSTALL) -m 755 libmd.dylib $(DESTDIR)$(PREFIX)/lib
++	$(INSTALL) -m 755 libmd.a $(DESTDIR)$(PREFIX)/lib
+ 
+ binary:	install
+ 	@echo Creating binary .tar.bz2 in directory $(OUTDIR)/
+@@ -50,15 +51,15 @@
+ 	bzip2 -9f $(OUTDIR)/libmd-$(VERS)-$(OSTYPE).tar
+ 
+ tarball: mrproper
+-	@echo Creating source .tar.bz2 in directory $(OUTDIR)/
++	@echo Creating.dyliburce .tar.bz2 in directory $(OUTDIR)/
+ 	cd .. && tar cf $(OUTDIR)/libmd-$(VERS).tar libmd-$(VERS)/
+ 	bzip2 -9f $(OUTDIR)/libmd-$(VERS).tar
+ 
+-libmd.so.1:
+-	$(LN_S) libmd.so.1.0 libmd.so.1
++libmd.1.dylib:
++	$(LN_S) libmd.1.0.dylib libmd.1.dylib
+ 
+-libmd.so:
+-	$(LN_S) libmd.so.1.0 libmd.so
++libmd.dylib:
++	$(LN_S) libmd.1.0.dylib libmd.dylib
+ 
+ md2hl.c: mdXhl.c
+ 	sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' $? > $@
+@@ -87,15 +88,15 @@
+ 	sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' $? > $@
+ 	cat md5.copyright >> $@
+ 
+-libmd.so.1.0:	$(OBJ)
+-	$(CC) -shared -o libmd.so.1.0 $(OBJ)
++libmd.1.0.dylib:	$(OBJ)
++	$(CC) -dynamiclib -o libmd.1.0.dylib $(OBJ) -install_name $(PREFIX)/lib/$@ -current_version $(VERS)
+ 
+ libmd.a:	$(OBJ)
+ 	rm -f libmd.a
+ 	$(AR) rulv libmd.a $(OBJ)
+ 	$(RANLIB) libmd.a
+ 
+-mddriver:	mddriver.o libmd.so version.o
++mddriver:	mddriver.o libmd.dylib version.o
+ 	$(CC) -fPIC -O3 -o mddriver mddriver.o version.o -L. -lmd
+ 
+ version.o:	version.c
Index: trunk/dports/devel/libmd/files/patch-rmd160.h
===================================================================
--- trunk/dports/devel/libmd/files/patch-rmd160.h	(revision 14686)
+++ trunk/dports/devel/libmd/files/patch-rmd160.h	(revision 14686)
@@ -0,0 +1,11 @@
+--- rmd160.h	1999-07-31 15:39:31.000000000 +0200
++++ rmd160.h	2005-10-18 10:34:20.000000000 +0200
+@@ -31,7 +31,7 @@
+ 
+ __BEGIN_DECLS
+ void   RMD160Init(RMD160_CTX *);
+-void   RMD160Update(RMD160_CTX *, const unsigned char *, unsigned int);
++void   RMD160Update(RMD160_CTX *, const unsigned char *, size_t);
+ void   RMD160Final(unsigned char [RMD160_HASHBYTES], RMD160_CTX *);
+ char * RMD160End(RMD160_CTX *, char *);
+ char * RMD160File(const char *, char *);
