diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/compface/README | 6 | ||||
-rw-r--r-- | libraries/compface/compface-sharedlib.patch | 46 | ||||
-rw-r--r-- | libraries/compface/compface-xbm-debian.patch | 101 | ||||
-rw-r--r-- | libraries/compface/compface.SlackBuild | 106 | ||||
-rw-r--r-- | libraries/compface/compface.info | 10 | ||||
-rw-r--r-- | libraries/compface/slack-desc | 19 |
6 files changed, 288 insertions, 0 deletions
diff --git a/libraries/compface/README b/libraries/compface/README new file mode 100644 index 0000000000..8537ac46c2 --- /dev/null +++ b/libraries/compface/README @@ -0,0 +1,6 @@ +Compface converts 48x48x1 images to and from a compressed format. +The purpose is to allow the inclusion of face images within mail +headers using the field name 'X-face:'. It uses the library that +can be used to allow the compression and decompression algorithms +to be used in other programs such as mail dispatchers and mail +notification daemons. diff --git a/libraries/compface/compface-sharedlib.patch b/libraries/compface/compface-sharedlib.patch new file mode 100644 index 0000000000..856303f8dc --- /dev/null +++ b/libraries/compface/compface-sharedlib.patch @@ -0,0 +1,46 @@ +--- compface-1.5.2.orig/Makefile.in 2005-10-04 14:59:49.000000000 +0200 ++++ compface-1.5.2/Makefile.in 2013-02-28 00:12:27.888027519 +0100 +@@ -24,6 +24,7 @@ + EXECUTABLE = $(BINDIR)/$(NAMEEXE) + UNEXECUTABLE = $(BINDIR)/$(UNNAMEEXE) + LIBNAME = lib$(NAME).a ++SOLIBNAME = lib$(NAME).so + LIBRARY = $(LIBDIR)/$(LIBNAME) + MAN1DIR = $(MANDIR)/man1 + MAN3DIR = $(MANDIR)/man3 +@@ -41,15 +42,16 @@ + CFLAGS = @CFLAGS@ + DEFS = @DEFS@ -DHAVE_CONFIG_H + LDFLAGS = @LDFLAGS@ ++SHLDFLAGS = -L. -lcompface + LIBS = @LIBS@ + +-all: $(NAMEEXE) $(UNNAMEEXE) ++all: shared $(NAMEEXE) $(UNNAMEEXE) + +-$(NAMEEXE) : cmain.o compface.o $(LIBNAME) +- $(CC) $(LDFLAGS) -o $@ cmain.o compface.o $(LIBNAME) ++$(NAMEEXE) : cmain.o compface.o ++ $(CC) $(LDFLAGS) $(SHLDFLAGS) -o $@ cmain.o compface.o + + $(UNNAMEEXE) : uncmain.o $(LIBNAME) +- $(CC) $(LDFLAGS) -o $@ uncmain.o $(LIBNAME) ++ $(CC) $(LDFLAGS) $(SHLDFLAGS) -o $@ uncmain.o + + $(LIBNAME) : $(OBJECTS) + ar rc $(LIBNAME) $(OBJECTS) +@@ -92,6 +94,14 @@ + shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh + compress $(NAME).sh + ++static: $(OBJECTS) ++ ar rc $(LIBNAME) $(OBJECTS) ++ -ranlib $(LIBNAME) ++ ++shared: $(OBJECTS) ++ $(CC) -shared -Wl,-soname,$(SOLIBNAME).1 $(LDFLAGS) -o $(SOLIBNAME).1.5.2 $(OBJECTS) ++ ln -sf $(SOLIBNAME).1.5.2 $(SOLIBNAME) ++ + .c.o: + $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $< + diff --git a/libraries/compface/compface-xbm-debian.patch b/libraries/compface/compface-xbm-debian.patch new file mode 100644 index 0000000000..dd73b5c4f1 --- /dev/null +++ b/libraries/compface/compface-xbm-debian.patch @@ -0,0 +1,101 @@ +diff -Naur compface-1.5.2.orig/compface.c compface-1.5.2/compface.c +--- compface-1.5.2.orig/compface.c 2005-10-04 14:28:47.000000000 +0200 ++++ compface-1.5.2/compface.c 2013-02-27 20:37:04.022999237 +0100 +@@ -19,7 +19,7 @@ + #include "config.h" + #endif + +-#include "compface_private.h" ++#include "compface.h" + + int + compface(fbuf) +diff -Naur compface-1.5.2.orig/compface.h compface-1.5.2/compface.h +--- compface-1.5.2.orig/compface.h 2005-10-04 14:29:00.000000000 +0200 ++++ compface-1.5.2/compface.h 2013-02-27 20:43:45.252969068 +0100 +@@ -143,7 +143,6 @@ + int AllWhite P((char *, int, int)) ; + int BigPop P((Prob *)) ; + int compface P((char *)) ; +-int main P((int, char *[])) ; + int ReadBuf P(()) ; + int Same P((char *, int, int)) ; + int uncompface P((char *)) ; +diff -Naur compface-1.5.2.orig/file.c compface-1.5.2/file.c +--- compface-1.5.2.orig/file.c 2005-10-04 14:28:47.000000000 +0200 ++++ compface-1.5.2/file.c 2013-02-27 20:43:16.611971224 +0100 +@@ -77,8 +77,42 @@ + { + register int c, i; + register char *s, *t; ++ static char table_inv[] = { 0,8,4,12,2,10,6,14,1,9, 5,13, 3,11, 7,15 }; ++ static char table_nop[] = { 0,1,2, 3,4, 5,6, 7,8,9,10,11,12,13,14,15 }; ++ char *table = table_nop; /* optionally invert bits in nibble */ ++ register inc = 0; /* optionally swap nimmles */ ++ int bits; ++ int len; + + t = s = fbuf; ++ ++ /* Does this look like an X bitmap ? */ ++ if (sscanf(s, "#define %*s %d", &bits) == 1) { ++ if (bits == 48) { ++ char type1[256]; ++ char type2[256]; ++ while (*s && *s++ != '\n'); ++ if (sscanf(s, "#define %*s %d", &bits) == 1) if (bits == 48) { ++ while (*s && *s++ != '\n'); ++ for (len=0; s[len] && s[len]!='\n'; len++); ++ if (len<255) { ++ if (sscanf(s, "static %s %s", type1,type2)==2 && ++ (!strcmp(type1, "char") || ++ !strcmp(type2, "char"))) { ++ while (*s && *s++ != '\n'); ++ inc = 1; ++ table = table_inv; ++ } ++ else fprintf(stderr, "warning: xbitmap line 3 not static [unsigned] short ...\n"); ++ } else fprintf(stderr, "warning: xbitmap line 3 too long\n"); ++ } ++ else fprintf(stderr, "warning: xbitmaps must be 48x48\n"); ++ } ++ else fprintf(stderr, "warning: xbitmaps must be 48x48\n"); ++ } ++ /* Ensure s is reset if it was not an X bitmap ... */ ++ if (! inc) s = fbuf; ++ + for(i = strlen(s); i > 0; i--) + { + c = (int)*(s++); +@@ -89,7 +123,7 @@ + status = ERR_EXCESS; + break; + } +- *(t++) = c - '0'; ++ (t++)[inc] = table[c - '0']; inc = -inc; + } + else if ((c >= 'A') && (c <= 'F')) + { +@@ -98,7 +132,7 @@ + status = ERR_EXCESS; + break; + } +- *(t++) = c - 'A' + 10; ++ (t++)[inc] = table[c - 'A' + 10]; inc = -inc; + } + else if ((c >= 'a') && (c <= 'f')) + { +@@ -107,10 +141,10 @@ + status = ERR_EXCESS; + break; + } +- *(t++) = c - 'a' + 10; ++ (t++)[inc] = table[c - 'a' + 10]; inc = -inc; + } +- else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) +- t--; ++ else if (((c == 'x') || (c == 'X')) && (t > fbuf) && ++ ((t-1)[-inc] == table[0])){t--; inc = -inc;} + } + if (t < fbuf + DIGITS) + longjmp(comp_env, ERR_INSUFF); diff --git a/libraries/compface/compface.SlackBuild b/libraries/compface/compface.SlackBuild new file mode 100644 index 0000000000..751901c904 --- /dev/null +++ b/libraries/compface/compface.SlackBuild @@ -0,0 +1,106 @@ +#!/bin/sh + +# Slackware build script for compface + +# Copyright 2013, Bojan Popovic, Belgrade, Serbia +# 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=compface +VERSION=${VERSION:-1.5.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ];then + case "$( uname -m )" in + i?86) ARCH=486 ;; + 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.?z* +# Apply xbm patch from Debian +cat $CWD/compface-xbm-debian.patch | patch -p0 +# Apply shared lib patch (the default is static) +cat $CWD/compface-sharedlib.patch | patch -p0 +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +# make install ignores DESTDIR +mkdir -p $PKG/usr/bin $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/man/man1 $PKG/usr/man/man3 $PKG/usr/include +install -s -m 0755 compface uncompface $PKG/usr/bin +gzip -c compface.1 > $PKG/usr/man/man1/compface.1.gz +gzip -c compface.3 > $PKG/usr/man/man3/compface.3.gz +install -m 0644 compface.h $PKG/usr/include +install -m 0644 libcompface.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libcompface.so.$VERSION +cd $PKG/usr/lib$LIBDIRSUFFIX ; ln -sf libcompface.so.$VERSION libcompface.so.1 +cd $PKG/usr/man/man1 ; ln -sf compface.1.gz uncompface.1.gz +cd $TMP/$PRGNAM-$VERSION + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ChangeLog 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/compface/compface.info b/libraries/compface/compface.info new file mode 100644 index 0000000000..7dc530a547 --- /dev/null +++ b/libraries/compface/compface.info @@ -0,0 +1,10 @@ +PRGNAM="compface" +VERSION="1.5.2" +HOMEPAGE="http://freecode.com/projects/compface" +DOWNLOAD="http://ftp.xemacs.org/pub/xemacs/aux/compface-1.5.2.tar.gz" +MD5SUM="62f4f79c0861ad292ba3cf77b4c48319" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Bojan Popovic" +EMAIL="bocke@slackware-srbija.org" diff --git a/libraries/compface/slack-desc b/libraries/compface/slack-desc new file mode 100644 index 0000000000..1b1f7d23d0 --- /dev/null +++ b/libraries/compface/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------------------------------------------------------| +compface: Compface (48x48x1 image compression and decompression) +compface: +compface: Compface converts 48x48x1 images to and from a compressed format. +compface: The purpose is to allow the inclusion of face images within mail +compface: headers using the field name 'X-face:'. It uses the library that +compface: can be used to allow the compression and decompression algorithms +compface: to be used in other programs such as mail dispatchers and mail +compface: notification daemons. +compface: +compface: +compface: |