summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBuildTools2015-09-22 11:39:57 -0700
committerBuildTools2015-09-22 11:39:57 -0700
commitb433dbfb3e53e3f968d651acfbd436c7043f3de3 (patch)
treed24e65745f91b65901a74b50e792f7f7e63c4b73
downloadaur-b433dbfb3e53e3f968d651acfbd436c7043f3de3.tar.gz
init
-rw-r--r--.SRCINFO39
-rw-r--r--.gitignore4
-rw-r--r--0001-use-namespace.mingw.patch18
-rw-r--r--0002-printf.mingw.patch36
-rw-r--r--0003-no-undefined-on.mingw.patch11
-rw-r--r--0004-reloc.mingw.patch123
-rw-r--r--0005-w32-home.all.patch24
-rw-r--r--0006-abort.mingw.patch236
-rw-r--r--0007-fix-including-langinfo.patch12
-rw-r--r--PKGBUILD81
10 files changed, 584 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..84906f75b31a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = mingw-w64-aspell
+ pkgdesc = A spell checker designed to eventually replace Ispell (mingw-w64)
+ pkgver = 0.60.6.1
+ pkgrel = 1
+ url = http://aspell.net/
+ arch = any
+ license = LGPL
+ makedepends = mingw-w64-gcc
+ depends = mingw-w64-gettext
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz
+ source = 0001-use-namespace.mingw.patch
+ source = 0002-printf.mingw.patch
+ source = 0003-no-undefined-on.mingw.patch
+ source = 0004-reloc.mingw.patch
+ source = 0005-w32-home.all.patch
+ source = 0006-abort.mingw.patch
+ source = 0007-fix-including-langinfo.patch
+ md5sums = e66a9c9af6a60dc46134fdacf6ce97d7
+ md5sums = ee6e262260e11bc285ce6a242fec3aeb
+ md5sums = 9f799391cc00cf9e0d5ffee88d103a97
+ md5sums = 4aa79ac556d2cd42b1d736e031acdbac
+ md5sums = 102bacf0b0c041f9d04aeb6bb0adb865
+ md5sums = 3830ee14ff5b704a4e21b2c76f153217
+ md5sums = 5ed7ead83958a39719242221c3669311
+ md5sums = 50a79bb773b73cb3a69ec38cb086ca27
+ sha1sums = ff1190db8de279f950c242c6f4c5d5cdc2cbdc49
+ sha1sums = be7c87411f47fe170e2b296553ce07b4272e2e0d
+ sha1sums = c7bff3c45707095c16bda3d35ea95f3eb09683dc
+ sha1sums = c0278c4d8cfe2e9dfee094b83197b2fb13d16126
+ sha1sums = e38466e0e15458d73701b9fc224b31a3b5346b41
+ sha1sums = 1957646282ba00eabd7136fe67c6408a363f57b8
+ sha1sums = f20a0677818cb24e32aefa5ea22662b9afe65360
+ sha1sums = 25a7919b90a9593cfc391ac0aa8fa6a2554c59cb
+
+pkgname = mingw-w64-aspell
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..25cca9a92b37
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.gz
+*.xz
diff --git a/0001-use-namespace.mingw.patch b/0001-use-namespace.mingw.patch
new file mode 100644
index 000000000000..bb1f411d6475
--- /dev/null
+++ b/0001-use-namespace.mingw.patch
@@ -0,0 +1,18 @@
+--- aspell-0.60.7-20110707/common/file_util.cpp.orig 2004-11-15 12:29:53.000000000 +0000
++++ aspell-0.60.7-20110707/common/file_util.cpp 2014-02-19 11:11:58.100765300 +0000
+@@ -30,6 +30,7 @@
+ # define ACCESS _access
+ # include <windows.h>
+ # include <winbase.h>
++# include "asc_ctype.hpp"
+
+ #else
+
+@@ -38,6 +39,7 @@
+
+ #endif
+
++using namespace acommon;
+
+ namespace acommon {
+
diff --git a/0002-printf.mingw.patch b/0002-printf.mingw.patch
new file mode 100644
index 000000000000..3b808a298357
--- /dev/null
+++ b/0002-printf.mingw.patch
@@ -0,0 +1,36 @@
+--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-02-19 11:24:42.255300600 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-02-19 11:23:47.492846700 +0000
+@@ -39,6 +39,9 @@
+ #include "vararray.hpp"
+ #include "string_list.hpp"
+
++#define printf printf
++#include "libintl.h"
++#undef printf
+ #include "gettext.h"
+
+ #include "iostream.hpp"
+--- aspell-0.60.7-20110707/modules/speller/default/language.cpp.orig 2011-07-05 00:28:44.000000000 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/language.cpp 2014-02-19 11:25:32.094629400 +0000
+@@ -24,6 +24,9 @@
+ # include <langinfo.h>
+ #endif
+
++#define printf printf
++#include "libintl.h"
++#undef printf
+ #include "gettext.h"
+
+ namespace aspeller {
+--- aspell-0.60.7-20110707/prog/aspell.cpp.orig 2011-07-04 14:36:05.000000000 +0000
++++ aspell-0.60.7-20110707/prog/aspell.cpp 2014-02-19 11:26:37.049377600 +0000
+@@ -59,6 +59,9 @@
+ #include "hash-t.hpp"
+ #include "hash_fun.hpp"
+
++#define printf printf
++#include "libintl.h"
++#undef printf
+ #include "gettext.h"
+
+ using namespace acommon;
diff --git a/0003-no-undefined-on.mingw.patch b/0003-no-undefined-on.mingw.patch
new file mode 100644
index 000000000000..80c796005178
--- /dev/null
+++ b/0003-no-undefined-on.mingw.patch
@@ -0,0 +1,11 @@
+--- aspell-0.60.7-20110707/Makefile.am.orig 2011-07-07 01:01:39.000000000 +0000
++++ aspell-0.60.7-20110707/Makefile.am 2014-02-19 11:56:42.396127500 +0000
+@@ -203,7 +203,7 @@
+ else # not COMPILE_IN_FILTERS
+
+ dynamic_optfiles += ${optfiles}
+-filter_ldflags = -module -avoid-version
++filter_ldflags = -module -avoid-version -no-undefined
+
+ ### Add name of filter library containing your filter. Name always
+ ### must look like lib<filtername>-filter.la see development manual
diff --git a/0004-reloc.mingw.patch b/0004-reloc.mingw.patch
new file mode 100644
index 000000000000..706f2b0223f2
--- /dev/null
+++ b/0004-reloc.mingw.patch
@@ -0,0 +1,123 @@
+--- aspell-0.60.7-20110707/common/info.cpp.orig 2004-11-10 06:18:45.000000000 +0000
++++ aspell-0.60.7-20110707/common/info.cpp 2014-03-20 14:46:13.395537900 +0000
+@@ -39,6 +39,19 @@
+
+ #include "gettext.h"
+
++#ifdef ENABLE_W32_PREFIX
++extern "C" {
++static HINSTANCE dll_hinstance;
++
++BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
++{
++ if (fdwReason == DLL_PROCESS_ATTACH)
++ dll_hinstance = hinstDLL;
++ return TRUE;
++}
++}
++#endif
++
+ namespace acommon {
+
+ class Dir {
+@@ -778,4 +789,60 @@
+ return data;
+ }
+
++#ifdef ENABLE_W32_PREFIX
++
++const char *
++get_w32_prefix ()
++{
++
++ static char *wprefix = NULL;
++
++/*
++ Entry * next;
++ String key;
++ String value;
++ String file;
++*/
++ if (wprefix == NULL)
++ {
++ DWORD bsize = MAX_PATH;
++ DWORD l = bsize;
++ char *bslash, *slash;
++ char *buf = (char *) malloc (bsize);
++ while (l == bsize)
++ {
++ l = GetModuleFileNameA (dll_hinstance, buf, bsize);
++ if (l == 0)
++ {
++ DebugBreak ();
++ abort ();
++ }
++ if (l == bsize)
++ {
++ buf = (char *) realloc ((void *) buf, bsize * 2);
++ bsize *= 2;
++ l = bsize;
++ }
++ }
++ bslash = strrchr (buf, '\\');
++ slash = strrchr (buf, '/');
++ if (bslash > slash)
++ slash = bslash;
++ slash[0] = '\0';
++ l = strlen (buf);
++ if (l > 3 && strcmp (&buf[l - 3], "bin") == 0)
++ {
++ bslash = strrchr (buf, '\\');
++ slash = strrchr (buf, '/');
++ if (bslash > slash)
++ slash = bslash;
++ slash[0] = '\0';
++ }
++ wprefix = buf;
++
++ }
++ return wprefix;
++}
++#endif
++
+ }
+--- aspell-0.60.7-20110707/common/info.hpp.orig 2004-05-30 10:49:17.000000000 +0000
++++ aspell-0.60.7-20110707/common/info.hpp 2014-03-20 14:45:24.476325900 +0000
+@@ -140,8 +140,7 @@
+ };
+
+
+-
+-
++ const char * get_w32_prefix ();
+ }
+
+ #endif /* ASPELL_INFO__HPP */
+--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 13:52:58.851882300 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 14:17:49.116621900 +0000
+@@ -310,6 +310,14 @@
+ const Entry * res = 0;
+ const Entry * cur = first_;
+
++#ifdef ENABLE_W32_PREFIX
++ if (key == "prefix")
++ {
++ Entry *e = new Config::Entry();
++ e->value = get_w32_prefix ();
++ return e;
++ }
++#endif
+ while (cur) {
+ if (cur->key == key && cur->action != NoOp) res = cur;
+ cur = cur->next;
+--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 15:11:29.935614000 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 15:22:47.619168900 +0000
+@@ -22,6 +22,8 @@
+ # include <langinfo.h>
+ #endif
+
++#include "info.hpp"
++#include <windows.h>
+ #include "cache.hpp"
+ #include "asc_ctype.hpp"
+ #include "config.hpp"
diff --git a/0005-w32-home.all.patch b/0005-w32-home.all.patch
new file mode 100644
index 000000000000..588997f63cb6
--- /dev/null
+++ b/0005-w32-home.all.patch
@@ -0,0 +1,24 @@
+--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 19:51:08.756753700 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 20:15:54.984480600 +0000
+@@ -664,6 +664,21 @@
+ } else { // sep == '|'
+ assert(replace[0] == '$');
+ const char * env = getenv(replace.c_str()+1);
++ if (NULL == env && strcmp (replace.c_str() + 1, "HOME") == 0)
++ {
++ const char *hd, *hp;
++ hd = getenv("HOMEDRIVE");
++ hp = getenv("HOMEPATH");
++ if (hd && hp)
++ {
++ char tmpbuf[strlen ("HOME=") + strlen (hd) + strlen (hp) + 1];
++ strcpy (tmpbuf, "HOME=");
++ strcpy (&tmpbuf[strlen ("HOME=")], hd);
++ strcpy (&tmpbuf[strlen ("HOME=") + strlen (hd)], hp);
++ putenv (tmpbuf);
++ env = getenv(replace.c_str()+1);
++ }
++ }
+ final_str += env ? env : second;
+ }
+ replace = "";
diff --git a/0006-abort.mingw.patch b/0006-abort.mingw.patch
new file mode 100644
index 000000000000..26c472272901
--- /dev/null
+++ b/0006-abort.mingw.patch
@@ -0,0 +1,236 @@
+diff -ur aspell-0.60.7-20110707.orig/common/config.cpp aspell-0.60.7-20110707/common/config.cpp
+--- aspell-0.60.7-20110707.orig/common/config.cpp 2014-03-20 22:31:38.359557900 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 22:39:19.296089400 +0000
+@@ -623,7 +623,7 @@
+
+ } else {
+
+- abort(); // this should not happen
++ DebugBreak(); // this should not happen
+
+ }
+
+@@ -857,7 +857,7 @@
+ case ListClear:
+ return make_err(no_value_clear, entry->key);
+ default:
+- abort(); // this shouldn't happen
++ DebugBreak(); // this shouldn't happen
+ }
+ } else {
+ entry->place_holder = -1;
+diff -ur aspell-0.60.7-20110707.orig/common/itemize.cpp aspell-0.60.7-20110707/common/itemize.cpp
+--- aspell-0.60.7-20110707.orig/common/itemize.cpp 2004-01-03 12:06:24.000000000 +0000
++++ aspell-0.60.7-20110707/common/itemize.cpp 2014-03-20 22:39:22.191457100 +0000
+@@ -97,7 +97,7 @@
+ RET_ON_ERR(d.clear());
+ break;
+ default:
+- abort();
++ DebugBreak();
+ }
+ }
+ return no_err;
+diff -ur aspell-0.60.7-20110707.orig/common/posib_err.cpp aspell-0.60.7-20110707/common/posib_err.cpp
+--- aspell-0.60.7-20110707.orig/common/posib_err.cpp 2004-11-21 02:52:22.000000000 +0000
++++ aspell-0.60.7-20110707/common/posib_err.cpp 2014-03-20 22:39:24.232716300 +0000
+@@ -100,7 +100,7 @@
+ fputs(_("Unhandled Error: "), stderr);
+ fputs(err_->err->mesg, stderr);
+ fputs("\n", stderr);
+- abort();
++ DebugBreak();
+ }
+ #endif
+
+diff -ur aspell-0.60.7-20110707.orig/common/string_list.hpp aspell-0.60.7-20110707/common/string_list.hpp
+--- aspell-0.60.7-20110707.orig/common/string_list.hpp 2004-06-17 12:41:47.000000000 +0000
++++ aspell-0.60.7-20110707/common/string_list.hpp 2014-03-20 22:39:26.609018100 +0000
+@@ -90,7 +90,7 @@
+ }
+
+ bool empty() const { return first == 0; }
+- unsigned int size() const { abort(); return 0; }
++ unsigned int size() const { DebugBreak(); return 0; }
+
+ };
+
+diff -ur aspell-0.60.7-20110707.orig/lib/find_speller.cpp aspell-0.60.7-20110707/lib/find_speller.cpp
+--- aspell-0.60.7-20110707.orig/lib/find_speller.cpp 2005-08-30 08:34:03.000000000 +0000
++++ aspell-0.60.7-20110707/lib/find_speller.cpp 2014-03-20 22:39:30.995575100 +0000
+@@ -384,7 +384,7 @@
+ b_size.req_type = '+';
+ }
+ if (!asc_isdigit(p[0]) || !asc_isdigit(p[1]) || p[2] != '\0')
+- abort(); //FIXME: create an error condition here
++ DebugBreak(); //FIXME: create an error condition here
+ b_size.requested = atoi(p);
+ b_size.init();
+
+diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/data.cpp aspell-0.60.7-20110707/modules/speller/default/data.cpp
+--- aspell-0.60.7-20110707.orig/modules/speller/default/data.cpp 2011-07-04 14:30:16.000000000 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/data.cpp 2014-03-20 22:39:33.647911900 +0000
+@@ -439,7 +439,7 @@
+ w = new_default_replacement_dict();
+ break;
+ default:
+- abort();
++ DebugBreak();
+ }
+
+ RET_ON_ERR(w->load(true_file_name, config, new_dicts, speller));
+diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/phonetic.cpp aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp
+--- aspell-0.60.7-20110707.orig/modules/speller/default/phonetic.cpp 2004-05-21 00:15:58.000000000 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp 2014-03-20 22:39:36.033214800 +0000
+@@ -194,7 +194,7 @@
+ } else if (name == lang->name()) {
+ sl = new PhonetSoundslike(lang);
+ } else {
+- abort(); // FIXME
++ DebugBreak(); // FIXME
+ }
+ PosibErrBase pe = sl->setup(iconv);
+ if (pe.has_err()) {
+diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/readonly_ws.cpp aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp
+--- aspell-0.60.7-20110707.orig/modules/speller/default/readonly_ws.cpp 2011-07-04 22:00:38.000000000 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp 2014-03-20 22:39:39.614669600 +0000
+@@ -108,7 +108,7 @@
+
+ static inline void mmap_free(char *, unsigned int)
+ {
+- abort();
++ DebugBreak();
+ }
+
+ #endif
+@@ -210,7 +210,7 @@
+ InsensitiveHash<hash_int_t> hash;
+ InsensitiveEqual equal;
+ bool is_nonexistent(Value v) const {return v == u32int_max;}
+- void make_nonexistent(const Value & v) const {abort();}
++ void make_nonexistent(const Value & v) const {DebugBreak();}
+ };
+ typedef VectorHashTable<WordLookupParms> WordLookup;
+
+diff -ur aspell-0.60.7-20110707.orig/modules/speller/default/speller_impl.cpp aspell-0.60.7-20110707/modules/speller/default/speller_impl.cpp
+--- aspell-0.60.7-20110707.orig/modules/speller/default/speller_impl.cpp 2011-07-04 14:30:16.000000000 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/speller_impl.cpp 2014-03-20 22:39:43.524666100 +0000
+@@ -380,7 +380,7 @@
+ static PosibErr<void> save_repl(SpellerImpl * m, bool value) {
+ // FIXME
+ // m->save_on_saveall(DataSet::Id(&m->personal_repl()), value);
+- abort(); return no_err;
++ DebugBreak(); return no_err;
+ }
+ static PosibErr<void> sug_mode(SpellerImpl * m, const char * mode) {
+ RET_ON_ERR(m->suggest_->set_mode(mode));
+@@ -683,7 +683,7 @@
+ case Dict::multi_dict:
+ break;
+ default:
+- abort();
++ DebugBreak();
+ }
+ save_on_saveall = false;
+ }
+@@ -709,7 +709,7 @@
+
+ } else {
+
+- abort();
++ DebugBreak();
+
+ }
+ break;
+diff -ur aspell-0.60.7-20110707.orig/prog/aspell.cpp aspell-0.60.7-20110707/prog/aspell.cpp
+--- aspell-0.60.7-20110707.orig/prog/aspell.cpp 2014-03-20 22:31:38.247543700 +0000
++++ aspell-0.60.7-20110707/prog/aspell.cpp 2014-03-20 22:39:47.708697400 +0000
+@@ -448,7 +448,7 @@
+ else if (action_str == "merge")
+ action = do_merge;
+ else
+- abort(); // this should not happen
++ DebugBreak(); // this should not happen
+
+ if (action != do_other) {
+ if (args.empty()) {
+@@ -1498,7 +1498,7 @@
+ }
+ break;
+ default:
+- abort();
++ DebugBreak();
+ }
+ }
+
+--- aspell-0.60.7-20110707/modules/filter/tex.cpp.orig 2011-06-26 00:30:51.000000000 +0000
++++ aspell-0.60.7-20110707/modules/filter/tex.cpp 2014-03-21 00:05:17.545103900 +0000
+@@ -24,6 +24,7 @@
+ #include "string_enumeration.hpp"
+
+ #include "gettext.h"
++#include <debugapi.h>
+
+ namespace {
+
+--- aspell-0.60.7-20110707/common/itemize.cpp.orig 2014-03-20 22:41:17.483097300 +0000
++++ aspell-0.60.7-20110707/common/itemize.cpp 2014-03-21 00:05:47.254376500 +0000
+@@ -12,6 +12,7 @@
+ #include "mutable_container.hpp"
+ #include <stdio.h>
+ #include <cstdio>
++#include <debugapi.h>
+
+ //FIXME: it should be possible to escape ',' '+' '-' '!' so that they can
+ // appear in values
+--- aspell-0.60.7-20110707/common/string_list.hpp.orig 2014-03-20 22:41:17.485097500 +0000
++++ aspell-0.60.7-20110707/common/string_list.hpp 2014-03-21 00:06:43.069964200 +0000
+@@ -12,6 +12,7 @@
+ #include "posib_err.hpp"
+ #include <stdio.h>
+ #include <cstdio>
++#include <debugapi.h>
+
+ namespace acommon {
+
+--- aspell-0.60.7-20110707/common/posib_err.cpp.orig 2014-03-20 22:41:17.484097400 +0000
++++ aspell-0.60.7-20110707/common/posib_err.cpp 2014-03-21 00:07:22.355452800 +0000
+@@ -13,7 +13,7 @@
+ #include "posib_err.hpp"
+
+ #include "gettext.h"
+-
++#include <debugapi.h>
+
+ namespace acommon {
+
+--- aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp.orig 2014-03-20 22:41:17.489598100 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/readonly_ws.cpp 2014-03-21 00:08:00.899347200 +0000
+@@ -55,6 +55,7 @@
+ #include "iostream.hpp"
+
+ #include "gettext.h"
++#include <debugapi.h>
+
+ typedef unsigned int u32int;
+ static const u32int u32int_max = (u32int)-1;
+--- aspell-0.60.7-20110707/modules/speller/default/data.cpp.orig 2014-03-20 22:41:17.487097800 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/data.cpp 2014-03-21 00:12:01.247367600 +0000
+@@ -17,6 +17,7 @@
+ #include "vararray.hpp"
+
+ #include "gettext.h"
++#include <debugapi.h>
+
+ namespace aspeller {
+
+--- aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp.orig 2014-03-20 22:41:17.488097900 +0000
++++ aspell-0.60.7-20110707/modules/speller/default/phonetic.cpp 2014-03-21 00:12:31.846253100 +0000
+@@ -7,6 +7,7 @@
+ #include "file_util.hpp"
+ #include "file_data_util.hpp"
+ #include "clone_ptr-t.hpp"
++#include <debugapi.h>
+
+ namespace aspeller {
+
diff --git a/0007-fix-including-langinfo.patch b/0007-fix-including-langinfo.patch
new file mode 100644
index 000000000000..24af2e0df168
--- /dev/null
+++ b/0007-fix-including-langinfo.patch
@@ -0,0 +1,12 @@
+diff -Naur aspell-0.60.7-20131207-orig/modules/speller/default/language.cpp aspell-0.60.7-20131207/modules/speller/default/language.cpp
+--- aspell-0.60.7-20131207-orig/modules/speller/default/language.cpp 2011-07-05 03:46:03.000000000 +0300
++++ aspell-0.60.7-20131207/modules/speller/default/language.cpp 2014-12-13 21:19:22.924600000 +0300
+@@ -20,7 +20,7 @@
+ #include "getdata.hpp"
+ #include "file_util.hpp"
+
+-#ifdef ENABLE_NLS
++#ifdef HAVE_LANGINFO_CODESET
+ # include <langinfo.h>
+ #endif
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8dd605645e0f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,81 @@
+pkgname=mingw-w64-aspell
+pkgver=0.60.6.1
+_pkgmajorver=0.60
+pkgrel=1
+pkgdesc="A spell checker designed to eventually replace Ispell (mingw-w64)"
+arch=(any)
+url="http://aspell.net/"
+license=("LGPL")
+makedepends=(mingw-w64-gcc)
+depends=(mingw-w64-gettext)
+options=(!strip !buildflags staticlibs)
+source=("ftp://ftp.gnu.org/gnu/aspell/aspell-${pkgver}.tar.gz"
+"0001-use-namespace.mingw.patch"
+"0002-printf.mingw.patch"
+"0003-no-undefined-on.mingw.patch"
+"0004-reloc.mingw.patch"
+"0005-w32-home.all.patch"
+"0006-abort.mingw.patch"
+"0007-fix-including-langinfo.patch")
+md5sums=('e66a9c9af6a60dc46134fdacf6ce97d7'
+ 'ee6e262260e11bc285ce6a242fec3aeb'
+ '9f799391cc00cf9e0d5ffee88d103a97'
+ '4aa79ac556d2cd42b1d736e031acdbac'
+ '102bacf0b0c041f9d04aeb6bb0adb865'
+ '3830ee14ff5b704a4e21b2c76f153217'
+ '5ed7ead83958a39719242221c3669311'
+ '50a79bb773b73cb3a69ec38cb086ca27')
+sha1sums=('ff1190db8de279f950c242c6f4c5d5cdc2cbdc49'
+ 'be7c87411f47fe170e2b296553ce07b4272e2e0d'
+ 'c7bff3c45707095c16bda3d35ea95f3eb09683dc'
+ 'c0278c4d8cfe2e9dfee094b83197b2fb13d16126'
+ 'e38466e0e15458d73701b9fc224b31a3b5346b41'
+ '1957646282ba00eabd7136fe67c6408a363f57b8'
+ 'f20a0677818cb24e32aefa5ea22662b9afe65360'
+ '25a7919b90a9593cfc391ac0aa8fa6a2554c59cb')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd aspell-$pkgver
+ patch -p1 -i ${srcdir}/0001-use-namespace.mingw.patch
+ patch -p1 -i ${srcdir}/0002-printf.mingw.patch
+ patch -p1 -i ${srcdir}/0003-no-undefined-on.mingw.patch
+ patch -p1 -i ${srcdir}/0004-reloc.mingw.patch
+ patch -p1 -i ${srcdir}/0005-w32-home.all.patch
+ patch -p1 -i ${srcdir}/0006-abort.mingw.patch
+ patch -p1 -i ${srcdir}/0007-fix-including-langinfo.patch
+ autoreconf -fi
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ CFLAGS+=" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+ CPPFLAGS+=" -DENABLE_W32_PREFIX=1"
+ mkdir -p build-${_arch} && cp -r aspell-$pkgver/* build-${_arch}/ && pushd build-${_arch}
+ ./configure \
+ --host=${_arch} \
+ --build=$CHOST \
+ --prefix=/usr/${_arch} \
+ --libdir=/usr/${_arch}/lib \
+ --includedir=/usr/${_arch}/include \
+ --enable-shared \
+ --enable-static \
+ --disable-curses
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/build-${_arch}"
+ make -j1 DESTDIR="$pkgdir" install
+ ln -s "/usr/${_arch}/lib/aspell-$_pkgmajorver" "${pkgdir}/usr/${_arch}/lib/aspell"
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -exec rm {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ rm -r "$pkgdir/usr/${_arch}/share"
+ rm "$pkgdir/usr/${_arch}/bin/"{aspell-import,precat,preunzip,prezip,run-with-aspell}
+ done
+}