Patchwork [03/18] Add SOLIBS and SOLIBSDEV suffix for darwin

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:27 p.m.
Message ID <1350833261-8401-3-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193007/
State Under Review
Delegated to: Esben Haabendal
Headers show

Comments

Yann Diorcet - Oct. 21, 2012, 3:27 p.m.
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

Darwin uses dylib extension.
Use negative instruction for removing SOLIBS from dev package (on darwin)
---
 conf/package.conf |    4 ++++
 1 file changed, 4 insertions(+)
Esben Haabendal - Oct. 22, 2012, 6:27 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> Darwin uses dylib extension.
> Use negative instruction for removing SOLIBS from dev package (on
> darwin)

Although not 100.0% backwards compatible, I tend to accept this into
OE-lite/core 3.

Any recipes with non-standard library filenaming or packaging could have
added files to FILES_${PN}-dev that matches the new '!' globs, and will
suddenly have these files not included in the -dev package as without
this change.

Looking through OE-lite/base, I haven't found any recipes that looks
like this, and I believe it is likely that we won't see any fallouts at
all.

So let's take it in now, but keep an eye out for such problems.

/Esben 

> ---
>  conf/package.conf |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/conf/package.conf b/conf/package.conf
> index d4e53d7..b513086 100644
> --- a/conf/package.conf
> +++ b/conf/package.conf
> @@ -15,8 +15,10 @@ HOMEPAGE	= "unknown"
>  
>  SOLIBS				= ".so.*"
>  SOLIBS:HOST_OS_mingw32		= "-*.dll"
> +SOLIBS:HOST_OS_darwin           = ".*.dylib"
>  SOLIBSDEV			= ".so"
>  SOLIBSDEV:HOST_OS_mingw32	= ".dll.a"
> +SOLIBSDEV:HOST_OS_darwin        = ".dylib"
>  
>  PACKAGES	= "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-locale ${PN}"
>  
> @@ -43,6 +45,7 @@ ${base_libdir}/*.a
>  ${base_libdir}/*.la
>  ${base_libdir}/*.o
>  ${base_sharedlibdir}/lib*${SOLIBSDEV}
> +!${base_sharedlibdir}/lib*${SOLIBS}
>  ${datadir}/aclocal
>  ${datadir}/pkgconfig
>  ${includedir}
> @@ -51,6 +54,7 @@ ${libdir}/*.la
>  ${libdir}/*.o
>  ${libdir}/*/include
>  ${sharedlibdir}/lib*${SOLIBSDEV}
> +!${sharedlibdir}/lib*${SOLIBS}
>  ${libdir}/pkgconfig
>  ${FILES_DEV_MINGW}
>  """
Yann Diorcet - Oct. 22, 2012, 6:39 p.m.
Le 22/10/2012 20:37, Diorcet Yann a écrit :
> Le 22/10/2012 20:27, Esben Haabendal a écrit :
>> Yann Diorcet <diorcet.yann@gmail.com> writes:
>>
>>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>>
>>> Darwin uses dylib extension.
>>> Use negative instruction for removing SOLIBS from dev package (on
>>> darwin)
>> Although not 100.0% backwards compatible, I tend to accept this into
>> OE-lite/core 3.
>>
>> Any recipes with non-standard library filenaming or packaging could have
>> added files to FILES_${PN}-dev that matches the new '!' globs, and will
>> suddenly have these files not included in the -dev package as without
>> this change.
>>
>> Looking through OE-lite/base, I haven't found any recipes that looks
>> like this, and I believe it is likely that we won't see any fallouts at
>> all.
> Indeed the correct behaviour is to put no-dev library out of dev 
> package.  Maybe exceptions ...
> I have done a quick fix maybe there is a better and proper way to do 
> that. Because if i want force this kind of library in dev, i can't.
> Maybe only remove previous instruction.
> For example if i have in package.conf:
>
> !${base_sharedlibdir}/lib*${SOLIBS}
>
>
> and in my package.oe
>
> ${base_sharedlibdir}/lib*${SOLIBS}
>
>
> It will not work with this fix.
>
> But it will introduce an order in the instructions...
Oups i forget something
If we can allow ordering we can change the function in order to allow 
the previous example.
>
>
>> So let's take it in now, but keep an eye out for such problems.
>>
>> /Esben
>>
>>> ---
>>>   conf/package.conf |    4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/conf/package.conf b/conf/package.conf
>>> index d4e53d7..b513086 100644
>>> --- a/conf/package.conf
>>> +++ b/conf/package.conf
>>> @@ -15,8 +15,10 @@ HOMEPAGE    = "unknown"
>>>     SOLIBS                = ".so.*"
>>>   SOLIBS:HOST_OS_mingw32        = "-*.dll"
>>> +SOLIBS:HOST_OS_darwin           = ".*.dylib"
>>>   SOLIBSDEV            = ".so"
>>>   SOLIBSDEV:HOST_OS_mingw32    = ".dll.a"
>>> +SOLIBSDEV:HOST_OS_darwin        = ".dylib"
>>>     PACKAGES    = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-locale ${PN}"
>>>   @@ -43,6 +45,7 @@ ${base_libdir}/*.a
>>>   ${base_libdir}/*.la
>>>   ${base_libdir}/*.o
>>>   ${base_sharedlibdir}/lib*${SOLIBSDEV}
>>> +!${base_sharedlibdir}/lib*${SOLIBS}
>>>   ${datadir}/aclocal
>>>   ${datadir}/pkgconfig
>>>   ${includedir}
>>> @@ -51,6 +54,7 @@ ${libdir}/*.la
>>>   ${libdir}/*.o
>>>   ${libdir}/*/include
>>>   ${sharedlibdir}/lib*${SOLIBSDEV}
>>> +!${sharedlibdir}/lib*${SOLIBS}
>>>   ${libdir}/pkgconfig
>>>   ${FILES_DEV_MINGW}
>>>   """
>
Esben Haabendal - Oct. 22, 2012, 9:48 p.m.
Diorcet Yann <diorcet.yann@gmail.com> writes:

> Le 22/10/2012 20:37, Diorcet Yann a écrit :
>> Le 22/10/2012 20:27, Esben Haabendal a écrit :
>>> Yann Diorcet <diorcet.yann@gmail.com> writes:
>>>
>>>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>>>
>>>> Darwin uses dylib extension.
>>>> Use negative instruction for removing SOLIBS from dev package (on
>>>> darwin)
>>> Although not 100.0% backwards compatible, I tend to accept this into
>>> OE-lite/core 3.
>>>
>>> Any recipes with non-standard library filenaming or packaging could have
>>> added files to FILES_${PN}-dev that matches the new '!' globs, and will
>>> suddenly have these files not included in the -dev package as without
>>> this change.
>>>
>>> Looking through OE-lite/base, I haven't found any recipes that looks
>>> like this, and I believe it is likely that we won't see any fallouts at
>>> all.
>> Indeed the correct behaviour is to put no-dev library out of dev package.
>> Maybe exceptions ...
>> I have done a quick fix maybe there is a better and proper way to do
>> that. Because if i want force this kind of library in dev, i can't.
>> Maybe only remove previous instruction.
>> For example if i have in package.conf:
>>
>> !${base_sharedlibdir}/lib*${SOLIBS}
>>
>>
>> and in my package.oe
>>
>> ${base_sharedlibdir}/lib*${SOLIBS}
>>
>>
>> It will not work with this fix.
>>
>> But it will introduce an order in the instructions...
> Oups i forget something
> If we can allow ordering we can change the function in order to allow the
> previous example.

Do you mean to change the '!' (exclude) rules to only remove from preceding
matching include rules?  That might work better.

/Esben
Yann Diorcet - Oct. 22, 2012, 11:09 p.m.
Le 22/10/2012 23:48, Esben Haabendal a écrit :
> Diorcet Yann <diorcet.yann@gmail.com> writes:
>
>> Le 22/10/2012 20:37, Diorcet Yann a écrit :
>>> Le 22/10/2012 20:27, Esben Haabendal a écrit :
>>>> Yann Diorcet <diorcet.yann@gmail.com> writes:
>>>>
>>>>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>>>>
>>>>> Darwin uses dylib extension.
>>>>> Use negative instruction for removing SOLIBS from dev package (on
>>>>> darwin)
>>>> Although not 100.0% backwards compatible, I tend to accept this into
>>>> OE-lite/core 3.
>>>>
>>>> Any recipes with non-standard library filenaming or packaging could have
>>>> added files to FILES_${PN}-dev that matches the new '!' globs, and will
>>>> suddenly have these files not included in the -dev package as without
>>>> this change.
>>>>
>>>> Looking through OE-lite/base, I haven't found any recipes that looks
>>>> like this, and I believe it is likely that we won't see any fallouts at
>>>> all.
>>> Indeed the correct behaviour is to put no-dev library out of dev package.
>>> Maybe exceptions ...
>>> I have done a quick fix maybe there is a better and proper way to do
>>> that. Because if i want force this kind of library in dev, i can't.
>>> Maybe only remove previous instruction.
>>> For example if i have in package.conf:
>>>
>>> !${base_sharedlibdir}/lib*${SOLIBS}
>>>
>>>
>>> and in my package.oe
>>>
>>> ${base_sharedlibdir}/lib*${SOLIBS}
>>>
>>>
>>> It will not work with this fix.
>>>
>>> But it will introduce an order in the instructions...
>> Oups i forget something
>> If we can allow ordering we can change the function in order to allow the
>> previous example.
> Do you mean to change the '!' (exclude) rules to only remove from preceding
> matching include rules?  That might work better.
Yes. I was thinking about that. I try to do so. But i shamefully use a 
simpliest solution.
PS: just pay attention that files found for the jokers are put before 
next rules
Ex:
/lib/*
!/lib/c

The old behaviour produces the following process:
/lib/*
!/lib/c
/lib/a
/lib/b
/lib/c

>
> /Esben

Patch

diff --git a/conf/package.conf b/conf/package.conf
index d4e53d7..b513086 100644
--- a/conf/package.conf
+++ b/conf/package.conf
@@ -15,8 +15,10 @@  HOMEPAGE	= "unknown"
 
 SOLIBS				= ".so.*"
 SOLIBS:HOST_OS_mingw32		= "-*.dll"
+SOLIBS:HOST_OS_darwin           = ".*.dylib"
 SOLIBSDEV			= ".so"
 SOLIBSDEV:HOST_OS_mingw32	= ".dll.a"
+SOLIBSDEV:HOST_OS_darwin        = ".dylib"
 
 PACKAGES	= "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-locale ${PN}"
 
@@ -43,6 +45,7 @@  ${base_libdir}/*.a
 ${base_libdir}/*.la
 ${base_libdir}/*.o
 ${base_sharedlibdir}/lib*${SOLIBSDEV}
+!${base_sharedlibdir}/lib*${SOLIBS}
 ${datadir}/aclocal
 ${datadir}/pkgconfig
 ${includedir}
@@ -51,6 +54,7 @@  ${libdir}/*.la
 ${libdir}/*.o
 ${libdir}/*/include
 ${sharedlibdir}/lib*${SOLIBSDEV}
+!${sharedlibdir}/lib*${SOLIBS}
 ${libdir}/pkgconfig
 ${FILES_DEV_MINGW}
 """