Summary: | [PATCH] Change USE_LINUX in bsd.port.mk to allow choice between linux_base ports | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Conor McDermottroe <ports> | ||||
Component: | Individual Port(s) | Assignee: | Port Management Team <portmgr> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Conor McDermottroe
2004-08-04 14:30:22 UTC
Responsible Changed From-To: freebsd-ports-bugs->portmgr over to maintainer Here is something much smaller that may fit the bill. I was wanting the same feature as in this PR to be able to use linux_base-8 for my Linux base. Instead of using /etc files I figured the existance of the Linux /bin/sh would be sufficient to determine if the Linux base was installed. Sean ------- begin cut ------- --- bsd.port.mk.orig Sun Aug 15 23:07:45 2004 +++ bsd.port.mk Sun Aug 15 23:08:47 2004 @@ -325,6 +325,8 @@ # of bsd.kde.mk. Default: not set. # # USE_LINUX - Set to yes to say the port needs emulators/linux_base. +# Set to suffix of linux_base to specify alternate bases. +# For example, USE_LINUX=8 -> emulators/linux_base-8 # Default: not set. # USE_LINUX_PREFIX - controls the action of PREFIX (see above). # @@ -1386,7 +1388,11 @@ .endif .if defined(USE_LINUX) -RUN_DEPENDS+= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base +. if exists(${PORTSDIR}/emulators/linux_base-${USE_LINUX}) +RUN_DEPENDS+= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base-${USE_LINUX} +. else +RUN_DEPENDS+= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base +. endif .endif .if defined(USE_MOTIF) ------- end cut ------- Although my previous patch works for any port using USE_LINUX=[base], dependent ports would not pick up the desired base. For example, cd /usr/ports/multimedia/linux-xmovie; make USE_LINUX=8 all-depends-list cd /usr/ports/multimedia/mplayer; make all-depends-list linux-xmovie would have linux_base-8 as a dependency while mplayer would have linux_base. If linux-xmovie had not been installed both would be using linux_base. It is better to define a new variable (LINUX_VERSION or LINUX_BASE_VERSION) to allow someone to build all Linux-dependent ports off of a desired base. I have attached such a patch. Sean ------ begin cut ------ --- bsd.port.mk.orig Mon Aug 16 06:35:36 2004 +++ bsd.port.mk Mon Aug 16 06:33:55 2004 @@ -325,6 +325,8 @@ # of bsd.kde.mk. Default: not set. # # USE_LINUX - Set to yes to say the port needs emulators/linux_base. +# Set to suffix of linux_base to specify alternate bases. +# For example, USE_LINUX=8 -> emulators/linux_base-8 # Default: not set. # USE_LINUX_PREFIX - controls the action of PREFIX (see above). # @@ -1386,7 +1388,11 @@ .endif .if defined(USE_LINUX) -RUN_DEPENDS+= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base +. if defined(LINUX_VERSION) && exists(${PORTSDIR}/emulators/linux_base-${LINUX_VERSION}) +RUN_DEPENDS+= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base-${LINUX_VERSION} +. else +RUN_DEPENDS+= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base +. endif .endif .if defined(USE_MOTIF) ------ end cut ------ AFAIK, my patch handled this as well. As far as I can see, the only difference between your patch and mine now is that mine allows you to install a non-standard linux base and the ports system will automatically use that base from then on (unless the port or the user says otherwise). I think your patch requires you or the port to explicitly declare which base to use. I could have misread the patch though. If it is as I think, then if you install a non-standard linux_base and then portupgrade a port that says USE_LINUX=yes then you'll get the old behaviour of the ports system trying to install the standard linux_base: # No linux ports installed portinstall linux_base-debian portinstall acroread # With your patch, this will try to install linux_base # With my patch, it'll point acroread at linux_base-debian Regards -Conor Hi, This patch is now stale due to there being more linux_base ports available. I'll provide an updated patch if people think the idea behind it is a good idea. Anyone have any feedback for me? -C State Changed From-To: open->closed Thanks for your patch. I've committed something similar, which superseedes your patch. Your PR was some kind of inspiration. |