Re: A simple request (MkHexGrid) turned into ...

2022-05-15 Thread Ken Cunningham


> On May 14, 2022, at 1:21 PM, Mojca Miklavec  wrote:
> 

> See:
>
> https://github.com/macports/macports-ports/blob/master/multimedia/dav1d/Portfile#L47-L50
> suggesting that this looks like a workaround for a bug in the meson
> build system that has been ignored for more than a year:
>https://github.com/mesonbuild/meson/issues/8307
> and it looks as if this was only relevant for macOS <= 10.9.
> 

I fixed this about a year and a half ago here:

https://github.com/macports/macports-ports/commit/229bb3be0e72cdbc0fd2f97fc74350a50fa5538f
 



so dav1d no longer needs to add in a workaround. I think I mentioned that at 
the time, but the dav1d workaround had just been added so it was kept anyway, 
for no good reason.

Of course, I haven’t tried to build the port with the old compilers on 10.7 and 
10.8 since. It may still fail, for other reasons, as far as I know.

Best,

Ken



Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Michael


On 2022-05-14, at 1:21 PM, Mojca Miklavec  wrote:

> On Sat, 14 May 2022 at 19:55, Michael wrote:
>> On 2022-05-14, at 9:27 AM, Mojca Miklavec wrote:
>>> On Sat, 14 May 2022 at 16:20, Michael wrote:
 
 So I thought I'd install a simple little hex map generator. Mkhexgrid.
 
 Hasn't been updated in years, should be simple, right?
>>> ...
>>> You can check why you are getting weird dependency by running the
>>> following command:
>>>   port rdeps mkhexgrid
>> 
>> Hmm. Just some highlights. It took a compiler??
> 
> In such cases it's crucial to also provide information about the macOS
> version that you are using.

Indeed. 10.9.5. And ...

>
> https://github.com/macports/macports-ports/blob/master/multimedia/dav1d/Portfile#L47-L50
> suggesting that this looks like a workaround for a bug in the meson
> build system that has been ignored for more than a year:
>https://github.com/mesonbuild/meson/issues/8307
> and it looks as if this was only relevant for macOS <= 10.9.

Yea ... lovely :-).

>> Cairo was another port installed, and not on that list. (Checked -- it's 
>> +quartz -X11)
> 
> If you want to know which port requires x11, you can run "port depend
> ", like this, but using the relevant name:

Oh, this is interesting. "xorg" is not installed. xorg-server is not installed.

Here's the Xorg list that I have ... somehow?

xorg-libice@1.0.10 x11/xorg-libice
xorg-libpthread-stubs  @0.4x11/xorg-libpthread-stubs
xorg-libsm @1.2.3  x11/xorg-libsm
xorg-libX11@1.8x11/xorg-libX11
xorg-libXau@1.0.9  x11/xorg-libXau
xorg-libxcb@1.15   x11/xorg-libxcb
xorg-libXdamage@1.1.5  x11/xorg-libXdamage
xorg-libXdmcp  @1.1.3  x11/xorg-libXdmcp
xorg-libXext   @1.3.4  x11/xorg-libXext
xorg-libXfixes @6.0.0  x11/xorg-libXfixes
xorg-libXi @1.7.10 x11/xorg-libXi
xorg-libXmu@1.1.3  x11/xorg-libXmu
xorg-libXrandr @1.5.2  x11/xorg-libXrandr
xorg-libXt @1.2.1  x11/xorg-libXt
xorg-libXxf86vm@1.1.4  x11/xorg-libXxf86vm
xorg-xcb-proto @1.15   x11/xorg-xcb-proto
xorg-xcb-util  @0.4.0  x11/xorg-xcb-util
xorg-xorgproto @2022.1 x11/xorg-xorgproto
xrender@0.9.10 x11/xrender

... How do I have some parts of the X libraries without actually having X?

Answer:
keybounceMBP:MacOS michael$ port depend xorg-libX11
gdk-pixbuf2 depends on xorg-libX11
mesa depends on xorg-libX11
xorg-libXext depends on xorg-libX11
xorg-libXfixes depends on xorg-libX11
xorg-libXrandr depends on xorg-libX11
xorg-libXt depends on xorg-libX11
xrender depends on xorg-libX11

keybounceMBP:MacOS michael$ port depend mesa
freeglut depends on mesa
libGLU depends on mesa
webp depends on mesa

keybounceMBP:MacOS michael$ port depend libGLU
freeglut depends on libGLU

keybounceMBP:MacOS michael$ port depend freeglut
webp depends on freeglut

keybounceMBP:MacOS michael$ port depend webp
ImageMagick depends on webp
gd2 depends on webp
graphviz depends on webp
qt5-qtimageformats depends on webp
qt58-qtimageformats depends on webp
keybounceMBP:MacOS michael$ 

So gd2, and others, to webp, to freeglut, to libGLU, to mesa, to the X 
libraries.
And gd2 is -X11.

Freeglut requires X11, it's in the library dependencies. 
Webp, however ... does not list freeglut?

Gd2 needs webp, fine. Webp is somehow grabbing freeglut, despite not listing 
it, and that forces a bunch of X stuff.



Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Mojca Miklavec
On Sat, 14 May 2022 at 19:55, Michael wrote:
> On 2022-05-14, at 9:27 AM, Mojca Miklavec wrote:
> > On Sat, 14 May 2022 at 16:20, Michael wrote:
> >>
> >> So I thought I'd install a simple little hex map generator. Mkhexgrid.
> >>
> >> Hasn't been updated in years, should be simple, right?
> > ...
> > You can check why you are getting weird dependency by running the
> > following command:
> >port rdeps mkhexgrid
>
> Hmm. Just some highlights. It took a compiler??

In such cases it's crucial to also provide information about the macOS
version that you are using.

Your list is suggesting that the compiler installation was required by
the port dav1d which uses meson for building.

See:

https://github.com/macports/macports-ports/blob/master/multimedia/dav1d/Portfile#L47-L50
suggesting that this looks like a workaround for a bug in the meson
build system that has been ignored for more than a year:
https://github.com/mesonbuild/meson/issues/8307
and it looks as if this was only relevant for macOS <= 10.9.

If you install the port from the binary archive, you shouldn't be
getting the compiler though. The command "port rdeps" lists all
dependencies, including build dependencies.

Other than fixing the bug upstream in the meson build system, I don't
have any better idea about what could be done about this (unless it
has already been fixed in the meantime and nobody noticed it).

> Cairo was another port installed, and not on that list. (Checked -- it's 
> +quartz -X11)

If you want to know which port requires x11, you can run "port depend
", like this, but using the relevant name:

% port depend xz
libarchive depends on xz
libxml2 depends on xz
python310 depends on xz
tiff depends on xz
zstd depends on xz

Mojca


Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Michael


On 2022-05-14, at 9:27 AM, Mojca Miklavec  wrote:

> On Sat, 14 May 2022 at 16:20, Michael wrote:
>> 
>> So I thought I'd install a simple little hex map generator. Mkhexgrid.
>> 
>> Hasn't been updated in years, should be simple, right?
> ...
> You can check why you are getting weird dependency by running the
> following command:
>port rdeps mkhexgrid

Hmm. Just some highlights. It took a compiler??

fontconfig
  expat
  ossp-uuid
perl5.28
  db48
  gdbm
readline

libunistring
  perl5
  texinfo
help2man
  perl5.34
  p5.34-locale-gettext

  libpsl
python310
  libedit
  libffi
expect
  tcl

libheif
  dav1d
clang-14
  cctools
libunwind-headers
llvm-3.7
  llvm_select

  clang-11
clang-9.0
  clang-3.7
  libomp
  llvm-9.0
  clang_select
  ld64
ld64-274
  libmacho-headers

meson
  py39-setuptools
python39

  aom
git
  perl5.26
  python27
openssl11
python2_select

Interestingly, X 11 is not on that list. And Gd2 is installed as non-X:
keybounceMBP:~ michael$ port info gd2
gd2 @2.3.3_1 (graphics)
Variants: universal, (-)x11

Cairo was another port installed, and not on that list. (Checked -- it's 
+quartz -X11)



Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Ken Cunningham
It was a couple of years ago I fixed up ICU — so I don’t recall just now a 
specific python 2.7 reason.

Bootstrapping maybe. Sorry,

Ken



> On May 14, 2022, at 9:27 AM, Mojca Miklavec  wrote:
> 
> On Sat, 14 May 2022 at 16:20, Michael wrote:
>> 
>> So I thought I'd install a simple little hex map generator. Mkhexgrid.
>> 
>> Hasn't been updated in years, should be simple, right?
>> 
>> Three versions of Python (37, 38, and 39)
>> A full reinstall of X
>> 
>> I mean, I can sort-of understand perl, one python, and ssl -- maybe it 
>> needed to rebuild something, and needed updated ssh fetching and rebuilding 
>> the compilation environment.
>> 
>> But everything else? And three versions of python? And not just python 2 vs 
>> python 3.
> 
> For me python 2.7 sneaks in as a build dependency of ICU (that only
> affects users of the latest macOS).
> I see neither python 3.7 nor python 3.8 on the dependency list. Those
> could be side-effects of something that you have installed earlier
> which keeps depending on an older version of python. Or maybe you are
> using a different OS version that has slightly different dependencies.
> 
> The following patch for ICU that replaces python 2.7 with 3.10 seems
> to work for me:
> 
> --- a/devel/icu/Portfile
> +++ b/devel/icu/Portfile
> @@ -113,9 +113,9 @@ if {${subport} eq ${name} || ${subport} eq "${name}-lx"} {
> test.args VERBOSE=1
> 
> if {${os.platform} eq "darwin" && (${os.major} < 11 || ${os.major} > 20)} {
> - depends_build-append port:python27
> - license_noconflict python27
> - configure.python ${prefix}/bin/python2.7
> + depends_build-append port:python310
> + license_noconflict python310
> + configure.python ${prefix}/bin/python3.10
> }
> 
> if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {
> 
> This patch should probably be applied anyway.
> 
> (Ken: is there some Tiger-like reason to keep python 2.7 as a build
> dependency of ICU?)
> 
> You can check why you are getting weird dependency by running the
> following command:
>port rdeps mkhexgrid
> 
> Say, the reason why you need python 3.9 is because meson currently
> declares a dependency on python 3.9 and that should definitely be
> changed as well.
> There's an open pull request for meson from 2 days ago.
> 
>> I'm assuming that somewhere, some graphical library was being used that 
>> could output to X as well as to ascii/curses. I just have no idea what.
> 
> Yes, mkhexgrid depends on gd2 which depends on X11 by default. Try to
> run "port info gd2" or check
>https://ports.macports.org/port/gd2/details/
> 
> You can avoid the need to install x11 by installing "sudo port install
> gd2 -x11" before installing mkhexgrid.
> 
> All I can say is that the situation with multiple versions of
> python/perl/etc. could and should be improved.
> Whether or not the default variant to install gd2 with X11 support is
> something that I'm not competent to judge.
> 
> "port rdeps " will usually provide you enough information to
> figure out why some dependency is there.
> Sometimes it makes sense, sometimes it's something that could be improved.
> 
> Btw: you should usually update all your ports before installing a new port.
> It could happen that by installing a new port, one of the libraries (a
> dependency) will be upgraded, while another port that depends on that
> same library won't be updated and may stop working.
> 
> Mojca



Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Mojca Miklavec
On Sat, 14 May 2022 at 16:20, Michael wrote:
>
> So I thought I'd install a simple little hex map generator. Mkhexgrid.
>
> Hasn't been updated in years, should be simple, right?
>
> Three versions of Python (37, 38, and 39)
> A full reinstall of X
>
> I mean, I can sort-of understand perl, one python, and ssl -- maybe it needed 
> to rebuild something, and needed updated ssh fetching and rebuilding the 
> compilation environment.
>
> But everything else? And three versions of python? And not just python 2 vs 
> python 3.

For me python 2.7 sneaks in as a build dependency of ICU (that only
affects users of the latest macOS).
I see neither python 3.7 nor python 3.8 on the dependency list. Those
could be side-effects of something that you have installed earlier
which keeps depending on an older version of python. Or maybe you are
using a different OS version that has slightly different dependencies.

The following patch for ICU that replaces python 2.7 with 3.10 seems
to work for me:

--- a/devel/icu/Portfile
+++ b/devel/icu/Portfile
@@ -113,9 +113,9 @@ if {${subport} eq ${name} || ${subport} eq "${name}-lx"} {
test.args VERBOSE=1

if {${os.platform} eq "darwin" && (${os.major} < 11 || ${os.major} > 20)} {
- depends_build-append port:python27
- license_noconflict python27
- configure.python ${prefix}/bin/python2.7
+ depends_build-append port:python310
+ license_noconflict python310
+ configure.python ${prefix}/bin/python3.10
}

if {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} {

This patch should probably be applied anyway.

(Ken: is there some Tiger-like reason to keep python 2.7 as a build
dependency of ICU?)

You can check why you are getting weird dependency by running the
following command:
port rdeps mkhexgrid

Say, the reason why you need python 3.9 is because meson currently
declares a dependency on python 3.9 and that should definitely be
changed as well.
There's an open pull request for meson from 2 days ago.

> I'm assuming that somewhere, some graphical library was being used that could 
> output to X as well as to ascii/curses. I just have no idea what.

Yes, mkhexgrid depends on gd2 which depends on X11 by default. Try to
run "port info gd2" or check
https://ports.macports.org/port/gd2/details/

You can avoid the need to install x11 by installing "sudo port install
gd2 -x11" before installing mkhexgrid.

All I can say is that the situation with multiple versions of
python/perl/etc. could and should be improved.
Whether or not the default variant to install gd2 with X11 support is
something that I'm not competent to judge.

"port rdeps " will usually provide you enough information to
figure out why some dependency is there.
Sometimes it makes sense, sometimes it's something that could be improved.

Btw: you should usually update all your ports before installing a new port.
It could happen that by installing a new port, one of the libraries (a
dependency) will be upgraded, while another port that depends on that
same library won't be updated and may stop working.

Mojca


Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Marius Schamschula
Any dependencies are updated independently of the dependent port.

All versions of python were recently updated, as were several components of X11.

Marius
--
Marius Schamschula




> On May 14, 2022, at 10:39 AM, Michael  wrote:
> 
> 
> On 2022-05-14, at 8:38 AM, Marius Schamschula  > wrote:
> 
>> Mkhexgrid has not been updated upstream since 2007.
> 
> Exactly. So I'm trying to understand how installing something so old/basic 
> like that caused a reinstall of so many pieces in Macports.
> 
> I was expecting little more than downloading it, and maybe one or two 
> libraries.
> 
> 
>> 
>> Marius
>> --
>> Marius Schamschula
>> 
>> 
>> 
>> 
>>> On May 14, 2022, at 9:20 AM, Michael >> > wrote:
>>> 
>>> So I thought I'd install a simple little hex map generator. Mkhexgrid.
>>> 
>>> Hasn't been updated in years, should be simple, right?
>>> 
>>> Three versions of Python (37, 38, and 39)
>>> A full reinstall of X
>>> 
>>> I mean, I can sort-of understand perl, one python, and ssl -- maybe it 
>>> needed to rebuild something, and needed updated ssh fetching and rebuilding 
>>> the compilation environment.
>>> 
>>> But everything else? And three versions of python? And not just python 2 vs 
>>> python 3.
>>> 
>>> I'm assuming that somewhere, some graphical library was being used that 
>>> could output to X as well as to ascii/curses. I just have no idea what. 
>>> 
>>> All I wanted was to generate a PNG hexmap.
>>> At least it was able to fetch binaries for pretty much everything, and not 
>>> compile everything.
>>> 
>> 
> 
> ---
> Entertaining minecraft videos
> http://YouTube.com/keybounce 


Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Michael

On 2022-05-14, at 8:38 AM, Marius Schamschula  wrote:

> Mkhexgrid has not been updated upstream since 2007.

Exactly. So I'm trying to understand how installing something so old/basic like 
that caused a reinstall of so many pieces in Macports.

I was expecting little more than downloading it, and maybe one or two libraries.


> 
> Marius
> --
> Marius Schamschula
> 
> 
> 
> 
>> On May 14, 2022, at 9:20 AM, Michael  wrote:
>> 
>> So I thought I'd install a simple little hex map generator. Mkhexgrid.
>> 
>> Hasn't been updated in years, should be simple, right?
>> 
>> Three versions of Python (37, 38, and 39)
>> A full reinstall of X
>> 
>> I mean, I can sort-of understand perl, one python, and ssl -- maybe it 
>> needed to rebuild something, and needed updated ssh fetching and rebuilding 
>> the compilation environment.
>> 
>> But everything else? And three versions of python? And not just python 2 vs 
>> python 3.
>> 
>> I'm assuming that somewhere, some graphical library was being used that 
>> could output to X as well as to ascii/curses. I just have no idea what. 
>> 
>> All I wanted was to generate a PNG hexmap.
>> At least it was able to fetch binaries for pretty much everything, and not 
>> compile everything.
>> 
> 

---
Entertaining minecraft videos
http://YouTube.com/keybounce



Re: A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Marius Schamschula
Mkhexgrid has not been updated upstream since 2007.

Marius
--
Marius Schamschula




> On May 14, 2022, at 9:20 AM, Michael  wrote:
> 
> So I thought I'd install a simple little hex map generator. Mkhexgrid.
> 
> Hasn't been updated in years, should be simple, right?
> 
> Three versions of Python (37, 38, and 39)
> A full reinstall of X
> 
> I mean, I can sort-of understand perl, one python, and ssl -- maybe it needed 
> to rebuild something, and needed updated ssh fetching and rebuilding the 
> compilation environment.
> 
> But everything else? And three versions of python? And not just python 2 vs 
> python 3.
> 
> I'm assuming that somewhere, some graphical library was being used that could 
> output to X as well as to ascii/curses. I just have no idea what. 
> 
> All I wanted was to generate a PNG hexmap.
> At least it was able to fetch binaries for pretty much everything, and not 
> compile everything.
> 



A simple request (MkHexGrid) turned into ...

2022-05-14 Thread Michael
So I thought I'd install a simple little hex map generator. Mkhexgrid.

Hasn't been updated in years, should be simple, right?

Three versions of Python (37, 38, and 39)
A full reinstall of X

I mean, I can sort-of understand perl, one python, and ssl -- maybe it needed 
to rebuild something, and needed updated ssh fetching and rebuilding the 
compilation environment.

But everything else? And three versions of python? And not just python 2 vs 
python 3.

I'm assuming that somewhere, some graphical library was being used that could 
output to X as well as to ascii/curses. I just have no idea what. 

All I wanted was to generate a PNG hexmap.
At least it was able to fetch binaries for pretty much everything, and not 
compile everything.