academic/itex2mml: Updated for version 1.5.1.

Fixed build failure with bison-3.
Removed bashisms and hardcoded Ruby version.
(The itexToMML.tar.gz version was already 1.5.1...)

Signed-off-by: David Spencer <baildon.research@googlemail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
David Spencer 2015-07-26 14:01:37 +01:00 committed by Willy Sudiarto Raharjo
parent c27f97a404
commit ecaab058cc
3 changed files with 34 additions and 9 deletions

View file

@ -0,0 +1,21 @@
diff -wbBur itexToMML/itex-src/itex2MML.y itexToMML.my/itex-src/itex2MML.y
--- itexToMML/itex-src/itex2MML.y 2014-01-05 21:56:04.000000000 +0400
+++ itexToMML.my/itex-src/itex2MML.y 2014-02-03 21:21:16.455644069 +0400
@@ -2,6 +2,8 @@
* itex2MML.y last modified 1/5/2014
*/
+%parse-param {char **ret_str}
+
%{
#include <stdio.h>
#include <string.h>
@@ -27,7 +29,7 @@
void (*itex2MML_error) (const char * msg) = itex2MML_default_error;
- static void yyerror (char * s)
+ static void yyerror (char **ret_str, char * s)
{
char * msg = itex2MML_copy3 (s, " at token ", yytext);
if (itex2MML_error)

View file

@ -5,7 +5,7 @@
# Public domain.
PRGNAM=itex2mml
VERSION=${VERSION:-1.4.11}
VERSION=${VERSION:-1.5.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -48,14 +48,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if [[ "$RUBY" = "YES" ]]; then
MYRARCH=$(ruby -e 'print RbConfig::CONFIG["arch"]')
# Fix for bison-3 (thanks to Arch ;-)
patch -p2 < $CWD/bison3-fix.patch
if [ "$RUBY" = "YES" ]; then
sed -i \
-e 's|require "rbconfig"; ||' \
-e 's|-I\$(RUBYDIR)|& -I$(RUBYHDRDIR)/$(RUBY_ARCH)|' \
Makefile
fi
# This fixes ruby bindings build, BINDIR,
sed -i \
-e "s|require\ \"rbconfig\";\ print\ |print Rb|" \
-e "s|RUBYDIR)|RUBYDIR) -I/usr/include/ruby-1.9.1/${MYRARCH}|" \
-e "s|local/||" \
-e "s|BINDIR=/usr/local/bin|BINDIR=/usr/bin|" \
Makefile
make clean
@ -65,7 +69,7 @@ make
mkdir -p $PKG/usr/bin
make install BINDIR=$PKG/usr/bin
if [[ "$RUBY" = "YES" ]]; then
if [ "$RUBY" = "YES" ]; then
make ruby
ARCHDIR="$PKG$(ruby -e 'print RbConfig::CONFIG["sitearchdir"]')"
SITEDIR="$PKG$(ruby -e 'print RbConfig::CONFIG["sitelibdir"]')"

View file

@ -1,5 +1,5 @@
PRGNAM="itex2mml"
VERSION="1.4.11"
VERSION="1.5.1"
HOMEPAGE="http://golem.ph.utexas.edu/~distler/blog/itex2MML.html"
DOWNLOAD="http://golem.ph.utexas.edu/~distler/blog/files/itexToMML.tar.gz"
MD5SUM="a0bd9fc5439499f12d0c2c3bee74c9a0"