Bug 254424

Summary: net/nsscache: Check for py-pycurl via PYTHON_PKGNAMEPREFIX
Product: Ports & Packages Reporter: Kai Knoblich <kai>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed FIXED    
Severity: Affects Only Me CC: kbowling
Priority: --- Flags: kbowling: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 253815    
Attachments:
Description Flags
nsscache-fix-packaging-with-py38.patch kbowling: maintainer-approval+

Description Kai Knoblich freebsd_committer freebsd_triage 2021-03-20 09:04:21 UTC
Created attachment 223442 [details]
nsscache-fix-packaging-with-py38.patch

Hi Kevin,

the exp-run (PR #253815) revealed that the port net/nsscache fails in the run-depends phase with PYTHON3_DEFAULT=3.8:

> ===>   nsscache-0.41 depends on file: /usr/local/lib/python3.8/site-packages/pycurl.so - not found
> *** Error code 1

This is because since Python 3.8.7 the "pycurl.so" file got an extension added and is now named "pycurl.cpython-38.so".

Attached is a patch that fixes the above mentioned issue by checking for the presence of the py38-pycurl package instead of the actual .so file itself as it's done in many other ports.

QA:
~~~
- poudriere -> OK (12.2-RELEASE amd64 with PYTHON3_DEFAULT=3.7)
- poudriere -> OK (12.2-RELEASE amd64 with PYTHON3_DEFAULT=3.8)
Comment 1 Kevin Bowling freebsd_committer freebsd_triage 2021-03-21 02:12:18 UTC
LGTM thanks!  Will you go ahead and commit it?
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-03-21 08:47:51 UTC
A commit references this bug:

Author: kai
Date: Sun Mar 21 08:47:18 UTC 2021
New revision: 568908
URL: https://svnweb.freebsd.org/changeset/ports/568908

Log:
  net/nsscache: Adjust RUN_DEPENDS for Python 3.8.7 and onward

  * Since Python 3.8.7 (and also 3.9.2), .so files get an extension, e.g.
    ".cpython-38.so" if built with Python 3.8.

    Thus check for the presence of the package from ftp/py-pycurl instead of
    the actual .so file itself.

  PR:		254424
  Approved by:	kbowling (maintainer)

Changes:
  head/net/nsscache/Makefile
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2021-03-21 08:49:23 UTC
(In reply to Kevin Bowling from comment #1)

Sure, committed, thank you for your review and approval!