NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help with asterisk module needed



On 18.11.2019 0:01, Greg Troxel wrote:

2. Optionally this option should download and add app_mt.c to
workdir/apps directory (for now i put it there by myself).

The other approach is if you can build it separately with header files
installed by the main package, and it can then be a separate asterisk_mt
package.

When I tried to add an option i was using "Buildlink methodology" and "How to create package from scratch" documents. Does suggested approach means new package which is bl3'ed to both asterisk16 and kannel? Doesn't it sound overloaded because we need to put downloaded .c in asterisk source tree and generally should be compiled inside it?

I've added this to comms/asterisk16/options.mk:
.if !empty(PKG_OPTIONS:Mkannel)
#DEPENDS+=          kannel>=1.4.5:../../www/kannel.new
.include "../../www/kannel.new/buildlink3.mk"
PLIST.kannel=       yes
.endif

With bl3, DEPENDS is implicit and not used.

I commented this out because I tried to use both. What should be used when I need to include headers, which are taken not from sources but from installed package?

I've added this to buildlink3.mk in www/kannel.new:
BUILDLINK_INCDIRS.kannel=               /usr/pkg/include/kannel
BUILDLINK_LIBDIRS.kannel=               /usr/pkg/lib/kannel

That isn't right, because it says /usr/pkg, vs PREFIX.

I know, I did it directly for the test.

I would look in doc/pkgsrc.txt and for other examples.

Thank you, an example may turn to be very handy.

Any possible values of those do nothing:
gwlib/gwlib.h is not found

gwlib/gwlib.h is located in /usr/pkg/include/kannel on installed
package and in pkgsrc workdir.

Look in work/.buildlink3 and see if you can find the symlinks and if
they seem right.

Yes, they do
[root@freon ~]$ ls -la /usr/pkgsrc/comms/asterisk16/work/.buildlink/include/kannel/gwlib/gwlib.h lrwxr-xr-x 1 root wheel 37 Nov 17 22:54 /usr/pkgsrc/comms/asterisk16/work/.buildlink/include/kannel/gwlib/gwlib.h -> /usr/pkg/include/kannel/gwlib/gwlib.h
[root@freon ~]$ ls -la /usr/pkg/include/kannel/gwlib/gwlib.h
-rw-r--r-- 1 root wheel 4013 Nov 17 21:39 /usr/pkg/include/kannel/gwlib/gwlib.h

The other half is making sure asterisk's configure finds them.

I've tried to search where CFLAGS are located but asterisk seems to be extra tough for the beginner.

Snatching at a chance I have one more case to ask about if you don't mind. There is a big patch named usecallmanager (usecallmanager.nz) for Cisco phones. I believe it may not be a standalone package because it patch lot of asterisk source files.

It would be nice to have it as an option but I failed to apply it in any automated manner. It is proved working on NetBSD (I applied it manually to sources after make patch in pkgsrc).

1. It may not (and I believe shouldn't) be applied via patches/ due to multifile nature. 2. I failed to make an option, because we need here to download optional patch and patch it before applying. 3. It does not work in localpatches because of different base (running in asterisk source tree while localpatches need to run outside of it).

What is the best strategy to make it automatically applying?

--
Dima Veselov
Physics R&D Establishment of Saint-Petersburg University


Home | Main Index | Thread Index | Old Index