summaryrefslogtreecommitdiffstats
path: root/testing/dspam
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2014-10-26 12:46:08 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2014-10-26 12:46:08 +0100
commitcc40f381dc3c8a4ad2b3289088f033ad5bfb620e (patch)
treea080047a36d197124f6f3bbe8a4a35980dc5c66e /testing/dspam
parent630a278bc16616e0d8d916b0a5d1d36c50595536 (diff)
downloadaports-cc40f381dc3c8a4ad2b3289088f033ad5bfb620e.tar.bz2
aports-cc40f381dc3c8a4ad2b3289088f033ad5bfb620e.tar.xz
testing/dspam: upgrade to 3.10.2 and musl fixes
Diffstat (limited to 'testing/dspam')
-rw-r--r--testing/dspam/APKBUILD25
-rw-r--r--testing/dspam/musl-fixes.patch124
2 files changed, 142 insertions, 7 deletions
diff --git a/testing/dspam/APKBUILD b/testing/dspam/APKBUILD
index ff9be1cf1..71e498c18 100644
--- a/testing/dspam/APKBUILD
+++ b/testing/dspam/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dspam
-pkgver=3.9.1_rc1
-_ver=3.9.1-RC1
+pkgver=3.10.2
+_ver=$pkgver
pkgrel=2
pkgdesc="A statistical-algorithmic hybrid anti-spam filter"
url="http://dspam.nuclearelephant.com/"
@@ -18,7 +18,8 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-mysql
install= #dspam.install
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_ver.tar.gz
dspam.logrotate
- dspam.initd"
+ dspam.initd
+ musl-fixes.patch"
prepare() {
@@ -28,11 +29,12 @@ prepare() {
msg "Applying $i"
patch -p1 -i "$i" || return 1
done
- aclocal -I m4 && libtoolize && autoconf && automake
+ #aclocal -I m4 && libtoolize && autoconf && automake
}
build() {
cd "$srcdir"/$pkgname-$_ver
+ ./autogen.sh || return 1
./configure --prefix=/usr \
--sysconfdir=/etc/dspam \
--with-dspam-home=/var/lib/dspam \
@@ -43,7 +45,7 @@ build() {
--with-mysql-includes=/usr/include/mysql \
--with-mysql-libraries=/usr/lib/mysql \
|| return 1
- make
+ make -j1 || return 1
}
package() {
@@ -73,6 +75,15 @@ sqlite() {
mv "$pkgdir"/usr/lib/dspam/*sqlite* "$subpkgdir"/usr/lib/dspam/
}
-md5sums="326677b30af2711a8fa4b52facb52f37 dspam-3.9.1-RC1.tar.gz
+md5sums="0e0e405d3284485b2a43f47eaf6b09bb dspam-3.10.2.tar.gz
a798e9a6e2d5c30724f84d004bb96339 dspam.logrotate
-7d1fb0820f4a23f593f22186ef77d02a dspam.initd"
+7d1fb0820f4a23f593f22186ef77d02a dspam.initd
+5e77c0fd2fe8b4bfbdb5d7927835d73a musl-fixes.patch"
+sha256sums="ae76569604021f35b741fb95198a1e611a8c64c3838661973a6cf360bba593a9 dspam-3.10.2.tar.gz
+dd5bce638b92936e02ff02faf781cbf903faac7b73c61c1c666eb06cfb56bfac dspam.logrotate
+8fb3ae6a04f59798bc919e6a967015733e28fe0d52e7cbc6e7aa0dbe110edf4d dspam.initd
+ecd01cd869c44507d22f4b4d4804cf2053d5679e7a6f5a71159fc80a91da53b9 musl-fixes.patch"
+sha512sums="5fe53e1d0d7cabb3983f5c67274b074b7c647c1bae10ebc7ea3805542f99dbfb39abd4697e344e6eb80554522319a1253e1082ed6b389364bbaec1d6ddd43856 dspam-3.10.2.tar.gz
+b0e288f36f0aa2be48c9917bcfca39148df2682cb6bea88192c46dfa6e33226613bf2b5d7b977f2948a43c6932837e186949a99dece34431fac6e9b678f00da5 dspam.logrotate
+59177cbb3a42ed4f003a643239433d990c36e7531b6bae5841ac19164548a9ad0054be3d0b0ca5540af05b9a901a8d9f0b2b965d9969fee6779b81ac35b19262 dspam.initd
+4c600cccd6601db6c738a940d6309ee621e98d678a000614f4d4927c10a80528c642a32ae5a453d35c2679debacb04af6ca60d1c569d72751acc44e75446245a musl-fixes.patch"
diff --git a/testing/dspam/musl-fixes.patch b/testing/dspam/musl-fixes.patch
new file mode 100644
index 000000000..23c2adf3b
--- /dev/null
+++ b/testing/dspam/musl-fixes.patch
@@ -0,0 +1,124 @@
+--- a/src/libdspam.h.orig
++++ b/src/libdspam.h
+@@ -51,10 +51,10 @@
+ int libdspam_shutdown(void);
+
+ DSPAM_CTX * dspam_init (const char *username, const char *group,
+- const char *home, int operating_mode, u_int32_t flags);
++ const char *home, int operating_mode, uint32_t flags);
+
+ DSPAM_CTX * dspam_create (const char *username, const char *group,
+- const char *home, int operating_mode, u_int32_t flags);
++ const char *home, int operating_mode, uint32_t flags);
+
+ int dspam_attach (DSPAM_CTX *CTX, void *dbh);
+ int dspam_detach (DSPAM_CTX *CTX);
+--- a/src/libdspam_objects.h.orig
++++ b/src/libdspam_objects.h
+@@ -31,17 +31,17 @@
+ #include "config_shared.h"
+ #include "decode.h"
+
+-#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(u_int32_t) && !defined(__BIT_TYPES_DEFINED__)
++#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(uint32_t) && !defined(__BIT_TYPES_DEFINED__)
+ #define __BIT_TYPES_DEFINED__
+ typedef unsigned long long u_int64_t;
+-typedef unsigned int u_int32_t;
++typedef unsigned int uint32_t;
+ typedef unsigned short u_int16_t;
+ typedef unsigned char u_int8_t;
+ #endif
+
+ #ifdef _WIN32
+-typedef unsigned int u_int32_t;
+-typedef u_int32_t uid_t;
++typedef unsigned int uint32_t;
++typedef uint32_t uid_t;
+ #endif
+
+ extern void *_drv_handle; /* Handle to storage driver library */
+@@ -312,8 +312,8 @@
+ int source; /* DSS_ */
+ int learned; /* Did we actually learn something? */
+ int tokenizer; /* DSZ_ */
+- u_int32_t flags;
+- u_int32_t algorithms;
++ uint32_t flags;
++ uint32_t algorithms;
+
+ int result;
+ char class[32];
+--- a/src/tokenizer.c.orig
++++ b/src/tokenizer.c
+@@ -524,7 +524,7 @@
+ const char *heading, const char *bitpattern)
+ {
+ int i, t, keylen, breadth;
+- u_int32_t mask;
++ uint32_t mask;
+ unsigned long long crc;
+ char key[256];
+ int active = 0, top, tokenizer = CTX->tokenizer;
+@@ -550,7 +550,7 @@
+ breadth = _ds_pow2(active);
+
+ /* Iterate and generate all keys necessary */
+- for (mask=0; mask < (u_int32_t)breadth; mask++) {
++ for (mask=0; mask < (uint32_t)breadth; mask++) {
+ int terms = 0;
+
+ key[0] = 0;
+@@ -633,7 +633,7 @@
+ unsigned long long crc;
+ char key[256];
+ int active = 0;
+- u_int32_t mask;
++ uint32_t mask;
+
+ /* Shift all previous tokens up */
+ for(i=0;i<SPARSE_WINDOW_SIZE-1;i++) {
+@@ -650,7 +650,7 @@
+
+ /* Iterate and generate all keys necessary */
+
+- for(mask=0;mask < (u_int32_t)breadth;mask++) {
++ for(mask=0;mask < (uint32_t)breadth;mask++) {
+ int terms = 0;
+ t = 0;
+
+@@ -960,13 +960,13 @@
+
+ char *_ds_generate_bitpattern(int breadth) {
+ char *bitpattern;
+- u_int32_t mask;
++ uint32_t mask;
+ unsigned long exp;
+ int i;
+
+ bitpattern = malloc(SPARSE_WINDOW_SIZE * breadth);
+
+- for(mask=0;mask<(u_int32_t)breadth;mask++) {
++ for(mask=0;mask<(uint32_t)breadth;mask++) {
+ for(i=0;i<SPARSE_WINDOW_SIZE;i++) {
+ exp = (i) ? _ds_pow2(i) : 1;
+ /* Reverse pos = SPARSE_WINDOW_SIZE - (i+1); */
+--- a/src/libdspam.c.orig
++++ b/src/libdspam.c
+@@ -122,7 +122,7 @@
+ const char *group,
+ const char *home,
+ int operating_mode,
+- u_int32_t flags)
++ uint32_t flags)
+ {
+ DSPAM_CTX *CTX = dspam_create(username, group, home, operating_mode, flags);
+
+@@ -159,7 +159,7 @@
+ const char *group,
+ const char *home,
+ int operating_mode,
+- u_int32_t flags)
++ uint32_t flags)
+ {
+ DSPAM_CTX *CTX;
+