Closed Bug 290726 Opened 20 years ago Closed 13 years ago

Missing pkg-config file

Categories

(NSPR :: NSPR, defect, P2)

All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: caillon, Assigned: glandium)

References

Details

Attachments

(1 file, 2 obsolete files)

The .pc file for nspr is not distributed as part of the NSPR release. NSPR needs its own equivalent. See http://lxr.mozilla.org/mozilla/source/build/unix/mozilla-nspr.pc.in The NSPR release version should use the NSPR release version, not the mozilla version. (I'd actually argue that the one in the mozilla tree should also follow suit.)
Chris, could you help me fix this? Should we add a new file mozilla/nsprpub/config/nspr.pc.in with the following contents? prefix=%prefix% exec_prefix=%exec_prefix% libdir=%libdir% includedir=%includedir% Name: NSPR Description: The Netscape Portable Runtime Version: 4.6 Libs: -L${libdir} -lplc4 -lplds4 -lnspr4 Cflags: -I${includedir}/nspr Why does this file use %var% instead of @var@ for substitution?
Status: NEW → ASSIGNED
Attached patch first try (obsolete) — Splinter Review
This patch works for me. I have not much knowledge about pkgconfig files but it survived my basic tests. The name of the file is a matter of discussion. I just took the name, mozilla uses and so I think almost every package which use NSPR and pkgconfig files will recognize it. (Wan-Teh: the %...% are used because the variables are not set from configure in mozilla environment. It's a manual step in the Makefile)
Comment on attachment 183899 [details] [diff] [review] first try Wolfgang: please name the new file nspr.pc, unless that name is already taken. By the way, is nss.pc already taken?
Attached patch changed filename (obsolete) — Splinter Review
Attachment #183899 - Attachment is obsolete: true
(In reply to comment #3) > (From update of attachment 183899 [details] [diff] [review] [edit]) > Wolfgang: please name the new file nspr.pc, unless that name > is already taken. I don't think so, but you'll never know for sure. > By the way, is nss.pc already taken? The same. At least we have no package on SUSE LINUX which has a pkgconfig file with this name. And yes, that would be my next step. Or is there any other taker ;-)
Status: ASSIGNED → NEW
There is a follow-up issue with this change: Following scenario: - build mozilla --with-system-nspr - don't provide mozilla's mozilla-nspr.pc - provide this new nspr.pc Then mozilla-xpcom.pc is broken because it requires the same nspr version, which is now decoupled and states the real NSPR version instead the mozilla release. This would be a mozilla core bug instead of NSPR and I will file it there.
another thing is, that it might be possible to install two different major versions of nspr in parallel. Then we should create a nspr4.pc file?
Yes, it is possible to install two major versions of NSPR in parallel. If the convention is to add the major version to the pkg-config file name, let's do that. It'll also reduce the likelihood of name collision. Note: it is extremely unlikely that we will ever release NSPR 5 because it is too hard to migrate all NSPR 4 users to NSPR 5 to warrant the need to break backward compatibility.
In that case we should just use nspr.pc. If NSPR5 will ever gets released, we can name it nspr5.pc maybe.
Comment on attachment 183930 [details] [diff] [review] changed filename Chris, may I ask you to give your review? You might be the most experienced person for pkgconfig files.
Attachment #183930 - Flags: review?(caillon)
OK, nspr.pc is fine by me.
Chris? Is this proposed patch OK for you? (unfortunately we missed 4.6)
Version: 4.4.1 → 4.6
Assignee: wtchang → mozilla
Status: NEW → ASSIGNED
Comment on attachment 183930 [details] [diff] [review] changed filename Why is that file being installed in $bindir/ rather than $libdir/pkgconfig/ ? We should at least try to use the standard location to install it.
Attachment #183930 - Flags: review?(caillon) → review-
There is no "install" target at all in nspr and for mozilla builds those pkgconfig files are even not in dist directory. Therefore I would recommend that someone else familiar with the whole build-system should change the behaviour as I would need 10 times longer for those changes.
Assignee: mozilla → cls
Status: ASSIGNED → NEW
There's no need to make a common install rule for a one-off case. Just add custom install & real_install rules to a makefile (presumably config/Makefile.in) to install that particular file in the right place.
QA Contact: wtchang → nspr
Assignee: cls → wtc
Assignee: wtc → mh+mozilla
Attachment #183930 - Attachment is obsolete: true
Comment on attachment 623481 [details] [diff] [review] Ship a nspr.pc file when doing make install Review of attachment 623481 [details] [diff] [review]: ----------------------------------------------------------------- r=wtc. Thanks. I have a question below. Patch checked in on the NSPR trunk (NSPR 4.9.1). Checking in configure; /cvsroot/mozilla/nsprpub/configure,v <-- configure new revision: 1.327; previous revision: 1.326 done Checking in configure.in; /cvsroot/mozilla/nsprpub/configure.in,v <-- configure.in new revision: 1.330; previous revision: 1.329 done Checking in config/Makefile.in; /cvsroot/mozilla/nsprpub/config/Makefile.in,v <-- Makefile.in new revision: 1.26; previous revision: 1.25 done RCS file: /cvsroot/mozilla/nsprpub/config/nspr.pc.in,v done Checking in config/nspr.pc.in; /cvsroot/mozilla/nsprpub/config/nspr.pc.in,v <-- nspr.pc.in initial revision: 1.1 done ::: nsprpub/config/nspr.pc.in @@ +1,1 @@ > +prefix=@prefix@ Can nspr.pc.in file have comments? If so, we should add a comment block that contains the MPL 2 header.
Attachment #623481 - Flags: review?(wtc) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Priority: -- → P2
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 4.9.1
(In reply to Wan-Teh Chang from comment #17) > Can nspr.pc.in file have comments? If so, we should add > a comment block that contains the MPL 2 header. According to the manual page, it can, delimiter is #. I'm not sure it makes much sense to add an MPL2 header in there. As a matter of fact, none of the .pc.in files in xulrunner/installer/ have a license header.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: