Package: xulrunner
Version: 1.9~rc2-2
Severity: importants
Tags: patch

As monitored while building gnome-python-extras[1], The .pc files
hard-code -fshort-char regardless of what is actually the result
of configure checks. The attached patch exports -fshort-char only
if it was used during build of xulrunner. I'd rather have not used
AC_SUBST, but I don't have enough autoconf understanding to see
why it didn't work without it...

[1] 
http://buildd.debian.org/fetch.cgi?pkg=gnome-python-extras;ver=2.19.1-2;arch=armel;stamp=1213084719

-- 
"rm -rf" only sounds scary if you don't have backups
diff -u xulrunner-1.9~rc2/configure xulrunner-1.9~rc2/configure
--- xulrunner-1.9~rc2/configure
+++ xulrunner-1.9~rc2/configure
@@ -8053,6 +8053,7 @@
 EOF
 
         HAVE_CPP_2BYTE_WCHAR_T=1
+        WCHAR_CFLAGS="-fshort-wchar"
     else    
         CXXFLAGS=$_SAVE_CXXFLAGS
     fi
@@ -21759,6 +21761,7 @@
 [EMAIL PROTECTED]@%$BZ2_LIBS%g
 [EMAIL PROTECTED]@%$PNG_CFLAGS%g
 [EMAIL PROTECTED]@%$PNG_LIBS%g
[EMAIL PROTECTED]@%$WCHAR_CFLAGS%g
 [EMAIL PROTECTED]@%$MOZ_JPEG_CFLAGS%g
 [EMAIL PROTECTED]@%$MOZ_JPEG_LIBS%g
 [EMAIL PROTECTED]@%$MOZ_ZLIB_CFLAGS%g
diff -u xulrunner-1.9~rc2/configure.in xulrunner-1.9~rc2/configure.in
--- xulrunner-1.9~rc2/configure.in
+++ xulrunner-1.9~rc2/configure.in
@@ -2784,6 +2784,7 @@
     if test "$ac_cv_have_usable_wchar_option_v2" = "yes"; then
         AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T)
         HAVE_CPP_2BYTE_WCHAR_T=1
+        WCHAR_CFLAGS="-fshort-wchar"
     else    
         CXXFLAGS=$_SAVE_CXXFLAGS
     fi
@@ -7962,6 +7963,7 @@
 AC_SUBST(BZ2_LIBS)
 AC_SUBST(PNG_CFLAGS)
 AC_SUBST(PNG_LIBS)
+AC_SUBST(WCHAR_CFLAGS)
 
 AC_SUBST(MOZ_JPEG_CFLAGS)
 AC_SUBST(MOZ_JPEG_LIBS)
diff -u xulrunner-1.9~rc2/debian/changelog xulrunner-1.9~rc2/debian/changelog
--- xulrunner-1.9~rc2/debian/changelog
+++ xulrunner-1.9~rc2/debian/changelog
@@ -1,3 +1,10 @@
+xulrunner (1.9~rc2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Export -fshort-wchar in .pc only if defined on platform
+
+ -- Riku Voipio <[EMAIL PROTECTED]>  Tue, 10 Jun 2008 11:21:01 +0300
+
 xulrunner (1.9~rc2-1) unstable; urgency=low
 
   * modules/libjar/nsJAR.cpp: Apply patch from Alexander Sack to avoid
diff -u xulrunner-1.9~rc2/xulrunner/installer/Makefile.in 
xulrunner-1.9~rc2/xulrunner/installer/Makefile.in
--- xulrunner-1.9~rc2/xulrunner/installer/Makefile.in
+++ xulrunner-1.9~rc2/xulrunner/installer/Makefile.in
@@ -41,6 +41,7 @@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
+WCHAR_CFLAGS = @WCHAR_CFLAGS@
 
 include $(DEPTH)/config/autoconf.mk
 
@@ -118,6 +119,7 @@
        -e "s|%sdkdir%|$(sdkdir)|" \
        -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
        -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
+       -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
        -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
        -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
        -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
only in patch2:
unchanged:
--- xulrunner-1.9~rc2.orig/xulrunner/installer/libxul.pc.in
+++ xulrunner-1.9~rc2/xulrunner/installer/libxul.pc.in
@@ -13,4 +13,4 @@
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
-Cflags: -I${includedir}/${includetype} -fshort-wchar
\ No newline at end of file
+Cflags: -I${includedir}/${includetype} %WCHAR_CFLAGS%
only in patch2:
unchanged:
--- xulrunner-1.9~rc2.orig/xulrunner/installer/libxul-unstable.pc.in
+++ xulrunner-1.9~rc2/xulrunner/installer/libxul-unstable.pc.in
@@ -9,4 +9,4 @@
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
-Cflags: -I${includedir}/${includetype} -fshort-wchar
+Cflags: -I${includedir}/${includetype} %WCHAR_CFLAGS%
only in patch2:
unchanged:
--- xulrunner-1.9~rc2.orig/xulrunner/installer/libxul-embedding.pc.in
+++ xulrunner-1.9~rc2/xulrunner/installer/libxul-embedding.pc.in
@@ -12,4 +12,4 @@
 Description: Static library for version-independent embedding of the Mozilla 
runtime
 Version: %MOZILLA_VERSION%
 Libs: -L${sdkdir}/lib -lxpcomglue
-Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar
+Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS%
only in patch2:
unchanged:
--- xulrunner-1.9~rc2.orig/xulrunner/installer/libxul-embedding-unstable.pc.in
+++ xulrunner-1.9~rc2/xulrunner/installer/libxul-embedding-unstable.pc.in
@@ -8,4 +8,4 @@
 Description: Static library for version-independent embedding of the Mozilla 
runtime (unstable API)
 Version: %MOZILLA_VERSION%
 Libs: -L${sdkdir}/lib -lxpcomglue
-Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar
+Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} %WCHAR_CFLAGS%

Attachment: signature.asc
Description: Digital signature

Reply via email to