aspell: Import patches from cygwin
This commit is contained in:
parent
8f54de44fa
commit
9ca477dc5c
@ -10,44 +10,50 @@ license=('LGPL')
|
|||||||
groups=('libraries')
|
groups=('libraries')
|
||||||
makedepends=('gcc' 'gettext-devel' 'libiconv-devel' 'ncurses-devel')
|
makedepends=('gcc' 'gettext-devel' 'libiconv-devel' 'ncurses-devel')
|
||||||
options=()
|
options=()
|
||||||
source=("https://ftp.gnu.org/gnu/aspell/$pkgname-$pkgver.tar.gz"{,.sig}
|
source=("https://ftp.gnu.org/gnu/aspell/${pkgname}-${pkgver}.tar.gz"{,.sig}
|
||||||
"msys-platform.patch"
|
"msys-platform.patch"
|
||||||
"aspell-0.60.6.1-fix-O_BINARY-macro.patch")
|
"aspell-noundefined.patch"
|
||||||
|
"aspell-so2dll.patch"
|
||||||
|
"aspell-fileno.patch")
|
||||||
sha256sums=('f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1'
|
sha256sums=('f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'ed9a09ee29c031b979b76a9146c60fadd8c591b072f09c1a29fd640be0bbca8a'
|
'ed9a09ee29c031b979b76a9146c60fadd8c591b072f09c1a29fd640be0bbca8a'
|
||||||
'35510b7637623c471f027650c531572abda89f1d40a81c0548d01b377aa72a59')
|
'5188d1443b04c095261b3fe01f77a9235ca4b3c5c35caa87167a5507a30f6bee'
|
||||||
|
'9b9e4300d35a92f029c098da7001235d1dd6aeb03a854591afd84606b5cd257b'
|
||||||
|
'8054609ba63038c7f488782a1f80ed31ba1fe18ded842707702ad08793903c7b')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
patch -p1 -i ${srcdir}/msys-platform.patch
|
patch -p1 -i ${srcdir}/msys-platform.patch
|
||||||
patch -p1 -i ${srcdir}/aspell-0.60.6.1-fix-O_BINARY-macro.patch
|
patch -p1 -i ${srcdir}/aspell-noundefined.patch
|
||||||
|
patch -p1 -i ${srcdir}/aspell-so2dll.patch
|
||||||
|
patch -p1 -i ${srcdir}/aspell-fileno.patch
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
./configure --prefix=/usr --build=${CHOST} --enable-static
|
./configure --prefix=/usr --build=${CHOST} --enable-static
|
||||||
make
|
make
|
||||||
make DESTDIR="$srcdir/dest" install
|
make DESTDIR="${srcdir}/dest" install
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "$srcdir/$pkgname-$pkgver"
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
make -k check
|
make -k check
|
||||||
}
|
}
|
||||||
|
|
||||||
package_aspell() {
|
package_aspell() {
|
||||||
depends=("gcc-libs" "gettext" "libiconv" "ncurses")
|
depends=("gcc-libs" "gettext" "libiconv" "ncurses")
|
||||||
|
|
||||||
mkdir -p $pkgdir/usr/bin
|
mkdir -p ${pkgdir}/usr/bin
|
||||||
cp -rf $srcdir/dest/usr/bin $pkgdir/usr/
|
cp -rf ${srcdir}/dest/usr/bin ${pkgdir}/usr/
|
||||||
|
|
||||||
mkdir -p $pkgdir/usr/lib/aspell-0.60
|
mkdir -p ${pkgdir}/usr/lib/aspell-0.60
|
||||||
cp -rf $srcdir/dest/usr/lib/aspell-0.60 $pkgdir/usr/lib/
|
cp -rf ${srcdir}/dest/usr/lib/aspell-0.60 ${pkgdir}/usr/lib/
|
||||||
|
|
||||||
mkdir -p $pkgdir/usr/share
|
mkdir -p ${pkgdir}/usr/share
|
||||||
cp -rf $srcdir/dest/usr/share $pkgdir/usr/
|
cp -rf ${srcdir}/dest/usr/share ${pkgdir}/usr/
|
||||||
}
|
}
|
||||||
|
|
||||||
package_aspell-devel() {
|
package_aspell-devel() {
|
||||||
@ -55,7 +61,7 @@ package_aspell-devel() {
|
|||||||
groups=('development')
|
groups=('development')
|
||||||
depends=("aspell=${pkgver}" "gettext-devel" "libiconv-devel" "ncurses-devel")
|
depends=("aspell=${pkgver}" "gettext-devel" "libiconv-devel" "ncurses-devel")
|
||||||
|
|
||||||
mkdir -p $pkgdir/usr/lib
|
mkdir -p ${pkgdir}/usr/lib
|
||||||
cp -rf $srcdir/dest/usr/include $pkgdir/usr/
|
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
|
||||||
cp -f $srcdir/dest/usr/lib/*.a $pkgdir/usr/lib
|
cp -f ${srcdir}/dest/usr/lib/*.a ${pkgdir}/usr/lib
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
diff --git aspell-0.60.6.1.orig/prog/compress.c aspell-0.60.6.1/prog/compress.c
|
|
||||||
index c47ddf2..f4271b7 100644
|
|
||||||
--- aspell-0.60.6.1.orig/prog/compress.c
|
|
||||||
+++ aspell-0.60.6.1/prog/compress.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
# include <io.h>
|
|
||||||
# include <fcntl.h>
|
|
||||||
|
|
||||||
-# define SETBIN(fno) _setmode( _fileno( fno ), _O_BINARY )
|
|
||||||
+# define SETBIN(fno) _setmode( _fileno( fno ), O_BINARY )
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
diff --git aspell-0.60.6.1.orig/prog/prezip.c aspell-0.60.6.1/prog/prezip.c
|
|
||||||
index 3835114..4d2677c 100644
|
|
||||||
--- aspell-0.60.6.1.orig/prog/prezip.c
|
|
||||||
+++ aspell-0.60.6.1/prog/prezip.c
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
# include <io.h>
|
|
||||||
# include <fcntl.h>
|
|
||||||
|
|
||||||
-# define SETBIN(fno) _setmode( _fileno( fno ), _O_BINARY )
|
|
||||||
+# define SETBIN(fno) _setmode( _fileno( fno ), O_BINARY )
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
28
aspell/aspell-fileno.patch
Normal file
28
aspell/aspell-fileno.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
--- aspell-0.60.6.1/prog/compress.c 2004-11-07 13:29:48.000000000 +0100
|
||||||
|
+++ aspell-0.60.6.1/prog/compress.c 2013-04-30 09:03:17.471947700 +0200
|
||||||
|
@@ -25,7 +25,11 @@
|
||||||
|
# include <io.h>
|
||||||
|
# include <fcntl.h>
|
||||||
|
|
||||||
|
+#if defined(__CYGWIN__)
|
||||||
|
+# define SETBIN(fno) _setmode( fileno( fno ), O_BINARY )
|
||||||
|
+#else
|
||||||
|
# define SETBIN(fno) _setmode( _fileno( fno ), _O_BINARY )
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
--- aspell-0.60.6.1/prog/prezip.c 2011-07-02 23:09:09.000000000 +0200
|
||||||
|
+++ aspell-0.60.6.1/prog/prezip.c 2013-04-30 09:02:30.307958600 +0200
|
||||||
|
@@ -39,7 +39,11 @@
|
||||||
|
# include <io.h>
|
||||||
|
# include <fcntl.h>
|
||||||
|
|
||||||
|
+#if defined(__CYGWIN__)
|
||||||
|
+# define SETBIN(fno) _setmode( fileno( fno ), O_BINARY )
|
||||||
|
+#else
|
||||||
|
# define SETBIN(fno) _setmode( _fileno( fno ), _O_BINARY )
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
45
aspell/aspell-noundefined.patch
Normal file
45
aspell/aspell-noundefined.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
--- aspell-0.60.6.1/Makefile.am 2011-07-03 01:42:34.000000000 +0200
|
||||||
|
+++ aspell-0.60.6.1/Makefile.am 2011-11-11 01:35:59.046875000 +0100
|
||||||
|
@@ -194,7 +194,7 @@ libaspell_la_SOURCES +=\
|
||||||
|
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
|
||||||
|
@@ -203,27 +203,27 @@ filter_LTLIBRARIES = email-filter.la tex
|
||||||
|
nroff-filter.la texinfo-filter.la
|
||||||
|
|
||||||
|
email_filter_la_SOURCES = modules/filter/email.cpp
|
||||||
|
-email_filter_la_LIBADD = libaspell.la
|
||||||
|
+email_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
email_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
tex_filter_la_SOURCES = modules/filter/tex.cpp
|
||||||
|
-tex_filter_la_LIBADD = libaspell.la
|
||||||
|
+tex_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
tex_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
sgml_filter_la_SOURCES = modules/filter/sgml.cpp
|
||||||
|
-sgml_filter_la_LIBADD = libaspell.la
|
||||||
|
+sgml_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
sgml_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
context_filter_la_SOURCES = modules/filter/context.cpp
|
||||||
|
-context_filter_la_LIBADD = libaspell.la
|
||||||
|
+context_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
context_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
nroff_filter_la_SOURCES = modules/filter/nroff.cpp
|
||||||
|
-nroff_filter_la_LIBADD = libaspell.la
|
||||||
|
+nroff_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
nroff_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
texinfo_filter_la_SOURCES = modules/filter/texinfo.cpp
|
||||||
|
-texinfo_filter_la_LIBADD = libaspell.la
|
||||||
|
+texinfo_filter_la_LIBADD = libaspell.la $(LTLIBINTL)
|
||||||
|
texinfo_filter_la_LDFLAGS = ${filter_ldflags}
|
||||||
|
|
||||||
|
### Before this line add the corresponding <yourfilterlibrary>_SOURCES and
|
||||||
22
aspell/aspell-so2dll.patch
Normal file
22
aspell/aspell-so2dll.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- aspell-0.60.6.1/lib/new_filter.cpp 2011-07-02 23:09:09.000000000 +0200
|
||||||
|
+++ aspell-0.60.6.1/lib/new_filter.cpp 2011-11-11 01:35:59.046875000 +0100
|
||||||
|
@@ -458,11 +458,19 @@ namespace acommon
|
||||||
|
module->file.assign(option_file.str(), slash + 1 - option_file.str());
|
||||||
|
//module->file += "lib";
|
||||||
|
module->file += filter_name;
|
||||||
|
+#ifdef __CYGWIN__
|
||||||
|
+ module->file += "-filter.dll";
|
||||||
|
+#else
|
||||||
|
module->file += "-filter.so";
|
||||||
|
+#endif
|
||||||
|
} else {
|
||||||
|
if (module->file[0] != '/')
|
||||||
|
module->file.insert(0, option_file.str(), slash + 1 - option_file.str());
|
||||||
|
+#ifdef __CYGWIN__
|
||||||
|
+ module->file += ".dll";
|
||||||
|
+#else
|
||||||
|
module->file += ".so";
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return module.release();
|
||||||
Loading…
x
Reference in New Issue
Block a user