Determine variant of dependency
Hi all I'm writing currently a Portfile for an application which depends on port:qt4-mac. Unfortunately, that port has the variant +framework which builds the qt4 libraries as frameworks. Unfortunately this changes the whole build process for my port. Now I would have to determine the variant with which qt4-mac is installed in order to able to build my port. Is there any way I can do that with the means provided by MacPorts? Thanks for the help Michael
On Sep 27, 2007, at 10:45 AM, Michael Wild wrote:
I'm writing currently a Portfile for an application which depends on port:qt4-mac. Unfortunately, that port has the variant +framework which builds the qt4 libraries as frameworks. Unfortunately this changes the whole build process for my port. Now I would have to determine the variant with which qt4-mac is installed in order to able to build my port. Is there any way I can do that with the means provided by MacPorts?
nope, as far as I know, that functionality does not currently exist. ... of course, you don't really want to test to see which variant qt4- mac was installed with, you really want to test to see if it was built as a framework or not. You could probably (in the portfile) test to see if the qt4 framework is installed in /Library/Frameworks or not and adjust your build accordingly. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
Daniel J. Luke wrote:
On Sep 27, 2007, at 10:45 AM, Michael Wild wrote:
I'm writing currently a Portfile for an application which depends on port:qt4-mac. Unfortunately, that port has the variant +framework which builds the qt4 libraries as frameworks. Unfortunately this changes the whole build process for my port. Now I would have to determine the variant with which qt4-mac is installed in order to able to build my port. Is there any way I can do that with the means provided by MacPorts?
nope, as far as I know, that functionality does not currently exist.
... of course, you don't really want to test to see which variant qt4-mac was installed with, you really want to test to see if it was built as a framework or not.
You could probably (in the portfile) test to see if the qt4 framework is installed in /Library/Frameworks or not and adjust your build accordingly. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
Thanks for the answer. But did you really mean /Library/Frameworks? Or ${prefix}/Library/Frameworks? Currently qt4-mac installs the frameworks (probably quite unfortunately) into ${prefix}/lib. To find out which variant is installed, I'm using now "file isdirectory ${prefix}/lib/QtCore.framework" in my Portfile. Seems to work... Michael
On Sep 28, 2007, at 5:04 AM, Michael Wild wrote:
Thanks for the answer.
But did you really mean /Library/Frameworks? Or ${prefix}/Library/ Frameworks? Currently qt4-mac installs the frameworks (probably quite unfortunately) into ${prefix}/lib.
The porthier manpage says that frameworks get installed into /Library/ Frameworks/ ... I know that there had been talk in the past of installing into ${prefix}/Library/Frameworks with a symlink in / Library/Frameworks (if necessary), but I don't think it got documented as policy.
To find out which variant is installed, I'm using now "file isdirectory ${prefix}/lib/QtCore.framework" in my Portfile. Seems to work...
That's probably the way I would do it... -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
participants (2)
-
Daniel J. Luke
-
Michael Wild