unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 28177@debbugs.gnu.org
Subject: [bug#28177] [PATCH 02/12] gnu: Add perl-text-markdown-discount.
Date: Tue, 12 Sep 2017 22:38:54 +0100	[thread overview]
Message-ID: <20170912213904.24503-2-mail@cbaines.net> (raw)
In-Reply-To: <20170912213904.24503-1-mail@cbaines.net>

* 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 <al3xbio@gmail.com>
+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 <sekimura@cpan.org>') : ()),
+-    LIBS               => '-L' . $extdir,
+-    INC               => '-I. -I' . $extdir,
+-    MYEXTLIB          => $myextlib,
+-    clean             => { FILES => $clean_files },
++    LIBS               => '-lmarkdown',
++    INC               => '-I.',
+ );
-- 
2.14.1

  reply	other threads:[~2017-09-12 21:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 18:04 [bug#28177] [PATCH] Add ikiwiki and dependencies Christopher Baines
2017-08-21 18:08 ` [bug#28177] [PATCH 01/12] gnu: Add discount Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 02/12] gnu: Add perl-text-markdown-discount Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 03/12] gnu: Add perl-test-cpan-meta-json Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 04/12] gnu: Add perl-test-cpan-meta Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 05/12] gnu: Add perl-devel-cycle Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 06/12] gnu: Add perl-test-memory-cycle Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 07/12] gnu: Add perl-test-notabs Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 08/12] gnu: Add perl-test-eol Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 09/12] gnu: Add perl-html-scrubber Christopher Baines
2017-09-10 13:25     ` Ludovic Courtès
2017-09-12 21:36       ` Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 10/12] gnu: Add perl-yaml-libyaml Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 11/12] gnu: Add perl-cgi-session Christopher Baines
2017-08-21 18:08   ` [bug#28177] [PATCH 12/12] gnu: Add ikiwiki Christopher Baines
2017-09-10 13:27     ` Ludovic Courtès
2017-09-12 21:38       ` Christopher Baines
2017-09-10 13:23   ` [bug#28177] [PATCH 01/12] gnu: Add discount Ludovic Courtès
2017-09-12 20:57     ` Christopher Baines
2017-09-12 21:38 ` Christopher Baines
2017-09-12 21:38   ` Christopher Baines [this message]
2017-09-12 21:38   ` [bug#28177] [PATCH 03/12] gnu: Add perl-test-cpan-meta-json Christopher Baines
2017-09-12 21:38   ` [bug#28177] [PATCH 04/12] gnu: Add perl-test-cpan-meta Christopher Baines
2017-09-12 21:38   ` [bug#28177] [PATCH 05/12] gnu: Add perl-devel-cycle Christopher Baines
2017-09-12 21:38   ` [bug#28177] [PATCH 06/12] gnu: Add perl-test-memory-cycle Christopher Baines
2017-09-12 21:38   ` [bug#28177] [PATCH 07/12] gnu: Add perl-test-notabs Christopher Baines
2017-09-12 21:39   ` [bug#28177] [PATCH 08/12] gnu: Add perl-test-eol Christopher Baines
2017-09-12 21:39   ` [bug#28177] [PATCH 09/12] gnu: Add perl-html-scrubber Christopher Baines
2017-09-12 21:39   ` [bug#28177] [PATCH 10/12] gnu: Add perl-yaml-libyaml Christopher Baines
2017-09-12 21:39   ` [bug#28177] [PATCH 11/12] gnu: Add perl-cgi-session Christopher Baines
2017-09-12 21:39   ` [bug#28177] [PATCH 12/12] gnu: Add ikiwiki Christopher Baines
2017-09-13  8:17   ` [bug#28177] [PATCH 01/12] gnu: Add discount Ludovic Courtès
2017-09-13 17:21     ` bug#28177: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170912213904.24503-2-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=28177@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).