Changeset View
Standalone View
x11/nvidia-hybrid-graphics/Makefile
- This file was added.
# Created by: Theron Tarigo <theron.tarigo@gmail.com> | |||||
PORTNAME= nvidia-hybrid-graphics | |||||
PORTVERSION= 0.5 | |||||
CATEGORIES= x11 | |||||
MASTER_SITES= # none | |||||
DISTFILES= # none | |||||
MAINTAINER= theron.tarigo@gmail.com | |||||
COMMENT= NVIDIA secondary GPU configuration - Optimus Technology support | |||||
monwarez_mailoo.org: here (and in headless-utils) having a run depend on nvidia-headless-driver will force the… | |||||
Done Inline ActionsThanks. Is using FLAVORS for such small variations (that need to be packaged) no longer controversial? If I understand https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/flavors-using.html correctly, this is an intended use (the flavor would be "390" or "legacy") This seems preferable to either creating more slave port directories or removing the dependency, which would allow installation of a useless hybrid-graphics package and foreseeably cause user frustration (despite a warning in pkg-message). theron.tarigo_gmail.com: Thanks. Is using FLAVORS for such small variations (that need to be packaged) no longer… | |||||
LICENSE= BSD2CLAUSE | |||||
Done Inline ActionsI'm a bit obscured by RUN_DEPENDS= nvidia-headless-utils and using nvidia-headless-utils as MASTERDIR at the same time. Why is this port a slave at all? arrowd: I'm a bit obscured by `RUN_DEPENDS= nvidia-headless-utils` and using `nvidia-headless-utils` as… | |||||
Done Inline ActionsI had the two separate ports for two different use-cases:
I thought for the headless case, dependency on a particular nvidia driver version and VirtualGL are extraneous. The hybrid case is a strict superset of what is needed for headless. It's still a slave port since there is only one github repository for all this. theron.tarigo_gmail.com: I had the two separate ports for two different use-cases:
- Headless graphics. Only the bare… | |||||
Done Inline Actions
I think, yes. arrowd: > Probably I should abandon "headless-utils" and just make it an option of hybrid-graphics… | |||||
RUN_DEPENDS= nvidia-xconfig:x11/nvidia-xconfig \ | |||||
${LOCALBASE}/bin/Xorg:x11-servers/xorg-server | |||||
FLAVORS= default 390 | |||||
NO_ARCH= yes | |||||
NO_BUILD= yes | |||||
WRKSRC= ${WRKDIR}/src | |||||
default_RUN_DEPENDS= \ | |||||
nvidia-secondary-driver>=440.64:x11/nvidia-secondary-driver | |||||
390_RUN_DEPENDS= \ | |||||
nvidia-secondary-driver-390>=390.87:x11/nvidia-secondary-driver-390 | |||||
VIRTUALGL_RUN_DEPENDS= ${LOCALBASE}/VirtualGL/bin/vglrun:x11/virtualgl | |||||
390_PKGNAMESUFFIX= -390 | |||||
OPTIONS_DEFINE= VIRTUALGL OPTIRUN | |||||
OPTIONS_DEFAULT= VIRTUALGL OPTIRUN | |||||
OPTIONS_SUB= OPTIRUN | |||||
VIRTUALGL_DESC= Use VirtualGL for OpenGL redirection support | |||||
OPTIRUN_DESC= Install "optirun" alias for nvrun-vgl | |||||
.include <bsd.port.options.mk> | |||||
.if ${PORT_OPTIONS:MOPTIRUN} && !${PORT_OPTIONS:MVIRTUALGL} | |||||
IGNORE=VirtualGL option required for Optirun | |||||
.endif | |||||
matUnsubmitted Done Inline ActionsYou should be using x_IMPLIES instead: 5.13.3.7. OPT_IMPLIES mat: You should be using x_IMPLIES instead: [[https://docs.freebsd.org/en/books/porters… | |||||
scripts= \ | |||||
bin/Xorg-nvidia-headless \ | |||||
bin/nvidia-headless-xconfig \ | |||||
bin/nvrun \ | |||||
bin/nvrun-vgl \ | |||||
libexec/nvidia-headless-utils/readconf \ | |||||
libexec/nvidia-settings-hybrid | |||||
configs= \ | |||||
etc/X11/xorg-nvidia-headless-template.conf \ | |||||
etc/nvidia-headless.conf \ | |||||
etc/nvidia-hybrid.conf \ | |||||
SUB_FILES= pkg-message ${scripts:%=src/%} ${configs:%=src/%} | |||||
SUB_LIST+= VGLRUN=${LOCALBASE}/VirtualGL/bin/vglrun | |||||
USE_RC_SUBR= nvidia_xorg | |||||
do-extract: | |||||
.for f in ${SUB_FILES} | |||||
${MKDIR} ${WRKDIR}/${f:H} | |||||
.endfor | |||||
do-install: | |||||
.for f in ${scripts} | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/${f:H} | |||||
${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/${f} | |||||
.endfor | |||||
.for f in ${configs} | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/${f:H} | |||||
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/${f}.sample | |||||
.endfor | |||||
post-install: | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg-nvidia-headless.conf.d | |||||
.if ${PORT_OPTIONS:MVIRTUALGL} | |||||
matUnsubmitted Done Inline ActionsAs VIRTUALGL is required by OPTIRUN, this is not needed. mat: As VIRTUALGL is required by OPTIRUN, this is not needed. | |||||
post-install-OPTIRUN-on: | |||||
@${RLN} ${STAGEDIR}${PREFIX}/bin/nvrun-vgl \ | |||||
${STAGEDIR}${PREFIX}/bin/optirun | |||||
.endif | |||||
.include <bsd.port.mk> |
here (and in headless-utils) having a run depend on nvidia-headless-driver will force the install of the latest nvidia driver which will prevent legacy driver user to install nvidia-hybrid-graphics.
To this I see two solutions: not depending on the nvidia driver so that user can choose the version, or having a slave port with the version like for nvidia-headless-driver