Opened 4 years ago
Last modified 5 months ago
#61861 assigned defect
gimp-resynthesizer: uses "python2", underquoted AC_CONFIG_HEADERS, lib dependency, license
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | pietvo (Pieter van Oostrum) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | cooljeanius (Eric Gallager) | |
Port: | gimp-resynthesizer |
Description
gimp-resynthesizer has a patchfile that changes #!/usr/bin/env python
to #!/usr/bin/env python2
in several python scripts. There is no python2
on macOS 10.14 or earlier. You should probably change it to #!/usr/bin/python
so that we're sure what python is used or add a dependency on port:python27 and use #!/opt/local/bin/python2.7
.
You also have a patch that switches to AC_CONFIG_HEADERS
in configure.ac but it's underquoted. Instead of AC_CONFIG_HEADERS(config.h)
use AC_CONFIG_HEADERS([config.h])
. In any case it's an upstream issue so you should also submit a pull request for your configure.ac changes to the developers and then include the URL of that pull request in your MacPorts patchfile so that we can keep track of it.
The port has a dependency on lib:libgimp-2.0:gimp2
. That should be port:gimp2
. lib:
-style dependencies can be satisfied by software installed outside of MacPorts, which we don't want.
The port specifies license GPL-3.0
. That should be written as license GPL-3
which means the same thing in MacPorts.
Change History (5)
comment:1 follow-up: 2 Changed 4 years ago by pietvo (Pieter van Oostrum)
comment:2 follow-up: 3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to pietvo:
Re: the
python2
: almost all standard python plugins ingimp2
have#!/usr/bin/env python2
Then they are all broken on macOS 10.14 and earlier and need to be fixed.
gimp2
has the default variant+python27
, so usually the dependency onpython2.7
is already satisfied. But ifgimp2
is installed with-python27
then all hope is lost, because the plugin won't work. Is there a way to set a dependency ongimp2
with thepython27
variant enforced?
This can be accomplished using the require_active_variants
procedure of the active_variants 1.1 portgroup.
PortGroup active_variants 1.1 require_active_variants path:lib/pkgconfig/gimp-2.0.pc:gimp2 python27
Re: the
lib:libgimp-2.0:gimp2
, this was done to catch alsogimp2-devel
. Is there a way to specify eithergimp2
orgimp2-devel
?
Other ports use path:lib/pkgconfig/gimp-2.0.pc:gimp2
And, by the way, I also noticed a few
python3
scripts in thegimp
distribution, whereas thegimp2
port has no dependency on anypython3
. That is of course outside this port, but maybe it should be looked int.
No port provides python
, python2
, or python3
. All OS versions provide /usr/bin/python. Some OS versions provide /usr/bin/python2 or /usr/bin/python3 but not all so you shouldn't rely on them. Symlinks called python, python2 or python3 can be created by using port select python
but that is for the user's convenience only; ports should not rely on the user having run (or not run) port select
. If you can use any python and don't care what version and don't need any extra modules, #!/usr/bin/env python
is fine or #!/usr/bin/python
if you want to ensure that a MacPorts python will not be used. If you care what version or you need extra modules, specify a dependency on the corresponding python and module ports and use #!/opt/local/bin/pythonX.Y
where X.Y is whatever version you're using.
comment:3 follow-up: 4 Changed 4 years ago by pietvo (Pieter van Oostrum)
Replying to ryandesign:
Replying to pietvo:
Re: the
python2
: almost all standard python plugins ingimp2
have#!/usr/bin/env python2
Then they are all broken on macOS 10.14 and earlier and need to be fixed.
I found out that these lines are interpreted by gimp
itself, not by the OS. It looks for #!/usr/bin/env
and then looks up the rest in a table. Both python
and python2
are mapped to /opt/local/bin/python2.7
. So I guess the python2
is only chosen for documentary purposes.
This also means that my patch is both unnecessary and harmless. I'll remove it.
gimp2
has the default variant+python27
, so usually the dependency onpython2.7
is already satisfied. But ifgimp2
is installed with-python27
then all hope is lost, because the plugin won't work. Is there a way to set a dependency ongimp2
with thepython27
variant enforced?This can be accomplished using the
require_active_variants
procedure of the active_variants 1.1 portgroup.PortGroup active_variants 1.1 require_active_variants path:lib/pkgconfig/gimp-2.0.pc:gimp2 python27
I'll use that.
Re: the
lib:libgimp-2.0:gimp2
, this was done to catch alsogimp2-devel
. Is there a way to specify eithergimp2
orgimp2-devel
?Other ports use
path:lib/pkgconfig/gimp-2.0.pc:gimp2
I suppose that's covered by the two lines above.
I will make the changes, test it, and submit a new PR.
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to pietvo:
I found out that these lines are interpreted by
gimp
itself, not by the OS. It looks for#!/usr/bin/env
and then looks up the rest in a table. Bothpython
andpython2
are mapped to/opt/local/bin/python2.7
. So I guess thepython2
is only chosen for documentary purposes. This also means that my patch is both unnecessary and harmless. I'll remove it.
Ah ok.
gimp2
has the default variant+python27
, so usually the dependency onpython2.7
is already satisfied. But ifgimp2
is installed with-python27
then all hope is lost, because the plugin won't work. Is there a way to set a dependency ongimp2
with thepython27
variant enforced?This can be accomplished using the
require_active_variants
procedure of the active_variants 1.1 portgroup.PortGroup active_variants 1.1 require_active_variants path:lib/pkgconfig/gimp-2.0.pc:gimp2 python27I'll use that.
Re: the
lib:libgimp-2.0:gimp2
, this was done to catch alsogimp2-devel
. Is there a way to specify eithergimp2
orgimp2-devel
?Other ports use
path:lib/pkgconfig/gimp-2.0.pc:gimp2
I suppose that's covered by the two lines above.
Well you need to specify path:lib/pkgconfig/gimp-2.0.pc:gimp2
in both places: in depends_whatever
and in require_active_variants
.
comment:5 Changed 5 months ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
Re: the
python2
: almost all standard python plugins ingimp2
have#!/usr/bin/env python2
, so I went along with that. There is just one that#!/usr/bin/env python
.gimp2
has the default variant+python27
, so usually the dependency onpython2.7
is already satisfied. But ifgimp2
is installed with-python27
then all hope is lost, because the plugin won't work. Is there a way to set a dependency ongimp2
with thepython27
variant enforced?Re: the
lib:libgimp-2.0:gimp2
, this was done to catch alsogimp2-devel
. Is there a way to specify eithergimp2
orgimp2-devel
?The
config.ac
changes and the licence I will correct.And, by the way, I also noticed a few
python3
scripts in thegimp
distribution, whereas thegimp2
port has no dependency on anypython3
. That is of course outside this port, but maybe it should be looked int.