Unswers to comments made in Bugzilla by Kubilay Kocak:
> * Using PyPI (CHEESESHOP) for distribution files is preferred unless desirable files are missing from the sdist (LICENSE, test suite, etc)
I did not manage to fetch the distro using CHEESESHOP, perhaps due to recent switch
to GitHub made by Enthought. I'm bit reluctant to go away from currently working
method. Are there big advantages of CHEESESHOP?
> * If a LICENSE file exists in WRKSRC, add LICENSE_FILE=${WRKSRC}/path/to/LICENSE
Done for graphics/py-mayavi, yet to be done for other ports.
A question. It turns out that within mayavi sources there are few more license file
for some internally used files (like colormap and icons). What to do in this case?
What to read on the subject?
> * I'm not confident that the declared dependencies are all BUILD_DEPENDENCIES. See:
> https://github.com/enthought/mayavi/blob/master/mayavi/__init__.py#L10
You are right, only one port is nesessary for build.
> * GH_PROJECT defaults to PORTNAME, this entry is not needed
Removed from all 5 ports. I swear I tried to do this earlier and it did not work :)
> * Instead of a pre-configure check for the/a python vtk module, there should be a (slave) port for either vtk with the option enabled (vtkX-python) OR, a port for py-pyvtk (https://pypi.python.org/pypi/PyVTK) if this is the module that is used. A pre-configure check assists port users who can rebuild vtk w/ PYTHON, but not package users.
Well, I do not want to maintain any of vtk ports, they are too complex to my taste...
> * Group USE{S_*} lines with USES at the top, and USE_* sorted
Done for all 5 ports.
Before submitting the ports to Buzilla, I asked for help with 4 issues. I added 
a link to that request in bug 204435 graphics/py-mayavi. I recieved no comment
till now, probably, google groups is not a good place to ask this kind of questions.
So, I repeat the request here. 
For Issue 2, I have found that some ports use pkg info for this purposes. 
The solution still needs some adaptaion to my case, so it's not included in this 
review.
Issue 1. Plist. 
I cannot get plist working correctly. 
If I use a static file, pkg-plist, then it fails either during my normal 
installing or in poudrier. Seemingly, the installation distutils  script 
of the package detects difference of options of depend packages and installs or 
skips some parts of html documentation. 
So, it looks like I need an autoplist. I have in my port a line 
USE_PYTHON=        autoplist distutils 
But with this the port also fails, and I think this indicates a bug in autoplist 
mechanics. 
How to fix it? Or how to debug this mechanics? 
Issue 2. Depends on an option. 
The port depends on math/vtk6 and needs it installed with option PYTHON 
selected. I found in discussions that the only way is to inform the user about 
the option and ask to re-install the dependence. I adapted the solution. But 
later I learned that this method of checking a file for existence does not work 
with changed WORKDIR and PREFIX (BUILDROOT in porttools). 
Currently I have in Makefile: 
pre-configure: 
        if [ ! -e ${PREFIX}/lib/python2.7/site-packages/vtk/__init__.py ]; then \ 
                ${ECHO_MSG} "math/vtk6 was installed without PYTHON option; "; \ 
                ${ECHO_MSG} "please reinstall with PYTHON selected"; \ 
                ${FALSE}; \ 
        fi 
What can be a better way to check for an option? 
Issue 3. portlint and BUILD_DEPENDS=        ${MY_DEPENDS}. 
Porter's Handbook recommends to use a variable if the same list of depends 
is to be assigned to two *_DEPENDS. But portlint complains: 
WARN: Makefile: wrong dependency value for RUN_DEPENDS. RUN_DEPENDS requires 2 or 3 colon-separated tuples. 
Is it a bug in portlint or am I missing something? 
Issue 4. LD_LIBRARY_PATH. 
If the port is installed and I start the script mayavi2, it fails: 
#++++ 
$ mayavi2 
Warning: Unable to import the wx backend for pyface due to traceback: Traceback (most recent call last): 
          File "/usr/local/lib/python2.7/site-packages/pyface/toolkit.py", line 49, in _init_toolkit 
            be = import_toolkit(tk) 
          File "/usr/local/lib/python2.7/site-packages/pyface/toolkit.py", line 31, in import_toolkit 
            __import__(be + 'init') 
          File "/usr/local/lib/python2.7/site-packages/pyface/ui/wx/init.py", line 14, in <module> 
            import wx 
          File "/usr/local/lib/python2.7/site-packages/wx-3.0-gtk2/wx/__init__.py", line 45, in <module> 
            from wx._core import * 
          File "/usr/local/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 4, in <module> 
            import _core_ 
        ImportError: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/local/lib/libwx_baseu-3.0.so.0 not found 
Traceback (most recent call last): 
  File "/usr/local/bin/mayavi2", line 9, in <module> 
    load_entry_point('mayavi==4.4.3', 'gui_scripts', 'mayavi2')() 
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 552, in load_entry_point 
    return get_distribution(dist).load_entry_point(group, name) 
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point 
    return ep.load() 
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load 
    return self.resolve() 
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve 
    module = __import__(self.module_name, fromlist=['__name__'], level=0) 
  File "/usr/local/lib/python2.7/site-packages/mayavi/scripts/mayavi2.py", line 493, in <module> 
    raise ImportError(msg) 
ImportError: cannot import name scimath 
________________________________________________________________________________ 
Could not load envisage. You might have a missing dependency. 
Do you have the EnvisageCore and EnvisagePlugins installed? 
If you installed Mayavi with easy_install, try 'easy_install <pkg_name>'. 
'easy_install Mayavi[app]' will also work. 
If you performed a source checkout and installed via 'python setup.py develop', 
be sure to run the same command in the EnvisageCore and EnvisagePlugins folders. 
If these packages appear to be installed, check that your numpy and 
configobj are installed and working. If you need numpy, 'easy_install numpy' 
will install numpy. Similarly, 'easy_install configobj' will install 
configobj. 
#---- 
I have read a number of PRs with similar problems e.g. bug 196703, bug 192928, 
bug 192821. Unfortunately, I cannot identify a port which is the source of the 
problem. Any help will be greatly appreciated. 
A work-around from one of the PRs helps. Start as follows: 
$ LD_LIBRARY_PATH=/usr/local/lib/gcc48 mayavi2 
The program emits warnings about some deprecated things but works alright.