Index: Makefile
===================================================================
--- Makefile	(revision 330064)
+++ Makefile	(working copy)
@@ -2,10 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	sdl
-PORTVERSION=	1.3.1
-PORTREVISION=	8
+PORTVERSION=	2.1.2
 CATEGORIES=	devel graphics audio ruby
-MASTER_SITES=	http://www.kmc.gr.jp/~ohai/rubysdl/
+MASTER_SITES=	RUBYFORGE/ruby${PORTNAME}/
 PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
 DISTNAME=	ruby${PORTNAME}-${PORTVERSION}
 DIST_SUBDIR=	ruby
@@ -13,10 +12,11 @@
 MAINTAINER=	ruby@FreeBSD.org
 COMMENT=	Ruby extension library to use SDL library
 
-DEPRECATED=	Does not work with Ruby 1.9
-EXPIRATION_DATE=	2013-10-10
+LICENSE=	LGPL21
 
-BUILD_DEPENDS=	${NONEXISTENT}:${RUBY_OPENGL_PORTDIR}:patch
+LIB_DEPENDS=	libSGE.so:${PORTSDIR}/devel/sdl_sge \
+		libskk.so:${PORTSDIR}/japanese/libskk \
+		libSDLSKK.so.2.0:${PORTSDIR}/devel/sdlskk
 
 RUBY_OPENGL_PORTDIR=	${PORTSDIR}/graphics/ruby-opengl
 RUBY_OPENGL_WRKSRC_CMD=	cd ${RUBY_OPENGL_PORTDIR}; ${MAKE} -V WRKSRC
@@ -27,45 +27,47 @@
 
 CONFIGURE_ARGS=	--with-sdl-config="sdl-config" \
 		--enable-opengl --linkoglmodule \
-		--with-x11-dir="${LOCALBASE}"
+		--with-x11-dir="${LOCALBASE}" \
+		--disable-pthreads
 INSTALL_TARGET=	site-install
 
-RUBY_RD_FILES=	rubysdl_doc.en.rd \
-		rubysdl_doc_old.rd
+PORTDOCS=	*
+PORTEXAMPLES=	*
 
-DOCS_EN=	NEWS.en README.en rubysdl_const_list.txt \
-		${RUBY_RD_FILES:M*.en.rd} \
-		${RUBY_RD_HTML_FILES:M*.en.html}
-DOCS_JA=	NEWS.ja README.ja \
-		${RUBY_RD_FILES:N*.en.rd} \
-		${RUBY_RD_HTML_FILES:N*.en.html}
+DOCSDIR=	${RUBY_MODDOCDIR}
+EXAMPLESDIR=	${RUBY_MODEXAMPLESDIR}
 
-NO_STAGE=	yes
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES_WRKSRC_JA=	NEWS.ja README.ja
+DOC_FILES_WRKSRC_EN=	NEWS.en README.en
+
+DOCSRCDIRJA=	${WRKSRC}/doc
+DOCSDIRJA=	${RUBY_MODDOCDIR}/doc
+DOC_FILESJA=	*.rsd *.rb
+
+DOCSRCDIREN=	${WRKSRC}/doc-en
+DOCSDIREN=	${RUBY_MODDOCDIR}/doc-en
+DOC_FILESEN=	*.rsd
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
 .include <bsd.port.pre.mk>
 
-post-extract:
-	dir=`${RUBY_OPENGL_WRKSRC_CMD}`; \
-	for f in rbogl.h rbogl.c ogl.c glu.c; do \
-		${LN} -fs $$dir/$$f ${WRKSRC}/; \
-	done
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}/ja
+	${INSTALL_DATA} ${DOC_FILES_WRKSRC_JA:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}/ja/
+	${INSTALL_DATA} ${DOC_FILES_WRKSRC_EN:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
 
-post-patch:
-	${RUBY} -i -pe '/require \x27mkmf\x27/ and $$_ += "dir_config(\x27x11\x27)\n"' \
-		${WRKSRC}/${RUBY_EXTCONF}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}/doc/ja
+	${INSTALL_DATA} ${DOC_FILESJA:S|^|${DOCSRCDIRJA}/|} ${STAGEDIR}${DOCSDIR}/doc/ja/
+	${INSTALL_DATA} ${DOC_FILESEN:S|^|${DOCSRCDIREN}/|} ${STAGEDIR}${DOCSDIR}/doc/
+.endif
 
-post-install: doc-install
 
-doc-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${RUBY_MODEXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/sample/* ${RUBY_MODEXAMPLESDIR}/
-	${MKDIR} ${RUBY_MODDOCDIR}/ja
-.for f in ${DOCS_EN}
-	${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
-.endfor
-.for f in ${DOCS_JA}
-	${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/
-.endfor
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/sample/* ${STAGEDIR}${EXAMPLESDIR}
 .endif
 
 .include <bsd.port.post.mk>
Index: distinfo
===================================================================
--- distinfo	(revision 330064)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (ruby/rubysdl-1.3.1.tar.gz) = a4b4841f9259cd1a792e6407ca7ae83439aa39926606154a952ea5c663314891
-SIZE (ruby/rubysdl-1.3.1.tar.gz) = 264856
+SHA256 (ruby/rubysdl-2.1.2.tar.gz) = d0f4df467cfa2dd387490fc7673ba5f3fc860fd59f0eabb96848bdc8ef04a36c
+SIZE (ruby/rubysdl-2.1.2.tar.gz) = 394125
Index: files/patch-rubysdl_rwops.c
===================================================================
--- files/patch-rubysdl_rwops.c	(revision 0)
+++ files/patch-rubysdl_rwops.c	(working copy)
@@ -0,0 +1,12 @@
+--- ./rubysdl_rwops.c.orig	2012-04-07 17:50:01.000000000 +0200
++++ ./rubysdl_rwops.c	2013-10-16 09:54:34.000000000 +0200
+@@ -70,6 +70,9 @@
+   return 0;
+ }
+ 
++#ifdef close
++#undef close
++#endif
+ /* WARNING: +obj+ is not marked when GC starts,
+    so you should use `volatile' when this function is used
+    and you should not take out this RWops pointer to ruby's world.

Property changes on: files/patch-rubysdl_rwops.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 330064)
+++ pkg-descr	(working copy)
@@ -1,6 +1,4 @@
 Ruby/SDL is a Ruby extension library to use SDL library.
 Currently 3D features are unsupported.
 
-SGE support will be enabled after SGE is ported.
-
-Author: Ippei Obayashi <ohai@kmc.kyoto-u.ac.jp>
+WWW: http://www.kmc.gr.jp/~ohai/rubysdl.en.html
\ No newline at end of file
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 330064)
+++ pkg-plist	(working copy)
@@ -1,43 +1,4 @@
-%%RUBY_SITEARCHLIBDIR%%/sdl.so
+%%RUBY_SITEARCHLIBDIR%%/sdl_ext.so
 %%RUBY_SITELIBDIR%%/rubysdl_aliases.rb
+%%RUBY_SITELIBDIR%%/rubysdl_compatible_ver1.rb
 %%RUBY_SITELIBDIR%%/sdl.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/aadraw.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/alpha.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/alphadraw.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/bfont.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/cdrom.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/collision.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/cursor.bmp
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/cursor.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/ellipses.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/event2.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/font.bmp
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/font.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/fpstimer.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/icon.bmp
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/joy2.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/kanji.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/movesp.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/playmod.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/plaympeg.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/playwave.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/randrect.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/sample.ttf
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/sdlskk.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/sgetest.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/stetris.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/testgl.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/testsprite.rb
-%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/transformblit.rb
-%%PORTDOCS%%@dirrm %%RUBY_MODEXAMPLESDIR%%
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/NEWS.en
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/README.en
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/rubysdl_const_list.txt
-%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/rubysdl_doc.en.html
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/rubysdl_doc.en.rd
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/NEWS.ja
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/README.ja
-%%PORTDOCS%%%%RUBY_RD_HTML_FILES%%%%RUBY_MODDOCDIR%%/ja/rubysdl_doc_old.html
-%%PORTDOCS%%%%RUBY_MODDOCDIR%%/ja/rubysdl_doc_old.rd
-%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%/ja
-%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%
