Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 290726 - Missing pkg-config file
: Missing pkg-config file
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: 4.6
: All Linux
: P2 normal (vote)
: 4.9.1
Assigned To: Mike Hommey [:glandium]
: 472807 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2005-04-17 11:34 PDT by Christopher Aillon (sabbatical, not receiving bugmail)
Modified: 2012-06-15 16:36 PDT (History)
12 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

first try (2.26 KB, patch)
2005-05-18 03:51 PDT, Wolfgang Rosenauer [:wolfiR]
no flags Details | Diff | Splinter Review
changed filename (2.20 KB, patch)
2005-05-18 12:06 PDT, Wolfgang Rosenauer [:wolfiR]
cls: review-
Details | Diff | Splinter Review
Ship a nspr.pc file when doing make install (2.88 KB, patch)
2012-05-13 01:15 PDT, Mike Hommey [:glandium]
wtc: review+
Details | Diff | Splinter Review

Description Christopher Aillon (sabbatical, not receiving bugmail) 2005-04-17 11:34:13 PDT
The .pc file for nspr is not distributed as part of the NSPR release.  NSPR
needs its own equivalent.  See

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.)
Comment 1 Wan-Teh Chang 2005-04-26 17:26:56 PDT
Chris, could you help me fix this?  Should we add
a new file mozilla/nsprpub/config/ with
the following contents?


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?
Comment 2 Wolfgang Rosenauer [:wolfiR] 2005-05-18 03:51:22 PDT
Created attachment 183899 [details] [diff] [review]
first try

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 3 Wan-Teh Chang 2005-05-18 11:43:22 PDT
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?
Comment 4 Wolfgang Rosenauer [:wolfiR] 2005-05-18 12:06:02 PDT
Created attachment 183930 [details] [diff] [review]
changed filename
Comment 5 Wolfgang Rosenauer [:wolfiR] 2005-05-18 12:12:13 PDT
(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 ;-)

Comment 6 Wolfgang Rosenauer [:wolfiR] 2005-05-18 23:20:26 PDT
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.
Comment 7 Wolfgang Rosenauer [:wolfiR] 2005-05-18 23:31:19 PDT
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?
Comment 8 Wan-Teh Chang 2005-05-19 10:53:00 PDT
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

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.
Comment 9 Wolfgang Rosenauer [:wolfiR] 2005-05-19 12:17:34 PDT
In that case we should just use nspr.pc. If NSPR5 will ever gets released, we
can name it nspr5.pc maybe.
Comment 10 Wolfgang Rosenauer [:wolfiR] 2005-05-19 12:18:49 PDT
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.
Comment 11 Wan-Teh Chang 2005-05-19 13:56:45 PDT
OK, nspr.pc is fine by me.
Comment 12 Wolfgang Rosenauer [:wolfiR] 2005-05-31 03:07:08 PDT
Chris? Is this proposed patch OK for you?
(unfortunately we missed 4.6)
Comment 13 cls 2005-06-05 11:42:15 PDT
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.
Comment 14 Wolfgang Rosenauer [:wolfiR] 2005-06-05 13:38:39 PDT
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.
Comment 15 cls 2005-06-05 13:43:19 PDT
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/ to install that particular file in the right place.
Comment 16 Mike Hommey [:glandium] 2012-05-13 01:15:18 PDT
Created attachment 623481 [details] [diff] [review]
Ship a nspr.pc file when doing make install
Comment 17 Wan-Teh Chang 2012-05-18 15:28:22 PDT
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
Checking in;
/cvsroot/mozilla/nsprpub/,v  <--
new revision: 1.330; previous revision: 1.329
Checking in config/;
/cvsroot/mozilla/nsprpub/config/,v  <--
new revision: 1.26; previous revision: 1.25
RCS file: /cvsroot/mozilla/nsprpub/config/,v
Checking in config/;
/cvsroot/mozilla/nsprpub/config/,v  <--
initial revision: 1.1

::: nsprpub/config/
@@ +1,1 @@
> +prefix=@prefix@

Can file have comments?  If so, we should add
a comment block that contains the MPL 2 header.
Comment 18 Mike Hommey [:glandium] 2012-05-18 22:57:29 PDT
(In reply to Wan-Teh Chang from comment #17)
> Can 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 files in xulrunner/installer/ have a license header.
Comment 20 Ed Morley (Away 28th Oct -> 6th Nov) [:emorley] 2012-05-23 08:09:04 PDT
Comment 21 Away, back on Nov 10 2012-06-02 12:05:30 PDT
NSPR upgrade:
Comment 22 Elio Maldonado 2012-06-15 16:36:51 PDT
*** Bug 472807 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.