Bug 237982 - devel/powerpc64-gcc: Regular expression use is not suitable for targets with multiple hyphens
Summary: devel/powerpc64-gcc: Regular expression use is not suitable for targets with ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: easy, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-05-19 14:45 UTC by James Shuriff
Modified: 2019-06-03 02:29 UTC (History)
5 users (show)

See Also:
koobs: maintainer-feedback? (lwhsu)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Shuriff 2019-05-19 14:45:50 UTC
Regex for COMMENT, PLIST_SUB's TARGETARCH, TARGETARCH, and CONFIGURE_ARGS's --with-pkgversion is not suitable for targets with multiple hyphens. For example, the aarch64-none-elf-gcc port uses this as a master and the regular expressions change this to "aarch64noneelfgcc". Should be using ${PKGNAMEPREFIX:C/-$//} for the comments and pkgversion and ${PKGNAMEPREFIX:C/-.*//} for both TARGETARCH's.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-20 05:02:30 UTC
Thank you for the report James.

Bapt created these ports in ports r370506, perhaps he knows the provenance of the regular expression (if they came from somewhere else)

Looks like the other cross compiler ports are similarly affected:

devel/arm-none-eabi-gcc492 (cc ian@)
devel/riscv64-gcc (cc lwhsu@)

Might be worth sweeping at least all other compiler/cross-compiler ports, if not the whole tree for further examples of this issue and sorting them all out at once.