Dear all,

How are you? I hope all is well with you. I apologise for my beginner 
questions. I’m still struggling to test install the updated Portfile for 
Perl5.40.1.

1) I created a local MacPorts tree under /opt/local/ports.

2) I created a directory structure for Perl5: /opt/local/ports/lang/perl5.

3) I placed my modified Portfile there under 
/opt/local/ports/lang/perl5/Portfile.

4) I modified the /opt/local/etc/macports/sources.conf to have my local ports 
tree:

file:///opt/local/ports
rsync://rsync.macports.org/macports/release/tarballs/ports.tar.gz [default]

5) I ran portindex command with:

sudo portindex
Creating port index in /opt/local/ports
Adding port lang/perl5
Adding subport perl5.20
Adding subport perl5.22
Adding subport perl5.18
Adding subport perl5.16
Adding subport perl5.24
Adding subport perl5.26
Adding subport perl5.28
Adding subport perl5.30
Adding subport perl5.32
Adding subport perl5.34
Adding subport perl5.36
Adding subport perl5.38
Adding subport perl5.40

Total number of ports parsed:   14
Ports successfully parsed:      14
Ports failed:                   0
Up-to-date ports skipped:       0

6) I can verify that I now see Perl 5.40.1 with the port search command and 
port variants command:

perl5.40 @5.40.1 (lang)
    Perl 5.40.1 - Practical Extraction and Report Language

perl5_40: Use MacPorts perl5.40
     * conflicts with perl5_34 perl5_36 perl5_38

7) Finally, I attempted to install the new Perl with

sudo port -d install subport=perl5.40

DEBUG: Using normalized porturl file:///opt/local/ports
DEBUG: Opening port in directory: /opt/local/ports
DEBUG: Could not find Portfile in /opt/local/ports
    while executing
"mportopen $url"
Can't map the URL 'file://.' to a port description file ("Could not find 
Portfile in /opt/local/ports").
Please verify that the directory and portfile syntax are correct.
Error: A default port name could not be supplied.
DEBUG: Using normalized porturl file:///opt/local/ports
DEBUG: Opening port in directory: /opt/local/ports
DEBUG: Could not find Portfile in /opt/local/ports
    while executing
"mportopen $porturl $options $requested_variations"
Error: Unable to open port : Could not find Portfile in /opt/local/ports

Can you please advise me, what did I miss? Thank you for your help and have a 
great day ahead!

—
Best wishes,
Maxim

Maxim Abalenkov \\ maxim.abalen...@gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk

> On 10 Feb 2025, at 05:16, Joshua Root <j...@macports.org> wrote:
> 
> On 10/2/2025 08:42, Ryan Carsten Schmidt wrote:
>> On Feb 9, 2025, at 15:26, Maxim Abalenkov wrote:
>>> 
>>> sudo port -d install perl5 +perl5_40
>>> 
>>> This fails with ‘Dependency perl5.40 not found’. Obviously, I missed 
>>> something in the Portfile.
>> The portfiles is probably fine. You probably just need to run
>> sudo port -d install subport=perl5.40
> 
> The reason that perl5.40 can't be found as a dependency when installing perl5 
> +perl5_40 is that it isn't in the index yet. You can run portindex in your 
> ports tree to change that, see 
> <https://guide.macports.org/#development.local-repositories>.
> 
> A sync or selfupdate will also run portindex, but be careful with that if you 
> are editing Portfiles in a tree synced using the default rsync method, as 
> syncing will wipe out your local changes. This is why using a separate local 
> tree is recommended for anything requiring more permanence.
> 
> - Josh

Reply via email to