Bug 201414 - [patch] x11-fm/pcmanfm: fix NLS option, sort USES
Summary: [patch] x11-fm/pcmanfm: fix NLS option, sort USES
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: Philip M. Gollucci
URL:
Keywords: needs-patch, patch
Depends on:
Blocks:
 
Reported: 2015-07-07 23:50 UTC by Andriy Voskoboinyk
Modified: 2015-07-15 20:59 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (horia)


Attachments
Makefile.diff (757 bytes, patch)
2015-07-07 23:50 UTC, Andriy Voskoboinyk
no flags Details | Diff
portlint.log (419 bytes, text/plain)
2015-07-07 23:51 UTC, Andriy Voskoboinyk
no flags Details
poudriere-9.3-i386.log (64.27 KB, text/plain)
2015-07-07 23:52 UTC, Andriy Voskoboinyk
no flags Details
Patch2.diff (1.55 KB, patch)
2015-07-08 19:55 UTC, Andriy Voskoboinyk
no flags Details | Diff
portlint.log (317 bytes, text/plain)
2015-07-08 19:57 UTC, Andriy Voskoboinyk
no flags Details
poudriere-9.3-i386-no-nls.log (64.27 KB, text/plain)
2015-07-08 20:02 UTC, Andriy Voskoboinyk
no flags Details
pcmanfm.diff (2.13 KB, patch)
2015-07-09 11:50 UTC, Horia Racoviceanu
no flags Details | Diff
pcmanfm.diff (2.26 KB, patch)
2015-07-10 00:03 UTC, Horia Racoviceanu
horia: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-07 23:50:30 UTC
Created attachment 158516 [details]
Makefile.diff
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-07 23:51:28 UTC
Created attachment 158517 [details]
portlint.log
Comment 2 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-07 23:52:29 UTC
Created attachment 158518 [details]
poudriere-9.3-i386.log
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-08 04:24:23 UTC
USES=gettext-tools can/should be made conditional using an options helper as well: NLS_USES=gettext-tools
Comment 4 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-08 19:53:54 UTC
(In reply to Kubilay Kocak from comment #3)
Not with intltool - they are will be checked/used even when NLS is disabled.

Also, gettext-runtime (libintl.so) seems to be used anyway (via glib/gi18n.h?).
Comment 5 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-08 19:55:51 UTC
Created attachment 158540 [details]
Patch2.diff

- Add gettext-runtime into USES.
- Regenerate patch.
Comment 6 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-08 19:57:15 UTC
Created attachment 158541 [details]
portlint.log
Comment 7 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-08 20:02:34 UTC
Created attachment 158543 [details]
poudriere-9.3-i386-no-nls.log
Comment 8 Horia Racoviceanu 2015-07-09 11:50:54 UTC
Created attachment 158563 [details]
pcmanfm.diff

Andriy, you are right. In this case, autoreconf sets NLS on and intltool runs anyway.

As koobs@ mentioned in comment 3 and the portlint warning, gettext should be made conditional using an options helper.

Also, there is no need to add FLAGS here.

Please take a look at this patch. I will run more tests later.
Comment 9 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-07-09 19:29:47 UTC
(In reply to Horia Racoviceanu from comment #8)
> As koobs@ mentioned in comment 3 and the portlint warning, gettext should be 
> made conditional using an options helper.

gettext(-runtime) cannot be used conditionally, since devel/glib20 uses it.

For example

>   fm_show_error(NULL, NULL, _("Desktop manager is not active."));

will be converted into

>    fm_show_error(NULL, NULL, libintl_gettext("Desktop manager is not active."));

> Also, there is no need to add FLAGS here.

They're required for correct libintl.h detection:
> checking libintl.h usability... no
> checking libintl.h presence... no
> checking for libintl.h... no
Comment 10 Horia Racoviceanu 2015-07-10 00:03:51 UTC
Created attachment 158573 [details]
pcmanfm.diff

I accept this patch, with small modifications.
Thank you.

- Bump PORTREVISION
- Add gettext-runtime into USES
- Sort USES
- Fix NLS option
- Regenerate patch

# portlint -AC
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
0 fatal errors and 2 warnings found.
Comment 11 Philip M. Gollucci freebsd_committer freebsd_triage 2015-07-14 22:25:29 UTC
Take.
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-07-15 20:59:34 UTC
A commit references this bug:

Author: pgollucci
Date: Wed Jul 15 20:59:09 UTC 2015
New revision: 392223
URL: https://svnweb.freebsd.org/changeset/ports/392223

Log:
  x11-fm/pcmanfm: cleanup

  - Bump PORTREVISION
  - Add gettext-runtime into USES
  - Sort USES
  - Fix NLS option
  - Regenerate patch

  PR:                  201414
  Submitted by:        s3erios@gmail.com and maintainer
  Approved by:         horia@racoviceanu.com (maintainer)

Changes:
  head/x11-fm/pcmanfm/Makefile
  head/x11-fm/pcmanfm/files/patch-src__Makefile.am