Codebase list libmodule-build-tiny-perl / fresh-releases/main
[ gregor herrmann ] [ Debian Janitor ] New upstream release. Debian Janitor 1 year, 1 day ago
10 changed file(s) with 83 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Module::Build::Tiny
1
2 0.045 2023-04-30 11:52:20+02:00 Europe/Brussels
3 - Fix compilation issue on Windows
4
5 0.044 2023-04-28 09:19:30+02:00 Europe/Brussels
6 - Add module sharedirs
7 - Only add src/*.c files to primary XS file
18
29 0.043 2023-04-19 02:05:14+02:00 Europe/Amsterdam
310 - Fix manification test for perls without man paths
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.029.
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030.
11 Build.PL
22 Changes
33 INSTALL
44 "David Golden <dagolden@cpan.org>"
55 ],
66 "dynamic_config" : 0,
7 "generated_by" : "Dist::Zilla version 6.029, CPAN::Meta::Converter version 2.150010",
7 "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010",
88 "license" : [
99 "perl_5"
1010 ],
9797 "provides" : {
9898 "Module::Build::Tiny" : {
9999 "file" : "lib/Module/Build/Tiny.pm",
100 "version" : "0.043"
100 "version" : "0.045"
101101 }
102102 },
103103 "release_status" : "stable",
111111 "web" : "https://github.com/Perl-Toolchain-Gang/module-build-tiny"
112112 }
113113 },
114 "version" : "0.043",
115 "x_generated_by_perl" : "v5.36.0",
116 "x_serialization_backend" : "Cpanel::JSON::XS version 4.29",
114 "version" : "0.045",
115 "x_generated_by_perl" : "v5.36.1",
116 "x_serialization_backend" : "Cpanel::JSON::XS version 4.36",
117117 "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
118118 }
119119
3939 conflicts:
4040 local::lib: '< 1.006008'
4141 dynamic_config: 0
42 generated_by: 'Dist::Zilla version 6.029, CPAN::Meta::Converter version 2.150010'
42 generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010'
4343 license: perl
4444 meta-spec:
4545 url: http://module-build.sourceforge.net/META-spec-v1.4.html
4848 provides:
4949 Module::Build::Tiny:
5050 file: lib/Module/Build/Tiny.pm
51 version: '0.043'
51 version: '0.045'
5252 requires:
5353 CPAN::Meta: '0'
5454 DynaLoader: '0'
7373 resources:
7474 bugtracker: https://github.com/Perl-Toolchain-Gang/module-build-tiny/issues
7575 repository: git://github.com/Perl-Toolchain-Gang/module-build-tiny.git
76 version: '0.043'
77 x_generated_by_perl: v5.36.0
78 x_serialization_backend: 'YAML::Tiny version 1.73'
76 version: '0.045'
77 x_generated_by_perl: v5.36.1
78 x_serialization_backend: 'YAML::Tiny version 1.74'
7979 x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
00 This archive contains the distribution Module-Build-Tiny,
1 version 0.043:
1 version 0.045:
22
33 A tiny replacement for Module::Build
44
88 the same terms as the Perl 5 programming language system itself.
99
1010
11 This README file was generated by Dist::Zilla::Plugin::Readme v6.029.
11 This README file was generated by Dist::Zilla::Plugin::Readme v6.030.
0 libmodule-build-tiny-perl (0.043-1) UNRELEASED; urgency=medium
0 libmodule-build-tiny-perl (0.045-1) UNRELEASED; urgency=medium
11
2 [ gregor herrmann ]
23 WAITS-FOR: bookworm-release
34
45 * Import upstream version 0.043.
1011 * Drop unneeded (test) dependency.
1112 * Annotate test-only build dependencies with <!nocheck>.
1213
13 -- gregor herrmann <gregoa@debian.org> Fri, 21 Apr 2023 21:39:43 +0200
14 [ Debian Janitor ]
15 * New upstream release.
16
17 -- gregor herrmann <gregoa@debian.org> Wed, 03 May 2023 16:42:43 -0000
1418
1519 libmodule-build-tiny-perl (0.039-2) unstable; urgency=medium
1620
1313
1414 [AutoPrereqs]
1515 skip = File::ShareDir
16 skip = Foo::Bar
1617 [MetaJSON]
1718 [GitHub::Meta]
1819 [Git::NextVersion]
00 package Module::Build::Tiny;
1 $Module::Build::Tiny::VERSION = '0.043';
1 $Module::Build::Tiny::VERSION = '0.045';
22 use strict;
33 use warnings;
44 use Exporter 5.57 'import';
4444 }
4545
4646 sub process_xs {
47 my ($source, $options) = @_;
47 my ($source, $options, $c_files) = @_;
4848
4949 die "Can't build xs files under --pureperl-only\n" if $options->{'pureperl-only'};
5050 my (undef, @parts) = splitdir(dirname($source));
6363 my @objects = $builder->compile(source => $c_file, defines => { VERSION => qq/"$version"/, XS_VERSION => qq/"$version"/ }, include_dirs => [ curdir, 'include', dirname($source) ]);
6464
6565 my $o = $options->{config}->get('_o');
66 for my $c_source (find(qr/\.c$/, 'src')) {
66 for my $c_source (@{ $c_files }) {
6767 my $o_file = catfile($tempdir, basename($c_source, '.c') . $o);
68 push @objects, $builder->compile(source => $c_file, include_dirs => [ curdir, 'include', dirname($source) ])
68 push @objects, $builder->compile(source => $c_source, include_dirs => [ curdir, 'include', dirname($source) ])
6969 }
7070
7171 require DynaLoader;
100100 my %docs = map { $_ => catfile('blib', $_) } find(qr/\.pod$/, 'lib');
101101 my %scripts = map { $_ => catfile('blib', $_) } find(qr//, 'script');
102102 my %sdocs = map { $_ => delete $scripts{$_} } grep { /.pod$/ } keys %scripts;
103 my %shared = map { $_ => catfile(qw/blib lib auto share dist/, $opt{meta}->name, abs2rel($_, 'share')) } find(qr//, 'share');
104 pm_to_blib({ %modules, %docs, %scripts, %shared }, catdir(qw/blib lib auto/));
103 my %dist_shared = map { $_ => catfile(qw/blib lib auto share dist/, $opt{meta}->name, abs2rel($_, 'share')) } find(qr//, 'share');
104 my %module_shared = map { $_ => catfile(qw/blib lib auto share module/, abs2rel($_, 'module-share')) } find(qr//, 'module-share');
105 pm_to_blib({ %modules, %docs, %scripts, %dist_shared, %module_shared }, catdir(qw/blib lib auto/));
105106 make_executable($_) for values %scripts;
106107 mkpath(catdir(qw/blib arch/), $opt{verbose});
107 process_xs($_, \%opt) for find(qr/.xs$/, 'lib');
108 my $main_xs = join('/', 'lib', split /-/, $opt{meta}->name) . '.xs';
109 for my $xs (find(qr/.xs$/, 'lib')) {
110 my @c_files = $xs eq $main_xs ? find(qr/\.c$/, 'src') : ();
111 process_xs($xs, \%opt, \@c_files);
112 }
108113
109114 if ($opt{install_paths}->install_destination('bindoc') && $opt{install_paths}->is_default_installable('bindoc')) {
110115 my $section = $opt{config}->get('man1ext');
196201
197202 =head1 VERSION
198203
199 version 0.043
204 version 0.045
200205
201206 =head1 SYNOPSIS
202207
229234
230235 =item * Generated code from PL files
231236
237 =item * Module sharedirs
238
232239 =back
233240
234241 =head2 Not Supported
241248
242249 =item * Extending Module::Build::Tiny
243250
244 =item * Module sharedirs
245
246251 =back
247252
248253 =head2 Directory structure
249254
250255 Your .pm, .xs and .pod files must be in F<lib/>. Any executables must be in
251 F<script/>. Test files must be in F<t/>. Dist sharedirs must be in F<share/>.
256 F<script/>. Test files must be in F<t/>. Dist sharedirs must be in F<share/>,
257 module sharedirs are under F<module-share> (e.g. F<module-share/Foo-Bar> for
258 module C<Foo::Bar>).
259
260 C<.c> files in the F<src/> are compiled together with the .xs file matching the
261 distribution name.
252262
253263 =head1 USAGE
254264
119119 package $module_name;
120120
121121 use vars qw( \$VERSION );
122 \$VERSION = '0.01';
122 \$VERSION = '0.001';
123123
124124 use strict;
125125
1919 my $dist = DistGen->new(name => 'Foo::Bar');
2020 $dist->chdir_in;
2121 $dist->add_file('share/file.txt', 'FooBarBaz');
22 $dist->add_file('module-share/Foo-Bar/file.txt', 'BazBarFoo');
2223 $dist->add_file('script/simple', undent(<<' ---'));
2324 #!perl
2425 use Foo::Bar;
2526 print Foo::Bar->VERSION . "\n";
2627 ---
2728 my $has_compiler = ExtUtils::CBuilder->new->have_compiler();
28 $dist->add_file('lib/Foo/Bar.xs', undent(<<' ---')) if $has_compiler;
29 #define PERL_NO_GET_CONTEXT
30 #include "EXTERN.h"
31 #include "perl.h"
32 #include "XSUB.h"
3329
34 MODULE = Foo::Bar PACKAGE = Foo::Bar
30 if ($has_compiler) {
31 $dist->add_file('lib/Foo/Bar.xs', undent(<<' ---'));
32 #define PERL_NO_GET_CONTEXT
33 #include "EXTERN.h"
34 #include "perl.h"
35 #include "XSUB.h"
36 #include "foo.h"
3537
36 const char*
37 foo()
38 CODE:
39 RETVAL = "Hello World!\n";
40 OUTPUT:
41 RETVAL
42 ---
38 MODULE = Foo::Bar PACKAGE = Foo::Bar
39
40 const char*
41 foo()
42 CODE:
43 RETVAL = foo();
44 OUTPUT:
45 RETVAL
46 ---
47 $dist->add_file('include/foo.h', undent(<<' ---'));
48 char* foo();
49 ---
50 $dist->add_file('src/foo.c', undent(<<' ---'));
51 char* foo() {
52 return "Hello World!\n";
53 }
54 ---
55 }
4356
4457 $dist->regen;
4558
113126 if (eval { require File::ShareDir }) {
114127 ok( -d File::ShareDir::dist_dir('Foo-Bar'), 'sharedir has been made');
115128 ok( -f File::ShareDir::dist_file('Foo-Bar', 'file.txt'), 'sharedir file has been made');
129 require Foo::Bar;
130 ok( -d File::ShareDir::module_dir('Foo::Bar'), 'sharedir has been made');
131 ok( -f File::ShareDir::module_file('Foo::Bar', 'file.txt'), 'sharedir file has been made');
116132 }
117 ok( -d catdir(qw/blib lib auto share dist Foo-Bar/), 'sharedir has been made');
118 ok( -f catfile(qw/blib lib auto share dist Foo-Bar file.txt/), 'sharedir file has been made');
133 ok( -d catdir(qw/blib lib auto share dist Foo-Bar/), 'dist sharedir has been made');
134 ok( -f catfile(qw/blib lib auto share dist Foo-Bar file.txt/), 'dist sharedir file has been made');
135 ok( -d catdir(qw/blib lib auto share module Foo-Bar/), 'moduole sharedir has been made');
136 ok( -f catfile(qw/blib lib auto share module Foo-Bar file.txt/), 'module sharedir file has been made');
119137
120138 if ($has_compiler) {
121139 XSLoader::load('Foo::Bar');
124142
125143 SKIP: {
126144 require ExtUtils::InstallPaths;
127 skip 1, 'No manification supported' if not ExtUtils::InstallPaths->new->is_default_installable('libdoc');
145 skip 'No manification supported', 1 if not ExtUtils::InstallPaths->new->is_default_installable('libdoc');
128146 require ExtUtils::Helpers;
129147 my $file = "blib/libdoc/" . ExtUtils::Helpers::man3_pagename($pmfile, '.');
130148 ok( -e $file, 'Module gets manified properly');