Bug 196321 - print/gutenprint-base: Enable building without GTK2
Summary: print/gutenprint-base: Enable building without GTK2
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: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa, patch
Depends on: 202324
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-28 08:52 UTC by Matthieu Volat
Modified: 2015-09-23 00:00 UTC (History)
2 users (show)

See Also:
cmt: maintainer-feedback+


Attachments
Add a GTK2 option (2.48 KB, patch)
2014-12-28 08:52 UTC, Matthieu Volat
no flags Details | Diff
Update with better option handling in slaves, rudimentary check for gimp (2.88 KB, patch)
2014-12-29 08:20 UTC, Matthieu Volat
no flags Details | Diff
Better gtk2 option enabling (3.14 KB, patch)
2015-01-04 19:44 UTC, Matthieu Volat
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2014-12-28 08:52:24 UTC
Created attachment 151025 [details]
Add a GTK2 option

Hi,

As I am deploying a (jailed) cups network server those days, I found that gutenprint is bringing the whole X11 fiesta to my installation.

I'd like to submit a patch to optionaly enable/disable gtk2 support, which I'm not sure who is using it... -cups, -foomatic, -ijs slaves build fine without it, and the -gimp one do not seems to exist anymore?

Here is check-plist report:

WITH_GTK2:
print/gutenprint-base# make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)

WITHOUT_GTK2:
/usr/ports/print/gutenprint-base# make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-28 08:52:24 UTC
Maintainer CC'd
Comment 2 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2014-12-28 18:44:23 UTC
I'm generally ok with this idea.
Anyways, "the -gimp one" is not gone, it's named gimp-gutenprint (print/gimp-gutenprint) and actually requires libgutenprintui, but right now I'm not aware of anything else requiring that library.
To avoid upsetting dependencies, I'd suggest to make sure gimp-gutenprint depends on libgutenprintui (or the GTK2 option - there had been talk about ports depending on other ports OPTIONS, but I have to research if that's possible).
Comment 3 Matthieu Volat 2014-12-29 08:19:15 UTC
Ok, so I made the gimp slave depends on libgutenprintui2 library (ironicaly, it was the only slave *not* depending on it).

I also made the GTK2 option unique to -base, so it won't bother slave port with an unused option.

I also tried to put a option test in the gimp conditional, the logic being to grep the ${PORT_DBDIR}/print_gutenprint-base/options file to check for a ligne with both GTK2 and UNSET... 
In practice, it works, but would fail if for whatever reason, the port was installed without GTK2 support and no PORT_DB file (pkg? voluntary removal?). I guess this would be an adequate question for freebsd-ports@, I'll do that a bit later.
Comment 4 Matthieu Volat 2014-12-29 08:20:03 UTC
Created attachment 151060 [details]
Update with better option handling in slaves, rudimentary check for gimp
Comment 5 Matthieu Volat 2015-01-04 19:44:42 UTC
Created attachment 151339 [details]
Better gtk2 option enabling

Here is a better implementation of a check if gutenprint-base was built with gtk2 support in the case of gimp-gutenprint, I think: it do not put an explicit dependency on libgutenprintui2.so since it confuses the build system, but rather check for its presence in the pre-configure target, and output a message & error if necessary.
Comment 6 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2015-01-06 21:52:32 UTC
looks good (the libgutenprintui/libgutenprint dependency was redundant, indeed). I'll give it a try tomorrow, and then we'll just need to find a comitter :)
Comment 7 Matthieu Volat 2015-02-23 11:03:40 UTC
Sorry to bother, but is there any progress on commiting that enhancement?
Comment 8 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2015-02-23 22:11:31 UTC
except for me having been buried in work? :) no, please go ahead.
Comment 9 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2015-09-13 20:46:48 UTC
for reference: I rolled up this change into PR 202324 to avoid conflicts.
this PR should be closed as "overcome by events"
Comment 10 Jason Unovitch freebsd_committer freebsd_triage 2015-09-19 14:02:32 UTC
Set depends on bug 202324 based on comment 9.  This PR can be closed when that PR is done.
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-09-22 23:59:31 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Sep 22 23:59:07 UTC 2015
New revision: 397598
URL: https://svnweb.freebsd.org/changeset/ports/397598

Log:
  - Make GTK2 support optional
  - Fix module directory handling
  - Strip libraries
  - Minor fixes

  PR:		196321, 200017, 202324
  Submitted by:	mazhe@alkumuna.eu, yuri@rawbw.com, amdmi3@FreeBSD.org, cmt@burggraben.net (maintainer)
  Approved by:	cmt@burggraben.net (maintainer)

Changes:
  head/print/gimp-gutenprint/Makefile
  head/print/gutenprint-base/Makefile
  head/print/gutenprint-base/pkg-plist
  head/print/gutenprint-cups/pkg-plist