summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-10-03 23:52:23 +0200
committerGitHub <noreply@github.com>2018-10-03 23:52:23 +0200
commitb12dbd21abedcfab84b249df52c5e5a039e3d028 (patch)
treec0c19de509b1fb70b398cf11cbb696ef898ed255
parenta909ede27722b171486e85cd07f5f9720d7dbb28 (diff)
downloadbugzilla-b12dbd21abedcfab84b249df52c5e5a039e3d028.tar.gz
bugzilla-b12dbd21abedcfab84b249df52c5e5a039e3d028.tar.xz
no bug - make libcmark-gfm optional (#792)
-rw-r--r--Bugzilla.pm4
-rw-r--r--Bugzilla/Install/Requirements.pm1
-rwxr-xr-xMakefile.PL9
3 files changed, 10 insertions, 4 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 56020b230..94defda3b 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -29,8 +29,6 @@ use Bugzilla::Flag;
use Bugzilla::Hook;
use Bugzilla::Install::Localconfig qw(read_localconfig);
use Bugzilla::Install::Util qw(init_console include_languages);
-use Bugzilla::Markdown::GFM;
-use Bugzilla::Markdown::GFM::Parser;
use Bugzilla::Memcached;
use Bugzilla::Template;
use Bugzilla::Token;
@@ -750,6 +748,8 @@ sub check_rate_limit {
}
sub markdown_parser {
+ require Bugzilla::Markdown::GFM;
+ require Bugzilla::Markdown::GFM::Parser;
return request_cache->{markdown_parser}
||= Bugzilla::Markdown::GFM::Parser->new( {extensions => [qw( autolink tagfilter table strikethrough)] } );
}
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index c4813abde..beed721f3 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -96,7 +96,6 @@ use constant FEATURE_FILES => (
patch_viewer => ['Bugzilla/Attachment/PatchReader.pm'],
updates => ['Bugzilla/Update.pm'],
mfa => ['Bugzilla/MFA/*.pm'],
- markdown => ['Bugzilla/Markdown.pm'],
memcached => ['Bugzilla/Memcache.pm'],
s3 => ['Bugzilla/S3.pm', 'Bugzilla/S3/Bucket.pm', 'Bugzilla/Attachment/S3.pm']
);
diff --git a/Makefile.PL b/Makefile.PL
index 293a66f6b..c8d78f5cd 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -33,7 +33,6 @@ BEGIN {
# PREREQ_PM
my %requires = (
- 'Alien::libcmark_gfm' => '3',
'Algorithm::BloomFilter' => '0.02',
'CGI' => '4.31',
'CGI::Compile' => 0,
@@ -122,6 +121,14 @@ if ( $OSNAME eq 'linux' && -f '/etc/debian_version' ) {
}
my %optional_features = (
+ alien_cmark => {
+ description => 'Support GitHub-flavored markdown',
+ prereqs => {
+ runtime => {
+ requires => { 'Alien::libcmark_gfm' => '3' },
+ },
+ },
+ },
argon2 => {
description => 'Support hashing passwords with Argon2',
prereqs => {