summaryrefslogtreecommitdiff
path: root/libraries/ocaml-camomile
diff options
context:
space:
mode:
authorJockey S. Kyd <jockey.kyd@gmail.com>2012-05-05 12:16:43 -0400
committerErik Hanson <erik@slackbuilds.org>2012-05-07 12:18:07 -0500
commitb0c32dd496e374e5758907021eff652e19248adb (patch)
tree8939625a8bd7169f95093bc6128cf126c40b3e3b /libraries/ocaml-camomile
parent7697858eb06784d871aecf05dec06332471da95d (diff)
downloadslackbuilds-b0c32dd496e374e5758907021eff652e19248adb.tar.gz
libraries/ocaml-camomile: Added (Unicode library for OCaml)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/ocaml-camomile')
-rw-r--r--libraries/ocaml-camomile/README4
-rw-r--r--libraries/ocaml-camomile/ocaml-camomile.SlackBuild99
-rw-r--r--libraries/ocaml-camomile/ocaml-camomile.info10
-rw-r--r--libraries/ocaml-camomile/slack-desc19
4 files changed, 132 insertions, 0 deletions
diff --git a/libraries/ocaml-camomile/README b/libraries/ocaml-camomile/README
new file mode 100644
index 0000000000..6ffc1186b8
--- /dev/null
+++ b/libraries/ocaml-camomile/README
@@ -0,0 +1,4 @@
+Camomile is a Unicode library for Objective Caml language. Camomile provides
+Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from
+about 200 encodings, collation and locale-sensitive case mappings, and more.
+The library is currently designed for Unicode Standard 3.2.
diff --git a/libraries/ocaml-camomile/ocaml-camomile.SlackBuild b/libraries/ocaml-camomile/ocaml-camomile.SlackBuild
new file mode 100644
index 0000000000..8c34742aac
--- /dev/null
+++ b/libraries/ocaml-camomile/ocaml-camomile.SlackBuild
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+# Copyright 2012 Jockey S. Kyd, Shanghai, CHN
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=ocaml-camomile
+VERSION=0.8.3
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCNAM=camomile
+
+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 $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
+cd $SRCNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure --prefix=/usr
+
+# add DESTDIR for `install-data'
+sed -i 's|^prefix=\(.*\)$|prefix=$(DESTDIR)\1|' Makefile
+
+# for `install-without-ocamlfind'
+sed -i 's|^OCAMLLIB = \(.*\)$|OCAMLLIB = $(DESTDIR)\1|' Makefile
+
+# for `install-with-ocamlfind'
+long='$(DESTDIR)/$$(ocamlfind printconf destdir)'
+sed -i "s|\\(ocamlfind install\\)| mkdir -p $long; \\1 -destdir $long |" Makefile
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file \
+ | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \
+ || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING Changes README \
+ $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/libraries/ocaml-camomile/ocaml-camomile.info b/libraries/ocaml-camomile/ocaml-camomile.info
new file mode 100644
index 0000000000..b9d846dcdf
--- /dev/null
+++ b/libraries/ocaml-camomile/ocaml-camomile.info
@@ -0,0 +1,10 @@
+PRGNAM="ocaml-camomile"
+VERSION="0.8.3"
+HOMEPAGE="http://camomile.sourceforge.net/"
+DOWNLOAD="http://prdownloads.sourceforge.net/camomile/camomile-0.8.3.tar.bz2"
+MD5SUM="c6476bdb4138d222bc14396a82205034"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Jockey S. Kyd"
+EMAIL="jockey.kyd@gmail.com"
+APPROVED="dsomero"
diff --git a/libraries/ocaml-camomile/slack-desc b/libraries/ocaml-camomile/slack-desc
new file mode 100644
index 0000000000..d733c3c523
--- /dev/null
+++ b/libraries/ocaml-camomile/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ocaml-camomile: ocaml-camomile (Unicode library for OCaml)
+ocaml-camomile:
+ocaml-camomile: Camomile is a Unicode library for Objective Caml language. Camomile
+ocaml-camomile: provides Unicode character type, UTF-8, UTF-16, UTF-32 strings,
+ocaml-camomile: conversion to/from about 200 encodings, collation and
+ocaml-camomile: locale-sensitive case mappings, and more. The library is currently
+ocaml-camomile: designed for Unicode Standard 3.2.
+ocaml-camomile:
+ocaml-camomile: http://camomile.sourceforge.net/
+ocaml-camomile:
+ocaml-camomile: