[ gregor herrmann ]
[ Debian Janitor ]
New upstream release.
Debian Janitor
1 year, 1 day ago
0 | 0 | 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 | |
1 | 8 | |
2 | 9 | 0.043 2023-04-19 02:05:14+02:00 Europe/Amsterdam |
3 | 10 | - 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. | |
1 | 1 | Build.PL |
2 | 2 | Changes |
3 | 3 | INSTALL |
4 | 4 | "David Golden <dagolden@cpan.org>" |
5 | 5 | ], |
6 | 6 | "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", | |
8 | 8 | "license" : [ |
9 | 9 | "perl_5" |
10 | 10 | ], |
97 | 97 | "provides" : { |
98 | 98 | "Module::Build::Tiny" : { |
99 | 99 | "file" : "lib/Module/Build/Tiny.pm", |
100 | "version" : "0.043" | |
100 | "version" : "0.045" | |
101 | 101 | } |
102 | 102 | }, |
103 | 103 | "release_status" : "stable", |
111 | 111 | "web" : "https://github.com/Perl-Toolchain-Gang/module-build-tiny" |
112 | 112 | } |
113 | 113 | }, |
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", | |
117 | 117 | "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" |
118 | 118 | } |
119 | 119 |
39 | 39 | conflicts: |
40 | 40 | local::lib: '< 1.006008' |
41 | 41 | 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' | |
43 | 43 | license: perl |
44 | 44 | meta-spec: |
45 | 45 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
48 | 48 | provides: |
49 | 49 | Module::Build::Tiny: |
50 | 50 | file: lib/Module/Build/Tiny.pm |
51 | version: '0.043' | |
51 | version: '0.045' | |
52 | 52 | requires: |
53 | 53 | CPAN::Meta: '0' |
54 | 54 | DynaLoader: '0' |
73 | 73 | resources: |
74 | 74 | bugtracker: https://github.com/Perl-Toolchain-Gang/module-build-tiny/issues |
75 | 75 | 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' | |
79 | 79 | x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' |
0 | 0 | This archive contains the distribution Module-Build-Tiny, |
1 | version 0.043: | |
1 | version 0.045: | |
2 | 2 | |
3 | 3 | A tiny replacement for Module::Build |
4 | 4 | |
8 | 8 | the same terms as the Perl 5 programming language system itself. |
9 | 9 | |
10 | 10 | |
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 | |
1 | 1 | |
2 | [ gregor herrmann ] | |
2 | 3 | WAITS-FOR: bookworm-release |
3 | 4 | |
4 | 5 | * Import upstream version 0.043. |
10 | 11 | * Drop unneeded (test) dependency. |
11 | 12 | * Annotate test-only build dependencies with <!nocheck>. |
12 | 13 | |
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 | |
14 | 18 | |
15 | 19 | libmodule-build-tiny-perl (0.039-2) unstable; urgency=medium |
16 | 20 |
13 | 13 | |
14 | 14 | [AutoPrereqs] |
15 | 15 | skip = File::ShareDir |
16 | skip = Foo::Bar | |
16 | 17 | [MetaJSON] |
17 | 18 | [GitHub::Meta] |
18 | 19 | [Git::NextVersion] |
0 | 0 | package Module::Build::Tiny; |
1 | $Module::Build::Tiny::VERSION = '0.043'; | |
1 | $Module::Build::Tiny::VERSION = '0.045'; | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | 4 | use Exporter 5.57 'import'; |
44 | 44 | } |
45 | 45 | |
46 | 46 | sub process_xs { |
47 | my ($source, $options) = @_; | |
47 | my ($source, $options, $c_files) = @_; | |
48 | 48 | |
49 | 49 | die "Can't build xs files under --pureperl-only\n" if $options->{'pureperl-only'}; |
50 | 50 | my (undef, @parts) = splitdir(dirname($source)); |
63 | 63 | my @objects = $builder->compile(source => $c_file, defines => { VERSION => qq/"$version"/, XS_VERSION => qq/"$version"/ }, include_dirs => [ curdir, 'include', dirname($source) ]); |
64 | 64 | |
65 | 65 | my $o = $options->{config}->get('_o'); |
66 | for my $c_source (find(qr/\.c$/, 'src')) { | |
66 | for my $c_source (@{ $c_files }) { | |
67 | 67 | 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) ]) | |
69 | 69 | } |
70 | 70 | |
71 | 71 | require DynaLoader; |
100 | 100 | my %docs = map { $_ => catfile('blib', $_) } find(qr/\.pod$/, 'lib'); |
101 | 101 | my %scripts = map { $_ => catfile('blib', $_) } find(qr//, 'script'); |
102 | 102 | 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/)); | |
105 | 106 | make_executable($_) for values %scripts; |
106 | 107 | 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 | } | |
108 | 113 | |
109 | 114 | if ($opt{install_paths}->install_destination('bindoc') && $opt{install_paths}->is_default_installable('bindoc')) { |
110 | 115 | my $section = $opt{config}->get('man1ext'); |
196 | 201 | |
197 | 202 | =head1 VERSION |
198 | 203 | |
199 | version 0.043 | |
204 | version 0.045 | |
200 | 205 | |
201 | 206 | =head1 SYNOPSIS |
202 | 207 | |
229 | 234 | |
230 | 235 | =item * Generated code from PL files |
231 | 236 | |
237 | =item * Module sharedirs | |
238 | ||
232 | 239 | =back |
233 | 240 | |
234 | 241 | =head2 Not Supported |
241 | 248 | |
242 | 249 | =item * Extending Module::Build::Tiny |
243 | 250 | |
244 | =item * Module sharedirs | |
245 | ||
246 | 251 | =back |
247 | 252 | |
248 | 253 | =head2 Directory structure |
249 | 254 | |
250 | 255 | 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. | |
252 | 262 | |
253 | 263 | =head1 USAGE |
254 | 264 |
119 | 119 | package $module_name; |
120 | 120 | |
121 | 121 | use vars qw( \$VERSION ); |
122 | \$VERSION = '0.01'; | |
122 | \$VERSION = '0.001'; | |
123 | 123 | |
124 | 124 | use strict; |
125 | 125 |
19 | 19 | my $dist = DistGen->new(name => 'Foo::Bar'); |
20 | 20 | $dist->chdir_in; |
21 | 21 | $dist->add_file('share/file.txt', 'FooBarBaz'); |
22 | $dist->add_file('module-share/Foo-Bar/file.txt', 'BazBarFoo'); | |
22 | 23 | $dist->add_file('script/simple', undent(<<' ---')); |
23 | 24 | #!perl |
24 | 25 | use Foo::Bar; |
25 | 26 | print Foo::Bar->VERSION . "\n"; |
26 | 27 | --- |
27 | 28 | 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" | |
33 | 29 | |
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" | |
35 | 37 | |
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 | } | |
43 | 56 | |
44 | 57 | $dist->regen; |
45 | 58 | |
113 | 126 | if (eval { require File::ShareDir }) { |
114 | 127 | ok( -d File::ShareDir::dist_dir('Foo-Bar'), 'sharedir has been made'); |
115 | 128 | 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'); | |
116 | 132 | } |
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'); | |
119 | 137 | |
120 | 138 | if ($has_compiler) { |
121 | 139 | XSLoader::load('Foo::Bar'); |
124 | 142 | |
125 | 143 | SKIP: { |
126 | 144 | 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'); | |
128 | 146 | require ExtUtils::Helpers; |
129 | 147 | my $file = "blib/libdoc/" . ExtUtils::Helpers::man3_pagename($pmfile, '.'); |
130 | 148 | ok( -e $file, 'Module gets manified properly'); |