Skip to contentSkip to conversation

package/libglib2: remove bindir prefix from gio-2.0.pc

PATCH Superseded Fabrice Fontaine 4 participants 4 messages Jun 11, 2019 – Jun 13, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libglib2: remove bindir prefix from gio-2.0.pc

Apply LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE to gio-2.0.pc so ${bindir} prefix is also removed for gbus-codegen otherwise build of packages using this binary will fail if gbus-codegen is not installed on host

Fixes:
- http://autobuild.buildroot.org/results/5c0e4f3d33e01198688d58388aabe159bd005234

---
 package/libglib2/libglib2.mk | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
package/libglib2/libglib2.mk +10 -6
index 78d6e5ab32..c8db706684 100644
@@ -85,13 +85,17 @@ endef
 
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
 
-# Newer versions of libglib2 prefix glib-genmarshal, gobject-query, and
-# glib-mkenums with ${bindir}. Unfortunately, this will resolve to the host
-# systems /bin/ directory, which will cause compilation issues if the host does
-# not have these programs. By removing the ${bindir}/ prefix, these programs
-# are resolved in PATH instead.
+# Newer versions of libglib2 prefix glib-genmarshal, gobject-query,
+# glib-mkenums, glib_compile_schemas, glib_compile_resources and gdbus-codegen
+# with ${bindir}. Unfortunately, this will resolve to the host systems /bin/
+# directory, which will cause compilation issues if the host does not have these
+# programs. By removing the ${bindir}/ prefix, these programs are resolved in
+# PATH instead.
 define LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
-	$(SED) 's%$${bindir}/%%g' $(STAGING_DIR)/usr/lib/pkgconfig/glib-2.0.pc
+	for file in glib-2.0.pc gio-2.0.pc ; do \
+		$(SED) 's%$${bindir}/%%g' \
+			$(STAGING_DIR)/usr/lib/pkgconfig/$$file ; \
+	done
 endef
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/libglib2: remove bindir prefix from gio-2.0.pc

All;

Openembedded has a patch for this that might be even better for us to use:
https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch

If not, then consider this an

Quoted 49 lines · Fabrice Fontaine

Apply LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE to gio-2.0.pc so ${bindir} prefix is also removed for gbus-codegen otherwise build of packages using this binary will fail if gbus-codegen is not installed on host

Fixes:
- http://autobuild.buildroot.org/results/5c0e4f3d33e01198688d58388aabe159bd005234

---
 package/libglib2/libglib2.mk | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
package/libglib2/libglib2.mk +10 -7
index 78d6e5ab32..c8db706684 100644
@@ -85,13 +85,17 @@ endef
 
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
 
-# Newer versions of libglib2 prefix glib-genmarshal, gobject-query, and
-# glib-mkenums with ${bindir}. Unfortunately, this will resolve to the host
-# systems /bin/ directory, which will cause compilation issues if the host does
-# not have these programs. By removing the ${bindir}/ prefix, these programs
-# are resolved in PATH instead.
+# Newer versions of libglib2 prefix glib-genmarshal, gobject-query,
+# glib-mkenums, glib_compile_schemas, glib_compile_resources and gdbus-codegen
+# with ${bindir}. Unfortunately, this will resolve to the host systems /bin/
+# directory, which will cause compilation issues if the host does not have these
+# programs. By removing the ${bindir}/ prefix, these programs are resolved in
+# PATH instead.
 define LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
-       $(SED) 's%$${bindir}/%%g' $(STAGING_DIR)/usr/lib/pkgconfig/glib-2.0.pc
+       for file in glib-2.0.pc gio-2.0.pc ; do \
+               $(SED) 's%$${bindir}/%%g' \
+                       $(STAGING_DIR)/usr/lib/pkgconfig/$$file ; \
+       done
 endef
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
 
--

2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH 1/1 package/libglib2: remove bindir prefix from gio-2.0.pc

Adam, All,

On 2019-06-11 14:19 -0400, Adam Duskett spake thusly:

Quoted 2 lines

Openembedded has a patch for this that might be even better for us to use:
https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch

As discussed on IRC (Fabrice, you should *really* join):

Upstream glib refused that patch, because they do want to have the paths.

So it has zero chance to be applied, so we'll have to carry it over and over.

So, I prefer we go with the hook. Still, see comments below...

Quoted 27 lines

If not, then consider this an

Quoted 22 lines · Fabrice Fontaine

Apply LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE to gio-2.0.pc so ${bindir} prefix is also removed for gbus-codegen otherwise build of packages using this binary will fail if gbus-codegen is not installed on host

Fixes:
- http://autobuild.buildroot.org/results/5c0e4f3d33e01198688d58388aabe159bd005234

---
 package/libglib2/libglib2.mk | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
package/libglib2/libglib2.mk +0 -0
index 78d6e5ab32..c8db706684 100644
@@ -85,13 +85,17 @@ endef
 
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
 
Quoted 16 lines
Quoted 6 lines
package/libglib2/libglib2.mk +1 -5
-# Newer versions of libglib2 prefix glib-genmarshal, gobject-query, and
-# glib-mkenums with ${bindir}. Unfortunately, this will resolve to the host
-# systems /bin/ directory, which will cause compilation issues if the host does
-# not have these programs. By removing the ${bindir}/ prefix, these programs
-# are resolved in PATH instead.
+# Newer versions of libglib2 prefix glib-genmarshal, gobject-query,

package/libglib2/libglib2.mk endef · line 97

Quoted 10 lines
package/libglib2/libglib2.mk +8 -1
+# glib-mkenums, glib_compile_schemas, glib_compile_resources and gdbus-codegen
+# with ${bindir}. Unfortunately, this will resolve to the host systems /bin/
+# directory, which will cause compilation issues if the host does not have these
+# programs. By removing the ${bindir}/ prefix, these programs are resolved in
+# PATH instead.
 define LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
-       $(SED) 's%$${bindir}/%%g' $(STAGING_DIR)/usr/lib/pkgconfig/glib-2.0.pc
+       for file in glib-2.0.pc gio-2.0.pc ; do \
+               $(SED) 's%$${bindir}/%%g' \
+                       $(STAGING_DIR)/usr/lib/pkgconfig/$$file ; \

IF the sed fails (for whatever reason), you'll miss the error, so...

Quoted 1 line

package/libglib2/libglib2.mk endef · line 98

Quoted 1 line
package/libglib2/libglib2.mk +1 -0
+       done

... prefer using $(foreach ...) instead of a shell loop.

Regards,
Yann E. MORIN.

Quoted 14 lines
Quoted 10 lines
package/libglib2/libglib2.mk +0 -1
 endef
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
 
--

2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/libglib2: remove bindir prefix from gio-2.0.pc

Quoted 63 lines · Yann E. MORIN

Adam, All,

On 2019-06-11 14:19 -0400, Adam Duskett spake thusly:

Quoted 2 lines

Openembedded has a patch for this that might be even better for us to use:
https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch

As discussed on IRC (Fabrice, you should *really* join):

Upstream glib refused that patch, because they do want to have the paths.

So it has zero chance to be applied, so we'll have to carry it over and over.

So, I prefer we go with the hook. Still, see comments below...

Quoted 27 lines

If not, then consider this an

Quoted 22 lines · Fabrice Fontaine

Apply LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE to gio-2.0.pc so ${bindir} prefix is also removed for gbus-codegen otherwise build of packages using this binary will fail if gbus-codegen is not installed on host

Fixes:
- http://autobuild.buildroot.org/results/5c0e4f3d33e01198688d58388aabe159bd005234

---
 package/libglib2/libglib2.mk | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
package/libglib2/libglib2.mk +0 -0
index 78d6e5ab32..c8db706684 100644
@@ -85,13 +85,17 @@ endef
 
 LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
 
Quoted 16 lines
Quoted 6 lines
package/libglib2/libglib2.mk +1 -5
-# Newer versions of libglib2 prefix glib-genmarshal, gobject-query, and
-# glib-mkenums with ${bindir}. Unfortunately, this will resolve to the host
-# systems /bin/ directory, which will cause compilation issues if the host does
-# not have these programs. By removing the ${bindir}/ prefix, these programs
-# are resolved in PATH instead.
+# Newer versions of libglib2 prefix glib-genmarshal, gobject-query,

package/libglib2/libglib2.mk endef · line 97

Quoted 10 lines
package/libglib2/libglib2.mk +8 -1
+# glib-mkenums, glib_compile_schemas, glib_compile_resources and gdbus-codegen
+# with ${bindir}. Unfortunately, this will resolve to the host systems /bin/
+# directory, which will cause compilation issues if the host does not have these
+# programs. By removing the ${bindir}/ prefix, these programs are resolved in
+# PATH instead.
 define LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE
-       $(SED) 's%$${bindir}/%%g' $(STAGING_DIR)/usr/lib/pkgconfig/glib-2.0.pc
+       for file in glib-2.0.pc gio-2.0.pc ; do \
+               $(SED) 's%$${bindir}/%%g' \
+                       $(STAGING_DIR)/usr/lib/pkgconfig/$$file ; \

IF the sed fails (for whatever reason), you'll miss the error, so...

Quoted 3 lines
Quoted 1 line

package/libglib2/libglib2.mk endef · line 98

Quoted 1 line
package/libglib2/libglib2.mk +1 -0
+       done

... prefer using $(foreach ...) instead of a shell loop.

Or simply

define LIBGLIB2_REMOVE_BINDIR_PREFIX_FROM_PC_FILE

        $(SED) 's%$${bindir}/%%g' \
                $(STAGING_DIR)/usr/lib/pkgconfig/glib-2.0.pc \
                $(STAGING_DIR)/usr/lib/pkgconfig/gio-2.0.pc

endef

Signature · 1 line
Carlos Santos <[email protected]>