Hi,

Now that we have textproc/voikko for finnish spelling I'd like to
include support for it in enchant(-2) ports.

This adds voikko flavor for older enchant port and regenerates the
patches.

I'm not that well versed in making flavors so check accordingly.

Timo


diff /usr/ports
path + /usr/ports
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - d496f9f40fcb9a876e88d6ba76916e5357a5e80a
file + textproc/enchant/Makefile
--- textproc/enchant/Makefile
+++ textproc/enchant/Makefile
@@ -6,13 +6,16 @@ V=                    1.6.1
 GH_ACCOUNT=            AbiWord
 GH_PROJECT=            enchant
 GH_TAGNAME=            enchant-${V:S/./-/g}
-REVISION=              5
+REVISION=              6
 
 # XXX needed for portroach (DISTNAME must match the GH_PROJECT-GH_TAGNAME)
 SITES=                 
https://github.com/AbiWord/enchant/releases/download/${GH_PROJECT}-${V:S/./-/g}/
 DISTNAME=              ${GH_PROJECT}-${V}
 WRKDIST=               ${WRKDIR}/${DISTNAME}
 
+FLAVORS=                voikko
+FLAVOR?=
+
 SHARED_LIBS +=  enchant              6.1      # 7.1
 
 CATEGORIES=            textproc
@@ -43,11 +46,18 @@ CONFIGURE_ENV +=    LDFLAGS="-L${LOCALBASE}/lib ${LIBCXX:
 
 CONFIGURE_ARGS=                --with-aspell-prefix=${LOCALBASE} \
                        --with-ispell-dir=${LOCALBASE}/lib/ispell/ \
-                       --disable-voikko \
                        --disable-zemberek \
                        --disable-uspell \
                        --disable-hspell
 
+.if ${FLAVOR} == "voikko"
+WANTLIB +=              voikko
+LIB_DEPENDS +=          textproc/voikko/libvoikko
+.else
+CONFIGURE_ARGS+=        --without-voikko
+.endif
+
 AUTOCONF_VERSION=      2.69
 AUTOMAKE_VERSION=      1.15
 
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - 4b7ad75cad1c60ed8832d5e9fb62db6bc5e934af
file + textproc/enchant/patches/patch-configure_ac
--- textproc/enchant/patches/patch-configure_ac
+++ textproc/enchant/patches/patch-configure_ac
@@ -1,6 +1,7 @@
---- configure.ac.orig  Wed Feb  8 23:24:36 2017
-+++ configure.ac       Fri Apr 28 00:26:35 2017
-@@ -404,7 +404,7 @@ if test "x$check_aspell" != "xno"; then
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -386,7 +386,7 @@ if test "x$check_aspell" != "xno"; then
           ,)
         
AC_CHECK_LIB(aspell,get_aspell_dict_info_list,ASPELL_CFLAGS="-DASPELL_0_50_0=1",)
  
@@ -9,7 +10,7 @@
     elif test -f "$aspell_prefix/include/aspell.h"; then
         AC_MSG_RESULT([yes (aspell)])
  
-@@ -510,12 +510,13 @@ build_zemberek=no
+@@ -492,12 +492,13 @@ build_zemberek=no
  
  AC_ARG_ENABLE(zemberek, AS_HELP_STRING([--disable-zemberek],[enable the 
experimental zemberek (turkish) backend @<:@default=auto@:>@]), 
build_zemberek="$enableval", build_zemberek=no)
  
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - /dev/null
file + textproc/enchant/pkg/PFRAG.voikko (mode 644)
--- /dev/null
+++ textproc/enchant/pkg/PFRAG.voikko
@@ -0,0 +1 @@
+@so lib/enchant/libenchant_voikko.so
commit - 7443ea27bef6010dba2db58f67e480cb7e24db56
blob - 7528d31493709bd35aa4e86352032b345c48684f
file + textproc/enchant/pkg/PLIST
--- textproc/enchant/pkg/PLIST
+++ textproc/enchant/pkg/PLIST
@@ -5,10 +5,11 @@ include/enchant/enchant++.h
 include/enchant/enchant-provider.h
 include/enchant/enchant.h
 lib/enchant/
-lib/enchant/libenchant_aspell.so
-lib/enchant/libenchant_ispell.so
-lib/enchant/libenchant_myspell.so
-lib/libenchant.a
+%%voikko%%
+@so lib/enchant/libenchant_aspell.so
+@so lib/enchant/libenchant_ispell.so
+@so lib/enchant/libenchant_myspell.so
+@static-lib lib/libenchant.a
 lib/libenchant.la
 @lib lib/libenchant.so.${LIBenchant_VERSION}
 lib/pkgconfig/enchant.pc

Reply via email to