Bug 204615 - bsd.port.mk: USE_LINUX as build-only dependency
Summary: bsd.port.mk: USE_LINUX as build-only dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords: needs-patch
Depends on: 211645
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-17 00:26 UTC by Jan Beich
Modified: 2016-09-05 19:30 UTC (History)
2 users (show)

See Also:
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2015-11-17 00:26:08 UTC
USE_LINUX assumes anything built by a linux toolchain targets linuxulator. In some cases a port may want to build either for native (e.g. using proprietary toolchain) or for unsupported ABI (e.g. FreeBSD<->device bridge).

To fix maybe extend the syntax to allow arguments (similar to USES) e.g.,

  USE_LINUX= yes:build
  USE_LINUX= c6_64:build

to avoid hacks like in devel/fb-adb:

  BUILD_DEPENDS=  ${LINUX_BASE_PORT}

  USE_LINUX=      yes

  .include <bsd.port.mk>

  .if defined(.PARSEDIR)
  RUN_DEPENDS:=   ${RUN_DEPENDS:N${LINUX_BASE_PORT}}
  .else
  RUN_DEPENDS:=   ${RUN_DEPENDS:N*linux_base*}
  .endif
Comment 1 Chris Hutchinson 2015-11-19 04:18:16 UTC
Am I allowed to add a +1 here?
If so, consider this my vote to add this feature.

Thanks, Jan!
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-19 12:51:49 UTC
(In reply to Chris Hutchinson from comment #1)

Don't ask for permission when it comes to communication :) Feedback is important, and we don't have the 'vote' feature turned on. Ideally, the feedback is more than just a "+1", but also explains/confirms/reiterates the value/benefit to you :)
Comment 3 Jan Beich freebsd_committer 2016-07-23 13:42:30 UTC
CC'ing tijl as he works on USES=linux and may (or not) want to tackle :build argument similar to USES=python:build.
Comment 4 Tijl Coosemans freebsd_committer 2016-08-09 14:59:39 UTC
Can you check that the changes made to devel/fb-adb in bug 211645 are correct?
Comment 5 Tijl Coosemans freebsd_committer 2016-09-05 19:30:03 UTC
Fixed in ports r421387.