Bug 219731 - sysutils/fswatch-mon avoiding need of gettext dependency when option NLS is disabled
Summary: sysutils/fswatch-mon avoiding need of gettext dependency when option NLS is d...
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: Olivier Cochard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-02 14:29 UTC by Olivier Cochard
Modified: 2017-11-01 08:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (enrico.m.crisostomo)


Attachments
patch file (1.81 KB, patch)
2017-06-02 14:29 UTC, Olivier Cochard
no flags Details | Diff
update to 1.11.2 and make NLS optional (3.06 KB, patch)
2017-10-31 23:00 UTC, Enrico M. Crisostomo
no flags Details | Diff
update fswatch@1.11.2 and make NLS optional (3.30 KB, patch)
2017-10-31 23:40 UTC, Enrico M. Crisostomo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Cochard freebsd_committer freebsd_triage 2017-06-02 14:29:22 UTC
Created attachment 183156 [details]
patch file

Here is a patch for avoiding need of gettext dependency when option NLS is disabled.
Comment 1 Olivier Cochard freebsd_committer freebsd_triage 2017-10-02 05:28:38 UTC
Hi Enrico,

no feedback about this patch ?
Comment 2 Enrico M. Crisostomo 2017-10-21 20:25:46 UTC
Hi Olivier,

Sorry for the belated answer. I will have a look at the patch asap.
Comment 3 Enrico M. Crisostomo 2017-10-24 15:13:23 UTC
Hi Olivier, I had a look at the patch. I see that what the patch does is basically:

* Removing ABOUT-NLS from the list of distributed files.
* Purging gettext-related stuff from the Makefile.
* Removing ABOUT-NLS from pkg-plist.

My impressions are the following:

* The first two points are actually shortcomings of the current package configuration machinery. Therefore I think we should not be modifying the package files; rather, we should update the package to conditionally use gettext only when available and/or requested.
* Removing ABOUT-NLS from pkg-plist is something which we should take care of at the port side. However, according to the "FreeBSD Porter's Handbook", sec. 6.7.2 (Using GNU gettext / Optional Usage), that goal can be accomplished by simply appending the %%NLS%% prefix to the conditionally-included file path in pkg-plist.

I'm actively working on the first two points and I will submit a port update shortly. Could you validate my statement about using %%NLS%%?
Comment 4 Enrico M. Crisostomo 2017-10-31 23:00:51 UTC
Created attachment 187629 [details]
update to 1.11.2 and make NLS optional

Update to the port that:

* Downloads the release tarball attached to the specified release (as a binary file) in github.
* Conditionally uses NLS.
Comment 5 Enrico M. Crisostomo 2017-10-31 23:07:05 UTC
Hi Olivier,

I updated fswatch:

  * gettext is now used conditionally, only when NLS is used.

You can see the patch I propose:

  * fswatch has been updated to 1.11.2
  * gettext is _not_ a dependency any longer (it is only is NLS is used)
  * autoreconf is not used.

The previous version of the port downloaded the _sources_ of fswatch at the specified tag, _not_ the release tarball. The release tarball should be used instead, as per GNU autotools workflow.  What's currently happening is that autoreconf is invoked to recreate the configure script and at that stage gettext _is_ required. Using the release tarball (attached to the github release) is the documented way to build fswatch.

Please, have a look at it.  By the way, I wanted to simplify MASTER_SITES by using GHC but I found an issue (The :DEFAULT group used for fswatch-1.11.2.tar.gz is missing from MASTER_SITES.) and I wasn't able to promptly solve it.

Cheers,
-- 
Enrico
Comment 6 Enrico M. Crisostomo 2017-10-31 23:08:38 UTC
I forgot to mention that I tested the port with poudriere, on a 11.1-RELEASE amd64 jail with both NLS enabled and disabled, and everything works fine.
Comment 7 Enrico M. Crisostomo 2017-10-31 23:40:10 UTC
Created attachment 187633 [details]
update fswatch@1.11.2 and make NLS optional
Comment 8 Enrico M. Crisostomo 2017-10-31 23:41:51 UTC
(In reply to Enrico M. Crisostomo from comment #4)
Please ignore the first patch: I forgot to include a modification
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-11-01 08:41:03 UTC
A commit references this bug:

Author: olivier
Date: Wed Nov  1 08:40:17 UTC 2017
New revision: 453268
URL: https://svnweb.freebsd.org/changeset/ports/453268

Log:
  Update to 1.11.2 and conditionally uses NLS

  PR:		219731
  Submitted by:	Enrico M. Crisostomo <enrico.m.crisostomo@gmail.com> (maintainer)

Changes:
  head/sysutils/fswatch-mon/Makefile
  head/sysutils/fswatch-mon/distinfo
  head/sysutils/fswatch-mon/pkg-plist
Comment 10 Olivier Cochard freebsd_committer freebsd_triage 2017-11-01 08:42:58 UTC
Thanks!
I've just did very small "cosmetic" changes to the Makefile (tabulation and variables order) for being portlint compliant.