2 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
7 VERSION_FROM => 'lib/Xdgmime.pm', # finds $VERSION, requires EU::MM from perl >= 5.5
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ABSTRACT_FROM => 'lib/Xdgmime.pm', # retrieve abstract from module
10 AUTHOR => 'stoiko ivanov <siv@>',
12 #Value must be from legacy list of licenses here
13 #https://metacpan.org/pod/Module::Build::API
14 LIBS => [''], # e.g., '-lm'
15 DEFINE => '-DHAVE_MMAP', # e.g., '-DHAVE_SOMETHING'
16 INC => '-I.', # e.g., '-I. -I/usr/include/other'
17 OBJECT => '$(O_FILES)', # link all the C files too
19 if (eval {require ExtUtils::Constant; 1}) {
20 # If you edit these definitions to change the constants used by this module,
21 # you will need to use the generated const-c.inc and const-xs.inc
22 # files to replace their "fallback" counterparts before distributing your
24 my @names = (qw(XDG_MIME_TYPE_EMPTY XDG_MIME_TYPE_TEXTPLAIN
25 XDG_MIME_TYPE_UNKNOWN));
26 ExtUtils::Constant::WriteConstants(
30 C_FILE => 'const-c.inc',
31 XS_FILE => 'const-xs.inc',
38 foreach my $file ('const-c.inc', 'const-xs.inc') {
39 my $fallback = File::Spec->catfile('fallback', $file);
40 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";