From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drsue-0001E0-6s for guix-patches@gnu.org; Tue, 12 Sep 2017 17:40:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drsuZ-0002Yz-Fx for guix-patches@gnu.org; Tue, 12 Sep 2017 17:40:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drsuZ-0002Yk-DA for guix-patches@gnu.org; Tue, 12 Sep 2017 17:40:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1drsuZ-0003vO-3e for guix-patches@gnu.org; Tue, 12 Sep 2017 17:40:03 -0400 Subject: [bug#28177] [PATCH 02/12] gnu: Add perl-text-markdown-discount. Resent-Message-ID: From: Christopher Baines Date: Tue, 12 Sep 2017 22:38:54 +0100 Message-Id: <20170912213904.24503-2-mail@cbaines.net> In-Reply-To: <20170912213904.24503-1-mail@cbaines.net> References: <20170912213904.24503-1-mail@cbaines.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28177@debbugs.gnu.org * gnu/packages/markdown.scm (perl-text-markdown-discount): New variable. * gnu/packages/patches/perl-text-markdown-discount-use-system-markdown.patch: New file. --- gnu/packages/markup.scm | 46 ++++++++++++++++++++++ ...ext-markdown-discount-use-system-markdown.patch | 32 +++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 gnu/packages/patches/perl-text-markdown-discount-use-system-markdown.patch diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index e3630fe2f..667f8b0a9 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -26,7 +26,9 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix build-system cmake) + #:use-module (guix build-system perl) #:use-module (gnu packages compression) + #:use-module (gnu packages) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages web)) @@ -144,6 +146,50 @@ convert it to structurally valid XHTML (or HTML).") (home-page "http://www.pell.portland.or.us/~orc/Code/discount/") (license bsd-3))) +(define-public perl-text-markdown-discount + (package + (name "perl-text-markdown-discount") + (version "0.11") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://cpan/authors/id/S/SE/SEKIMURA/Text-Markdown-Discount-" + version + ".tar.gz")) + (sha256 + (base32 + "1xx7v3wnla7m6wa3h33whxw3vvincaicg4yra1b9wbzf2aix9rnw")) + (patches + (search-patches "perl-text-markdown-discount-use-system-markdown.patch")))) + (build-system perl-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'set-ldflags + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("OTHERLDFLAGS = ") + (string-append + "OTHERLDFLAGS = -lmarkdown -Wl,-rpath=" + (assoc-ref inputs "discount") + "/lib")))))))) + (inputs + `(("discount" ,discount))) + (home-page + "http://search.cpan.org/dist/Text-Markdown-Discount") + (synopsis + "Fast function for converting Markdown to HTML using Discount") + (description + "Text::Markdown::Discount is a Perl extension to the Discount markdown +implementation. + +@example + use Text::Markdown::Discount; + my $html = markdown($text) +@end example") + (license perl-license))) + (define-public cmark (package (name "cmark") diff --git a/gnu/packages/patches/perl-text-markdown-discount-use-system-markdown.patch b/gnu/packages/patches/perl-text-markdown-discount-use-system-markdown.patch new file mode 100644 index 000000000..e0df632a0 --- /dev/null +++ b/gnu/packages/patches/perl-text-markdown-discount-use-system-markdown.patch @@ -0,0 +1,32 @@ +Description: Use the markdown library provided by the libmarkdown2 package. +Author: Alessandro Ghedini +Origin: vendor +Forwarded: not-needed +Last-Update: 2012-01-01 + +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -57,12 +57,6 @@ + + + +-sub MY::postamble { +- return sprintf(' +-$(MYEXTLIB): +- %s +-', qq{( cd $extdir; CC='cc -fPIC' sh configure.sh; make )\n}); +-} + + WriteMakefile( + NAME => 'Text::Markdown::Discount', +@@ -71,8 +65,6 @@ + ($] >= 5.005 ? + (ABSTRACT_FROM => 'lib/Text/Markdown/Discount.pm', + AUTHOR => 'Masayoshi Sekimura ') : ()), +- LIBS => '-L' . $extdir, +- INC => '-I. -I' . $extdir, +- MYEXTLIB => $myextlib, +- clean => { FILES => $clean_files }, ++ LIBS => '-lmarkdown', ++ INC => '-I.', + ); -- 2.14.1