Import ruby-itex2MML.

itex2MML converts the itex equations to MathML.  This is a Ruby
binding for itex2MML.
This commit is contained in:
minskim 2007-06-14 18:56:59 +00:00
parent 9a97ecc8ad
commit 1a9c61adec
5 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,2 @@
itex2MML converts the itex equations to MathML. This is a Ruby
binding for itex2MML.

View file

@ -0,0 +1,27 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/06/14 18:56:59 minskim Exp $
DISTNAME= itexToMML
PKGNAME= ${RUBY_PKGPREFIX}-itex2MML-${ITEX2MML_VERSION}
CATEGORIES= textproc ruby
MASTER_SITES= http://golem.ph.utexas.edu/~distler/blog/files/
MAINTAINER= minskim@NetBSD.org
HOMEPAGE= http://golem.ph.utexas.edu/~distler/blog/itex2MML.html
COMMENT= Ruby binding for itex2MML
BUILD_DEPENDS+= swig>=1.3:../../devel/swig
DIST_SUBDIR= itex2MML-${ITEX2MML_VERSION}
USE_LANGUAGES= c++
USE_TOOLS+= bison flex gmake
WRKSRC= ${WRKDIR}/${DISTNAME}/itex-src
ITEX2MML_VERSION= 1.2.2
MAKE_ENV+= RUBY=${RUBY:Q}
RUBY_HAS_ARCHLIB= yes
BUILD_TARGET= ruby
INSTALL_TARGET= install_ruby
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2007/06/14 18:56:59 minskim Exp $
${RUBY_SITEARCHLIBDIR}/itex2MML.${RUBY_DLEXT}
${RUBY_SITELIBDIR}/itextomml.rb

View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2007/06/14 18:56:59 minskim Exp $
SHA1 (itex2MML-1.2.2/itexToMML.tar.gz) = e3331d7dfe2914b053f903aad8b9e2d8bdcbc98f
RMD160 (itex2MML-1.2.2/itexToMML.tar.gz) = 209e61f2f2ee0bd08658143e72704eb839424657
Size (itex2MML-1.2.2/itexToMML.tar.gz) = 127224 bytes
SHA1 (patch-aa) = 68660134b805d81d86c6ac7c8a3e591d5705f6be

View file

@ -0,0 +1,52 @@
$NetBSD: patch-aa,v 1.1.1.1 2007/06/14 18:56:59 minskim Exp $
--- Makefile.orig 2007-02-22 09:51:13.000000000 -0800
+++ Makefile
@@ -1,6 +1,8 @@
#YACC=yacc
YACC=bison -y -v
LEX=flex -P$(YYPREFIX) -olex.yy.c
+RUBY?= ruby
+SWIG?= swig
RM=rm -f
INSTALL=install -c
@@ -34,19 +36,19 @@ clean:
install: itex2MML
$(INSTALL) itex2MML $(BINDIR)
-RUBY_CFLAGS = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["CCDLFLAGS"]')
-RUBY_LD = MACOSX_DEPLOYMENT_TARGET=10.4 $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["LDSHARED"]')
-RUBYLIBDIR =$(shell ruby -e 'require "rbconfig"; print Config::CONFIG["libdir"]')
+RUBY_CFLAGS = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["CCDLFLAGS"]')
+RUBY_LD = MACOSX_DEPLOYMENT_TARGET=10.4 $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["LDSHARED"]')
+RUBYLIBDIR =$(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["libdir"]')
RUBY_PREFIX = $(RUBYLIBDIR)/ruby
-RUBY_ARCH = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["arch"]')
-RUBYDIR = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["archdir"]')
-RUBY_SITEDIR = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["sitelibdir"]')
-RUBY_SITEARCHDIR = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["sitearchdir"]')
-LIBRUBYARG = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["LIBRUBYARG"]')
-DYLIB_EXT = $(shell ruby -e 'require "rbconfig"; print Config::CONFIG["DLEXT"]')
+RUBY_ARCH = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["arch"]')
+RUBYDIR = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["archdir"]')
+RUBY_SITEDIR = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["sitelibdir"]')
+RUBY_SITEARCHDIR = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["sitearchdir"]')
+LIBRUBYARG = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["LIBRUBYARG"]')
+DYLIB_EXT = $(shell ${RUBY} -e 'require "rbconfig"; print Config::CONFIG["DLEXT"]')
itex2MML_ruby.c: itex2MML.i
- swig -ruby -o itex2MML_ruby.c itex2MML.i
+ ${SWIG} -ruby -o itex2MML_ruby.c itex2MML.i
itex2MML_ruby.o: itex2MML_ruby.c
$(CC) $(RUBY_CFLAGS) -c itex2MML_ruby.c -I$(RUBYDIR) -o itex2MML_ruby.o
@@ -61,7 +63,7 @@ ruby: itex2MML_ruby.o y.tab_ruby.o lex.y
$(RUBY_LD) itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o -L$(RUBYLIBDIR) $(LIBRUBYARG) -o itex2MML.$(DYLIB_EXT)
test_ruby:
- ruby ./itextomml.rb
+ ${RUBY} ./itextomml.rb
install_ruby: itex2MML.$(DYLIB_EXT)
$(INSTALL) itex2MML.$(DYLIB_EXT) $(RUBY_SITEARCHDIR)