NetBSD Problem Report #44878
From www@NetBSD.org Tue Apr 19 02:14:56 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 04AF663C38B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 19 Apr 2011 02:14:56 +0000 (UTC)
Message-Id: <20110419021455.0C41063BBDB@www.NetBSD.org>
Date: Tue, 19 Apr 2011 02:14:55 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
X-Send-Pr-Version: www-1.0
>Number: 44878
>Category: pkg
>Synopsis: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Apr 19 02:15:00 +0000 2011
>Closed-Date: Mon Dec 08 20:23:36 +0000 2014
>Last-Modified: Mon Dec 08 20:25:00 +0000 2014
>Originator: David H. Gutteridge
>Release: Several
>Organization:
>Environment:
>Description:
I've been working (off and on) on adding support for more of the Abiword plug-ins than are currently enabled by default. In order to use the Abiword thesaurus functionality, the GTK-dependent portion of aiksaurus (gaiksaurus) must be enabled. (It's an interesting little application on its own, too, in how it displays results.) I've attached patches to add an option to the existing package to make this happen. (I've seen debate before on pkgsrc mailing lists over whether package options are a good or bad thing [as opposed to distinct packages], and I'm not sure how to force the GTK components to be included if this package is being compiled for Abiword, but this is a start, anyway...)
>How-To-Repeat:
>Fix:
Make file patch:
--- Makefile 2011-04-18 22:03:25.000000000 -0400
+++ Makefile.new 2011-04-18 22:02:53.000000000 -0400
@@ -15,7 +15,7 @@
USE_LIBTOOL= YES
USE_LANGUAGES= c c++
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --without-gtk
PKGCONFIG_OVERRIDE= base/aiksaurus-1.0.pc.in
+.include "options.mk"
.include "../../mk/bsd.pkg.mk"
New options.mk file:
# $NetBSD: options.mk,v 1.10 2009/08/05 17:10:37 drochner Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.aiksaurus
PKG_SUPPORTED_OPTIONS= gtk
PKG_SUGGESTED_OPTIONS=
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mgtk)
CONFIGURE_ARGS+= --with-gtk
.include "../../x11/gtk2/buildlink3.mk"
PLIST_SRC= ${PKGDIR}/PLIST ${PKGDIR}/PLIST.gtk
.else
CONFIGURE_ARGS+= --without-gtk
.endif
New PLIST.gtk file:
bin/gaiksaurus
include/Aiksaurus/AiksaurusGTK-C.h
include/Aiksaurus/AiksaurusGTK.h
lib/libAiksaurusGTK-1.2.so.0.0.1
lib/libAiksaurusGTK.a
lib/libAiksaurusGTK.la
lib/pkgconfig/gaiksaurus-1.0.pc
>Release-Note:
>Audit-Trail:
From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
Date: Mon, 31 Mar 2014 02:29:28 -0400
In the intervening years, GCC upgrades have made the following patches
necessary:
--- gtk/src/Display.cpp.orig 2003-05-27 19:56:54.000000000 -0400
+++ gtk/src/Display.cpp 2014-03-31 01:56:15.000000000 -0400
@@ -22,6 +22,7 @@
#include "Meaning.h"
#include "DialogMediator.h"
#include "Exception.h"
+#include <strings.h>
using namespace std;
namespace AiksaurusGTK_impl
--- gtk/src/gtkAiksaur.t.cpp.orig 2002-01-11 21:02:12.000000000 -0500
+++ gtk/src/gtkAiksaur.t.cpp 2014-03-31 02:01:07.000000000 -0400
@@ -20,6 +20,7 @@
#include <AiksaurusGTK.h>
#include "config.h"
+#include <cstdlib>
#include <gtk/gtk.h>
#include <iostream>
#include <string>
Dave
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, dhgutteridge@sympatico.ca
Cc:
Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
Date: Mon, 31 Mar 2014 08:54:12 -0400
On Mar 31, 7:30am, dhgutteridge@sympatico.ca ("David H. Gutteridge") wrote:
-- Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus
| The following reply was made to PR pkg/44878; it has been noted by GNATS.
|
| From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
| To: gnats-bugs@NetBSD.org
| Cc:
| Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
| Date: Mon, 31 Mar 2014 02:29:28 -0400
|
| In the intervening years, GCC upgrades have made the following patches
| necessary:
|
| --- gtk/src/Display.cpp.orig 2003-05-27 19:56:54.000000000 -0400
| +++ gtk/src/Display.cpp 2014-03-31 01:56:15.000000000 -0400
| @@ -22,6 +22,7 @@
| #include "Meaning.h"
| #include "DialogMediator.h"
| #include "Exception.h"
| +#include <strings.h>
| using namespace std;
|
| namespace AiksaurusGTK_impl
|
| --- gtk/src/gtkAiksaur.t.cpp.orig 2002-01-11 21:02:12.000000000 -0500
| +++ gtk/src/gtkAiksaur.t.cpp 2014-03-31 02:01:07.000000000 -0400
| @@ -20,6 +20,7 @@
|
| #include <AiksaurusGTK.h>
| #include "config.h"
| +#include <cstdlib>
| #include <gtk/gtk.h>
| #include <iostream>
| #include <string>
|
I can believe the second patch, but I think that the first should
be cstring?
christos
From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: Christos Zoulas <christos@zoulas.com>,
gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
Date: Mon, 31 Mar 2014 19:24:26 -0400
On 2014-03-31, at 8:54 AM, Christos Zoulas wrote:
> On Mar 31, 7:30am, dhgutteridge@sympatico.ca ("David H. Gutteridge") =
wrote:
> -- Subject: Re: pkg/44878: Submission to add an option to =
textproc/aiksaurus=20
>=20
> | The following reply was made to PR pkg/44878; it has been noted by =
GNATS.
> |=20
> | From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
> | To: gnats-bugs@NetBSD.org
> | Cc:=20
> | Subject: Re: pkg/44878: Submission to add an option to =
textproc/aiksaurus to enable the GUI interface (gaiksaurus)
> | Date: Mon, 31 Mar 2014 02:29:28 -0400
> |=20
> | In the intervening years, GCC upgrades have made the following =
patches
> | necessary:
> | =20
> | --- gtk/src/Display.cpp.orig 2003-05-27 19:56:54.000000000 =
-0400
> | +++ gtk/src/Display.cpp 2014-03-31 01:56:15.000000000 -0400
> | @@ -22,6 +22,7 @@
> | #include "Meaning.h"
> | #include "DialogMediator.h"
> | #include "Exception.h"
> | +#include <strings.h>
> | using namespace std;
> | =20
> | namespace AiksaurusGTK_impl
> | =20
> | --- gtk/src/gtkAiksaur.t.cpp.orig 2002-01-11 21:02:12.000000000 =
-0500
> | +++ gtk/src/gtkAiksaur.t.cpp 2014-03-31 02:01:07.000000000 =
-0400
> | @@ -20,6 +20,7 @@
> | =20
> | #include <AiksaurusGTK.h>
> | #include "config.h"
> | +#include <cstdlib>
> | #include <gtk/gtk.h>
> | #include <iostream>
> | #include <string>
> | =20
>=20
> I can believe the second patch, but I think that the first should
> be cstring?
>=20
> christos
Hello,
The function required is strcasecmp(3), which per POSIX is supposed
to be found in strings.h, rather than string.h, which means there's
no standard equivalent C++ library I'm aware of for it. =46rom looking
at NetBSD/DragonFly BSD/FreeBSD/OpenBSD/GNU libc, I saw none that
would expose that function via string.h without an additional macro
being defined, since it's a legacy aspect of string.h, and more
"correct" to be accessed through strings.h.
(In retrospect, I should've made a note of this in my last email, as
I anticipated there'd be a question, but forgot to explain this. My
apologies.)
Regards,
Dave
From: christos@zoulas.com (Christos Zoulas)
To: "David H. Gutteridge" <dhgutteridge@sympatico.ca>,
gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus)
Date: Mon, 31 Mar 2014 21:25:54 -0400
On Mar 31, 7:24pm, dhgutteridge@sympatico.ca ("David H. Gutteridge") wrote:
-- Subject: Re: pkg/44878: Submission to add an option to textproc/aiksaurus
| > I can believe the second patch, but I think that the first should
| > be cstring?
| >
| > christos
|
| Hello,
|
| The function required is strcasecmp(3), which per POSIX is supposed
| to be found in strings.h, rather than string.h, which means there's
| no standard equivalent C++ library I'm aware of for it. From looking
| at NetBSD/DragonFly BSD/FreeBSD/OpenBSD/GNU libc, I saw none that
| would expose that function via string.h without an additional macro
| being defined, since it's a legacy aspect of string.h, and more
| "correct" to be accessed through strings.h.
|
| (In retrospect, I should've made a note of this in my last email, as
| I anticipated there'd be a question, but forgot to explain this. My
| apologies.)
"Ouch".
christos
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44878 CVS commit: pkgsrc/textproc/aiksaurus
Date: Sat, 6 Dec 2014 19:04:14 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Sat Dec 6 19:04:14 UTC 2014
Modified Files:
pkgsrc/textproc/aiksaurus: Makefile PLIST distinfo
Added Files:
pkgsrc/textproc/aiksaurus: options.mk
pkgsrc/textproc/aiksaurus/patches: patch-gtk_src_Display.cpp
patch-gtk_src_gtkAiksaur.t.cpp
Log Message:
Add option (off by default) to build gtk support. From PR 44878 by
David H. Gutteridge, with some minor adjustments.
Plus a couple small patches to make gtk support actually build. :-/
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/textproc/aiksaurus/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/textproc/aiksaurus/PLIST \
pkgsrc/textproc/aiksaurus/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/aiksaurus/options.mk
cvs rdiff -u -r0 -r1.1 \
pkgsrc/textproc/aiksaurus/patches/patch-gtk_src_Display.cpp \
pkgsrc/textproc/aiksaurus/patches/patch-gtk_src_gtkAiksaur.t.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 06 Dec 2014 19:06:47 +0000
State-Changed-Why:
committed, please make sure I didn't screw it up :-)
From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/44878 (Submission to add an option to textproc/aiksaurus to enable the GUI interface (gaiksaurus))
Date: Sun, 7 Dec 2014 16:58:08 -0500
On 2014-12-06, at 2:06 PM, dholland@NetBSD.org wrote:
>committed, please make sure I didn't screw it up :-)
It's working fine for me. (In the PR, I'd included strings.h rather
than cstring, as the latter wraps only string.h, which in turn may
not include strings.h, where strcasecmp(3) is prototyped. Using
cstring works by default on NetBSD, but I'm not sure it's 100%
portable. But I don't have anything else to test on these days.)
Thanks,
Dave
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 08 Dec 2014 20:23:36 +0000
State-Changed-Why:
confirmed working -- if the strings.h thing breaks anyone let me know
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/44878 (Submission to add an option to textproc/aiksaurus to
enable the GUI interface (gaiksaurus))
Date: Mon, 8 Dec 2014 20:22:34 +0000
On Sun, Dec 07, 2014 at 10:00:02PM +0000, David H. Gutteridge wrote:
> On 2014-12-06, at 2:06 PM, dholland@NetBSD.org wrote:
> >committed, please make sure I didn't screw it up :-)
>
> It's working fine for me. (In the PR, I'd included strings.h rather
> than cstring, as the latter wraps only string.h, which in turn may
> not include strings.h, where strcasecmp(3) is prototyped. Using
> cstring works by default on NetBSD, but I'm not sure it's 100%
> portable. But I don't have anything else to test on these days.)
Yeah, my inclination on that specific point is to leave it. The
existence of strings.h is an old bsdism that should not have been
perpetuated -- regardless of what POSIX may currently say I suspect
using it is more likely to break than not using it.
Also at this point the best way to crosscheck stuff like this is to
commit and watch pkgsrc-bulk for failure reports. :-/
--
David A. Holland
dholland@netbsd.org
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.