Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
easyblock = 'ConfigureMake'

name = 'intltool'
version = '0.51.0'
versionsuffix = '-Perl-5.26.0'

homepage = 'http://freedesktop.org/wiki/Software/intltool/'
description = """intltool is a set of tools to centralize translation of
many different file formats using GNU gettext-compatible PO files."""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}

source_urls = ['http://launchpad.net/intltool/trunk/%(version)s/+download/']
sources = [SOURCE_TAR_GZ]
checksums = ['67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd']

builddependencies = [
('binutils', '2.28'),
]

dependencies = [
('XML-Parser', '2.44_01', versionsuffix),
]

# intltool bug with Perl 5.26
# https://bugs.launchpad.net/intltool/+bug/1696658
# This patch ist from:
# https://github.com/Alexpux/MSYS2-packages/blob/master/intltool/perl-5.22-compatibility.patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to include these comments here, they're already in the patch file itself?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just something like "fix regex error with perl 5.26.0" at this point, so one can understand instantly what the patch is for when reading the easyconfig?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If people want to figure out what the patch does exactly, they can look into the patch file.

The patch filename could give a good first hint.

patches = ['intltool-perl-5.26.0-fix-regex.patch']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reedts Since the patch is in no way specific to Perl 5.26.0, I would avoid including a version number in the patch filename?
Do include the intltool version though, since the patch is specific to this version of intltool.

So, I'd suggest: intltool-%(version)s-Perl-fix-regex.patch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. The problem seems to be specific to the combination of intltool-0.51.0 and Perl-5.26.0 but the patch file itself is not specific to this combination. I will fix that.


sanity_check_paths = {
'files': ['bin/intltool%s' % x for x in ['-extract', '-merge', '-prepare', '-update', 'ize']],
'dirs': []
}

moduleclass = 'devel'
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# intltool bug with Perl 5.26
# https://bugs.launchpad.net/intltool/+bug/1696658
# This patch ist from:
# https://github.com/Alexpux/MSYS2-packages/blob/master/intltool/perl-5.22-compatibility.patch
--- intltool-0.51.0.orig/intltool-update.in 2015-03-09 02:39:54.000000000 +0100
+++ intltool-0.51.0.orig/intltool-update.in 2015-06-19 01:52:07.171228154 +0200
@@ -1062,7 +1062,7 @@
}
}

- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
+ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
{
my $rest = $3;
my $untouched = $1;
@@ -1190,10 +1190,10 @@
$name =~ s/\(+$//g;
$version =~ s/\(+$//g;

- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
}

if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
@@ -1219,11 +1219,11 @@
$version =~ s/\(+$//g;
$bugurl =~ s/\(+$//g if (defined $bugurl);

- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
}

# \s makes this not work, why?