Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#58048 closed update (fixed)

pcb upgrade to 4.2.0

Reported by: technobauble (Chad Parker) Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc:
Port: pcb

Description

Hello-

Attached is a patch that updates the Portfile for recently released pcb version 4.2.0.

Thank you,

--Chad

Attachments (4)

pcb-v4.2.0.patch (1.1 KB) - added by technobauble (Chad Parker) 5 years ago.
Portfile patch.
pcb-v4.2.0-1.patch (1.2 KB) - added by technobauble (Chad Parker) 5 years ago.
pcb-4.2.0-2.patch (1.2 KB) - added by technobauble (Chad Parker) 5 years ago.
Third try…
pcb-4.2.0-intltoolbug.patch (805 bytes) - added by technobauble (Chad Parker) 5 years ago.

Download all attachments as: .zip

Change History (18)

Changed 5 years ago by technobauble (Chad Parker)

Attachment: pcb-v4.2.0.patch added

Portfile patch.

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Keywords: maintainer added

Adding a dependency on p5-xml-parser is not correct because you have to ensure that the package is installed for the specific version of perl that is being used by the port. Why is XML::Parser needed?

If it's just because the configure script says it needs INTLTOOL_PERL, that is a bug in intltool.m4 and the configure script needs to be regenerated to avoid it. https://bugs.launchpad.net/intltool/+bug/1197875

comment:2 Changed 5 years ago by technobauble (Chad Parker)

Preface: I'm still somewhat new to this, so, thanks for your patience.

Yes, I added it because intltool appeared to depend on it. I recently upgraded to Mojave, and haven't reinstalled most of my ports yet. So, I figured it was just missed.

The bug you referenced is years old, and it doesn't look like intltool is actually even being developed anymore. I doubt that it will ever be officially patched.

Without the dependency, I get the following output, which doesn't use the identifier INTLTOOL_PERL... but perhaps it is the same issue?

:info:configure checking for intltool >= 0.35.0... 0.51.0 found
:info:configure checking for intltool-update... /opt/local/bin/intltool-update
:info:configure checking for intltool-merge... /opt/local/bin/intltool-merge
:info:configure checking for intltool-extract... /opt/local/bin/intltool-extract
:info:configure checking for xgettext... (cached) /opt/local/bin/xgettext
:info:configure checking for msgmerge... (cached) /opt/local/bin/msgmerge
:info:configure checking for msgfmt... (cached) /opt/local/bin/msgfmt
:info:configure checking for gmsgfmt... (cached) /opt/local/bin/msgfmt
:info:configure checking for perl... /opt/local/bin/perl
:info:configure checking for perl >= 5.8.1... 5.26.3
:info:configure checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool
:info:configure Command failed:  cd "/opt/local/var/macports/build/_Users_parkecw1_ports_graphics_pcb/pcb/work/pcb-4.2.0" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --infodir=/opt/local/share/info --disable-update-desktop-database --disable-dbus --disable-update-mime-database 
:info:configure Exit code: 2
:error:configure Failed to configure pcb, consult /opt/local/var/macports/build/_Users_parkecw1_ports_graphics_pcb/pcb/work/pcb-4.2.0/config.log
:error:configure Failed to configure pcb: configure failure: command execution failed

Actually, when I just reproduced this, it asked me to install the p5.28-xml-parser port as a dependency (I uninstalled all versions to reproduce the output)... which it did. So, clearly there is a larger issue here.

I guess I'm not entirely sure what you're asking me to do. I can't fix intltool, and I don't think this is an issue with pcb, as we don't actually require XML::Parser (which is I suppose a reason it shouldn't be on my dependency list). If I remove the dependency, then it doesn't build unless the right package happens to already be on the system.

I'm sorry for being dense, but can you please be a little more explicit with your instructions? Are you asking me to distribute and apply the intltool patch as part of the pcb port?

Thanks,
--Chad

comment:3 Changed 5 years ago by mf2k (Frank Schima)

intltool already has a dependency on p5.28-xml-parser, so you don't need to add it because it will get installed. The problem is that the configure script is mistakenly looking for a perl 5.26 version, not the 5.28 version that is available to it.

comment:4 Changed 5 years ago by mf2k (Frank Schima)

So the configure needs to be fixed either by patching or maybe running autoreconf.

comment:5 Changed 5 years ago by technobauble (Chad Parker)

Ah... sorry. Embarrassing for the maintainer to admit this, but I didn't realize we were distributing with a configure script. I thought we were running the autogen.sh bootstrap each time. I normally build from git, not the SF packages.

I think I understand the issue now. We generated configure with a particular version of intltool/perl/xml-parser and that got baked into the configure script because of the bug in intltool. A quick check looks like there may be a bug that prevents autoreconf from executing successfully. I'll see if I can come up with something.

Is there a mechanism of distributing patches through macports?

Thanks for your patience, --Chad

comment:6 Changed 5 years ago by mf2k (Frank Schima)

Yes. There is an optional patch phase in Macports. See the guide about creating them. They are stored in the optional, created only as needed, files directory. See also https://guide.macports.org/#reference.phases.patch

comment:7 Changed 5 years ago by jmroot (Joshua Root)

Running autogen.sh is also fine. The copy of intltool.m4 installed by our intltool port has the bug fix applied.

Changed 5 years ago by technobauble (Chad Parker)

Attachment: pcb-v4.2.0-1.patch added

comment:8 Changed 5 years ago by technobauble (Chad Parker)

I've attached a new patch.

Basically, I just added a sed command to remove the section of the configure file that does the INTLTOOL_PERL checks. That seemed like the easiest thing to do. Plus, no extra files to worry about.

I did it by specifying the sed command in configure.cmd. Is there a better way to execute a shell command during one of the phases?

Thanks,
--Chad

comment:9 Changed 5 years ago by technobauble (Chad Parker)

::bump::

comment:10 Changed 5 years ago by mf2k (Frank Schima)

That's not the normal way we patch files. It is completely opaque and it won't work if the configure file changes for a future update. Instead, please make a patchfile.

Changed 5 years ago by technobauble (Chad Parker)

Attachment: pcb-4.2.0-2.patch added

Third try...

Changed 5 years ago by technobauble (Chad Parker)

Attachment: pcb-4.2.0-intltoolbug.patch added

comment:11 Changed 5 years ago by mf2k (Frank Schima)

Owner: set to mf2k
Resolution: fixed
Status: newclosed

In 6468cccd384bc32a4976d93545a2d43332d5897e/macports-ports (master):

pcb: Update to version 4.2.0

Closes: #58048

comment:12 Changed 5 years ago by mf2k (Frank Schima)

Sorry for the delay. Next time, you might want to consider submitting updates via GitHub pull request because those get acted on much faster.

comment:13 Changed 5 years ago by mf2k (Frank Schima)

Keywords: haspatch added

comment:14 Changed 5 years ago by mf2k (Frank Schima)

In e9e426121e52f6ba0467038be21af0f7c8bff5ff/macports-ports (master):

pcb: Add missing patchfile

See: #58048

Note: See TracTickets for help on using tickets.