Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
This Perl module provides functions to compare pkgsrc Dewey numbers.
+36
View File
@@ -0,0 +1,36 @@
# $NetBSD: Makefile,v 1.22 2013/05/31 12:41:46 wiz Exp $
DISTNAME= p5-pkgsrc-Dewey-1.1
PKGREVISION= 4
CATEGORIES= pkgtools perl5
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= wiz@NetBSD.org
HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/
COMMENT= Perl module to compare pkgsrc Dewey numbers
LICENSE= ${PERL5_LICENSE} OR 2-clause-bsd
PKG_INSTALLATION_TYPES= overwrite pkgviews
CPPFLAGS+= -DHAVE_CTYPE_H -DHAVE_STDLIB_H -DHAVE_STRING_H
CPPFLAGS.NetBSD+= -DHAVE_ERR_H
USE_LANGUAGES= c
PERL5_PACKLIST= auto/pkgsrc/Dewey/.packlist
PKG_INSTALL_FILESDIR= ${PKGSRCDIR}/pkgtools/pkg_install/files
PKG_INSTALL_FILES= lib/dewey.c lib/dewey.h lib/defs.h
do-extract:
${MKDIR} ${WRKSRC}
${CP} -r ${FILESDIR}/* ${WRKSRC}
for f in ${PKG_INSTALL_FILES}; do \
${CP} ${PKG_INSTALL_FILESDIR}/$$f ${WRKSRC}; \
done
${MV} ${WRKSRC}/dewey.c ${WRKSRC}/lib_dewey.c
${TOUCH} ${WRKSRC}/nbcompat.h
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
+8
View File
@@ -0,0 +1,8 @@
Revision history for Perl extension pkgsrc::Dewey.
1.1 Sat Mar 07 02:44:22 2009
- bug fixes
- documentation fixes
1.0 Mon Oct 17 15:46:19 2005
- first version
+86
View File
@@ -0,0 +1,86 @@
package pkgsrc::Dewey;
use strict;
use warnings;
require Exporter;
use AutoLoader;
our @ISA = qw(Exporter);
our @EXPORT = qw(dewey_cmp dewey_match);
our $VERSION = '1.1';
require XSLoader;
XSLoader::load('pkgsrc::Dewey', $VERSION);
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
pkgsrc::Dewey - Perl extension for comparing pkgsrc Dewey version numbers
=head1 SYNOPSIS
use pkgsrc::Dewey;
dewey_cmp(lhs, op, rhs);
dewey_match(pattern, package);
=head1 DESCRIPTION
C<pkgsrc::Dewey> is a Perl extension for comparing pkgsrc Dewey version
numbers.
It provides two functions:
C<dewey_cmp()> and C<dewey_match()>.
C<dewey_cmp(lhs, op, rhs)>
compares two pkgsrc Dewey version numbers. Both C<lhs> and
C<rhs> should be version numbers (not containing any package names).
If the operator C<op> is invalid, C<dewey_cmp> returns -1.
Otherwise it returns 1 if the comparison is true and 0 if not.
C<dewey_match(pattern, package)>
compares the C<pattern> against the C<package>, and returns 1 if the
C<package> matches the C<pattern> and 0 if not. Both the C<pattern>
and the C<package> should contain a package name.
=head2 EXPORT
C<dewey_cmp()>,
C<dewey_match()>
=head1 SEE ALSO
Homepage for the Perl module:
L<http://www.netbsd.org/packages/pkgtools/p5-pkgsrc-Dewey/README.html>
General information about pkgsrc:
L<http://www.pkgsrc.org/>
The pkgsrc guide:
L<http://www.netbsd.org/docs/pkgsrc/>
=head1 AUTHORS
Dieter Baron E<lt>dillo@NetBSD.orgE<gt>
and
Thomas Klausner E<lt>wiz@NetBSD.orgE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2005 by Dieter Baron and Thomas Klausner
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.7 or,
at your option, any later version of Perl 5 you may have available,
or the 2 clause BSD license.
=cut
+31
View File
@@ -0,0 +1,31 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <dewey.h>
MODULE = pkgsrc::Dewey PACKAGE = pkgsrc::Dewey
int
dewey_match(pattern, package)
const char * pattern
const char * package
PROTOTYPE: $;$
OUTPUT:
RETVAL
int
dewey_cmp(lhs, op, rhs)
const char * lhs
const char * op
const char * rhs
PROTOTYPE: $;$;$
INIT:
int opi;
CODE:
if (dewey_mktest(&opi, op) < 0)
RETVAL = -1;
else
RETVAL = dewey_cmp(lhs, opi, rhs);
OUTPUT:
RETVAL
+8
View File
@@ -0,0 +1,8 @@
Changes
Dewey.pm
Dewey.xs
MANIFEST
Makefile.PL
README
t/Dewey.t
typemap
@@ -0,0 +1,8 @@
use 5.008007;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'pkgsrc::Dewey',
VERSION_FROM => 'Dewey.pm', # finds $VERSION
INC => '-I.',
OBJECT => '$(O_FILES)', # link all the C files too
);
+26
View File
@@ -0,0 +1,26 @@
pkgsrc::Dewey version 1.1
=========================
This Perl module provides functions to compare pkgsrc Dewey
numbers.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module has no dependencies.
COPYRIGHT AND LICENCE
Copyright (C) 2005 by Dieter Baron and Thomas Klausner.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.7 or,
at your option, any later version of Perl 5 you may have available.
+19
View File
@@ -0,0 +1,19 @@
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Dewey.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 5;
BEGIN { use_ok('pkgsrc::Dewey') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
ok(dewey_cmp("1.0", "<", "2.0") > 0, 'dewey_cmp result incorrect');
ok(dewey_cmp("1.0", "a", "2.0") == -1, 'incorrect operator');
ok(dewey_match("foo<1.0", "foo-1.0beta1"), 'beta');
is(dewey_match("foo<1.0alpha1", "foo-1.0beta1"), 0, 'alpha');
+1
View File
@@ -0,0 +1 @@
const char * T_PV