Bug 281206 - www/wt: Revamp port and update to 4.10.4
Summary: www/wt: Revamp port and update to 4.10.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 11:31 UTC by Bram Ton
Modified: 2024-09-20 13:49 UTC (History)
3 users (show)

See Also:
info: maintainer-feedback+


Attachments
www/wt: Update to 4.10.4 and revamp port a little (899 bytes, application/mbox)
2024-09-02 11:31 UTC, Bram Ton
no flags Details
www/wt: Update to 4.10.4 and revamp port a little (82.24 KB, patch)
2024-09-02 12:37 UTC, Bram Ton
no flags Details | Diff
www/wt: Update to 4.10.4 and revamp port a little (82.03 KB, patch)
2024-09-03 09:04 UTC, Bram Ton
no flags Details | Diff
www/wt: Update to 4.10.4 and revamp port a little (82.47 KB, patch)
2024-09-04 10:52 UTC, Bram Ton
no flags Details | Diff
Makefile v1 (4.51 KB, text/plain)
2024-09-11 23:47 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details
Makefile v2 (4.65 KB, text/plain)
2024-09-17 13:34 UTC, Bram Ton
no flags Details
pkg-plist v2 (40.74 KB, text/plain)
2024-09-17 13:34 UTC, Bram Ton
no flags Details
www/wt v4.8.0 update to v4.10.4 (4.81 KB, patch)
2024-09-20 09:59 UTC, Mamadou Babaei
info: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bram Ton 2024-09-02 11:31:37 UTC
Created attachment 253272 [details]
www/wt: Update to 4.10.4 and revamp port a little

This patch upgrades wt to 4.10.4

Furthermore, the port has been revamped a little:

* Make use of standard variables, e.g. ETCDIR/EXAMPLESDIR_REL/WWWOWN
* Sort options alphabetically
* Renamed some variables to match those in bsd.options.desc.mk
* Removed patches, they are not needed anymore
* Missing examples have been added to the pkg-plist
Comment 1 Alexander Vereeken freebsd_triage 2024-09-02 12:24:26 UTC
Comment on attachment 253272 [details]
www/wt: Update to 4.10.4 and revamp port a little

Hello,

the file that you have submitted seems to be not related to the subject.

[PATCH] Conditional man pages with changes to audio/virtual_oss.
Comment 2 Bram Ton 2024-09-02 12:37:08 UTC
Created attachment 253274 [details]
www/wt: Update to 4.10.4 and revamp port a little
Comment 3 Bram Ton 2024-09-02 12:38:08 UTC
(In reply to Alexander Vereeken from comment #1)
My bad, I have attached the correct version now.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-02 15:56:59 UTC
1. Look like you tried to sort options in CMAKE_ARGS, but not completely.

2. Typo:
> QT6_CMAKE_BOOL=		NABLE_QT6

3. Maybe create flavors qt5 and qt6? Or at least make qt6 option default.

4. Use portclippy to sort Makefile.
Comment 5 Mamadou Babaei 2024-09-03 05:56:16 UTC
Thank you for your patch! Please give me some time to test it first and I'll get back to you.
Comment 6 Bram Ton 2024-09-03 09:04:33 UTC
Created attachment 253288 [details]
www/wt: Update to 4.10.4 and revamp port a little

Makefile has been sorted according to portclippy output.

I realised Qt is only required when building the examples/wtwithqt, hence I have removed the Qt requirements.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-03 18:01:42 UTC
You can use something like this:
EXTRACT_AFTER_ARGS=     --exclude ".gitignore" --no-same-owner --no-same-permissions
instead of
post-extract:
	${FIND} ${WRKSRC} -name .gitignore -delete

Check examples in other ports - search for EXTRACT_AFTER_ARGS.
Comment 8 Bram Ton 2024-09-04 10:52:59 UTC
Created attachment 253323 [details]
www/wt: Update to 4.10.4 and revamp port a little

Use EXTRACT_AFTER_ARGS for ignoring files in the extraction process.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-09 22:48:25 UTC
(In reply to Bram Ton from comment #8)
Waiting maintainer approve or 2 weeks maintainer timeout…
Comment 10 Mamadou Babaei 2024-09-10 07:13:13 UTC
Comment on attachment 253323 [details]
www/wt: Update to 4.10.4 and revamp port a little

Looks fine to me. Tested with various configurations and it passed all tests. Thank you for the patch @Bram Ton!
Comment 11 Mamadou Babaei 2024-09-10 07:15:14 UTC
I don't seem to have permission to set the Maintainer Flag to +. It just says no flags.
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-10 22:42:16 UTC
Please next time make separate patch for update version and for improve port/sort options.
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-11 19:42:30 UTC
${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT} - why not ${PORTNAME}-${DISTVERSION}?
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-11 19:44:45 UTC
Also are you sure option DEBUG still work after changes in patch?
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-11 23:47:35 UTC
Created attachment 253507 [details]
Makefile v1

Check please my suggestion (Makefile).
Comment 16 Bram Ton 2024-09-13 19:59:50 UTC
(In reply to Vladimir Druzenko from comment #15)

It seems the current patch (Makefile v1) has EXAMPLES and UNWIND enabled by default. The EXAMPLES option will also build the examples. Is it common practise to install pre-compiled examples by default for ports?

Also the UNWIND option is enabled now by default, is this really necessary for normal users? It does add an extra dependency to the port.

In the original Makefile there was the `PORTEXAMPLES=	*`. At hindsight I think this is the better option as it avoids polluting the (already) large pkg-plist with an enoumous number of %%PORTEXAMPLES%% lines.
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-13 22:46:52 UTC
(In reply to Bram Ton from comment #16)
> It seems the current patch (Makefile v1) has EXAMPLES and UNWIND enabled by default.
> The EXAMPLES option will also build the examples. Is it common practise to install
> pre-compiled examples by default for ports?
> 
> Also the UNWIND option is enabled now by default, is this really necessary for normal users?
> It does add an extra dependency to the port.
This line:
EXAMPLES SAML THEMES UNWIND FIREBIRD MYSQL PGSQL LIBWTTEST
was added for testing only. I forgot to remove it before attach Makefile to PR.
Ignore it.

> In the original Makefile there was the `PORTEXAMPLES=	*`. At hindsight I think this is
> the better option as it avoids polluting the (already) large pkg-plist with an enoumous
> number of %%PORTEXAMPLES%% lines.
This was done in your patch and I didn't change it.
Want to get it back?
Comment 18 Bram Ton 2024-09-17 13:34:19 UTC
Created attachment 253626 [details]
Makefile v2

These are the changes compared to the previous Makefile:

PLIST_SUB=             VERSION=${DISTVERSION}
+PORTEXAMPLES=  *

 OPTIONS_DEFINE=                DEBUG EXAMPLES HARU LIBWTTEST OPENGL PANGO \
                        RESOURCES SAML THEMES UNWIND
-OPTIONS_DEFAULT=       FASTCGI HARU OPENGL PANGO RESOURCES SQLITE3 WTHTTP \
-                       EXAMPLES SAML THEMES UNWIND FIREBIRD MYSQL PGSQL LIBWTTEST
-OPTIONS_GROUP=         CONNECTOR DBO WSTRING
+OPTIONS_DEFAULT=       HARU OPENGL PANGO RESOURCES THEMES
+OPTIONS_GROUP=         CONNECTOR DBO
 OPTIONS_GROUP_CONNECTOR=       FASTCGI WTHTTP
+OPTIONS_DEFAULT+=      FASTCGI WTHTTP
 OPTIONS_GROUP_DBO=     FIREBIRD MYSQL PGSQL SQLITE3
+OPTIONS_DEFAULT+=      SQLITE3
 NO_OPTIONS_SORT=       yes
 OPTIONS_SUB=           yes

PS: for testing I found the -c option of poudriere very handy. It gives you the config menu.
Comment 19 Bram Ton 2024-09-17 13:34:59 UTC
Created attachment 253627 [details]
pkg-plist v2
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-17 14:57:20 UTC
(In reply to Bram Ton from comment #18)
Why split "OPTIONS_DEFAULT=" for several "OPTIONS_DEFAULT+="?
Comment 21 Mamadou Babaei 2024-09-20 09:59:07 UTC
Created attachment 253686 [details]
www/wt v4.8.0 update to v4.10.4

OK, I've unified all the patches into one patch with all the suggestions from Bram and Vladimir, and also:

- Disabled the UNWIND option by default as it's something not used by every user and the Wt default CMake option is set to OFF.

- Re-enabled all DBO backends rather than only SQLite since by default in the CMakefile all backends are enabled and it restricts the pkg binary users to SQLite. If anyone wants to limit the DBO backends to a specific database, it makes sense to build from ports since the user preferences vary regarding the database of choice.
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-20 11:58:51 UTC
(In reply to Mamadou Babaei from comment #21)
Maybe create flavors for all DB backends?
Comment 23 Mamadou Babaei 2024-09-20 12:29:16 UTC
(In reply to Vladimir Druzenko from comment #22)

Well, not sure if flavorizing the port by database is a good idea or not. It's still possible an application utilizes two or more DBs at the same time, or people like myself avoid using DBO provided by Witty at all. For example, I prefer pqxx. 

If you still think, it's a good idea let me know and I'll look into it.
Comment 24 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-20 13:18:29 UTC
(In reply to Mamadou Babaei from comment #23)
It was just an idea.

Committing current patch.
Comment 25 commit-hook freebsd_committer freebsd_triage 2024-09-20 13:49:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a3940b83e061e764555a568b2c92656aa6487219

commit a3940b83e061e764555a568b2c92656aa6487219
Author:     Bram Ton <bram@cbbg.nl>
AuthorDate: 2024-09-20 13:34:43 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-09-20 13:34:43 +0000

    www/wt: Revamp port and update 4.8.0 → 4.10.4

    Release notes:
    https://www.webtoolkit.eu/wt/doc/reference/html/Releasenotes.html
    Changelogs:
    https://github.com/emweb/wt/releases/tag/4.8.1
    https://github.com/emweb/wt/releases/tag/4.8.2
    https://github.com/emweb/wt/releases/tag/4.8.3
    https://github.com/emweb/wt/releases/tag/4.9.0
    https://github.com/emweb/wt/releases/tag/4.9.1
    https://github.com/emweb/wt/releases/tag/4.9.2
    https://github.com/emweb/wt/releases/tag/4.10.0
    https://github.com/emweb/wt/releases/tag/4.10.1
    https://github.com/emweb/wt/releases/tag/4.10.2
    https://github.com/emweb/wt/releases/tag/4.10.3
    https://github.com/emweb/wt/releases/tag/4.10.4

    Improve port:
    - Sort options
    - Fix dependencies
    - Make all database backends default on
    - Add EXTRACT_AFTER_ARGS for reduce IO during build
    - Pet portclippy

    This update is a team effort between the reporter (Bram Ton), the
    maintainer (Mamadou Babai) and me.

    PR:             281206
    Approved by:    Mamadou Babaei <info@babaei.net> (maintainer)

 www/wt/Makefile                          | 147 ++++++++++++---------------
 www/wt/distinfo                          |   8 +-
 www/wt/files/patch-CMakeLists.txt (gone) |  45 ---------
 www/wt/pkg-plist                         | 164 +++++++++++++++----------------
 4 files changed, 148 insertions(+), 216 deletions(-)
Comment 26 Vladimir Druzenko freebsd_committer freebsd_triage 2024-09-20 13:49:47 UTC
Thanks!