summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorOleg O. Chukaev <oleg.chukaev@mail.ru>2010-07-02 12:26:19 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-07-02 12:26:19 -0500
commit38c993ee3bea7b68fe82bd0e24a6d709c1fd8dc4 (patch)
tree0889d386bd5ba3332868dd07f9a9e2c4ee8bf514 /misc
parentb97b095b6fc79828faba0cfbb5090c88e1d01914 (diff)
downloadslackbuilds-38c993ee3bea7b68fe82bd0e24a6d709c1fd8dc4.tar.gz
misc/uni2ascii: Added (unicode to ascii converter)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/uni2ascii/01_getline_posix2008_fix.diff28
-rw-r--r--misc/uni2ascii/README6
-rw-r--r--misc/uni2ascii/slack-desc19
-rw-r--r--misc/uni2ascii/uni2ascii.SlackBuild80
-rw-r--r--misc/uni2ascii/uni2ascii.info10
5 files changed, 143 insertions, 0 deletions
diff --git a/misc/uni2ascii/01_getline_posix2008_fix.diff b/misc/uni2ascii/01_getline_posix2008_fix.diff
new file mode 100644
index 0000000000..347063dfcc
--- /dev/null
+++ b/misc/uni2ascii/01_getline_posix2008_fix.diff
@@ -0,0 +1,28 @@
+Description:
+In eglibc <= 2.9, getline was only defined if _GNU_SOURCE was defined. In
+eglibc 2.10, getline is always defined (since it became a standard in
+POSIX2008). The uni2ascii already has a function named getline(), which now
+conflicts with glibc's. Patch will rename getline() to get_line() to fix the
+problem.
+Author: Kartik Mistry <kartik@debian.org>
+Debian bug: http://bugs.debian.org/552870
+--- a/ascii2uni.c
++++ b/ascii2uni.c
+@@ -463,7 +463,7 @@
+ fprintf(stderr,"Failed to allocate buffer for input line.\n");
+ exit(2);
+ }
+- while ((read = getline(&lbuf, &len, infp)) != -1) {
++ while ((read = get_line(&lbuf, &len, infp)) != -1) {
+ AddNewlineP = 1;
+ LineNo++;
+ last = read - 1;
+@@ -848,7 +848,7 @@
+ }
+
+ int
+-getline (lineptr, n, stream)
++get_line (lineptr, n, stream)
+ char **lineptr;
+ size_t *n;
+ FILE *stream;
diff --git a/misc/uni2ascii/README b/misc/uni2ascii/README
new file mode 100644
index 0000000000..4987336817
--- /dev/null
+++ b/misc/uni2ascii/README
@@ -0,0 +1,6 @@
+uni2ascii provides conversion in both directions between UTF-8 Unicode
+and more than thirty 7-bit ASCII equivalents, including HTML numeric
+character references, various escapes and hexadecimal. Such ASCII
+equivalents are useful when including Unicode text in program source,
+when debugging, and when entering text into web programs that can
+handle the Unicode character set but are not 8-bit safe.
diff --git a/misc/uni2ascii/slack-desc b/misc/uni2ascii/slack-desc
new file mode 100644
index 0000000000..04acc1f98b
--- /dev/null
+++ b/misc/uni2ascii/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+uni2ascii: uni2ascii (convert UTF-8 into 7-bit ASCII and vice versa)
+uni2ascii:
+uni2ascii: uni2ascii provides conversion in both directions between UTF-8 Unicode
+uni2ascii: and more than thirty 7-bit ASCII equivalents, including HTML numeric
+uni2ascii: character references, various escapes and hexadecimal. Such ASCII
+uni2ascii: equivalents are useful when including Unicode text in program source,
+uni2ascii: when debugging, and when entering text into web programs that can
+uni2ascii: handle the Unicode character set but are not 8-bit safe.
+uni2ascii:
+uni2ascii: Homepage: http://billposer.org/Software/uni2ascii.html
+uni2ascii:
diff --git a/misc/uni2ascii/uni2ascii.SlackBuild b/misc/uni2ascii/uni2ascii.SlackBuild
new file mode 100644
index 0000000000..b42818ea7b
--- /dev/null
+++ b/misc/uni2ascii/uni2ascii.SlackBuild
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# Slackware build script for uni2ascii
+# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru>
+
+PRGNAM=uni2ascii
+VERSION=4.14
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Fix some compilation errors...
+patch -p1 -i $CWD/01_getline_posix2008_fix.diff
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING CREDITS ChangeLog INSTALL NEWS README TODO \
+ TestSuiteAscii2Uni \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/misc/uni2ascii/uni2ascii.info b/misc/uni2ascii/uni2ascii.info
new file mode 100644
index 0000000000..923665ec81
--- /dev/null
+++ b/misc/uni2ascii/uni2ascii.info
@@ -0,0 +1,10 @@
+PRGNAM="uni2ascii"
+VERSION="4.14"
+HOMEPAGE="http://billposer.org/Software/uni2ascii.html"
+DOWNLOAD="http://billposer.org/Software/Downloads/uni2ascii-4.14.tar.bz2"
+MD5SUM="b26f3ac559ccd69161b93c2f4fed5f14"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Oleg O. Chukaev"
+EMAIL="oleg.chukaev@mail.ru"
+APPROVED="rworkman"