From b0c32dd496e374e5758907021eff652e19248adb Mon Sep 17 00:00:00 2001 From: Jockey S. Kyd Date: Sat, 5 May 2012 12:16:43 -0400 Subject: libraries/ocaml-camomile: Added (Unicode library for OCaml) Signed-off-by: dsomero --- libraries/ocaml-camomile/README | 4 + libraries/ocaml-camomile/ocaml-camomile.SlackBuild | 99 ++++++++++++++++++++++ libraries/ocaml-camomile/ocaml-camomile.info | 10 +++ libraries/ocaml-camomile/slack-desc | 19 +++++ 4 files changed, 132 insertions(+) create mode 100644 libraries/ocaml-camomile/README create mode 100644 libraries/ocaml-camomile/ocaml-camomile.SlackBuild create mode 100644 libraries/ocaml-camomile/ocaml-camomile.info create mode 100644 libraries/ocaml-camomile/slack-desc (limited to 'libraries') 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: -- cgit v1.2.3