pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/49032: Package submission to add textproc/p5-Text-Hunspell to pkgsrc
>Number: 49032
>Category: pkg
>Synopsis: Package submission to add textproc/p5-Text-Hunspell to pkgsrc
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jul 25 03:35:00 +0000 2014
>Originator: David H. Gutteridge
>Release: n/a
>Organization:
>Environment:
n/a
>Description:
I've been using the CPAN package Text::Hunspell to do morphological
analysis of texts, and thought I'd tidy up my work and send it in, in
case someone else will find this of use. (What does Hunspell offer
that other spellers don't? Well, for one thing, word stemming in
English, and for another, more sophisticated facilities in languages
with better support, e.g. in French it'll identify genders of words,
and whether they're singular or plural, etc.)
The only quirk to deal with in packaging this is that pkgsrc doesn't
install an un-versioned symlink for libhunspell (unlike most other
libraries), so the input to MakeMaker has to be adjusted accordingly.
Assuming the hunspell package omits that symlink by design, I'm using
the Perl interface to Pkgconfig to get a usable name to link against,
as that seemed like the safest means.
>How-To-Repeat:
(Look for this package and find it doesn't exist.)
>Fix:
DESCR:
This module provides a Perl interface to the OO Hunspell library.
# $NetBSD: Makefile Exp $
DISTNAME= Text-Hunspell-2.08
PKGNAME= p5-${DISTNAME}
CATEGORIES= textproc perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Text/}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://search.cpan.org/dist/Text-Hunspell
COMMENT= Perl module to interface with GNU Hunspell
LICENSE= ${PERL5_LICENSE}
USE_LANGUAGES= c c++
PERL5_PACKLIST= auto/Text/Hunspell/.packlist
BUILD_DEPENDS+= p5-ExtUtils-PkgConfig:../../devel/p5-ExtUtils-PkgConfig
.include "../../lang/perl5/module.mk"
.include "../../textproc/hunspell/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
distinfo:
$NetBSD$
SHA1 (Text-Hunspell-2.08.tar.gz) = b83220400d473e7c5fce77d07d1df2a6ddea03f0
RMD160 (Text-Hunspell-2.08.tar.gz) = 065b863d2d5ea4a3ad0167d60ce29c0b9de5b24c
Size (Text-Hunspell-2.08.tar.gz) = 23590 bytes
SHA1 (patch-Makefile.PL) = 9d91c4c9b86b08d7dddf7463a9805f6a58963ccc
patch-Makefile.PL:
$NetBSD: patch-Makefile.PL Exp $
The check to see if libhunspell is installed is redundant, since it's
an explicit dependency that pkgsrc must provide. There's no unversioned
libhunspell link installed by pkgsrc, so we must substitute a link with
the major/minor suffix.
--- Makefile.PL.orig 2013-03-26 15:52:12.000000000 -0400
+++ Makefile.PL 2014-07-24 21:37:09.000000000 -0400
@@ -1,6 +1,6 @@
-use lib qw(inc);
-use Config;
-use Devel::CheckLib;
+#use lib qw(inc);
+#use Config;
+#use Devel::CheckLib;
#
# Try to warn the user if linking might fail.
@@ -8,44 +8,45 @@
#
# Probably too platform specific, but seemed an acceptable compromise.
#
-my $dlext = $Config{dlext} || 'so';
-my $candidate_lib;
-for (split " " => $Config{libpth}) {
- my $lib_path = "$_/libhunspell.$dlext";
- #warn "Checking $lib_path\n";
- if (-e $lib_path) {
- $candidate_lib++;
- warn "Found '$lib_path'. Good.\n";
- }
-}
-
-if (0 == $candidate_lib) {
- my $def_lib = "/usr/lib/libhunspell";
- my ($possible_candidate) = glob("$def_lib-*.so");
- $possible_candidate ||= "/usr/lib/libhunspell-<ver>.so";
- warn
"---------------------------------------------------------------------\n";
- warn "Your system doesn't appear to have a libhunspell.$dlext link.\n";
- warn "Linking might fail. If it does, you might want to try installing\n";
- warn "the libhunspell-dev package (or the equivalent on your OS) or
try:\n";
- warn "\n";
- warn " $Config{lns} $possible_candidate $def_lib.so\n";
- warn
"---------------------------------------------------------------------\n";
- warn "\n";
-}
-
-check_lib_or_exit(
- lib => 'hunspell',
- header => 'hunspell/hunspell.h',
-);
+#my $dlext = $Config{dlext} || 'so';
+#my $candidate_lib;
+#for (split " " => $Config{libpth}) {
+# my $lib_path = "$_/libhunspell.$dlext";
+# #warn "Checking $lib_path\n";
+# if (-e $lib_path) {
+# $candidate_lib++;
+# warn "Found '$lib_path'. Good.\n";
+# }
+#}
+#
+#if (0 == $candidate_lib) {
+# my $def_lib = "/usr/lib/libhunspell";
+# my ($possible_candidate) = glob("$def_lib-*.so");
+# $possible_candidate ||= "/usr/lib/libhunspell-<ver>.so";
+# warn
"---------------------------------------------------------------------\n";
+# warn "Your system doesn't appear to have a libhunspell.$dlext link.\n";
+# warn "Linking might fail. If it does, you might want to try installing\n";
+# warn "the libhunspell-dev package (or the equivalent on your OS) or
try:\n";
+# warn "\n";
+# warn " $Config{lns} $possible_candidate $def_lib.so\n";
+# warn
"---------------------------------------------------------------------\n";
+# warn "\n";
+#}
+#
+#check_lib_or_exit(
+# lib => 'hunspell',
+# header => 'hunspell/hunspell.h',
+#);
use ExtUtils::MakeMaker;
+use ExtUtils::PkgConfig;
my $CC = $ENV{"CXX"} || 'g++';
WriteMakefile(
NAME => 'Text::Hunspell',
VERSION_FROM => 'Hunspell.pm',
- LIBS => ['-lhunspell'],
+ LIBS => [ExtUtils::PkgConfig->libs_only_l('hunspell')],
CC => $CC,
LD => '$(CC)',
PREREQ_PM => {}, # e.g., Module::Name => 1.1
Home |
Main Index |
Thread Index |
Old Index