Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618352 - net-libs/pjproject: install binaries
Summary: net-libs/pjproject: install binaries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-13 13:10 UTC by Jacob Floyd
Modified: 2019-11-30 07:49 UTC (History)
2 users (show)

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


Attachments
pjproject ebuild that installs binaries (pjproject-2.5.1-r1.ebuild,2.48 KB, text/plain)
2017-05-15 22:29 UTC, Jacob Floyd
Details
pjproject ebuild that installs binaries (pjproject-2.5.1-r1.ebuild,2.57 KB, text/plain)
2017-05-15 22:51 UTC, Jacob Floyd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Floyd 2017-05-13 13:10:59 UTC
Please install the pjsua and pjsystest binaries as part of installing net-libs/pjproject. (as a bonus, please consider also installing the compiled sample binaries somewhere)


per the pjproject instructions, a standard build includes building "libraries, applications, and samples": http://www.pjsip.org/using.htm

However, net-libs/pjproject-2.5.1 only installs the libraries, and skips the applications, and the samples. This is in part, because the Makefile builds everything but only installs the libraries.

To investigate where the compiled "applications, and samples" are, I ran `ebuild /usr/portage/net-libs/pjproject/pjproject-2.5.1.ebuild compile` and looked in /var/tmp/portage/net-libs/pjproject-2.5.1/work/pjproject-2.5.1/

Source for the samples can be installed via the samples USE flag, but the samples that are compiled during a standard build (which I verified by running  and looking in <work dir>/pjsip-apps/bin/samples/x86_64-pc-linux-gnu) cannot be installed with the current ebuild.

More importantly, the applications are not installed. As the pjproject manual says (http://www.pjsip.org/using.htm#running): "pjsua is the reference implementation for both PJSIP and PJMEDIA stack, and is the main target of the build system. Upon successful build, pjsua application will be put in pjsip-apps/bin directory."

I looked all over for the pjsua app before I realized that it wasn't installed (Note to self, check qlist sooner :P ).

There are two binaries (on my x86_64 arch) in /var/tmp/portage/net-libs/pjproject-2.5.1/work/pjproject-2.5.1/pjsip-apps/bin/:
pjsua-x86_64-pc-linux-gnu  pjsystest-x86_64-pc-linux-gnu

I think I would install these without the arch on the end (or at least with a shorter symlink to the longer bin):
pjsua-x86_64-pc-linux-gnu => pjsua
pjsystest-x86_64-pc-linux-gnu => pjsystest

(One unimportant note about the ebuild while I was looking at it: amr, opus, silk are all codecs, afaik, so I would put them in CODEC_FLAGS)

Please install these two binaries, and possibly the other sample binaries.
Comment 1 Jacob Floyd 2017-05-15 22:29:23 UTC
Created attachment 472728 [details]
pjproject ebuild that installs binaries

Here is my stab at installing the binaries, including the sample binaries.

This installs the sample binaries in /usr/$(get_libdir)/pjproject/samples/bin/

Is there a better place to install them? I wouldn't want them on the PATH, just available somewhere. Is there a standard place for example binaries?

It also cleans up the USE flags (as mentioned before) and fixes a bug in the ebuild with the static-libs flag. On my system, static-libs were installed even when the use flag was disabled, this (minor) fix fixes that. The *.a glob was not expanded within the double quotes, so I placed it outside the double quotes. Even if the rest of the changes don't go in, this change should. If needed I can file a separate bug.
Comment 2 Jacob Floyd 2017-05-15 22:51:07 UTC
Created attachment 472730 [details]
pjproject ebuild that installs binaries

New version of patch drops changes to CODEC_FLAGS, and IUSE. I didn't see the special handling of CODEC_FLAGS in src_configure. Instead I have a comment that says not to add amr, opus, and silk to CODEC_FLAGS because they are handled differently than the other codecs. If you choose not to include the comment in the ebuild, that's ok.

I had also alphabetized the flags in VIDEO_FLAGS, this reverts that too. I have no idea if order matters, so I'll just leave it alone.

That leaves these changes from the gentoo version:
- install binaries
- install sample binaries in /usr/$(get_libdir)/pjproject/samples/bin
- fix the static-libs glob
Comment 3 Jaco Kroon 2019-11-14 09:37:51 UTC
Jacob,

Do you still require these?

I don't think there is a standard place no, but I'll try and find out.

Just to be certain what's the use of having these binaries around?

Don't mind updating to install them ... would just like to know the purpose.  My only interest in pjproject is for asterisk, so I'm just trying to get the perspective here.  Also, I'll rebase this against 2.7.2 (or whatever the newest pjproject is currently).  Unless you'd like to post me a raw diff instead of an ebuild, or possibly send me a PR to github.com/jkroonza/gentoo

Kind Regards,
Jaco
Comment 4 Jacob Floyd 2019-11-14 18:31:03 UTC
At the time I was working on something that needed a simple soft phone to answer occasional short phone calls (as part of an automated Multi-Factor Authentication). pjsua was one of the applications that allowed me to do that without writing something to interact with lower level libraries. I wanted something that could be started when a phone call was expected and then closed. So, asterisk and most other solutions were far too complex or long-lived.

Ultimately I ended up using a linphone flatpak (which has turned out to be a nightmare of its own). If linphone doesn't straighten out their badly broken build and flatpak repo, I'll have to switch to an alternative implementation, and pjsua is on the shortlist of possibilities.

So, no I do not need this right now, but I still think it would be good to include the pjsua application for more simple pjproject use cases.
Comment 5 Larry the Git Cow gentoo-dev 2019-11-30 07:49:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d194bc8a80a478c91f5196da9eac770a755ca2

commit 90d194bc8a80a478c91f5196da9eac770a755ca2
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2019-11-18 09:45:56 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2019-11-30 07:48:56 +0000

    net-libs/pjproject: Bump to 2.9.
    
    Drop libressl patches (upstream).
    Rebase configure for --enable-ssl.
    Pull in asterisk config_site.h file.
    Remove blocked on mediastreamer-bcg729 (bcg729 and mediastreamer-bcg729
    are the actual blockers and marked as such already).
    Use ${ED} instead of ${D} on install
    Correctly rm static libs if USE=-static-libs
    Set the PJMEDIA_HAS_VIDEO #define as per https://bugs.gentoo.org/652196
    Update package.use.mask for ppc to mask g729 for pjproject since
    net-libs/bcg729 isn't available (yet) on ppc.
    
    Closes: https://bugs.gentoo.org/609702
    Closes: https://bugs.gentoo.org/618352
    Closes: https://bugs.gentoo.org/652196
    Closes: https://bugs.gentoo.org/650312
    Closes: https://bugs.gentoo.org/653482
    Closes: https://bugs.gentoo.org/657014
    Closes: https://bugs.gentoo.org/686796
    Package-Manager: Portage-2.3.76, Repoman-2.3.16
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Closes: https://github.com/gentoo/gentoo/pull/13712
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-libs/pjproject/Manifest                        |   1 +
 .../pjproject/files/pjproject-2.9-config_site.h    |  74 +++++++++++++
 .../pjproject/files/pjproject-2.9-ssl-enable.patch | 100 +++++++++++++++++
 net-libs/pjproject/metadata.xml                    |   3 +-
 net-libs/pjproject/pjproject-2.9.ebuild            | 120 +++++++++++++++++++++
 .../linux/powerpc/ppc32/17.0/package.use.mask      |   3 +
 .../ppc64/17.0/32bit-userland/package.use.mask     |   3 +
 7 files changed, 303 insertions(+), 1 deletion(-)