Issue 86670 - system-mozilla: libxul and new pkgconfig files
Summary: system-mozilla: libxul and new pkgconfig files
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: DEV300m1
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 3.0
Assignee: caolanm
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-04 08:43 UTC by caolanm
Modified: 2008-05-06 13:36 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
proposed to do it like so (3.49 KB, patch)
2008-03-04 08:44 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2008-03-04 08:43:20 UTC
Like http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges with
firefox 3.0 apparently there is a new standardized set of pkgconfig name for the
various pieces of the mozilla stack
Comment 1 caolanm 2008-03-04 08:44:23 UTC
Created attachment 51878 [details]
proposed to do it like so
Comment 2 rene 2008-03-04 09:40:46 UTC
cmc: looks good from just looking over it quickly
Comment 3 rene 2008-03-04 09:41:05 UTC
.
Comment 4 caolanm 2008-03-04 09:50:40 UTC
checked into cmcfixes43
Comment 5 caolanm 2008-03-05 16:40:48 UTC
cmc->rene: maybe you could verify this change in cmcfixes43 ?
Comment 6 geki 2008-03-20 17:41:52 UTC
This fails for me since plain xulrunner-1.9b4 has sdkdir instead of libdir.

+      MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul`

cmc, may you add a check for sdkdir if libdir returns an empty string, please?
Thanks!
Comment 7 caolanm 2008-03-20 17:50:54 UTC
cmc->geki: what do you have in that sdk dir, is it a hierarchy with a include
dir and then a lib dir, e.g. something like
/usr/lib/xulrunner-sdk/sdk/lib/libxul.so ?
Comment 8 caolanm 2008-03-20 18:00:07 UTC
How about now with the added fallback to sdkdir + "sdk/lib", does that work for
your setup too ?
Comment 9 geki 2008-03-20 18:04:00 UTC
geki->cmc: This is what I have. A simple s/libdir/sdkdir/ change.

# grep sdkdir /usr/lib64/pkgconfig/libxul.pc 
sdkdir=/usr/lib64/xulrunner-1.9
Libs: -L${sdkdir} -lxpcomglue_s -lxul -lxpcom -Wl,-R${sdkdir}

/usr/lib64/xulrunner-1.9/libxul.so{,.2}
Comment 10 caolanm 2008-03-20 19:48:21 UTC
That totally differs from the fedora sdkdir variable which has a sdk/lib dir
inside the sdkdir variable and a libdir that points to the actual lib dir, what
distro is this ?
Comment 11 caolanm 2008-03-20 19:52:46 UTC
Man what a bloody mess, the fedora xulrunner has this patch

diff -up mozilla/xulrunner/installer/libxul.pc.in.pk
mozilla/xulrunner/installer/libxul.pc.in
--- mozilla/xulrunner/installer/libxul.pc.in.pk 2007-08-03 16:46:28.000000000 +0200
+++ mozilla/xulrunner/installer/libxul.pc.in    2008-01-29 17:18:01.000000000 +0100
@@ -1,7 +1,8 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
+libdir=%libdir%
 includedir=%includedir%
-idldir=%idldir%
+idldir=%idldir%/stable
 includetype=stable

 # Note: the default pkg-config includes will only list include directories
@@ -12,5 +13,5 @@ Name: libxul
 Description: The Mozilla Runtime and Embedding Engine
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
+Libs: -L${sdkdir}/sdk/lib -lxpcomglue_s -lxul -lxpcom

which implies that your distro may also has a patch to turn
-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
into
-Libs: -L${sdkdir} -lxpcomglue_s -lxul -lxpcom
Comment 12 geki 2008-03-20 20:00:26 UTC
Lovely Gentoo distro here. They split it like:
/usr/lib64/xulrunner-1.9/ | /usr/include/xulrunner-1.9/

O right, vanilla is here:
http://lxr.mozilla.org/seamonkey/source/xulrunner/installer/libxul.pc.in
Comment 13 caolanm 2008-03-25 12:59:38 UTC
tweaked for gentoo locations
Comment 14 caolanm 2008-03-25 13:03:33 UTC
cmc->geki: does that version work for your setup ?
Comment 15 geki 2008-03-25 13:20:28 UTC
geki->cmc: that is fine. thank you very much!
Comment 16 caolanm 2008-03-25 13:31:56 UTC
k, verified then
Comment 17 ccheney 2008-03-29 05:39:20 UTC
This broke Ubuntu which uses the official upstream libxul.pc file with sdkdir.
Actually in ooo-build someone renamed the Ubuntu patch and then broke it by
changing to from the proper 'sdkdir' name...
Comment 18 rene 2008-03-29 13:04:57 UTC
ccheney: so you can try to extract the current version which has some sdkdir
things fixed?

The current version in ooo-build (and I was the one who exchanged your patch
with the "official" one here) is the version extracted before caolan did the
sdkdir fixes for gentoo...
Comment 19 ccheney 2008-03-30 07:29:41 UTC
Rene,

I did and committed the fixed version that should work both on Fedora and
everything else to ooo-build.
Comment 20 caolanm 2008-05-06 13:36:22 UTC
see in m11