On Mon Feb 21 18:24:17 2011, DWHEELER wrote:
Show quoted text> Howdy,
>
> Looks like Text::Markdown::Discount hasn't been updated since October
> 2009. It embeds Discount 1.3.4. The latest, though, is 2.0.7. Any
> chance of an upgrade?
>
> Thanks,
>
> David
The attached patch will make the perl module build against the system's
installed libmarkdown2 library, rather than the embedded copy of
discount. Seems to work ok with 2.1.2.
diff -ur 2/Text-Markdown-Discount-0.01/Makefile.PL Text-Markdown-Discount-0.01/Makefile.PL
--- 2/Text-Markdown-Discount-0.01/Makefile.PL 2009-10-19 18:38:26.000000000 -0400
+++ Text-Markdown-Discount-0.01/Makefile.PL 2012-01-01 17:50:45.049822343 -0400
@@ -4,10 +4,7 @@
use ExtUtils::MakeMaker;
use File::Spec;
-my $extdir = 'discount-1.3.4';
-my $myextlib = File::Spec->catfile($extdir, 'libmarkdown.a');
my $clean_files = join (" ",
- map{ File::Spec->catfile($extdir, $_) }
qw (
markdwon mkd2html makepage theme libmarkdown.a
Csio.o
@@ -36,12 +33,6 @@
-sub MY::postamble {
- return sprintf('
-$(MYEXTLIB):
- %s
-', qq{( cd $extdir; sh configure.sh; make )\n});
-}
WriteMakefile(
NAME => 'Text::Markdown::Discount',
@@ -50,8 +41,6 @@
($] >= 5.005 ?
(ABSTRACT_FROM => 'lib/Text/Markdown/Discount.pm',
AUTHOR => 'Masayoshi Sekimura <sekimura@cpan.org>') : ()),
- LIBS => '-L' . $extdir,
- INC => '-I. -I' . $extdir,
- MYEXTLIB => $myextlib,
+ MYEXTLIB => "/usr/lib/libmarkdown.so",
clean => { FILES => $clean_files },
);