diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | getline.patch | 97 |
4 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7c277e453f4a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = newspost + pkgdesc = A usenet binary autoposter for unix + pkgver = 2.1.1 + pkgrel = 3 + url = http://newspost.unixcab.org/ + arch = i686 + arch = x86_64 + license = GPL + depends = glibc + source = http://newspost.unixcab.org/download/newspost-2.1.1.tar.gz + source = getline.patch + sha1sums = 244f31c6e5aa8e41224310295e477ab4a8a17071 + sha1sums = c64d67627b72fea3bd23d2c81f2dbfbbddbd1fb2 + +pkgname = newspost + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..48110ddd6aab --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!getline.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bbaae10e119e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com> +# Contributor: Carsten Abele <yonk@yonk.de> + +pkgname=newspost +pkgver=2.1.1 +pkgrel=3 +pkgdesc="A usenet binary autoposter for unix" +url="http://newspost.unixcab.org/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('glibc') +source=("http://newspost.unixcab.org/download/${pkgname}-${pkgver}.tar.gz" + 'getline.patch') +sha1sums=('244f31c6e5aa8e41224310295e477ab4a8a17071' + 'c64d67627b72fea3bd23d2c81f2dbfbbddbd1fb2') + +prepare() { + patch -d "${pkgname}-${pkgver}" -Np1 -i ../getline.patch +} + +build() { + make -C "${pkgname}-${pkgver}" +} + +package() { + make -C "${pkgname}-${pkgver}" PREFIX="${pkgdir}/usr/" MANDIR="${pkgdir}/usr/share/man/man1" install +}
\ No newline at end of file diff --git a/getline.patch b/getline.patch new file mode 100644 index 000000000000..3aec6e103767 --- /dev/null +++ b/getline.patch @@ -0,0 +1,97 @@ +diff -crB newspost-2.1.1.org/base/newspost.c newspost-2.1.1/base/newspost.c +*** newspost-2.1.1.org/base/newspost.c 2003-04-23 17:33:23.000000000 +0200 +--- newspost-2.1.1/base/newspost.c 2009-12-29 20:18:19.000000000 +0100 +*************** +*** 342,348 **** + file = fopen(filename, "r"); + if (file != NULL) { + while (!feof(file)) { +! line = getline(line, file); + if(line == NULL){ + text_buffer = buff_add(text_buffer, "\r\n"); + continue; +--- 342,348 ---- + file = fopen(filename, "r"); + if (file != NULL) { + while (!feof(file)) { +! line = get_line(line, file); + if(line == NULL){ + text_buffer = buff_add(text_buffer, "\r\n"); + continue; +diff -crB newspost-2.1.1.org/base/utils.c newspost-2.1.1/base/utils.c +*** newspost-2.1.1.org/base/utils.c 2003-04-23 17:33:23.000000000 +0200 +--- newspost-2.1.1/base/utils.c 2009-12-29 20:18:34.000000000 +0100 +*************** +*** 43,49 **** + return NULL; + } + +! Buff * getline(Buff *buff, FILE *file){ + char c = fgetc(file); + buff = buff_free(buff); + while(TRUE){ +--- 43,49 ---- + return NULL; + } + +! Buff * get_line(Buff *buff, FILE *file){ + char c = fgetc(file); + buff = buff_free(buff); + while(TRUE){ +diff -crB newspost-2.1.1.org/base/utils.h newspost-2.1.1/base/utils.h +*** newspost-2.1.1.org/base/utils.h 2003-02-08 16:09:41.000000000 +0100 +--- newspost-2.1.1/base/utils.h 2009-12-29 20:18:45.000000000 +0100 +*************** +*** 26,32 **** + file_entry * file_entry_alloc(); + file_entry * file_entry_free(file_entry *fe); + +! Buff * getline(Buff *buff, FILE *file); + Buff *buff_add(Buff *buff, char *data, ... ); + Buff * buff_free(Buff *buff); + Buff *buff_create(Buff *buff, char *data, ... ); +--- 26,32 ---- + file_entry * file_entry_alloc(); + file_entry * file_entry_free(file_entry *fe); + +! Buff * get_line(Buff *buff, FILE *file); + Buff *buff_add(Buff *buff, char *data, ... ); + Buff * buff_free(Buff *buff); + Buff *buff_create(Buff *buff, char *data, ... ); +diff -crB newspost-2.1.1.org/ui/options.c newspost-2.1.1/ui/options.c +*** newspost-2.1.1.org/ui/options.c 2003-04-23 17:33:33.000000000 +0200 +--- newspost-2.1.1/ui/options.c 2009-12-29 20:19:06.000000000 +0100 +*************** +*** 332,338 **** + file = fopen(filename->data, "r"); + if (file != NULL) { + while (!feof(file)) { +! line = getline(line, file); + linenum++; + if(line == NULL) continue; + +--- 332,338 ---- + file = fopen(filename->data, "r"); + if (file != NULL) { + while (!feof(file)) { +! line = get_line(line, file); + linenum++; + if(line == NULL) continue; + +*************** +*** 429,435 **** + linenum = 0; + while (linenum < 8) { + linenum++; +! line = getline(line, file); + if(line == NULL) continue; + + switch (linenum) { +--- 429,435 ---- + linenum = 0; + while (linenum < 8) { + linenum++; +! line = get_line(line, file); + if(line == NULL) continue; + + switch (linenum) { |