Hi,
Here's voikko flavor for enchant2, similar as textproc/enchant.
Timo
diff /usr/ports
path + /usr/ports
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - 251784b6650e150f951dbad9a2d5cf15247229e3
file + textproc/enchant2/Makefile
--- textproc/enchant2/Makefile
+++ textproc/enchant2/Makefile
@@ -3,6 +3,7 @@ COMMENT= generic spell checking library
V= 2.8.14
DISTNAME= enchant-${V}
PKGNAME= enchant2-${V}
+REVISION= 0
SHARED_LIBS += enchant-2 1.2 # 10.13
@@ -21,6 +22,9 @@ WANTLIB += z
SITES=
https://github.com/AbiWord/enchant/releases/download/v${V}/
+FLAVORS= voikko
+FLAVOR?=
+
# c++11
COMPILER= base-clang ports-gcc
@@ -39,10 +43,16 @@ CONFIGURE_ENV=
CPPFLAGS="-I${LOCALBASE}/include" \
ac_cv_prog_VALGRIND=
CONFIGURE_ARGS= --without-applespell \
- --without-voikko \
--without-zemberek \
--without-nuspell
+.if ${FLAVOR} == "voikko"
+WANTLIB += voikko
+LIB_DEPENDS += textproc/voikko/libvoikko
+.else
+CONFIGURE_ARGS+= --without-voikko
+.endif
+
DEBUG_PACKAGES= ${BUILD_PACKAGES}
# prevent conflict with textproc/enchant
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - /dev/null
file + textproc/enchant2/pkg/PFRAG.voikko (mode 644)
--- /dev/null
+++ textproc/enchant2/pkg/PFRAG.voikko
@@ -0,0 +1 @@
+@so lib/enchant-2/enchant_voikko.so
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - 0befa8217453aa8ba2723abab978651040218124
file + textproc/enchant2/pkg/PLIST
--- textproc/enchant2/pkg/PLIST
+++ textproc/enchant2/pkg/PLIST
@@ -4,6 +4,7 @@ include/enchant-2/
include/enchant-2/enchant++.h
include/enchant-2/enchant.h
lib/enchant-2/
+%%voikko%%
@so lib/enchant-2/enchant_aspell.so
@so lib/enchant-2/enchant_hunspell.so
@static-lib lib/libenchant-2.a