Re: py27-pygtk

2022-10-12 Thread Joshua Root

On 2022-10-13 03:58 , Lukas Oberhuber wrote:
Here is the Portfile: 
https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/blob/dee2dcff05491fd5cd455fe1ab4164633720339b/ports/graphics/gimp2/Portfile 


Here is a gist of the logs: 
https://gist.github.com/lukaso/806cfb5fd90d147b6328a7aa0112a490 



Hopefully you have some ideas! Thanks.


Well here's your problem:

:debug:configure Executing org.macports.configure (gimp210)
:debug:configure Environment: 
:debug:configure CC_PRINT_OPTIONS='YES'

:debug:configure 
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_lukasoberhuber_project_ports_graphics_gimp2/gimp210/work/.CC_PRINT_OPTIONS'
:debug:configure CPATH='/opt/local/include'
:debug:configure DEVELOPER_DIR='/Library/Developer/CommandLineTools'
:debug:configure LIBRARY_PATH='/opt/local/lib'
:debug:configure MACOSX_DEPLOYMENT_TARGET='11.0'
:debug:configure 
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk'


There should be around 15 more environment variables set. Not just 
PKG_CONFIG_PATH and PYTHON but ones set by base like CC, CFLAGS and so on.


I think this is because the configure script is being run as part of the 
autoreconf command, not configure proper.


BTW, these two lines both do exactly the same thing, so you can just 
remove the second one:
configure.pkg_config_path 
${python_framework}/lib/pkgconfig:${prefix}/lib/pkgconfig
configure.env-append 
PKG_CONFIG_PATH=${python_framework}/lib/pkgconfig:${prefix}/lib/pkgconfig


And you don't need to specify ${prefix}/lib/pkgconfig in there because 
that's already in the default search paths.


- Josh


Re: py27-pygtk

2022-10-12 Thread Lukas Oberhuber
On Wed, 12 Oct 2022 at 17:29, Joshua Root  wrote:

> Lukas Oberhuber wrote:
>
> > I've tried many variants of
> >
> > depends_lib-append port:pygtk-2.0.pc:py27-pygtk
> > with and without the .pc file and with and without directories before
> them.
>
> That should be just:
>
> depends_lib-append port:py27-pygtk
>
> But as long as the correct port is already installed, that won't change
> the behaviour of pkg-config.
>
I've tried that version as well. No dice

>
> > But every time on build I get
> >
> > checking for pygtk-codegen-2.0... no
> > checking for pygtk defs... Package pygtk-2.0 was not found in the
> > pkg-config search path.
> > Perhaps you should add the directory containing `pygtk-2.0.pc'
> > to the PKG_CONFIG_PATH environment variable
> > No package 'pygtk-2.0' found
>
> Checking assumptions, try this outside of the port:
>
> PKG_CONFIG_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig
> pkg-config --exists --print-errors pygtk-2.0
>
This returned nothing but succeeded.

>
> In general when asking for help debugging a port, it's very helpful to
> share the Portfile and logs in a gist or something.
>
Sorry about that.

Here is the Portfile:
https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/blob/dee2dcff05491fd5cd455fe1ab4164633720339b/ports/graphics/gimp2/Portfile

Here is a gist of the logs:
https://gist.github.com/lukaso/806cfb5fd90d147b6328a7aa0112a490

Hopefully you have some ideas! Thanks.


Re: py27-pygtk

2022-10-12 Thread Joshua Root

Lukas Oberhuber wrote:


I'm trying to build gimp2.10.32 (I'm the mac maintainer). I've got a custom
Portfile, but for the life of me, I can't get gimps autotools (configure.ac)
to pick up on `py27-pygtk`.

I've set done this:

set python_framework${frameworks_dir}/Python.framework/Versions/2.7
configure.pkg_config_path
${python_framework}/lib/pkgconfig:${prefix}/lib/pkgconfig

with and without the second path.

I've tried many variants of

depends_lib-append port:pygtk-2.0.pc:py27-pygtk
with and without the .pc file and with and without directories before them.


That should be just:

depends_lib-append port:py27-pygtk

But as long as the correct port is already installed, that won't change the 
behaviour of pkg-config.


But every time on build I get

checking for pygtk-codegen-2.0... no
checking for pygtk defs... Package pygtk-2.0 was not found in the
pkg-config search path.
Perhaps you should add the directory containing `pygtk-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pygtk-2.0' found


Checking assumptions, try this outside of the port:

PKG_CONFIG_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig
 pkg-config --exists --print-errors pygtk-2.0

In general when asking for help debugging a port, it's very helpful to share 
the Portfile and logs in a gist or something.

- Josh