]> git.proxmox.com Git - libxdgmime-perl.git/blob - Xdgmime/Makefile.PL
import from svn://proxdev/server/svn//libxdgmime-perl/pmg3
[libxdgmime-perl.git] / Xdgmime / Makefile.PL
1 use 5.010001;
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.
5 WriteMakefile(
6 NAME => 'Xdgmime',
7 VERSION_FROM => 'lib/Xdgmime.pm', # finds $VERSION
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
10 (ABSTRACT_FROM => 'lib/Xdgmime.pm', # retrieve abstract from module
11 AUTHOR => 'root <root@>') : ()),
12 LIBS => [''], # e.g., '-lm'
13 DEFINE => '-DHAVE_MMAP', # e.g., '-DHAVE_SOMETHING'
14 INC => '-I.', # e.g., '-I. -I/usr/include/other'
15 # Un-comment this if you add C files to link with later:
16 OBJECT => '$(O_FILES)', # link all the C files too
17 );
18 if (eval {require ExtUtils::Constant; 1}) {
19 # If you edit these definitions to change the constants used by this module,
20 # you will need to use the generated const-c.inc and const-xs.inc
21 # files to replace their "fallback" counterparts before distributing your
22 # changes.
23 my @names = (qw(XDG_MIME_TYPE_EMPTY XDG_MIME_TYPE_TEXTPLAIN
24 XDG_MIME_TYPE_UNKNOWN _xdg_mime_mime_type_equal
25 _xdg_mime_mime_type_subclass _xdg_mime_unalias_mime_type
26 xdg_mime_dump xdg_mime_get_generic_icon xdg_mime_get_icon
27 xdg_mime_get_max_buffer_extents xdg_mime_get_mime_parents
28 xdg_mime_get_mime_type_for_data
29 xdg_mime_get_mime_type_for_file
30 xdg_mime_get_mime_type_from_file_name
31 xdg_mime_get_mime_types_from_file_name
32 xdg_mime_is_valid_mime_type xdg_mime_list_mime_parents
33 xdg_mime_media_type_equal xdg_mime_mime_type_equal
34 xdg_mime_mime_type_subclass xdg_mime_register_reload_callback
35 xdg_mime_remove_callback xdg_mime_shutdown xdg_mime_type_empty
36 xdg_mime_type_textplain xdg_mime_type_unknown
37 xdg_mime_unalias_mime_type));
38 ExtUtils::Constant::WriteConstants(
39 NAME => 'Xdgmime',
40 NAMES => \@names,
41 DEFAULT_TYPE => 'IV',
42 C_FILE => 'const-c.inc',
43 XS_FILE => 'const-xs.inc',
44 );
45
46 }
47 else {
48 use File::Copy;
49 use File::Spec;
50 foreach my $file ('const-c.inc', 'const-xs.inc') {
51 my $fallback = File::Spec->catfile('fallback', $file);
52 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
53 }
54 }