Bug 240206 - net/kamailio: Refactoring
Summary: net/kamailio: Refactoring
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-08-30 09:32 UTC by Dmitry Wagin
Modified: 2019-09-01 15:13 UTC (History)
1 user (show)

See Also:
pi: maintainer-feedback+


Attachments
kamailio.diff (37.09 KB, patch)
2019-08-30 09:32 UTC, Dmitry Wagin
no flags Details | Diff
kamailio.diff (38.87 KB, patch)
2019-08-31 12:59 UTC, Dmitry Wagin
no flags Details | Diff
poudriere_testport.txt (192.51 KB, text/plain)
2019-08-31 13:04 UTC, Dmitry Wagin
no flags Details
kamailio.diff (45.39 KB, patch)
2019-08-31 13:23 UTC, Dmitry Wagin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2019-08-30 09:32:50 UTC
Created attachment 207021 [details]
kamailio.diff

- improved options handling
 - improved building
 - fixed plists
Comment 1 Kurt Jaeger freebsd_committer 2019-08-30 19:12:28 UTC
Have you checked with portlint -AC ?
Comment 2 Kurt Jaeger freebsd_committer 2019-08-30 19:47:37 UTC
I did a testbuild with:

===> The following configuration options are available for kamailio-5.2.4_1:
     DATABASE=on: Database support (select one or more)
     DIALPLAN=off: Dialplan support
     DOCS=on: Build and/or install documentation
     JITSI=off: VoIP Frontend GUI via Jitsi
     PERL=off: Perl scripting language support
     PRESENCE=on: Presence support
     RADIUS=on: RADIUS protocol support
     SCTP=off: SCTP support
     TLS=on: Secure network connection support via TLS
     UNIXODBC=off: ODBC backend via unixODBC
     WEBSOCKET=off: Websocket support
====> Database support (select one or more): you have to choose at least one of them
     MYSQL=off: MySQL database support
     PGSQL=on: PostgreSQL database support

and it failed with errors in the plist.

See https://people.freebsd.org/~pi/logs/net__kamailio-120-1567192298.txt

I have not checked why it failed.
Comment 3 Kurt Jaeger freebsd_committer 2019-08-30 19:53:32 UTC
Btw, thanks for the cool patch! It is very useful to clean that port up.
Comment 4 Dmitry Wagin 2019-08-31 12:59:19 UTC
Created attachment 207043 [details]
kamailio.diff

passed portlint -AC
Comment 5 Dmitry Wagin 2019-08-31 13:04:40 UTC
Created attachment 207044 [details]
poudriere_testport.txt

poudriere testport
Comment 6 Dmitry Wagin 2019-08-31 13:16:49 UTC
(In reply to Kurt Jaeger from comment #2)

I think the problem is the patches that need to be removed

patch-src_Makefile
patch-src_main.c
patch-src_modules_ctl_ctl.c
patch-src_modules_ctl_ctl__defaults.h
patch-src_modules_tls_Makefile
patch-utils_kamctl_Makefile
Comment 7 Dmitry Wagin 2019-08-31 13:23:14 UTC
Created attachment 207045 [details]
kamailio.diff

with removed files
Comment 8 Kurt Jaeger freebsd_committer 2019-09-01 14:37:54 UTC
What value will RUN_DIR have with those patches removed ?
Comment 9 Dmitry Wagin 2019-09-01 14:52:50 UTC
(In reply to Kurt Jaeger from comment #8)

+RUNDIR?=	/var/run/${PORTNAME}

 post-patch:
+	@${REINPLACE_CMD} '499s|$$(run_prefix)/$$(run_dir)|${RUNDIR}|' \
+		${WRKSRC}/src/Makefile.defs
Comment 10 Kurt Jaeger freebsd_committer 2019-09-01 15:12:53 UTC
Ah, now I get it. Thanks!

Committed!
Comment 11 commit-hook freebsd_committer 2019-09-01 15:13:19 UTC
A commit references this bug:

Author: pi
Date: Sun Sep  1 15:12:51 UTC 2019
New revision: 510695
URL: https://svnweb.freebsd.org/changeset/ports/510695

Log:
  net/kamailio: refactoring

  - improved options handling
  - improved building
  - fixed plist

  PR:		240206
  Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>

Changes:
  head/net/kamailio/Makefile
  head/net/kamailio/files/kamailio.in
  head/net/kamailio/files/patch-src_Makefile
  head/net/kamailio/files/patch-src_Makefile.defs
  head/net/kamailio/files/patch-src_main.c
  head/net/kamailio/files/patch-src_modules_ctl_ctl.c
  head/net/kamailio/files/patch-src_modules_ctl_ctl__defaults.h
  head/net/kamailio/files/patch-src_modules_tls_Makefile
  head/net/kamailio/files/patch-src_modules_tls_tls__bio.c
  head/net/kamailio/files/patch-utils_kamctl_Makefile
  head/net/kamailio/pkg-plist