Skip to contentSkip to conversation

sylpheed: Fix includedir

PATCH Superseded Valentine Barshak 4 participants 7 messages Oct 7, 2012 – Oct 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

The sylpheed headers are installed to $(DESTDIR)$(includedir), while DESTDIR is $(TARGET_DIR) and includedir is set to $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Thus, the full staging directory path is created in the target root filesystem, which is wrong.

The includedir was set to staging include because sylpheed incorrectly adds includedir to its include path, and does not cross-compile with the default includedir set to /usr/include.

This removes includedir setting and also removes it from include paths in Makefiles to prevent using host headers from /usr/include. The same approach is used in the OE.

---
 package/sylpheed/sylpheed.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
package/sylpheed/sylpheed.mk +11 -2
index 451c4de..32c0a82 100644
@@ -9,11 +9,20 @@ SYLPHEED_VERSION = $(SYLPHEED_VERSION_MAJOR).$(SYLPHEED_VERSION_MINOR)
 SYLPHEED_SOURCE = sylpheed-$(SYLPHEED_VERSION).tar.bz2
 SYLPHEED_SITE = http://sylpheed.sraoss.jp/sylpheed/v$(SYLPHEED_VERSION_MAJOR)
 
-SYLPHEED_CONF_OPT = --disable-gtkspell \
-                    --includedir=$(STAGING_DIR)/usr/include
+SYLPHEED_CONF_OPT = --disable-gtkspell
 
 SYLPHEED_DEPENDENCIES = host-pkg-config libgtk2
 
+# Remove the -I$(includedir) from the Makefiles
+# because it refers to the host /usr/include.
+define SYLPHEED_PRECONFIGURE
+	for i in $$(find $(@D) -name "Makefile*"); do \
+		sed -i 's:-I$$(includedir)::g' $$i; \
+	done
+endef
+
+SYLPHEED_PRE_CONFIGURE_HOOKS += SYLPHEED_PRECONFIGURE
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 SYLPHEED_DEPENDENCIES += openssl
 SYLPHEED_CONF_OPT += --enable-ssl
Signature · 1 line
1.7.11.4
#1 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

Quoted 11 lines · Valentine Barshak

The sylpheed headers are installed to $(DESTDIR)$(includedir), while DESTDIR is $(TARGET_DIR) and includedir is set to $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Thus, the full staging directory path is created in the target root filesystem, which is wrong.

The includedir was set to staging include because sylpheed incorrectly adds includedir to its include path, and does not cross-compile with the default includedir set to /usr/include.

Quoted 5 lines

This removes includedir setting and also removes it from include paths in Makefiles to prevent using host headers from /usr/include. The same approach is used in the OE.

(untested)

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

In reply to Valentine Barshak

Dear Valentine Barshak,

Quoted 11 lines · Valentine Barshak

The sylpheed headers are installed to $(DESTDIR)$(includedir), while DESTDIR is $(TARGET_DIR) and includedir is set to $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Thus, the full staging directory path is created in the target root filesystem, which is wrong.

The includedir was set to staging include because sylpheed incorrectly adds includedir to its include path, and does not cross-compile with the default includedir set to /usr/include.

Quoted 5 lines

This removes includedir setting and also removes it from include paths in Makefiles to prevent using host headers from /usr/include. The same approach is used in the OE.

If you have the time, it would be great to submit a patch to the upstream project in order to fix this problem.

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

Quoted 14 lines · Thomas Petazzoni

Dear Valentine Barshak,

Quoted 11 lines · Valentine Barshak

The sylpheed headers are installed to $(DESTDIR)$(includedir), while DESTDIR is $(TARGET_DIR) and includedir is set to $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Thus, the full staging directory path is created in the target root filesystem, which is wrong.

The includedir was set to staging include because sylpheed incorrectly adds includedir to its include path, and does not cross-compile with the default includedir set to /usr/include.

Quoted 8 lines
Quoted 5 lines

This removes includedir setting and also removes it from include paths in Makefiles to prevent using host headers from /usr/include. The same approach is used in the OE.

If you have the time, it would be great to submit a patch to the upstream project in order to fix this problem.

Done.

Thanks,
Val.

Quoted 5 lines

Thanks,

Thomas

#4 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

In reply to Thomas Petazzoni
Quoted 14 lines · Thomas Petazzoni

Dear Valentine Barshak,

Quoted 11 lines · Valentine Barshak

The sylpheed headers are installed to $(DESTDIR)$(includedir), while DESTDIR is $(TARGET_DIR) and includedir is set to $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Thus, the full staging directory path is created in the target root filesystem, which is wrong.

The includedir was set to staging include because sylpheed incorrectly adds includedir to its include path, and does not cross-compile with the default includedir set to /usr/include.

Quoted 8 lines
Quoted 5 lines

This removes includedir setting and also removes it from include paths in Makefiles to prevent using host headers from /usr/include. The same approach is used in the OE.

If you have the time, it would be great to submit a patch to the upstream project in order to fix this problem.

Applied upstream:
http://www.sraoss.jp/pipermail/sylpheed/2012-October/005424.html

Thanks,
Val.

Quoted 5 lines

Thanks,

Thomas

#6 lore raw

PATCH v3 1/1 sylpheed: Fix includedir

In reply to Valentine Barshak
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Valentine" == Valentine Barshak <[email protected]> writes:

Valentine> The sylpheed headers are installed to $(DESTDIR)$(includedir), Valentine> while DESTDIR is $(TARGET_DIR) and includedir is set to Valentine> $(STAGING_DIR)/usr/include in the SYLPHEED_CONF_OPT. Valentine> Thus, the full staging directory path is created in the Valentine> target root filesystem, which is wrong.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard