1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Description: Use the markdown library provided by the libmarkdown2 package.
Origin: vendor
Forwarded: not-needed
Author: Alessandro Ghedini <al3xbio@gmail.com>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-02-02
--- a/builder/MyBuilder.pm
+++ b/builder/MyBuilder.pm
@@ -12,33 +12,7 @@
$class->SUPER::new(
%argv,
needs_compiler => 1,
- include_dirs => ["discount-$DISCOUNT_VERSION"],
);
}
-sub _build_discount {
- my $self = shift;
-
- chdir "discount-$DISCOUNT_VERSION";
- my $ok = do {
- local $ENV{CC} = $self->config("cc") . " -fPIC";
- $self->do_system("sh", "configure.sh");
- };
- $ok &&= $self->do_system($self->config("make"), "libmarkdown");
- chdir "..";
- $ok;
-}
-
-sub ACTION_code {
- my ($self, @argv) = @_;
-
- my $spec = $self->_infer_xs_spec(File::Spec->catfile("lib", "Text", "Markdown", "Discount.xs"));
- my $archive = File::Spec->catfile("discount-$DISCOUNT_VERSION", "libmarkdown.a");
- if (!$self->up_to_date($archive, $spec->{lib_file})) {
- $self->_build_discount or die;
- push @{$self->{properties}{objects}}, $archive;
- }
- $self->SUPER::ACTION_code(@argv);
-}
-
1;
--- a/Build.PL
+++ b/Build.PL
@@ -49,6 +49,8 @@
test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
recursive_test_files => 1,
+ extra_compiler_flags => scalar `pkgconf --cflags libmarkdown`,
+ extra_linker_flags => scalar `pkgconf --libs libmarkdown`,
);
if (-d 'share') {
|