Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 172 lines (171 sloc) 8.822 kb
7dd0e010 » Chris Nehren
2012-05-17 initial commit with some working features
1 use 5.014002;
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(
ef2f9c60 » Chris Nehren
2012-05-20 rename to FreeBSD::Libpkg
6 NAME => 'FreeBSD::Libpkg',
7 VERSION_FROM => 'lib/FreeBSD/Libpkg.pm', # finds $VERSION
7dd0e010 » Chris Nehren
2012-05-17 initial commit with some working features
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
ef2f9c60 » Chris Nehren
2012-05-20 rename to FreeBSD::Libpkg
10 (ABSTRACT_FROM => 'lib/FreeBSD/Libpkg.pm', # retrieve abstract from module
21f1ebc7 » Chris Nehren
2012-05-20 missed a quote
11 AUTHOR => 'apeiron <apeiron@cpan.org>') : ()),
7dd0e010 » Chris Nehren
2012-05-17 initial commit with some working features
12 LIBS => ['-lpkg', '-L/usr/local/lib'], # e.g., '-lm'
13 DEFINE => '', # e.g., '-DHAVE_SOMETHING'
14 INC => '-I. -I/usr/local/include',
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(PKG_ADD_AUTOMATIC PKG_ADD_FORCE PKG_ADD_UPGRADE
24 PKG_ADD_UPGRADE_NEW PKG_LOAD_BASIC PKG_LOAD_CATEGORIES
25 PKG_LOAD_DEPS PKG_LOAD_DIRS PKG_LOAD_FILES PKG_LOAD_GROUPS
26 PKG_LOAD_LICENSES PKG_LOAD_MTREE PKG_LOAD_OPTIONS
27 PKG_LOAD_RDEPS PKG_LOAD_SCRIPTS PKG_LOAD_SHLIBS
28 PKG_LOAD_USERS),
29 {name=>"EPKG_DEPENDENCY", macro=>"1"},
30 {name=>"EPKG_END", macro=>"1"},
31 {name=>"EPKG_ENODB", macro=>"1"},
32 {name=>"EPKG_FATAL", macro=>"1"},
33 {name=>"EPKG_INSTALLED", macro=>"1"},
34 {name=>"EPKG_OK", macro=>"1"},
35 {name=>"EPKG_REQUIRED", macro=>"1"},
36 {name=>"EPKG_UPTODATE", macro=>"1"},
37 {name=>"EPKG_WARN", macro=>"1"},
38 {name=>"FIELD_COMMENT", macro=>"1"},
39 {name=>"FIELD_DESC", macro=>"1"},
40 {name=>"FIELD_NAME", macro=>"1"},
41 {name=>"FIELD_NAMEVER", macro=>"1"},
42 {name=>"FIELD_NONE", macro=>"1"},
43 {name=>"FIELD_ORIGIN", macro=>"1"},
44 {name=>"LICENSE_AND", macro=>"1"},
45 {name=>"LICENSE_OR", macro=>"1"},
46 {name=>"LICENSE_SINGLE", macro=>"1"},
47 {name=>"MATCH_ALL", macro=>"1"},
48 {name=>"MATCH_CONDITION", macro=>"1"},
49 {name=>"MATCH_EREGEX", macro=>"1"},
50 {name=>"MATCH_EXACT", macro=>"1"},
51 {name=>"MATCH_GLOB", macro=>"1"},
52 {name=>"MATCH_REGEX", macro=>"1"},
53 {name=>"PKGDB_DEFAULT", macro=>"1"},
54 {name=>"PKGDB_REMOTE", macro=>"1"},
55 {name=>"PKG_ARCH", macro=>"1"},
56 {name=>"PKG_AUTOMATIC", macro=>"1"},
57 {name=>"PKG_CATEGORIES", macro=>"1"},
58 {name=>"PKG_CKSUM", macro=>"1"},
59 {name=>"PKG_COMMENT", macro=>"1"},
60 {name=>"PKG_CONFIG_ABI", macro=>"1"},
61 {name=>"PKG_CONFIG_ASSUME_ALWAYS_YES", macro=>"1"},
62 {name=>"PKG_CONFIG_AUTODEPS", macro=>"1"},
63 {name=>"PKG_CONFIG_CACHEDIR", macro=>"1"},
64 {name=>"PKG_CONFIG_DBDIR", macro=>"1"},
65 {name=>"PKG_CONFIG_DEVELOPER_MODE", macro=>"1"},
66 {name=>"PKG_CONFIG_HANDLE_RC_SCRIPTS", macro=>"1"},
67 {name=>"PKG_CONFIG_KV_KEY", macro=>"1"},
68 {name=>"PKG_CONFIG_KV_VALUE", macro=>"1"},
69 {name=>"PKG_CONFIG_MULTIREPOS", macro=>"1"},
70 {name=>"PKG_CONFIG_PLIST_KEYWORDS_DIR", macro=>"1"},
71 {name=>"PKG_CONFIG_PORTSDIR", macro=>"1"},
72 {name=>"PKG_CONFIG_REPO", macro=>"1"},
73 {name=>"PKG_CONFIG_REPOKEY", macro=>"1"},
74 {name=>"PKG_CONFIG_REPOS", macro=>"1"},
75 {name=>"PKG_CONFIG_SHLIBS", macro=>"1"},
76 {name=>"PKG_CONFIG_SIGNED_REPOS", macro=>"1"},
77 {name=>"PKG_CONFIG_SYSLOG", macro=>"1"},
78 {name=>"PKG_DEPS", macro=>"1"},
79 {name=>"PKG_DEP_NAME", macro=>"1"},
80 {name=>"PKG_DEP_ORIGIN", macro=>"1"},
81 {name=>"PKG_DEP_VERSION", macro=>"1"},
82 {name=>"PKG_DESC", macro=>"1"},
83 {name=>"PKG_DIRS", macro=>"1"},
84 {name=>"PKG_EVENT_ALREADY_INSTALLED", macro=>"1"},
85 {name=>"PKG_EVENT_ARCHIVE_COMP_UNSUP", macro=>"1"},
86 {name=>"PKG_EVENT_CREATE_DB_ERROR", macro=>"1"},
87 {name=>"PKG_EVENT_DEINSTALL_BEGIN", macro=>"1"},
88 {name=>"PKG_EVENT_DEINSTALL_FINISHED", macro=>"1"},
89 {name=>"PKG_EVENT_ERRNO", macro=>"1"},
90 {name=>"PKG_EVENT_ERROR", macro=>"1"},
91 {name=>"PKG_EVENT_FAILED_CKSUM", macro=>"1"},
92 {name=>"PKG_EVENT_FETCHING", macro=>"1"},
93 {name=>"PKG_EVENT_FILE_MISMATCH", macro=>"1"},
94 {name=>"PKG_EVENT_INSTALL_BEGIN", macro=>"1"},
95 {name=>"PKG_EVENT_INSTALL_FINISHED", macro=>"1"},
96 {name=>"PKG_EVENT_INTEGRITYCHECK_BEGIN", macro=>"1"},
97 {name=>"PKG_EVENT_INTEGRITYCHECK_FINISHED", macro=>"1"},
98 {name=>"PKG_EVENT_MISSING_DEP", macro=>"1"},
99 {name=>"PKG_EVENT_NEWPKGVERSION", macro=>"1"},
100 {name=>"PKG_EVENT_NOLOCALDB", macro=>"1"},
101 {name=>"PKG_EVENT_NOREMOTEDB", macro=>"1"},
102 {name=>"PKG_EVENT_REQUIRED", macro=>"1"},
103 {name=>"PKG_EVENT_UPGRADE_BEGIN", macro=>"1"},
104 {name=>"PKG_EVENT_UPGRADE_FINISHED", macro=>"1"},
105 {name=>"PKG_FILE", macro=>"1"},
106 {name=>"PKG_FILES", macro=>"1"},
107 {name=>"PKG_FILE_GNAME", macro=>"1"},
108 {name=>"PKG_FILE_PATH", macro=>"1"},
109 {name=>"PKG_FILE_SUM", macro=>"1"},
110 {name=>"PKG_FILE_UNAME", macro=>"1"},
111 {name=>"PKG_FLATSIZE", macro=>"1"},
112 {name=>"PKG_GROUPS", macro=>"1"},
113 {name=>"PKG_INFOS", macro=>"1"},
114 {name=>"PKG_INSTALLED", macro=>"1"},
115 {name=>"PKG_JOBS_DEINSTALL", macro=>"1"},
116 {name=>"PKG_JOBS_FETCH", macro=>"1"},
117 {name=>"PKG_JOBS_INSTALL", macro=>"1"},
118 {name=>"PKG_LICENSES", macro=>"1"},
119 {name=>"PKG_LICENSE_LOGIC", macro=>"1"},
120 {name=>"PKG_MAINTAINER", macro=>"1"},
121 {name=>"PKG_MESSAGE", macro=>"1"},
122 {name=>"PKG_MTREE", macro=>"1"},
123 {name=>"PKG_NAME", macro=>"1"},
124 {name=>"PKG_NEWVERSION", macro=>"1"},
125 {name=>"PKG_NEW_FLATSIZE", macro=>"1"},
126 {name=>"PKG_NEW_PKGSIZE", macro=>"1"},
127 {name=>"PKG_NONE", macro=>"1"},
128 {name=>"PKG_OPTIONS", macro=>"1"},
129 {name=>"PKG_ORIGIN", macro=>"1"},
130 {name=>"PKG_PREFIX", macro=>"1"},
131 {name=>"PKG_RDEPS", macro=>"1"},
132 {name=>"PKG_REMOTE", macro=>"1"},
133 {name=>"PKG_REPONAME", macro=>"1"},
134 {name=>"PKG_REPOPATH", macro=>"1"},
135 {name=>"PKG_REPOURL", macro=>"1"},
136 {name=>"PKG_ROWID", macro=>"1"},
137 {name=>"PKG_SCRIPTS", macro=>"1"},
138 {name=>"PKG_SCRIPT_DEINSTALL", macro=>"1"},
139 {name=>"PKG_SCRIPT_INSTALL", macro=>"1"},
140 {name=>"PKG_SCRIPT_POST_DEINSTALL", macro=>"1"},
141 {name=>"PKG_SCRIPT_POST_INSTALL", macro=>"1"},
142 {name=>"PKG_SCRIPT_POST_UPGRADE", macro=>"1"},
143 {name=>"PKG_SCRIPT_PRE_DEINSTALL", macro=>"1"},
144 {name=>"PKG_SCRIPT_PRE_INSTALL", macro=>"1"},
145 {name=>"PKG_SCRIPT_PRE_UPGRADE", macro=>"1"},
146 {name=>"PKG_SCRIPT_UPGRADE", macro=>"1"},
147 {name=>"PKG_SHLIBS", macro=>"1"},
148 {name=>"PKG_TIME", macro=>"1"},
149 {name=>"PKG_USERS", macro=>"1"},
150 {name=>"PKG_VERSION", macro=>"1"},
151 {name=>"PKG_WWW", macro=>"1"},
152 {name=>"TAR", macro=>"1"},
153 {name=>"TBZ", macro=>"1"},
154 {name=>"TGZ", macro=>"1"},
155 {name=>"TXZ", macro=>"1"});
156 ExtUtils::Constant::WriteConstants(
ef2f9c60 » Chris Nehren
2012-05-20 rename to FreeBSD::Libpkg
157 NAME => 'FreeBSD::Libpkg',
7dd0e010 » Chris Nehren
2012-05-17 initial commit with some working features
158 NAMES => \@names,
159 DEFAULT_TYPE => 'IV',
160 C_FILE => 'const-c.inc',
161 XS_FILE => 'const-xs.inc',
162 );
163
164 }
165 else {
166 use File::Copy;
167 use File::Spec;
168 foreach my $file ('const-c.inc', 'const-xs.inc') {
169 my $fallback = File::Spec->catfile('fallback', $file);
170 copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
171 }
172 }
Something went wrong with that request. Please try again.