diff mbox

sylpheed: Fix includedir

Message ID 1349457934-6208-1-git-send-email-gvaxon@gmail.com
State Superseded
Headers show

Commit Message

Valentine Barshak Oct. 5, 2012, 5:25 p.m. UTC
The sylpheed headers are installed to the target directory,
creating full staging directory path in the target rootfs,
which is wrong.
This happens because the headers are installed to
$(DESTDIR)$(includedir), while DESTDIR is set to
$(TARGET_DIR) and includedir is $(STAGING_DIR)/usr/include.

Remove $(DESTDIR) from the include paths in the Makefile
to have sylpheed install its headers to staging include
directory instead.

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
---
 package/sylpheed/sylpheed-fix-includedir.patch | 89 ++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 package/sylpheed/sylpheed-fix-includedir.patch

Comments

Arnout Vandecappelle Oct. 5, 2012, 11:26 p.m. UTC | #1
On 05/10/12 19:25, Valentine Barshak wrote:
> The sylpheed headers are installed to the target directory,
> creating full staging directory path in the target rootfs,
> which is wrong.
> This happens because the headers are installed to
> $(DESTDIR)$(includedir), while DESTDIR is set to
> $(TARGET_DIR) and includedir is $(STAGING_DIR)/usr/include.
>
> Remove $(DESTDIR) from the include paths in the Makefile
> to have sylpheed install its headers to staging include
> directory instead.

  Actually, includedir should be /usr/include instead of
$(STAGING_DIR)/usr/include.  Peter set it to $(STAGING_DIR)/usr/include
because sylpheed incorrectly adds includedir to its include path.
So maybe it's better to patch src/Makefile and remove the
--includedir=... from sylpheed.mk.

  Regards,
  Arnout
Valentine Barshak Oct. 6, 2012, 6:51 p.m. UTC | #2
On 10/06/2012 03:26 AM, Arnout Vandecappelle wrote:
> On 05/10/12 19:25, Valentine Barshak wrote:
>> The sylpheed headers are installed to the target directory,
>> creating full staging directory path in the target rootfs,
>> which is wrong.
>> This happens because the headers are installed to
>> $(DESTDIR)$(includedir), while DESTDIR is set to
>> $(TARGET_DIR) and includedir is $(STAGING_DIR)/usr/include.
>>
>> Remove $(DESTDIR) from the include paths in the Makefile
>> to have sylpheed install its headers to staging include
>> directory instead.
>
>   Actually, includedir should be /usr/include instead of
> $(STAGING_DIR)/usr/include.  Peter set it to $(STAGING_DIR)/usr/include
> because sylpheed incorrectly adds includedir to its include path.
> So maybe it's better to patch src/Makefile and remove the
> --includedir=... from sylpheed.mk.

Right, I'll submit an updated patch that I've prepared and tested on the 
vmware.

BTW, are there any objections to bump it to version 3.2, which is the 
latest. It seems to work fine for me (though to be honest I haven't seen 
any issues with 3.1 either). Version 3.2 needs the same includedir fix 
as well.

Thanks,
Val.

>
>   Regards,
>   Arnout
>
Arnout Vandecappelle Oct. 7, 2012, 11:06 a.m. UTC | #3
On 06/10/12 20:51, Valentine Barshak wrote:
> BTW, are there any objections to bump it to version 3.2, which is the latest. It seems to work fine for me (though to be
> honest I haven't seen any issues with 3.1 either). Version 3.2 needs the same includedir fix as well.

  Not at all.  Preferably as separate patches.

  Regards,
  Arnout
diff mbox

Patch

diff --git a/package/sylpheed/sylpheed-fix-includedir.patch b/package/sylpheed/sylpheed-fix-includedir.patch
new file mode 100644
index 0000000..3971699
--- /dev/null
+++ b/package/sylpheed/sylpheed-fix-includedir.patch
@@ -0,0 +1,89 @@ 
+The sylpheed headers are installed to the target directory,
+creating full staging directory path in the target rootfs,
+which is wrong.
+This happens because the headers are installed to
+$(DESTDIR)$(includedir), while DESTDIR is set to
+$(TARGET_DIR) and includedir is $(STAGING_DIR)/usr/include.
+
+Remove $(DESTDIR) from the include paths in the Makefile
+to have sylpheed install its headers to staging include
+directory instead.
+
+Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
+
+diff -pruN sylpheed-3.1.0.orig/libsylph/Makefile.in sylpheed-3.1.0/libsylph/Makefile.in
+--- sylpheed-3.1.0.orig/libsylph/Makefile.in	2012-09-25 22:47:21.794759554 +0400
++++ sylpheed-3.1.0/libsylph/Makefile.in	2012-09-25 22:47:39.797760345 +0400
+@@ -502,20 +502,20 @@ uninstall-info-am:
+ libsylph_0includeHEADERS_INSTALL = $(INSTALL_HEADER)
+ install-libsylph_0includeHEADERS: $(libsylph_0include_HEADERS)
+ 	@$(NORMAL_INSTALL)
+-	$(mkinstalldirs) $(DESTDIR)$(libsylph_0includedir)
++	$(mkinstalldirs) $(libsylph_0includedir)
+ 	@list='$(libsylph_0include_HEADERS)'; for p in $$list; do \
+ 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+-	  echo " $(libsylph_0includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libsylph_0includedir)/$$f"; \
+-	  $(libsylph_0includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libsylph_0includedir)/$$f; \
++	  echo " $(libsylph_0includeHEADERS_INSTALL) $$d$$p $(libsylph_0includedir)/$$f"; \
++	  $(libsylph_0includeHEADERS_INSTALL) $$d$$p $(libsylph_0includedir)/$$f; \
+ 	done
+ 
+ uninstall-libsylph_0includeHEADERS:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(libsylph_0include_HEADERS)'; for p in $$list; do \
+ 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+-	  echo " rm -f $(DESTDIR)$(libsylph_0includedir)/$$f"; \
+-	  rm -f $(DESTDIR)$(libsylph_0includedir)/$$f; \
++	  echo " rm -f $(libsylph_0includedir)/$$f"; \
++	  rm -f $(libsylph_0includedir)/$$f; \
+ 	done
+ 
+ ETAGS = etags
+@@ -609,7 +609,7 @@ check: $(BUILT_SOURCES)
+ all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+ 
+ installdirs:
+-	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libsylph_0includedir)
++	$(mkinstalldirs) $(DESTDIR)$(libdir) $(libsylph_0includedir)
+ install: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) install-am
+ install-exec: install-exec-am
+diff -pruN sylpheed-3.1.0.orig/src/Makefile.in sylpheed-3.1.0/src/Makefile.in
+--- sylpheed-3.1.0.orig/src/Makefile.in	2012-09-25 22:47:21.803759364 +0400
++++ sylpheed-3.1.0/src/Makefile.in	2012-09-25 22:47:39.798760332 +0400
+@@ -771,20 +771,20 @@ uninstall-info-am:
+ libsylpheed_plugin_0includeHEADERS_INSTALL = $(INSTALL_HEADER)
+ install-libsylpheed_plugin_0includeHEADERS: $(libsylpheed_plugin_0include_HEADERS)
+ 	@$(NORMAL_INSTALL)
+-	$(mkinstalldirs) $(DESTDIR)$(libsylpheed_plugin_0includedir)
++	$(mkinstalldirs) $(libsylpheed_plugin_0includedir)
+ 	@list='$(libsylpheed_plugin_0include_HEADERS)'; for p in $$list; do \
+ 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+-	  echo " $(libsylpheed_plugin_0includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libsylpheed_plugin_0includedir)/$$f"; \
+-	  $(libsylpheed_plugin_0includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(libsylpheed_plugin_0includedir)/$$f; \
++	  echo " $(libsylpheed_plugin_0includeHEADERS_INSTALL) $$d$$p $(libsylpheed_plugin_0includedir)/$$f"; \
++	  $(libsylpheed_plugin_0includeHEADERS_INSTALL) $$d$$p $(libsylpheed_plugin_0includedir)/$$f; \
+ 	done
+ 
+ uninstall-libsylpheed_plugin_0includeHEADERS:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(libsylpheed_plugin_0include_HEADERS)'; for p in $$list; do \
+ 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+-	  echo " rm -f $(DESTDIR)$(libsylpheed_plugin_0includedir)/$$f"; \
+-	  rm -f $(DESTDIR)$(libsylpheed_plugin_0includedir)/$$f; \
++	  echo " rm -f $(libsylpheed_plugin_0includedir)/$$f"; \
++	  rm -f $(libsylpheed_plugin_0includedir)/$$f; \
+ 	done
+ 
+ # This directory's subdirectories are mostly independent; you can cd
+@@ -963,7 +963,7 @@ install-binPROGRAMS: install-libLTLIBRAR
+ 
+ installdirs: installdirs-recursive
+ installdirs-am:
+-	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libsylpheed_plugin_0includedir)
++	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(libsylpheed_plugin_0includedir)
+ 
+ install: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) install-recursive