diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | gcc4-fixes.patch | 72 |
3 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..83bc1da19d3a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = mpack + pkgdesc = Utilities for encoding and decoding binaries files in MIME format mail messages + pkgver = 1.6 + pkgrel = 4 + url = http://ftp.andrew.cmu.edu/pub/mpack/ + arch = i686 + arch = x86_64 + license = GPL + source = http://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz + source = gcc4-fixes.patch + sha256sums = 274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c + sha256sums = 72cda1b1b2f28ab7d25dcefd03d8027711fd18c1bb9bf3b52eac36068f59b170 + +pkgname = mpack + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..140773cf567e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Christian Hesse <mail@eworm.de> +# Contributor: Alexandre Possebom <alexandrepossebom@gmail.com> + +pkgname=mpack +pkgver=1.6 +pkgrel=4 +pkgdesc='Utilities for encoding and decoding binaries files in MIME format mail messages' +arch=('i686' 'x86_64') +url='http://ftp.andrew.cmu.edu/pub/mpack/' +license=('GPL') +source=("http://ftp.andrew.cmu.edu/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'gcc4-fixes.patch') +sha256sums=('274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c' + '72cda1b1b2f28ab7d25dcefd03d8027711fd18c1bb9bf3b52eac36068f59b170') + +prepare(){ + cd ${srcdir}/${pkgname}-${pkgver} + + # fix for gcc 4.x + patch -p1 -N <../gcc4-fixes.patch + +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr --mandir=/usr/share/man + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install +} + diff --git a/gcc4-fixes.patch b/gcc4-fixes.patch new file mode 100644 index 000000000000..39bf57dbcbe7 --- /dev/null +++ b/gcc4-fixes.patch @@ -0,0 +1,72 @@ +diff -ub -r mpack-1.6-orig/unixos.c mpack-1.6/unixos.c +--- mpack-1.6-orig/unixos.c 2003-07-21 22:54:05.000000000 +0200 ++++ mpack-1.6/unixos.c 2009-01-12 17:11:50.000000000 +0100 +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include <stdio.h> ++#include <stdlib.h> + #include <ctype.h> + #include <string.h> + #include <errno.h> +@@ -38,10 +39,6 @@ + #define MAXHOSTNAMELEN 64 + #endif + +-extern int errno; +-extern char *malloc(); +-extern char *getenv(); +- + int overwrite_files = 0; + int didchat; + +diff -ub -r mpack-1.6-orig/unixpk.c mpack-1.6/unixpk.c +--- mpack-1.6-orig/unixpk.c 2003-07-21 22:50:41.000000000 +0200 ++++ mpack-1.6/unixpk.c 2009-01-12 17:11:32.000000000 +0100 +@@ -23,6 +23,9 @@ + * SOFTWARE. + */ + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> ++#include <getopt.h> + #include <string.h> + #include <errno.h> + #include "common.h" +@@ -31,12 +34,6 @@ + + #define MAXADDRESS 100 + +-extern char *getenv(); +- +-extern int errno; +-extern int optind; +-extern char *optarg; +- + void usage(void); + void sendmail(FILE *infile, char **addr, int start); + void inews(FILE *infile); +diff -ub -r mpack-1.6-orig/unixunpk.c mpack-1.6/unixunpk.c +--- mpack-1.6-orig/unixunpk.c 2003-07-21 22:51:55.000000000 +0200 ++++ mpack-1.6/unixunpk.c 2009-01-12 17:12:25.000000000 +0100 +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include <stdio.h> ++#include <stdlib.h> + #include "version.h" + #include "part.h" + +diff -ub -r mpack-1.6-orig/xmalloc.c mpack-1.6/xmalloc.c +--- mpack-1.6-orig/xmalloc.c 2003-07-21 22:35:31.000000000 +0200 ++++ mpack-1.6/xmalloc.c 2009-01-12 17:12:07.000000000 +0100 +@@ -23,8 +23,8 @@ + * SOFTWARE. + */ + #include <stdio.h> ++#include <stdlib.h> + #include <string.h> +-extern char *malloc(), *realloc(); + + char *xmalloc (int size) + { |