projects/aports·blob master · refs

213 lines · 4.0 KiB

1use strict;
2use warnings;
3use ExtUtils::MakeMaker 0;
4use ExtUtils::Constant qw (WriteConstants);
5
6my %WriteMakefileArgs = (
7 "ABSTRACT" => "Perl bindings to the Git linkable library (libgit2)",
8 "AUTHOR" => "Jacques Germishuys <jacquesg\@cpan.org>, Alessandro Ghedini <alexbio\@cpan.org>",
9 "CONFIGURE_REQUIRES" => {
10 "ExtUtils::Constant" => "0.23",
11 "ExtUtils::MakeMaker" => "6.63_03",
12 "File::Basename" => "2.74",
13 "Getopt::Long" => "2.35"
14 },
15 "DEFINE" => "-DGIT_SSH",
16 "DISTNAME" => "Git-Raw",
17 "LIBS" => "-lgit2",
18 "LICENSE" => "perl",
19 "MIN_PERL_VERSION" => "5.8.8",
20 "NAME" => "Git::Raw",
21 "OBJECT" => "\$(O_FILES)",
22 "PREREQ_PM" => {
23 "Carp" => 0,
24 "XSLoader" => 0,
25 "overload" => 0,
26 "strict" => 0,
27 "warnings" => 0
28 },
29 "TEST_REQUIRES" => {
30 "Capture::Tiny" => 0,
31 "Cwd" => 0,
32 "File::Basename" => 0,
33 "File::Copy" => 0,
34 "File::Path" => 0,
35 "File::Slurp::Tiny" => "0.001",
36 "File::Spec" => 0,
37 "File::Spec::Functions" => 0,
38 "File::Spec::Unix" => 0,
39 "IO::Handle" => 0,
40 "IPC::Open3" => 0,
41 "Test::Deep" => 0,
42 "Test::More" => 0,
43 "Time::Local" => 0
44 },
45 "VERSION_FROM" => "lib/Git/Raw.pm",
46 "test" => {
47 "TESTS" => "t/*.t"
48 }
49);
50
51my @error_constants = (qw(
52 OK
53 ERROR
54 ENOTFOUND
55 EEXISTS
56 EAMBIGUOUS
57 EBUFS
58 EBAREREPO
59 EUNBORNBRANCH
60 EUNMERGED
61 ENONFASTFORWARD
62 EINVALIDSPEC
63 ECONFLICT
64 ELOCKED
65 EMODIFIED
66 EAUTH
67 ECERTIFICATE
68 EAPPLIED
69 EPEEL
70 EEOF
71 EINVALID
72 EUNCOMMITTED
73 EDIRECTORY
74 EMERGECONFLICT
75 PASSTHROUGH
76
77 ASSERT
78 USAGE
79 RESOLVE
80));
81
82my @category_constants = (qw(
83 NONE
84 NOMEMORY
85 OS
86 INVALID
87 REFERENCE
88 ZLIB
89 REPOSITORY
90 CONFIG
91 REGEX
92 ODB
93 INDEX
94 OBJECT
95 NET
96 TAG
97 TREE
98 INDEXER
99 SSL
100 SUBMODULE
101 THREAD
102 STASH
103 CHECKOUT
104 FETCHHEAD
105 MERGE
106 SSH
107 FILTER
108 REVERT
109 CALLBACK
110 CHERRYPICK
111 DESCRIBE
112 REBASE
113 FILESYSTEM
114
115 INTERNAL
116));
117
118my @packbuilder_constants = (qw(
119 ADDING_OBJECTS
120 DELTAFICATION
121));
122
123my @stash_progress_constants = (qw(
124 NONE
125 LOADING_STASH
126 ANALYZE_INDEX
127 ANALYZE_MODIFIED
128 ANALYZE_UNTRACKED
129 CHECKOUT_UNTRACKED
130 CHECKOUT_MODIFIED
131 DONE
132));
133
134my @rebase_operation_constants = (qw(
135 PICK
136 REWORD
137 EDIT
138 SQUASH
139 FIXUP
140 EXEC
141));
142
143my @object_constants = (qw(
144 ANY
145 BAD
146 COMMIT
147 TREE
148 BLOB
149 TAG
150));
151
152ExtUtils::Constant::WriteConstants(
153 NAME => 'Git::Raw::Error',
154 NAMES => [@error_constants],
155 DEFAULT_TYPE => 'IV',
156 C_FILE => 'const-c-error.inc',
157 XS_FILE => 'const-xs-error.inc',
158 XS_SUBNAME => '_constant',
159 C_SUBNAME => '_error_constant',
160);
161
162ExtUtils::Constant::WriteConstants(
163 NAME => 'Git::Raw::Error::Category',
164 NAMES => [@category_constants],
165 DEFAULT_TYPE => 'IV',
166 C_FILE => 'const-c-category.inc',
167 XS_FILE => 'const-xs-category.inc',
168 XS_SUBNAME => '_constant',
169 C_SUBNAME => '_category_constant',
170);
171
172ExtUtils::Constant::WriteConstants(
173 NAME => 'Git::Raw::Packbuilder',
174 NAMES => [@packbuilder_constants],
175 DEFAULT_TYPE => 'IV',
176 C_FILE => 'const-c-packbuilder.inc',
177 XS_FILE => 'const-xs-packbuilder.inc',
178 XS_SUBNAME => '_constant',
179 C_SUBNAME => '_packbuilder_constant',
180);
181
182ExtUtils::Constant::WriteConstants(
183 NAME => 'Git::Raw::Stash::Progress',
184 NAMES => [@stash_progress_constants],
185 DEFAULT_TYPE => 'IV',
186 C_FILE => 'const-c-stash-progress.inc',
187 XS_FILE => 'const-xs-stash-progress.inc',
188 XS_SUBNAME => '_constant',
189 C_SUBNAME => '_stash_progress_constant',
190);
191
192ExtUtils::Constant::WriteConstants(
193 NAME => 'Git::Raw::Rebase::Operation',
194 NAMES => [@rebase_operation_constants],
195 DEFAULT_TYPE => 'IV',
196 C_FILE => 'const-c-rebase-operation.inc',
197 XS_FILE => 'const-xs-rebase-operation.inc',
198 XS_SUBNAME => '_constant',
199 C_SUBNAME => '_rebase_operation_constant',
200);
201
202ExtUtils::Constant::WriteConstants(
203 NAME => 'Git::Raw::Object',
204 NAMES => [@object_constants],
205 DEFAULT_TYPE => 'IV',
206 C_FILE => 'const-c-object.inc',
207 XS_FILE => 'const-xs-object.inc',
208 XS_SUBNAME => '_constant',
209 C_SUBNAME => '_object_constant',
210);
211
212WriteMakefile(%WriteMakefileArgs);
213exit(0);