[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-ports
Subject: patch to bsd.port.mk to fix minor problem with USE_MOTIF
From: Andrew Dalgleish <openbsd () andrewdalgleish ! dyndns ! org>
Date: 2003-02-27 6:51:27
[Download RAW message or body]
While tinkering with PSEUDO_FLAVORS for wxWindows, I've run into a
few minor quirks with USE_MOTIF.
If a port adds a 'USE_MOTIF=' line which is not inside any .if
blocks, the port gets a LIB_DEPENDS even if motif/lesstif is not
used.
To get around this a few ports add something like
.if ${FLAVOR:L:Mmotif}
USE_MOTIF=any
.endif
This fixes the LIB_DEPENDS for non-motif flavors, but makes another
problem.
'make show VARNAME=FLAVORS' does not list lesstif,
unless the default (or current) FLAVOR is motif.
Example:
cd /usr/ports/audio/timidity/
make show VARNAME=FLAVORS
# (the default is motif, so it works)
cd /usr/ports/russian/xruskb/
make show VARNAME=FLAVORS
env FLAVOR=motif make show VARNAME=FLAVORS
To get around this you could manually add lesstif to FLAVORS, but
this causes another problem.
If you add lesstif to either FLAVORS or PSEUDO_FLAVORS and you use
'USE_MOTIF=any', bsd.port.mk appends lesstif to FLAVORS again which
creates package name problems.
Example (the only one in ports now, but I'm trying something similar):
cd /usr/ports/editors/emacs21
env FLAVOR=lesstif make -n package | grep 'touch.*tgz'
Note the package name is 'emacs21-lesstif-lesstif.tgz'
A patch to fix this problem is:
<<<
--- bsd.port.mk.orig Sun Feb 16 02:24:04 2003
+++ bsd.port.mk Thu Feb 27 17:02:04 2003
@@ -388,7 +388,9 @@
. elif ${USE_MOTIF:L} == "openmotif"
LIB_DEPENDS+= Xm.2::x11/openmotif
. elif ${USE_MOTIF:L} == "any" || ${USE_MOTIF:L} == "yes"
+. if !${FLAVORS:L:Mlesstif}
FLAVORS+=lesstif
+. endif
. if ${FLAVOR:L:Mlesstif} && ${FLAVOR:L:Mmotif}
ERRORS+="Fatal: choose motif or lesstif, not both."
. endif
<<<
Regards,
Andrew Dalgleish
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic