Import wip/enchant as textproc/enchant2.

This is the newer 2.x release series of enchant. The package does not
conflict with the older 1.x (textproc/enchant). The goal is to move
all reverse-depends to this version, then delete enchant 1.
This commit is contained in:
bsiegert 2018-11-01 09:36:47 +00:00
parent 6b73c01432
commit cf88156f95
12 changed files with 294 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1007 2018/10/26 20:43:07 bsiegert Exp $
# $NetBSD: Makefile,v 1.1008 2018/11/01 09:36:47 bsiegert Exp $
#
COMMENT= Text processing utilities (does not include desktop publishing)
@ -180,6 +180,7 @@ SUBDIR+= emacs-dict-client
SUBDIR+= emacs-muse
SUBDIR+= enca
SUBDIR+= enchant
SUBDIR+= enchant2
SUBDIR+= epubcheck
SUBDIR+= epubpreflight
SUBDIR+= erlang-fast_xml

21
textproc/enchant2/DESCR Normal file
View file

@ -0,0 +1,21 @@
The project aims to provide an efficient extensible abstraction
for dealing with different spell checking libraries.
Enchant is meant to provide a generic interface into various existing
spell checking libraries. These include, but are not limited to:
* Aspell/Pspell (intends to replace Ispell)
* Hunspell (an OOo project, also used by Mozilla)
* Uspell (primarily Yiddish, Hebrew, and Eastern European
languages - hosted in AbiWord's CVS under the module "uspell")
* Hspell (Hebrew)
* Zemberek (Turkish)
* Voikko (Finnish)
* AppleSpell (Mac OSX)
Enchant is also meant to be used in a cross-platform (XP) environment.
Part of this means that Enchant wants to limit its number of external
dependencies to 0, or as close is as humanly possible. Also, any
enchant consumer (i.e. a Word Processor) should not need to know
about what backend providers Enchant knows about. In fact, Enchant
shouldn't even need to know this information itself. To accomplish
this, all of Enchant's providers are DLLs.

View file

@ -0,0 +1,8 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
For whichever spell-checkers you've installed (perhaps indirectly
by selecting options to this package), you need to install one
or more language-specific dictionaries.
===========================================================================

View file

@ -0,0 +1,38 @@
# $NetBSD: Makefile,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
#
DISTNAME= enchant-2.2.3
PKGNAME= enchant2-2.2.3
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=AbiWord/}
GITHUB_RELEASE= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://abiword.github.io/enchant/
COMMENT= Generic spell checking library
LICENSE= gnu-lgpl-v2.1
USE_TOOLS+= pkg-config autoconf
USE_LANGUAGES= c c++11
USE_PKGLOCALEDIR= yes
USE_LIBTOOL= yes
PKGCONFIG_OVERRIDE+= enchant.pc.in
GNU_CONFIGURE= yes
CFLAGS.SunOS+= -D__EXTENSIONS__
INSTALLATION_DIRS+= share/examples
MAKE_DIRS+= ${PREFIX}/share/enchant
CONF_FILES= ${PREFIX}/share/examples/enchant.ordering ${PREFIX}/share/enchant/enchant.ordering
# XXX: needs unittest-cpp as a test dependency
#TEST_TARGET= check
post-install:
cd ${DESTDIR}${PREFIX}/share && ${MV} enchant/enchant.ordering examples/enchant.ordering
.include "options.mk"
.include "../../devel/glib2/buildlink3.mk"
#BUILDLINK_DEPMETHOD.unittest-cpp= build # XXX: for tests
#.include "../../wip/unittest-cpp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

14
textproc/enchant2/PLIST Normal file
View file

@ -0,0 +1,14 @@
@comment $NetBSD: PLIST,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
bin/enchant-2
bin/enchant-lsmod-2
include/enchant-2/enchant++.h
include/enchant-2/enchant-provider.h
include/enchant-2/enchant.h
${PLIST.aspell}lib/enchant-2/enchant_aspell.la
${PLIST.hunspell}lib/enchant-2/enchant_hunspell.la
${PLIST.zemberek}lib/enchant-2/enchant_zemberek.la
lib/libenchant-2.la
lib/pkgconfig/enchant-2.pc
man/man1/enchant-2.1
man/man1/enchant-lsmod-2.1
share/examples/enchant.ordering

View file

@ -0,0 +1,17 @@
# $NetBSD: buildlink3.mk,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
BUILDLINK_TREE+= enchant2
.if !defined(ENCHANT2_BUILDLINK3_MK)
ENCHANT2_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.enchant2+= enchant2>=2
BUILDLINK_ABI_DEPENDS.enchant2+= enchant2>=2.2.3
BUILDLINK_PKGSRCDIR.enchant2?= ../../textproc/enchant2
# spelling libraries are loaded dynamically and do not need
# to be included here
.include "../../devel/glib2/buildlink3.mk"
.endif # ENCHANT2_BUILDLINK3_MK
BUILDLINK_TREE+= -enchant2

View file

@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
SHA1 (enchant-2.2.3.tar.gz) = 181d5563d282af0f30c7ab68c5d432271b6fd11e
RMD160 (enchant-2.2.3.tar.gz) = 87ac76b00ed54d47d246b0938d493d2a82180de6
SHA512 (enchant-2.2.3.tar.gz) = abde9d6fec25edff694570455fd4c6e8e2e2c41a6b133bbb31a344761137a354cc1c655e53374cf712bf311c3732dc721e9ffd2dc933d78ec8ccf224350635d6
Size (enchant-2.2.3.tar.gz) = 957451 bytes
SHA1 (patch-tests_Makefile.am) = 32474d4a5cba8657d7bf4bcd1fdaa5969e7c4e35
SHA1 (patch-tests_Makefile.in) = 68ee795e4f55d3d982a6f255ec67e87d84058068
SHA1 (patch-tests_enchant__providers_Makefile.am) = 70b0b9dfbc32526900a9cb55b8016b6ee7032f26
SHA1 (patch-tests_enchant__providers_Makefile.in) = 52b5022231a09cfa770b2de389e8a8d6e3774c21

View file

@ -0,0 +1,40 @@
# $NetBSD: options.mk,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.enchant2
PKG_SUPPORTED_OPTIONS= aspell enchant-zemberek hunspell
# Package also supports the following:
# hspell - Hebrew spelling
# uspell - Yiddish spelling
# voikko - Finnish spelling
PKG_SUGGESTED_OPTIONS= hunspell
.include "../../mk/bsd.options.mk"
PLIST_VARS+= aspell
.if !empty(PKG_OPTIONS:Maspell)
CONFIGURE_ARGS+= --with-aspell
.include "../../textproc/aspell/buildlink3.mk"
PLIST.aspell= yes
.else
CONFIGURE_ARGS+= --without-aspell
.endif
PLIST_VARS+= zemberek
.if !empty(PKG_OPTIONS:Menchant-zemberek)
CONFIGURE_ARGS+= --with-zemberek
.include "../../sysutils/dbus-glib/buildlink3.mk"
PLIST.zemberek= yes
.else
CONFIGURE_ARGS+= --without-zemberek
.endif
PLIST_VARS+= hunspell
.if !empty(PKG_OPTIONS:Mhunspell)
CONFIGURE_ARGS+= --with-hunspell
CONFIGURE_ARGS+= --with-hunspell-dir=${BUILDLINK_PREFIX.hunspell}/share/hunspell
.include "../../textproc/hunspell/buildlink3.mk"
DEPENDS+= hunspell-en_US-[0-9]*:../../textproc/hunspell-en_US
PLIST.hunspell= yes
.else
CONFIGURE_ARGS+= --without-hunspell
.endif

View file

@ -0,0 +1,29 @@
$NetBSD: patch-tests_Makefile.am,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
Avoid possible `rm -rf' of the entire file system when running `make check':
<https://github.com/AbiWord/enchant/pull/203>
--- tests/Makefile.am.orig 2018-02-04 17:01:08.000000000 +0000
+++ tests/Makefile.am
@@ -1,11 +1,7 @@
SUBDIRS = enchant_providers
# Get libdir suffix
-if GNU_MAKE
-libdir_subdir=$(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
-else
libdir_subdir=lib
-endif
AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\"
@@ -33,7 +29,7 @@ $(LIBENCHANT_COPY): $(top_builddir)/src/
$(MAKE) libenchant-copy
libenchant-copy:
- rm -rf $(libdir_subdir)/
+ rm -rf $(libdir_subdir)
$(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/

View file

@ -0,0 +1,29 @@
$NetBSD: patch-tests_Makefile.in,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
Avoid possible `rm -rf' of the entire file system when running `make check'.
<https://github.com/AbiWord/enchant/pull/203>
--- tests/Makefile.in.orig 2018-02-04 17:01:19.000000000 +0000
+++ tests/Makefile.in
@@ -1017,10 +1017,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = enchant_providers
-@GNU_MAKE_FALSE@libdir_subdir = lib
# Get libdir suffix
-@GNU_MAKE_TRUE@libdir_subdir = $(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
+libdir_subdir = lib
AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) -DENCHANT_MAJOR_VERSION=\"@ENCHANT_MAJOR_VERSION@\"
ENCHANT_CONFIG_DIR = config
AM_TESTS_ENVIRONMENT = \
@@ -2284,7 +2283,7 @@ $(LIBENCHANT_COPY): $(top_builddir)/src/
$(MAKE) libenchant-copy
libenchant-copy:
- rm -rf $(libdir_subdir)/
+ rm -rf $(libdir_subdir)
$(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/

View file

@ -0,0 +1,39 @@
$NetBSD: patch-tests_enchant__providers_Makefile.am,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
Avoid possible `rm -rf' of the entire file system when running `make check'.
<https://github.com/AbiWord/enchant/pull/203>
--- tests/enchant_providers/Makefile.am.orig 2018-02-04 17:01:08.000000000 +0000
+++ tests/enchant_providers/Makefile.am
@@ -1,11 +1,7 @@
# FIXME: common up with tests/Makefile.am
# Get libdir suffix
-if GNU_MAKE
-libdir_subdir=$(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
-else
libdir_subdir=lib
-endif
AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS)
@@ -28,15 +24,17 @@ $(LIBENCHANT_COPY): $(top_builddir)/src/
$(MAKE) libenchant-copy
libenchant-copy:
- rm -rf $(libdir_subdir)/
+ rm -rf $(libdir_subdir)
$(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/
+if WITH_APPLESPELL
APPLESPELL_CONFIG = config/AppleSpell.config
$(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config
$(MKDIR_P) config
cp $< config/
+endif
LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS)
LIBADD = $(LIBENCHANT_COPY)

View file

@ -0,0 +1,47 @@
$NetBSD: patch-tests_enchant__providers_Makefile.in,v 1.1 2018/11/01 09:36:47 bsiegert Exp $
Avoid possible `rm -rf' of the entire file system when running `make check'.
<https://github.com/AbiWord/enchant/pull/203>
--- tests/enchant_providers/Makefile.in.orig 2018-02-04 17:01:19.000000000 +0000
+++ tests/enchant_providers/Makefile.in
@@ -901,10 +901,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-@GNU_MAKE_FALSE@libdir_subdir = lib
# Get libdir suffix
-@GNU_MAKE_TRUE@libdir_subdir = $(shell echo "$(libdir)" | sed -e 's|^$(exec_prefix)/||' | sed -e 's|^/||')
+libdir_subdir = lib
AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS)
ENCHANT_CONFIG_DIR = config
AM_TESTS_ENVIRONMENT = \
@@ -916,7 +915,7 @@ AM_TESTS_ENVIRONMENT = \
DISTCLEANFILES = *@shlibext@
LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant-@ENCHANT_MAJOR_VERSION@.la
-APPLESPELL_CONFIG = config/AppleSpell.config
+@WITH_APPLESPELL_TRUE@APPLESPELL_CONFIG = config/AppleSpell.config
LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS)
LIBADD = $(LIBENCHANT_COPY)
DEPS = $(LIBENCHANT_COPY)
@@ -1551,13 +1550,13 @@ $(LIBENCHANT_COPY): $(top_builddir)/src/
$(MAKE) libenchant-copy
libenchant-copy:
- rm -rf $(libdir_subdir)/
+ rm -rf $(libdir_subdir)
$(MKDIR_P) $(libdir_subdir)/enchant-@ENCHANT_MAJOR_VERSION@
cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/
cp $(top_builddir)/src/libenchant-@ENCHANT_MAJOR_VERSION@.la $(libdir_subdir)/
-$(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config
- $(MKDIR_P) config
- cp $< config/
+@WITH_APPLESPELL_TRUE@$(APPLESPELL_CONFIG): $(top_srcdir)/providers/AppleSpell.config
+@WITH_APPLESPELL_TRUE@ $(MKDIR_P) config
+@WITH_APPLESPELL_TRUE@ cp $< config/
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.