Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 095fba9d54
Fetching contributors…

Cannot retrieve contributors at this time

file 172 lines (171 sloc) 8.822 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
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: $!";
  }
}
Something went wrong with that request. Please try again.