Bug 157369 - [PATCH] x11-toolkits/ocaml-lablgtk2: add an option for gtksourceview2 support, clean-up
Summary: [PATCH] x11-toolkits/ocaml-lablgtk2: add an option for gtksourceview2 support...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Stanislav Sedov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-27 19:40 UTC by Brendan Fabeny
Modified: 2011-10-29 04:07 UTC (History)
0 users

See Also:


Attachments
file.diff (19.38 KB, patch)
2011-05-27 19:40 UTC, Brendan Fabeny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Fabeny freebsd_committer freebsd_triage 2011-05-27 19:40:12 UTC
I'm going to add a new port that requires lablgtk2's gtksourceview2 support, currently not explicitly supported in lablgtk2.  I've attached a patch that:
 
--adds an option for this (on by default, as with the other options, and just called GTKSOURCEVIEW rather than GTKSOURCEVIEW2, to avoid renaming it after the probable imminent change to gtksourceview 3.0.x); 
--disables gtksourceview1 auto-detection, which can break the pkg-plist (I don't have anything against adding another option to support it, I just didn't need it for my new port); 
--simplifies the options handling, and prevents auto-detection from overriding a user's choice of options; 
--respects NOPORTEXAMPLES; and 
--uses a delimiter other than a comma for a CFLAGS regex (CFLAGS containing commas can break the build, and these are not uncommon).  

I also changed the GTKTL option to GTKGL -- I'm not sure of the rationale behind the former name (a typo?), the latter seems more appropriate. PORTREVISION is bumped.

b.

Fix: Patch attached with submission follows:
Comment 1 b. f. 2011-05-27 19:47:09 UTC
On 5/27/11, FreeBSD-gnats-submit@freebsd.org
<FreeBSD-gnats-submit@freebsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `ports/157369'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=157369

Oops, obviously the port name in the title of the PR should be
x11-toolkits/ocaml-lablgtk2.

b.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-05-29 07:03:49 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stas

Fix synopsis and assign.
Comment 3 Stanislav Sedov freebsd_committer freebsd_triage 2011-07-08 20:04:12 UTC
Hi!

Thanks a lot for the patch!
I have a couple of questions regarding it.

1) Did you checked that if some components for which autodetection is
   present in Makefile exists they won't be picked up automatically by
   configure despite the fact the --without-xxx flag was prodived?
   I'm not sure exactly why these autodetection checks were added to
   the port, but this might be because the underlying build system
   links agains them unconditionally if the dependency is present.
   This should be checked.
2) For GTKGL and GTKSOURCEVIEW the check should probably be
.if !defined(WITHOUT_GTKGL)
and
.if !defined(WITHOUT_GTKSOURCEVIEW)
because they're ON by default.

Otherwise, when being built in the batch mode the port will be build
without them enabled as WITH_GTKGL and WITH_GTKSOURCEVIEW won't be
defined.

Otherwise, it looks fine by my so fell free to commit.

-- 
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-09-18 16:28:44 UTC
bf          2011-09-18 15:28:34 UTC

  FreeBSD ports repository

  Modified files:
    x11-toolkits/ocaml-lablgtk2 Makefile pkg-plist 
  Log:
  add gtksourceview2 support; simplify handling of options;
  respect NOPORTEXAMPLES; change a set of sed delimiters to
  permit commas in flags
  
  PR:             157369
  Approved by:    stas (maintainer)
  
  Revision  Changes    Path
  1.30      +35 -31    ports/x11-toolkits/ocaml-lablgtk2/Makefile
  1.10      +131 -115  ports/x11-toolkits/ocaml-lablgtk2/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 b. f. 2011-09-18 18:48:12 UTC
> 1) Did you checked that if some components for which autodetection is
> present in Makefile exists they won't be picked up automatically by
> configure despite the fact the --without-xxx flag was prodived?
> I'm not sure exactly why these autodetection checks were added to
> the port, but this might be because the underlying build system
> links agains them unconditionally if the dependency is present.
> This should be checked.

I thought that I checked this before, but it was a while ago, so to be
sure, I looked again, and the configure scripts seems to be disabling
auto-detection properly.  It's a little strange, because if feature
FOO is disabled, the configure script defines:

USE_FOO=

in a common Makefile, ${WRKSRC}/config.make, and then other Makefiles,
like ${WRKSRC}/src/Makefile, have tests of the form:

ifdef USE_FOO
...
endif

which with our base system make would succeed, but apparently gmake
considers variables assigned empty values to be "undefined", and
treats ifdef like our .if !empty().  Anyway, I didn't see any problems
here.


> 2) For GTKGL and GTKSOURCEVIEW the check should probably be
> .if !defined(WITHOUT_GTKGL)
> and
> .if !defined(WITHOUT_GTKSOURCEVIEW)
> because they're ON by default.
>
> Otherwise, when being built in the batch mode the port will be build
> without them enabled as WITH_GTKGL and WITH_GTKSOURCEVIEW won't be
> defined.
>

Sorry, I overlooked this portion of your reply when I made my commit a
bit earlier today.  I think that they should be defined, even when
BATCH or PACKAGE_BUILDING is set, but I am willing to change them if
you wish.

b.
Comment 6 Brendan Fabeny freebsd_committer freebsd_triage 2011-10-29 04:07:14 UTC
State Changed
From-To: open->closed

Committed. Thanks!