Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

173 lines (171 sloc) 8.822 kB
use 5.014002;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'FreeBSD::Libpkg',
VERSION_FROM => 'lib/FreeBSD/Libpkg.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/FreeBSD/Libpkg.pm', # retrieve abstract from module
AUTHOR => 'apeiron <apeiron@cpan.org>') : ()),
LIBS => ['-lpkg', '-L/usr/local/lib'], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I. -I/usr/local/include',
# Un-comment this if you add C files to link with later:
# OBJECT => '$(O_FILES)', # link all the C files too
);
if (eval {require ExtUtils::Constant; 1}) {
# If you edit these definitions to change the constants used by this module,
# you will need to use the generated const-c.inc and const-xs.inc
# files to replace their "fallback" counterparts before distributing your
# changes.
my @names = (qw(PKG_ADD_AUTOMATIC PKG_ADD_FORCE PKG_ADD_UPGRADE
PKG_ADD_UPGRADE_NEW PKG_LOAD_BASIC PKG_LOAD_CATEGORIES
PKG_LOAD_DEPS PKG_LOAD_DIRS PKG_LOAD_FILES PKG_LOAD_GROUPS
PKG_LOAD_LICENSES PKG_LOAD_MTREE PKG_LOAD_OPTIONS
PKG_LOAD_RDEPS PKG_LOAD_SCRIPTS PKG_LOAD_SHLIBS
PKG_LOAD_USERS),
{name=>"EPKG_DEPENDENCY", macro=>"1"},
{name=>"EPKG_END", macro=>"1"},
{name=>"EPKG_ENODB", macro=>"1"},
{name=>"EPKG_FATAL", macro=>"1"},
{name=>"EPKG_INSTALLED", macro=>"1"},
{name=>"EPKG_OK", macro=>"1"},
{name=>"EPKG_REQUIRED", macro=>"1"},
{name=>"EPKG_UPTODATE", macro=>"1"},
{name=>"EPKG_WARN", macro=>"1"},
{name=>"FIELD_COMMENT", macro=>"1"},
{name=>"FIELD_DESC", macro=>"1"},
{name=>"FIELD_NAME", macro=>"1"},
{name=>"FIELD_NAMEVER", macro=>"1"},
{name=>"FIELD_NONE", macro=>"1"},
{name=>"FIELD_ORIGIN", macro=>"1"},
{name=>"LICENSE_AND", macro=>"1"},
{name=>"LICENSE_OR", macro=>"1"},
{name=>"LICENSE_SINGLE", macro=>"1"},
{name=>"MATCH_ALL", macro=>"1"},
{name=>"MATCH_CONDITION", macro=>"1"},
{name=>"MATCH_EREGEX", macro=>"1"},
{name=>"MATCH_EXACT", macro=>"1"},
{name=>"MATCH_GLOB", macro=>"1"},
{name=>"MATCH_REGEX", macro=>"1"},
{name=>"PKGDB_DEFAULT", macro=>"1"},
{name=>"PKGDB_REMOTE", macro=>"1"},
{name=>"PKG_ARCH", macro=>"1"},
{name=>"PKG_AUTOMATIC", macro=>"1"},
{name=>"PKG_CATEGORIES", macro=>"1"},
{name=>"PKG_CKSUM", macro=>"1"},
{name=>"PKG_COMMENT", macro=>"1"},
{name=>"PKG_CONFIG_ABI", macro=>"1"},
{name=>"PKG_CONFIG_ASSUME_ALWAYS_YES", macro=>"1"},
{name=>"PKG_CONFIG_AUTODEPS", macro=>"1"},
{name=>"PKG_CONFIG_CACHEDIR", macro=>"1"},
{name=>"PKG_CONFIG_DBDIR", macro=>"1"},
{name=>"PKG_CONFIG_DEVELOPER_MODE", macro=>"1"},
{name=>"PKG_CONFIG_HANDLE_RC_SCRIPTS", macro=>"1"},
{name=>"PKG_CONFIG_KV_KEY", macro=>"1"},
{name=>"PKG_CONFIG_KV_VALUE", macro=>"1"},
{name=>"PKG_CONFIG_MULTIREPOS", macro=>"1"},
{name=>"PKG_CONFIG_PLIST_KEYWORDS_DIR", macro=>"1"},
{name=>"PKG_CONFIG_PORTSDIR", macro=>"1"},
{name=>"PKG_CONFIG_REPO", macro=>"1"},
{name=>"PKG_CONFIG_REPOKEY", macro=>"1"},
{name=>"PKG_CONFIG_REPOS", macro=>"1"},
{name=>"PKG_CONFIG_SHLIBS", macro=>"1"},
{name=>"PKG_CONFIG_SIGNED_REPOS", macro=>"1"},
{name=>"PKG_CONFIG_SYSLOG", macro=>"1"},
{name=>"PKG_DEPS", macro=>"1"},
{name=>"PKG_DEP_NAME", macro=>"1"},
{name=>"PKG_DEP_ORIGIN", macro=>"1"},
{name=>"PKG_DEP_VERSION", macro=>"1"},
{name=>"PKG_DESC", macro=>"1"},
{name=>"PKG_DIRS", macro=>"1"},
{name=>"PKG_EVENT_ALREADY_INSTALLED", macro=>"1"},
{name=>"PKG_EVENT_ARCHIVE_COMP_UNSUP", macro=>"1"},
{name=>"PKG_EVENT_CREATE_DB_ERROR", macro=>"1"},
{name=>"PKG_EVENT_DEINSTALL_BEGIN", macro=>"1"},
{name=>"PKG_EVENT_DEINSTALL_FINISHED", macro=>"1"},
{name=>"PKG_EVENT_ERRNO", macro=>"1"},
{name=>"PKG_EVENT_ERROR", macro=>"1"},
{name=>"PKG_EVENT_FAILED_CKSUM", macro=>"1"},
{name=>"PKG_EVENT_FETCHING", macro=>"1"},
{name=>"PKG_EVENT_FILE_MISMATCH", macro=>"1"},
{name=>"PKG_EVENT_INSTALL_BEGIN", macro=>"1"},
{name=>"PKG_EVENT_INSTALL_FINISHED", macro=>"1"},
{name=>"PKG_EVENT_INTEGRITYCHECK_BEGIN", macro=>"1"},
{name=>"PKG_EVENT_INTEGRITYCHECK_FINISHED", macro=>"1"},
{name=>"PKG_EVENT_MISSING_DEP", macro=>"1"},
{name=>"PKG_EVENT_NEWPKGVERSION", macro=>"1"},
{name=>"PKG_EVENT_NOLOCALDB", macro=>"1"},
{name=>"PKG_EVENT_NOREMOTEDB", macro=>"1"},
{name=>"PKG_EVENT_REQUIRED", macro=>"1"},
{name=>"PKG_EVENT_UPGRADE_BEGIN", macro=>"1"},
{name=>"PKG_EVENT_UPGRADE_FINISHED", macro=>"1"},
{name=>"PKG_FILE", macro=>"1"},
{name=>"PKG_FILES", macro=>"1"},
{name=>"PKG_FILE_GNAME", macro=>"1"},
{name=>"PKG_FILE_PATH", macro=>"1"},
{name=>"PKG_FILE_SUM", macro=>"1"},
{name=>"PKG_FILE_UNAME", macro=>"1"},
{name=>"PKG_FLATSIZE", macro=>"1"},
{name=>"PKG_GROUPS", macro=>"1"},
{name=>"PKG_INFOS", macro=>"1"},
{name=>"PKG_INSTALLED", macro=>"1"},
{name=>"PKG_JOBS_DEINSTALL", macro=>"1"},
{name=>"PKG_JOBS_FETCH", macro=>"1"},
{name=>"PKG_JOBS_INSTALL", macro=>"1"},
{name=>"PKG_LICENSES", macro=>"1"},
{name=>"PKG_LICENSE_LOGIC", macro=>"1"},
{name=>"PKG_MAINTAINER", macro=>"1"},
{name=>"PKG_MESSAGE", macro=>"1"},
{name=>"PKG_MTREE", macro=>"1"},
{name=>"PKG_NAME", macro=>"1"},
{name=>"PKG_NEWVERSION", macro=>"1"},
{name=>"PKG_NEW_FLATSIZE", macro=>"1"},
{name=>"PKG_NEW_PKGSIZE", macro=>"1"},
{name=>"PKG_NONE", macro=>"1"},
{name=>"PKG_OPTIONS", macro=>"1"},
{name=>"PKG_ORIGIN", macro=>"1"},
{name=>"PKG_PREFIX", macro=>"1"},
{name=>"PKG_RDEPS", macro=>"1"},
{name=>"PKG_REMOTE", macro=>"1"},
{name=>"PKG_REPONAME", macro=>"1"},
{name=>"PKG_REPOPATH", macro=>"1"},
{name=>"PKG_REPOURL", macro=>"1"},
{name=>"PKG_ROWID", macro=>"1"},
{name=>"PKG_SCRIPTS", macro=>"1"},
{name=>"PKG_SCRIPT_DEINSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_INSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_POST_DEINSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_POST_INSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_POST_UPGRADE", macro=>"1"},
{name=>"PKG_SCRIPT_PRE_DEINSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_PRE_INSTALL", macro=>"1"},
{name=>"PKG_SCRIPT_PRE_UPGRADE", macro=>"1"},
{name=>"PKG_SCRIPT_UPGRADE", macro=>"1"},
{name=>"PKG_SHLIBS", macro=>"1"},
{name=>"PKG_TIME", macro=>"1"},
{name=>"PKG_USERS", macro=>"1"},
{name=>"PKG_VERSION", macro=>"1"},
{name=>"PKG_WWW", macro=>"1"},
{name=>"TAR", macro=>"1"},
{name=>"TBZ", macro=>"1"},
{name=>"TGZ", macro=>"1"},
{name=>"TXZ", macro=>"1"});
ExtUtils::Constant::WriteConstants(
NAME => 'FreeBSD::Libpkg',
NAMES => \@names,
DEFAULT_TYPE => 'IV',
C_FILE => 'const-c.inc',
XS_FILE => 'const-xs.inc',
);
}
else {
use File::Copy;
use File::Spec;
foreach my $file ('const-c.inc', 'const-xs.inc') {
my $fallback = File::Spec->catfile('fallback', $file);
copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
}
}
Jump to Line
Something went wrong with that request. Please try again.