Bug 245007 - www/domoticz: Update to 2020.2
Summary: www/domoticz: Update to 2020.2
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: Oleksii Samorukov
URL:
Keywords: needs-patch, needs-qa
Depends on: 244903
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-23 14:50 UTC by Xavier Beaudouin
Modified: 2020-05-26 20:03 UTC (History)
3 users (show)

See Also:
samm: maintainer-feedback+


Attachments
update to 2020.1 (34.60 KB, patch)
2020-03-23 14:50 UTC, Xavier Beaudouin
kiwi: maintainer-approval+
Details | Diff
update to 2020.1 (34.27 KB, patch)
2020-03-24 07:05 UTC, Xavier Beaudouin
kiwi: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Beaudouin 2020-03-23 14:50:15 UTC
Created attachment 212644 [details]
update to 2020.1

Domoticz v2020.1 is out.
This patch update the ports.
NOTICE it depends of openzwave-devel since it can link only on OpenZwave 1.6.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244903
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-23 15:30:41 UTC
Does this change depend on (require) bug 244903 to be resolved/committed first? If so please add that bug ID to this issues "Depends On" field.

For readability also, is it possible to use PORTVERSION=2020.1 and use that (PORTVERSION) variable later in the Makefile, instead of PORTVERSION=DOMOTICZ_REL
Comment 2 Xavier Beaudouin 2020-03-24 07:05:45 UTC
Created attachment 212669 [details]
update to 2020.1

Domoticz patch with requested modifications :)

Regards
Comment 3 Xavier Beaudouin 2020-03-24 07:06:16 UTC
(In reply to Kubilay Kocak from comment #1)

I have done the requested changes.

Regards,
Xavier
Comment 4 xlxxvcvdnfcitjaaoj 2020-05-16 03:00:35 UTC
Since openzwave-devel was updated in April, is there anything else needed to commit this? I'm willing to test if needed - I'm preparing to install in a jail on FreeNAS with FreeBSD 11.3. Thanks!
Comment 5 xlxxvcvdnfcitjaaoj 2020-05-16 03:03:38 UTC
In fact, now 2020.2 is out - should we test 2020.1 first, or go straight to 2020.2 now?
Comment 6 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-23 17:10:38 UTC
Please update patch to 2020.2 if possible. We can commit it then
Comment 7 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-24 12:06:33 UTC
P.S. latest version of the patch does not work due to failed `make patch` command. Probably diffs to the files/ are forgotten.
Comment 8 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-24 16:18:10 UTC
I updated port to the 2020.2, see https://reviews.freebsd.org/D24984. 

Some other changes i done:

1. Properly set CMAKE_INSTALL_PREFIX. This way we don`t need to patch cmake paths anymore.
2. Fix build with included libraries. They are distributed as git submodules, so we need to fetch them using GH_TUPLE.
3. Removed patches and post-patch stage.


Please test and let me know if it works as expected.
Comment 9 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-24 16:46:45 UTC
(updated patch, not port, of course)
Comment 10 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-24 20:07:50 UTC
More changes (updated patch)

- Remove SLUA option as LUA is now only external
- Add OPENZWAVE as an optional dependency
- Add ability to use internal JSonCPP
- Fix build with python disabled (patch sent to the upstream - https://github.com/domoticz/domoticz/pull/4181/files)
Comment 11 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-26 08:23:40 UTC
Summary of the changes:

- Update to the 2020.2
- Make LUA as hard dependency as internal LUA is not supported anymore
- Make OPENZWAVE optional
- Enable usage of precompiled headers by default to follow the upstream
- Add option to use JSonCPP from the domoticz instead of ports one
- Use GH_TUPLE to load external dependencies from the github (upstream uses git submodules), disable 	GIT_SUBMODULE
- Fix CMAKE_INSTALL_PREFIX (should be specified as Makefile option, not as CMAKE one) and remove patches obsoleted by that fix
- USE CMAKE_ON/CMAKE_OFF for the better readability
- Remove `post-patch` target, as version is normally set by the cmake itself
- Include patches for the embedded `minizip` and `mosquitto`, disable mosquitto shared libraries if embedded
- Update `pkg-plist` to support files added by the embedded dependencies

Diff could be found at https://reviews.freebsd.org/D24984

kiwi@oav.net - please let me know if you are ok with that, if yes - i will commit.
Comment 12 Xavier Beaudouin 2020-05-26 08:31:35 UTC
Hi Oleksii,

Well nice work :) 
IMHO i am not fan of static linking of domoticz even if your work is really nice for that. Since almost everything is on the FreeBSD ports, I really think we can forgot the static options.

Otherwise I love the work you did.

Is there any possiblity to use only dynamic linking and forgot the GH_TUPLE ? (Or maybe you have really a good usage for the static stuff ?).

Kind regards
Xavier
Comment 13 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-26 08:42:43 UTC
Thank you for the feedback.

+1 to drop static, i personally see 0 value from having static openssl or minizip as an options. I would probably suggest to leave (at least for now) possibility to use static Mosquitto, as it could be the case that one from port is not working as expected and it would be helpful to check with one author recommends. 

I will do these changes now, it would also make port smaller.
Comment 14 Xavier Beaudouin 2020-05-26 08:46:18 UTC
Well agreed. About MQTT, well... I use the dynamic one for ages, no issues at all (on my devel port, that... I have to update !).

Thanks !
Comment 15 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-26 09:10:26 UTC
@kiwi@oav.net - patch updated. Removed all static options but MQQT. Let me know if it looks good for you.
Comment 16 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-26 09:11:09 UTC
(p.s. also using domoticz on ancient RPi1 device running on FreeBSD :))
Comment 17 Xavier Beaudouin 2020-05-26 09:48:08 UTC
Well seems the patch has not been updated yet ... (on bugzilla)... :) I am wrong ? :p
Comment 18 Oleksii Samorukov freebsd_committer freebsd_triage 2020-05-26 11:15:46 UTC
Oh, its on the https://reviews.freebsd.org/D24984
Comment 19 Xavier Beaudouin 2020-05-26 13:46:56 UTC
Well :) Nice work :) You have the green light to push it :) (And I will use what you did for my -devel port as well).

Many thanks :)
Xavier
Comment 20 commit-hook freebsd_committer freebsd_triage 2020-05-26 20:02:32 UTC
A commit references this bug:

Author: samm
Date: Tue May 26 20:01:44 UTC 2020
New revision: 536650
URL: https://svnweb.freebsd.org/changeset/ports/536650

Log:
  www/domoticz: Update to 2020.2

  - Make LUA as hard dependency as internal LUA is not supported anymore
  - Make OPENZWAVE optional dependency
  - Enable usage of precompiled headers by default to follow the upstream
  - Use GH_TUPLE to load external dependencies from the github (upstream uses git
    submodules), disable GIT_SUBMODULE. As for now only MQQT is supported
  - Fix CMAKE_INSTALL_PREFIX (should be specified as Makefile option, not as CMAKE
     one) and remove patches obsoleted by that fix
  - USE CMAKE_ON/CMAKE_OFF for the better readability
  - Remove `post-patch` target, as version is normally set by the cmake itself
  - Include patches for the embedded `mosquitto`, disable mosquitto shared libraries
    installation
  - Update `pkg-plist` to support files added by the embedded dependencies
  - Remove `CONFLICTS` as there are no such matched packages in the ports tree
  - Fix build without PYTHON, patch accepted by the upstream
  - Remove most of the STATIC* options

  ChangeLog: https://github.com/domoticz/domoticz/blob/development/History.txt
  PR: 245007
  Approved by: krion (mentor)
  Differential Revision: https://reviews.freebsd.org/D24984

Changes:
  head/www/domoticz/Makefile
  head/www/domoticz/distinfo
  head/www/domoticz/files/patch-CMakeLists.txt
  head/www/domoticz/files/patch-extern_mosquitto_CMakeLists.txt
  head/www/domoticz/files/patch-extern_mosquitto_lib_CMakeLists.txt
  head/www/domoticz/files/patch-extern_mosquitto_lib_cpp_CMakeLists.txt
  head/www/domoticz/files/patch-getgit.cmake
  head/www/domoticz/files/patch-main_mainworker.cpp
  head/www/domoticz/pkg-plist