Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517266 - ?/? - >=dev-libs/nss-3.16.1 should install libfreebl.a, blapi.h and alghmac.h
Summary: ?/? - >=dev-libs/nss-3.16.1 should install libfreebl.a, blapi.h and alghmac.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-07-16 21:24 UTC by Andrew John Hughes
Modified: 2014-07-17 20:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2014-07-16 21:24:34 UTC
In order to build the SunEC provider against the system NSS, it needs access to a number of functions not exposed by the existing installed set. This was reduced to the above in 3.16.1 by https://bugzilla.redhat.com/show_bug.cgi?id=1075702

The necessary changes are in this version of the ebuild in the java-overlay:

http://git.overlays.gentoo.org/gitweb/?p=proj/java.git;a=blob;f=dev-libs/nss/nss-3.16.1.ebuild;h=edad7e44b98e33a1be2d61effb0775e313512f34;hb=bb7ec406bddc9418167472f992431e599d7030b8

Basically, when USE=java is set, the following additions are invoked:

  if use java ; then
      cp -L */lib/libfreebl.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
    fi

    if use java ; then
        local javapc="${ED}"/usr/$(get_libdir)/pkgconfig/nss{,-softokn}.pc
        cp -L "${ED}"/usr/$(get_libdir)/pkgconfig/nss.pc ${javapc}
        sed -i -e 's#Libs:#Libs: -lfreebl#' -e 's#Cflags:#Cflags: -I${includedir}/private#' ${javapc}
    fi

    if use java ; then
      insinto /usr/include/nss/private
      doins private/nss/{blapi,alghmac}.h
    fi

Reproducible: Always
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-17 14:02:50 UTC
Is there any particular drawback to doing this all the time?  I'd rather not add a java use flag.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-17 14:57:18 UTC
OK so first-off, I can't parse this:

local javapc="${ED}"/usr/$(get_libdir)/pkgconfig/nss{,-softokn}.pc
cp -L "${ED}"/usr/$(get_libdir)/pkgconfig/nss.pc ${javapc}
sed -i -e [regex] ${javapc}


What's the purpose of the {,-softokn} on javapc ?  I ran the ebuild and it seems like the nss.pc is simply copied to nss-softokn.pc and then sed'ed, but if that is the intent then javapc could b assigned nss-softokn.pc directly.


Also, according to comment#24 on the redhat bug, the software has switched to getting --libs from nss.pc and appending -lfreebl directly now.  With that being the case, is nss-softokn.pc necessary anymore?  Similarly, should those two headers be installed to /usr/include/nss alongside the rest (since adding the private subdir and an -I/usr/include/nss/private to nss.pc amounts to the same thing anyways)
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2014-07-17 20:56:36 UTC
sorted all issues and questions on irc.

+*nss-3.16.1-r1 (17 Jul 2014)
+
+  17 Jul 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> +nss-3.16.1-r1.ebuild:
+  added some private headers, a static lib, and a pkg-config file to support
+  compilation of OpenJDK, bug 517266
+