Hi there, I use textprox/py-enchant for a web application. Specifically we use py-enchant to act as a spell checker inside ckeditor for some webforms in our app. The current py-enchant port has a USE_* dependency on wxPython. This pulls in a pretty large dependency tree (totaling around 1GB of packages - most of which are related to X and graphics libraries) which we do not need or really want on our web app nodes. In my environment I have verified that I can build the port without the following lines and things works as expected: $ diff -u Makefile Makefile.wip --- Makefile 2017-06-05 18:11:25.603805000 +0000 +++ Makefile.wip 2017-06-05 18:12:04.288514000 +0000 @@ -18,8 +18,6 @@ USES= python USE_PYTHON= distutils -USE_WX= 3.0+ -WX_COMPS= python:run LDFLAGS+= -L${LOCALBASE}/lib Would it be a better long-term solution to define USE_WX as an optional flag that users can override?
Created attachment 183310 [details] Make Wx support optional The attached patch does what you want. Unfortunately, this is not very clean: - the dependency on x11-toolkits/py-wxPython30 is removed, but there is no way to configure it, and it will be used if found on the machine; - anyway, wxSpellCheckerDialog.py will be installed, even if not usable (well, it could be possible to remove it).
(In reply to Thierry Thomas from comment #1) Thanks Theirry! I'll give this patch a spin on my poudriere infra later today. FWIW - regarding wxSpellCheckerDialog.py being included regardless of it being usable. This is actually what happens when the module is installed via PIP - so this might not be a regression?
OK, committed. Thanks for the suggestion.
A commit references this bug: Author: thierry Date: Thu Jun 8 21:08:33 UTC 2017 New revision: 442959 URL: https://svnweb.freebsd.org/changeset/ports/442959 Log: Make wxPython optional. Note: no PORTREVISION bump, because the default is not changed. PR: 219804 Submitted by: pete (at) nomadlogic.org Changes: head/textproc/py-enchant/Makefile head/textproc/py-enchant/pkg-plist
A commit references this bug: Author: thierry Date: Sat Jun 10 15:06:41 UTC 2017 New revision: 443098 URL: https://svnweb.freebsd.org/changeset/ports/443098 Log: Use option helpers. PR: 219804 Reported by: koobs Changes: head/textproc/py-enchant/Makefile