All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slang 2.2.4: fix the pcre existence checking
@ 2012-07-25  8:07 rongqing.li
  2012-07-25 21:58 ` Saul Wold
  2012-07-26 20:08 ` Saul Wold
  0 siblings, 2 replies; 5+ messages in thread
From: rongqing.li @ 2012-07-25  8:07 UTC (permalink / raw)
  To: openembedded-core

From: Roy.Li <rongqing.li@windriver.com>

[YOCTO #2820]

when check if there is pcre, the configure file always check
the host dir. now we make it work by adding correct prefix for
cross-compile environment.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 .../slang/slang/fix-check-pcre.patch               |  108 ++++++++++++++++++++
 meta/recipes-extended/slang/slang_2.2.4.bb         |    3 +-
 2 files changed, 110 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/slang/slang/fix-check-pcre.patch

diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
new file mode 100644
index 0000000..0c1553a
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
@@ -0,0 +1,108 @@
+fix the pcre existence checking
+
+when check if there is pcre, the configure file always check
+the host dir. now we make it work by adding correct prefix for
+cross-compile environment.
+
+When enable pcre-module, we see a QA warning because rpaths
+hardcoded into the build, rpaths are not needed, so lets turn
+this off.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure |   60 ++++++------------------------------------------------------
+ 1 files changed, 6 insertions(+), 54 deletions(-)
+
+diff --git a/configure b/configure
+index f1586c3..d22814f 100755
+--- a/configure
++++ b/configure
+@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+ 	 /usr/include/pcre,/usr/lib \
+ 	 /usr/pcre/include,/usr/pcre/lib \
+ 	 /usr/include,/usr/lib \
++	 /usr/include,/usr/lib64 \
+ 	 /opt/include/pcre,/opt/lib \
+ 	 /opt/pcre/include,/opt/pcre/lib \
+ 	 /opt/include,/opt/lib"
+@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
+ 	xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
+ 	found=0
+-	if test -r $xincdir/$xincfile
++	if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
+ 	then
+ 	  for E in $exts
+ 	  do
+-	    if test -r "$xlibdir/$xlibfile.$E"
++	    if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
+ 	    then
+-	      jd_pcre_include_dir="$xincdir"
+-	      jd_pcre_library_dir="$xlibdir"
++	      jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
++	      jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
+ 	      jd_with_pcre_library="yes"
+ 	      found=1
+ 	      break
+@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
+     then
+       PCRE_LIB=""
+     else
+-
+-if test "X$jd_pcre_library_dir" != "X"
+-then
+-  if test "X$RPATH" = "X"
+-  then
+-
+-case "$host_os" in
+-  *linux*|*solaris* )
+-    if test "X$GCC" = Xyes
+-    then
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-Wl,-R,"
+-      else
+-        RPATH="-Wl,-R"
+-      fi
+-    else
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-R "
+-      else
+-	RPATH="-R"
+-      fi
+-    fi
+-  ;;
+-  *osf*|*openbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-rpath,"
+-    else
+-      RPATH="-rpath "
+-    fi
+-  ;;
+-  *netbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-R"
+-    fi
+-  ;;
+-esac
+-
+-    if test "X$RPATH" != "X"
+-    then
+-      RPATH="$RPATH$jd_pcre_library_dir"
+-    fi
+-  else
+-    RPATH="$RPATH:$jd_pcre_library_dir"
+-  fi
+-fi
+-
++      RPATH=""
+     fi
+ 
+     PCRE_INC=-I$jd_pcre_include_dir
+-- 
+1.7.4.1
+
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
index 72dd99f..7082611 100644
--- a/meta/recipes-extended/slang/slang_2.2.4.bb
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -10,7 +10,7 @@ to recode S-Lang procedures in C if you need to."
 HOMEPAGE = "http://www.jedsoft.org/slang/"
 SECTION = "libs"
 DEPENDS = "pcre"
-PR = "r9"
+PR = "r10"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
@@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
 
 SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
            file://rpathfix.patch \
+           file://fix-check-pcre.patch \
           "
 SRC_URI_append_arm = " file://change-char-type-to-signed-char-in-macros.patch"
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] slang 2.2.4: fix the pcre existence checking
  2012-07-25  8:07 [PATCH] slang 2.2.4: fix the pcre existence checking rongqing.li
@ 2012-07-25 21:58 ` Saul Wold
  2012-07-25 22:02   ` Saul Wold
  2012-07-26 20:08 ` Saul Wold
  1 sibling, 1 reply; 5+ messages in thread
From: Saul Wold @ 2012-07-25 21:58 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 07/25/2012 01:07 AM, rongqing.li@windriver.com wrote:
> From: Roy.Li <rongqing.li@windriver.com>
>
> [YOCTO #2820]
>
> when check if there is pcre, the configure file always check
> the host dir. now we make it work by adding correct prefix for
> cross-compile environment.
>
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
>   .../slang/slang/fix-check-pcre.patch               |  108 ++++++++++++++++++++
>   meta/recipes-extended/slang/slang_2.2.4.bb         |    3 +-
>   2 files changed, 110 insertions(+), 1 deletions(-)
>   create mode 100644 meta/recipes-extended/slang/slang/fix-check-pcre.patch
>
> diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
> new file mode 100644
> index 0000000..0c1553a
> --- /dev/null
> +++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
> @@ -0,0 +1,108 @@
> +fix the pcre existence checking
> +
> +when check if there is pcre, the configure file always check
> +the host dir. now we make it work by adding correct prefix for
> +cross-compile environment.
> +
> +When enable pcre-module, we see a QA warning because rpaths
> +hardcoded into the build, rpaths are not needed, so lets turn
> +this off.
> +
> +Upstream-Status: Inappropriate
> +Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> +---
> + configure |   60 ++++++------------------------------------------------------
> + 1 files changed, 6 insertions(+), 54 deletions(-)
> +
> +diff --git a/configure b/configure

Patching configure here will not work since this is an autotools based 
recipe configure is generated from configure.ac, you need to look into 
how to modify configure.ac.

Also are you that the xincdir and xlibdir are not able to be set to a 
sysroot dir earlier on in the configure process?

Why remove all that host code?

This might be an appropriate patch to upstream for better 
cross-compiling support, please fix the patch correctly.

Thanks
	Sau!


> +index f1586c3..d22814f 100755
> +--- a/configure
> ++++ b/configure
> +@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
> + 	 /usr/include/pcre,/usr/lib \
> + 	 /usr/pcre/include,/usr/pcre/lib \
> + 	 /usr/include,/usr/lib \
> ++	 /usr/include,/usr/lib64 \
> + 	 /opt/include/pcre,/opt/lib \
> + 	 /opt/pcre/include,/opt/pcre/lib \
> + 	 /opt/include,/opt/lib"
> +@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
> +         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
> + 	xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
> + 	found=0
> +-	if test -r $xincdir/$xincfile
> ++	if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
> + 	then
> + 	  for E in $exts
> + 	  do
> +-	    if test -r "$xlibdir/$xlibfile.$E"
> ++	    if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
> + 	    then
> +-	      jd_pcre_include_dir="$xincdir"
> +-	      jd_pcre_library_dir="$xlibdir"
> ++	      jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
> ++	      jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
> + 	      jd_with_pcre_library="yes"
> + 	      found=1
> + 	      break
> +@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
> +     then
> +       PCRE_LIB=""
> +     else
> +-
> +-if test "X$jd_pcre_library_dir" != "X"
> +-then
> +-  if test "X$RPATH" = "X"
> +-  then
> +-
> +-case "$host_os" in
> +-  *linux*|*solaris* )
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      if test "X$ac_R_nospace" = "Xno"
> +-      then
> +-        RPATH="-Wl,-R,"
> +-      else
> +-        RPATH="-Wl,-R"
> +-      fi
> +-    else
> +-      if test "X$ac_R_nospace" = "Xno"
> +-      then
> +-        RPATH="-R "
> +-      else
> +-	RPATH="-R"
> +-      fi
> +-    fi
> +-  ;;
> +-  *osf*|*openbsd*)
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      RPATH="-Wl,-rpath,"
> +-    else
> +-      RPATH="-rpath "
> +-    fi
> +-  ;;
> +-  *netbsd*)
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      RPATH="-Wl,-R"
> +-    fi
> +-  ;;
> +-esac
> +-
> +-    if test "X$RPATH" != "X"
> +-    then
> +-      RPATH="$RPATH$jd_pcre_library_dir"
> +-    fi
> +-  else
> +-    RPATH="$RPATH:$jd_pcre_library_dir"
> +-  fi
> +-fi
> +-
> ++      RPATH=""
> +     fi
> +
> +     PCRE_INC=-I$jd_pcre_include_dir
> +--
> +1.7.4.1
> +
> diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
> index 72dd99f..7082611 100644
> --- a/meta/recipes-extended/slang/slang_2.2.4.bb
> +++ b/meta/recipes-extended/slang/slang_2.2.4.bb
> @@ -10,7 +10,7 @@ to recode S-Lang procedures in C if you need to."
>   HOMEPAGE = "http://www.jedsoft.org/slang/"
>   SECTION = "libs"
>   DEPENDS = "pcre"
> -PR = "r9"
> +PR = "r10"
>
>   LICENSE = "GPLv2"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
> @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>
>   SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
>              file://rpathfix.patch \
> +           file://fix-check-pcre.patch \
>             "
>   SRC_URI_append_arm = " file://change-char-type-to-signed-char-in-macros.patch"
>
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slang 2.2.4: fix the pcre existence checking
  2012-07-25 21:58 ` Saul Wold
@ 2012-07-25 22:02   ` Saul Wold
  2012-07-26  3:16     ` Rongqing Li
  0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2012-07-25 22:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 07/25/2012 02:58 PM, Saul Wold wrote:
> On 07/25/2012 01:07 AM, rongqing.li@windriver.com wrote:
>> From: Roy.Li <rongqing.li@windriver.com>
>>
>> [YOCTO #2820]
>>
>> when check if there is pcre, the configure file always check
>> the host dir. now we make it work by adding correct prefix for
>> cross-compile environment.
>>
>> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>> ---
>>   .../slang/slang/fix-check-pcre.patch               |  108
>> ++++++++++++++++++++
>>   meta/recipes-extended/slang/slang_2.2.4.bb         |    3 +-
>>   2 files changed, 110 insertions(+), 1 deletions(-)
>>   create mode 100644
>> meta/recipes-extended/slang/slang/fix-check-pcre.patch
>>
>> diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>> b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>> new file mode 100644
>> index 0000000..0c1553a
>> --- /dev/null
>> +++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>> @@ -0,0 +1,108 @@
>> +fix the pcre existence checking
>> +
>> +when check if there is pcre, the configure file always check
>> +the host dir. now we make it work by adding correct prefix for
>> +cross-compile environment.
>> +
>> +When enable pcre-module, we see a QA warning because rpaths
>> +hardcoded into the build, rpaths are not needed, so lets turn
>> +this off.
>> +
>> +Upstream-Status: Inappropriate
>> +Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>> +---
>> + configure |   60
>> ++++++------------------------------------------------------
>> + 1 files changed, 6 insertions(+), 54 deletions(-)
>> +
>> +diff --git a/configure b/configure
>
> Patching configure here will not work since this is an autotools based
> recipe configure is generated from configure.ac, you need to look into
> how to modify configure.ac.
>
^^^^ Ignore this comment! ^^^^^ (I was confused and looked at libpcre, 
not slang)!

> Also are you that the xincdir and xlibdir are not able to be set to a
> sysroot dir earlier on in the configure process?
>
> Why remove all that host code?
>
> This might be an appropriate patch to upstream for better
> cross-compiling support, please fix the patch correctly.
>
The above comments are still valid

> Thanks
>      Sau!
>
>
>> +index f1586c3..d22814f 100755
>> +--- a/configure
>> ++++ b/configure
>> +@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and
>> header files ... " >&6; }
>> +      /usr/include/pcre,/usr/lib \
>> +      /usr/pcre/include,/usr/pcre/lib \
>> +      /usr/include,/usr/lib \
>> ++     /usr/include,/usr/lib64 \
>> +      /opt/include/pcre,/opt/lib \
>> +      /opt/pcre/include,/opt/pcre/lib \
>> +      /opt/include,/opt/lib"
>> +@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and
>> header files ... " >&6; }
>> +         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
>> +     xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
>> +     found=0
>> +-    if test -r $xincdir/$xincfile
>> ++    if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
>> +     then
>> +       for E in $exts
>> +       do
>> +-        if test -r "$xlibdir/$xlibfile.$E"
>> ++        if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
>> +         then
>> +-          jd_pcre_include_dir="$xincdir"
>> +-          jd_pcre_library_dir="$xlibdir"
>> ++          jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
>> ++          jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
>> +           jd_with_pcre_library="yes"
>> +           found=1
>> +           break
>> +@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and
>> $jd_pcre_include_dir" >&6; }
>> +     then
>> +       PCRE_LIB=""
>> +     else
>> +-
>> +-if test "X$jd_pcre_library_dir" != "X"
>> +-then
>> +-  if test "X$RPATH" = "X"
>> +-  then
>> +-
>> +-case "$host_os" in
>> +-  *linux*|*solaris* )
>> +-    if test "X$GCC" = Xyes
>> +-    then
>> +-      if test "X$ac_R_nospace" = "Xno"
>> +-      then
>> +-        RPATH="-Wl,-R,"
>> +-      else
>> +-        RPATH="-Wl,-R"
>> +-      fi
>> +-    else
>> +-      if test "X$ac_R_nospace" = "Xno"
>> +-      then
>> +-        RPATH="-R "
>> +-      else
>> +-    RPATH="-R"
>> +-      fi
>> +-    fi
>> +-  ;;
>> +-  *osf*|*openbsd*)
>> +-    if test "X$GCC" = Xyes
>> +-    then
>> +-      RPATH="-Wl,-rpath,"
>> +-    else
>> +-      RPATH="-rpath "
>> +-    fi
>> +-  ;;
>> +-  *netbsd*)
>> +-    if test "X$GCC" = Xyes
>> +-    then
>> +-      RPATH="-Wl,-R"
>> +-    fi
>> +-  ;;
>> +-esac
>> +-
>> +-    if test "X$RPATH" != "X"
>> +-    then
>> +-      RPATH="$RPATH$jd_pcre_library_dir"
>> +-    fi
>> +-  else
>> +-    RPATH="$RPATH:$jd_pcre_library_dir"
>> +-  fi
>> +-fi
>> +-
>> ++      RPATH=""
>> +     fi
>> +
>> +     PCRE_INC=-I$jd_pcre_include_dir
>> +--
>> +1.7.4.1
>> +
>> diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb
>> b/meta/recipes-extended/slang/slang_2.2.4.bb
>> index 72dd99f..7082611 100644
>> --- a/meta/recipes-extended/slang/slang_2.2.4.bb
>> +++ b/meta/recipes-extended/slang/slang_2.2.4.bb
>> @@ -10,7 +10,7 @@ to recode S-Lang procedures in C if you need to."
>>   HOMEPAGE = "http://www.jedsoft.org/slang/"
>>   SECTION = "libs"
>>   DEPENDS = "pcre"
>> -PR = "r9"
>> +PR = "r10"
>>
>>   LICENSE = "GPLv2"
>>   LIC_FILES_CHKSUM =
>> "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>> @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM =
>> "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>>
>>   SRC_URI =
>> "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
>>              file://rpathfix.patch \
>> +           file://fix-check-pcre.patch \
>>             "
>>   SRC_URI_append_arm = "
>> file://change-char-type-to-signed-char-in-macros.patch"
>>
>>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slang 2.2.4: fix the pcre existence checking
  2012-07-25 22:02   ` Saul Wold
@ 2012-07-26  3:16     ` Rongqing Li
  0 siblings, 0 replies; 5+ messages in thread
From: Rongqing Li @ 2012-07-26  3:16 UTC (permalink / raw)
  To: Saul Wold; +Cc: Patches and discussions about the oe-core layer



On 2012年07月26日 06:02, Saul Wold wrote:
> On 07/25/2012 02:58 PM, Saul Wold wrote:
>> On 07/25/2012 01:07 AM, rongqing.li@windriver.com wrote:
>>> From: Roy.Li <rongqing.li@windriver.com>
>>>
>>> [YOCTO #2820]
>>>
>>> when check if there is pcre, the configure file always check
>>> the host dir. now we make it work by adding correct prefix for
>>> cross-compile environment.
>>>
>>> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>>> ---
>>>   .../slang/slang/fix-check-pcre.patch               |  108
>>> ++++++++++++++++++++
>>>   meta/recipes-extended/slang/slang_2.2.4.bb         |    3 +-
>>>   2 files changed, 110 insertions(+), 1 deletions(-)
>>>   create mode 100644
>>> meta/recipes-extended/slang/slang/fix-check-pcre.patch
>>>
>>> diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>>> b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>>> new file mode 100644
>>> index 0000000..0c1553a
>>> --- /dev/null
>>> +++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
>>> @@ -0,0 +1,108 @@
>>> +fix the pcre existence checking
>>> +
>>> +when check if there is pcre, the configure file always check
>>> +the host dir. now we make it work by adding correct prefix for
>>> +cross-compile environment.
>>> +
>>> +When enable pcre-module, we see a QA warning because rpaths
>>> +hardcoded into the build, rpaths are not needed, so lets turn
>>> +this off.
>>> +
>>> +Upstream-Status: Inappropriate
>>> +Signed-off-by: Roy.Li <rongqing.li@windriver.com>
>>> +---
>>> + configure |   60
>>> ++++++------------------------------------------------------
>>> + 1 files changed, 6 insertions(+), 54 deletions(-)
>>> +
>>> +diff --git a/configure b/configure
>>
>> Patching configure here will not work since this is an autotools based
>> recipe configure is generated from configure.ac, you need to look into
>> how to modify configure.ac.
>>
> ^^^^ Ignore this comment! ^^^^^ (I was confused and looked at libpcre,
> not slang)!
>
>> Also are you that the xincdir and xlibdir are not able to be set to a
>> sysroot dir earlier on in the configure process?
>>

Yes.


>> Why remove all that host code?
>>

the host code is trying to defect which parameter should be used for 
link -rpath
based on host type, in fact, it can not defect our build image type.

use rpath will produce a QA warning in some condition.

This part fix is same as the patch:

meta/recipes-extended/slang/slang/rpathfix.patch


-Roy

>> This might be an appropriate patch to upstream for better
>> cross-compiling support, please fix the patch correctly.
>>
> The above comments are still valid
>
>> Thanks
>>      Sau!
>>
>>
>>> +index f1586c3..d22814f 100755
>>> +--- a/configure
>>> ++++ b/configure
>>> +@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and
>>> header files ... " >&6; }
>>> +      /usr/include/pcre,/usr/lib \
>>> +      /usr/pcre/include,/usr/pcre/lib \
>>> +      /usr/include,/usr/lib \
>>> ++     /usr/include,/usr/lib64 \
>>> +      /opt/include/pcre,/opt/lib \
>>> +      /opt/pcre/include,/opt/pcre/lib \
>>> +      /opt/include,/opt/lib"
>>> +@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and
>>> header files ... " >&6; }
>>> +         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print
>>> $1}'`
>>> +     xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
>>> +     found=0
>>> +-    if test -r $xincdir/$xincfile
>>> ++    if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
>>> +     then
>>> +       for E in $exts
>>> +       do
>>> +-        if test -r "$xlibdir/$xlibfile.$E"
>>> ++        if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
>>> +         then
>>> +-          jd_pcre_include_dir="$xincdir"
>>> +-          jd_pcre_library_dir="$xlibdir"
>>> ++          jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
>>> ++          jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
>>> +           jd_with_pcre_library="yes"
>>> +           found=1
>>> +           break
>>> +@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and
>>> $jd_pcre_include_dir" >&6; }
>>> +     then
>>> +       PCRE_LIB=""
>>> +     else
>>> +-
>>> +-if test "X$jd_pcre_library_dir" != "X"
>>> +-then
>>> +-  if test "X$RPATH" = "X"
>>> +-  then
>>> +-
>>> +-case "$host_os" in
>>> +-  *linux*|*solaris* )
>>> +-    if test "X$GCC" = Xyes
>>> +-    then
>>> +-      if test "X$ac_R_nospace" = "Xno"
>>> +-      then
>>> +-        RPATH="-Wl,-R,"
>>> +-      else
>>> +-        RPATH="-Wl,-R"
>>> +-      fi
>>> +-    else
>>> +-      if test "X$ac_R_nospace" = "Xno"
>>> +-      then
>>> +-        RPATH="-R "
>>> +-      else
>>> +-    RPATH="-R"
>>> +-      fi
>>> +-    fi
>>> +-  ;;
>>> +-  *osf*|*openbsd*)
>>> +-    if test "X$GCC" = Xyes
>>> +-    then
>>> +-      RPATH="-Wl,-rpath,"
>>> +-    else
>>> +-      RPATH="-rpath "
>>> +-    fi
>>> +-  ;;
>>> +-  *netbsd*)
>>> +-    if test "X$GCC" = Xyes
>>> +-    then
>>> +-      RPATH="-Wl,-R"
>>> +-    fi
>>> +-  ;;
>>> +-esac
>>> +-
>>> +-    if test "X$RPATH" != "X"
>>> +-    then
>>> +-      RPATH="$RPATH$jd_pcre_library_dir"
>>> +-    fi
>>> +-  else
>>> +-    RPATH="$RPATH:$jd_pcre_library_dir"
>>> +-  fi
>>> +-fi
>>> +-
>>> ++      RPATH=""
>>> +     fi
>>> +
>>> +     PCRE_INC=-I$jd_pcre_include_dir
>>> +--
>>> +1.7.4.1
>>> +
>>> diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb
>>> b/meta/recipes-extended/slang/slang_2.2.4.bb
>>> index 72dd99f..7082611 100644
>>> --- a/meta/recipes-extended/slang/slang_2.2.4.bb
>>> +++ b/meta/recipes-extended/slang/slang_2.2.4.bb
>>> @@ -10,7 +10,7 @@ to recode S-Lang procedures in C if you need to."
>>>   HOMEPAGE = "http://www.jedsoft.org/slang/"
>>>   SECTION = "libs"
>>>   DEPENDS = "pcre"
>>> -PR = "r9"
>>> +PR = "r10"
>>>
>>>   LICENSE = "GPLv2"
>>>   LIC_FILES_CHKSUM =
>>> "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>>> @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM =
>>> "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>>>
>>>   SRC_URI =
>>> "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
>>>              file://rpathfix.patch \
>>> +           file://fix-check-pcre.patch \
>>>             "
>>>   SRC_URI_append_arm = "
>>> file://change-char-type-to-signed-char-in-macros.patch"
>>>
>>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>>
>
>
>

-- 
Best Reagrds,
Roy | RongQing Li





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slang 2.2.4: fix the pcre existence checking
  2012-07-25  8:07 [PATCH] slang 2.2.4: fix the pcre existence checking rongqing.li
  2012-07-25 21:58 ` Saul Wold
@ 2012-07-26 20:08 ` Saul Wold
  1 sibling, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-07-26 20:08 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 07/25/2012 01:07 AM, rongqing.li@windriver.com wrote:
> From: Roy.Li <rongqing.li@windriver.com>
>
> [YOCTO #2820]
>
> when check if there is pcre, the configure file always check
> the host dir. now we make it work by adding correct prefix for
> cross-compile environment.
>
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
>   .../slang/slang/fix-check-pcre.patch               |  108 ++++++++++++++++++++
>   meta/recipes-extended/slang/slang_2.2.4.bb         |    3 +-
>   2 files changed, 110 insertions(+), 1 deletions(-)
>   create mode 100644 meta/recipes-extended/slang/slang/fix-check-pcre.patch
>
> diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
> new file mode 100644
> index 0000000..0c1553a
> --- /dev/null
> +++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
> @@ -0,0 +1,108 @@
> +fix the pcre existence checking
> +
> +when check if there is pcre, the configure file always check
> +the host dir. now we make it work by adding correct prefix for
> +cross-compile environment.
> +
> +When enable pcre-module, we see a QA warning because rpaths
> +hardcoded into the build, rpaths are not needed, so lets turn
> +this off.
> +
> +Upstream-Status: Inappropriate
> +Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> +---
> + configure |   60 ++++++------------------------------------------------------
> + 1 files changed, 6 insertions(+), 54 deletions(-)
> +
> +diff --git a/configure b/configure
> +index f1586c3..d22814f 100755
> +--- a/configure
> ++++ b/configure
> +@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
> + 	 /usr/include/pcre,/usr/lib \
> + 	 /usr/pcre/include,/usr/pcre/lib \
> + 	 /usr/include,/usr/lib \
> ++	 /usr/include,/usr/lib64 \
> + 	 /opt/include/pcre,/opt/lib \
> + 	 /opt/pcre/include,/opt/pcre/lib \
> + 	 /opt/include,/opt/lib"
> +@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
> +         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
> + 	xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
> + 	found=0
> +-	if test -r $xincdir/$xincfile
> ++	if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
> + 	then
> + 	  for E in $exts
> + 	  do
> +-	    if test -r "$xlibdir/$xlibfile.$E"
> ++	    if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
> + 	    then
> +-	      jd_pcre_include_dir="$xincdir"
> +-	      jd_pcre_library_dir="$xlibdir"
> ++	      jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
> ++	      jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
> + 	      jd_with_pcre_library="yes"
> + 	      found=1
> + 	      break
> +@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
> +     then
> +       PCRE_LIB=""
> +     else
> +-
> +-if test "X$jd_pcre_library_dir" != "X"
> +-then
> +-  if test "X$RPATH" = "X"
> +-  then
> +-
> +-case "$host_os" in
> +-  *linux*|*solaris* )
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      if test "X$ac_R_nospace" = "Xno"
> +-      then
> +-        RPATH="-Wl,-R,"
> +-      else
> +-        RPATH="-Wl,-R"
> +-      fi
> +-    else
> +-      if test "X$ac_R_nospace" = "Xno"
> +-      then
> +-        RPATH="-R "
> +-      else
> +-	RPATH="-R"
> +-      fi
> +-    fi
> +-  ;;
> +-  *osf*|*openbsd*)
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      RPATH="-Wl,-rpath,"
> +-    else
> +-      RPATH="-rpath "
> +-    fi
> +-  ;;
> +-  *netbsd*)
> +-    if test "X$GCC" = Xyes
> +-    then
> +-      RPATH="-Wl,-R"
> +-    fi
> +-  ;;
> +-esac
> +-
> +-    if test "X$RPATH" != "X"
> +-    then
> +-      RPATH="$RPATH$jd_pcre_library_dir"
> +-    fi
> +-  else
> +-    RPATH="$RPATH:$jd_pcre_library_dir"
> +-  fi
> +-fi
> +-
> ++      RPATH=""
> +     fi
> +
> +     PCRE_INC=-I$jd_pcre_include_dir
> +--
> +1.7.4.1
> +
> diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
> index 72dd99f..7082611 100644
> --- a/meta/recipes-extended/slang/slang_2.2.4.bb
> +++ b/meta/recipes-extended/slang/slang_2.2.4.bb
> @@ -10,7 +10,7 @@ to recode S-Lang procedures in C if you need to."
>   HOMEPAGE = "http://www.jedsoft.org/slang/"
>   SECTION = "libs"
>   DEPENDS = "pcre"
> -PR = "r9"
> +PR = "r10"
>
>   LICENSE = "GPLv2"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
> @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
>
>   SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
>              file://rpathfix.patch \
> +           file://fix-check-pcre.patch \
>             "
>   SRC_URI_append_arm = " file://change-char-type-to-signed-char-in-macros.patch"
>
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-26 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  8:07 [PATCH] slang 2.2.4: fix the pcre existence checking rongqing.li
2012-07-25 21:58 ` Saul Wold
2012-07-25 22:02   ` Saul Wold
2012-07-26  3:16     ` Rongqing Li
2012-07-26 20:08 ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.