Index: readline-5/files/patch-shobj-conf
===================================================================
--- readline-5/files/patch-shobj-conf	(revision 74525)
+++ readline-5/files/patch-shobj-conf	(working copy)
@@ -1,12 +0,0 @@
---- support/shobj-conf.sav	2006-05-30 06:45:41.000000000 -0400
-+++ support/shobj-conf	2006-05-30 06:46:30.000000000 -0400
-@@ -149,6 +149,9 @@
- 	darwin7*)	SHOBJ_LDFLAGS=''
- 			SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
- 			;;
-+	darwin8*)	SHOBJ_LDFLAGS=''
-+			SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
-+			;;
- 	*)		SHOBJ_LDFLAGS='-dynamic'
- 			SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
- 			;;
Index: readline-5/files/patch-support-shobj-conf.diff
===================================================================
--- readline-5/files/patch-support-shobj-conf.diff	(revision 0)
+++ readline-5/files/patch-support-shobj-conf.diff	(revision 0)
@@ -0,0 +1,20 @@
+--- support/shobj-conf.orig	2010-12-21 00:05:09.000000000 +0900
++++ support/shobj-conf	2010-12-21 00:05:58.000000000 +0900
+@@ -142,7 +142,7 @@
+ 	;;
+ 
+ # Darwin/MacOS X
+-darwin[89]*)
++darwin[89]*|darwin10*)
+ 	SHOBJ_STATUS=supported
+ 	SHLIB_STATUS=supported
+ 	
+@@ -171,7 +171,7 @@
+ 	SHLIB_LIBSUFF='dylib'
+ 
+ 	case "${host_os}" in
+-	darwin[789]*)	SHOBJ_LDFLAGS=''
++	darwin[789]*|darwin10*)	SHOBJ_LDFLAGS=''
+ 			SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ 			;;
+ 	*)		SHOBJ_LDFLAGS='-dynamic'
Index: readline-5/Portfile
===================================================================
--- readline-5/Portfile	(revision 74525)
+++ readline-5/Portfile	(working copy)
@@ -3,10 +3,10 @@
 PortSystem 1.0
 name		readline-5
 set shortname	readline
-version		5.0.005
-distname	${shortname}-5.0
+version		5.2.014
+distname	${shortname}-5.2
 categories	devel
-maintainers	nomaintainer
+maintainers	kimuraw openmaintainer
 platforms	darwin
 
 description	Library that provides command line editing
@@ -16,47 +16,59 @@
 		command lines as they are typed in. Both Emacs and vi	\
 		editing modes are available. The Readline library	\
 		includes additional functions to maintain a list of	\
- 		previously-entered command lines, to recall and perhaps	\
+		previously-entered command lines, to recall and perhaps	\
 		reedit those lines, and perform csh-like history	\
 		expansion on previous commands.				\
 									\
-		This version provides limited functionality. It is	\
-		intended to be used by ports that require version	\
-		5.0. Only the dynamic library is installed, and the	\
-		include files are kept in PREFIX/include/readline5.	 
+		The include files are kept in PREFIX/include/readline5	\
+		and the library files are kept in PREFIX/lib/readline5.
 
+# note: readline-6 is GPLv3+
+license		GPLv2+
+
 homepage	http://cnswww.cns.cwru.edu/~chet/readline/rltop.html
+depends_lib	port:ncurses
 master_sites	gnu:${shortname}	\
 		ftp://ftp.cwru.edu/pub/bash/:${shortname}
 
-patch_sites     ftp://ftp.cwru.edu/pub/bash/readline-5.0-patches/
-patchfiles      readline50-001 \
-                readline50-002 \
-                readline50-003 \
-                readline50-004 \
-                readline50-005
+patch_sites     ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches/
+patchfiles      readline52-001 \
+                readline52-002 \
+                readline52-003 \
+                readline52-004 \
+                readline52-005 \
+                readline52-006 \
+                readline52-007 \
+                readline52-008 \
+                readline52-009 \
+                readline52-010 \
+                readline52-011 \
+                readline52-012 \
+                readline52-013 \
+                readline52-014
+# fix an error at building .dylib on Snow Leopard.
+patchfiles-append	patch-support-shobj-conf.diff
 
-platform darwin 8 { patchfiles-append   patch-shobj-conf }
+checksums       ${distname}${extract.suffix} md5 e39331f32ad14009b9ff49cc10c5e751 \
+                readline52-001 md5 9d4d41622aa9b230c57f68548ce87d8f \
+                readline52-002 md5 f03e512d14206e37f7d6a748b56b9476 \
+                readline52-003 md5 252b42d8750f1a94b6bdf086612dceb2 \
+                readline52-004 md5 a32333c2e603a3ed250514e91050e552 \
+                readline52-005 md5 8106796c09b789523a3a78ab69c04b6d \
+                readline52-006 md5 512188e2bf0837f7eca19dbf71f182ae \
+                readline52-007 md5 ac17aca62eb6fb398c9f2fe9de540aff \
+                readline52-008 md5 2484c392db021905f112cf97a94dfd4c \
+                readline52-009 md5 fc6eb35d07914fae5c57d49c12483ff7 \
+                readline52-010 md5 7a2bf3dc7ac7680b1461a5701100e91b \
+                readline52-011 md5 ef6cef6822663470f6ac8c517c5a7ec6 \
+                readline52-012 md5 e3e9f441c8111589855bc363e5640f6c \
+                readline52-013 md5 3e2e5f543ed268a68fd1fa839faade1a \
+                readline52-014 md5 a1be30e1c6f1099bb5fcef00a2631fb8
 
-checksums       ${distname}${extract.suffix} md5 9a39d15f1ed592883f8c6671e8c13120 \
-                readline50-001 md5 5b47ed61b6b8413746750127c70e843d \
-                readline50-002 md5 9f803005e7e4c7d675146a9a805acbf1 \
-                readline50-003 md5 05d59c91f80fa99ab177783229b0f769 \
-                readline50-004 md5 aa1f6343e47f8e024488c63281d77809 \
-                readline50-005 md5 1dc2654e0161f2e7b4f536b12e1d54b7
+configure.args	--libdir=${prefix}/lib/readline5 \
+				--mandir=${prefix}/share/doc/readline-5/man \
+				--infodir=${prefix}/share/doc/readline-5/info
 
-configure.args	--mandir=${prefix}/share/man \
-		--infodir=${prefix}/share/info
-
-post-destroot	{ file delete -force ${destroot}${prefix}/share
-
-		  file delete ${destroot}${prefix}/lib/libhistory.a
-		  file delete ${destroot}${prefix}/lib/libhistory.dylib
-		  file delete ${destroot}${prefix}/lib/libhistory.5.dylib
-
-		  file delete ${destroot}${prefix}/lib/libreadline.a
-		  file delete ${destroot}${prefix}/lib/libreadline.dylib
-		  file delete ${destroot}${prefix}/lib/libreadline.5.dylib
-
+post-destroot {
 		  file rename ${destroot}${prefix}/include/readline ${destroot}${prefix}/include/readline5
 }
