DBD-Unify
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# For unstallu.pl
"Config" => 0,
"Cwd" => 0,
"File::Find" => 0,
"File::Copy" => 0,
# Real deps
"DBI" => 1.42,
# Test deps
"Test::More" => 0.90,
},
dist => { COMPRESS => "gzip -9f",
SUFFIX => ".gz",
},
clean => { FILES => "dbdimp.c dbdimp.ec Unify.ec",
},
realclean => { FILES => "Unify.xsi ulib",
},
LINKTYPE => "dynamic",
INC => "-I$UNITOP -I$UNITOP/include -I\$(DBI_INSTARCH_DIR)",
OBJECT => ( join " " =>
"Unify\$(OBJ_EXT)",
"dbdimp\$(OBJ_EXT)",
$ULIBS,
$ULDOPTS, {
hpux => "",
aix => "-lm",
dec_osf => "-lxnet",
}->{$^O} || ""),
depend => { "dbdimp\$(OBJ_EXT)" => "dbdimp.c Unify.h",
"Unify\$(OBJ_EXT)" => "Unify.h",
},
dynamic_lib => { OTHERLDFLAGS => join " " => "",
"-L$UNIFY",
"\$(COMPOBJS)",
},
macro => { EPP => "$UNITOP/bin/EPP",
EPPOPT => "",
CC => ($^O eq "aix" ? "env UPPNAME='cc -E' " : "")
. "$UNITOP/bin/ucc",
TARFLAGS => "--format=ustar -c -v -f",
SELINUXENABLED => "/usr/sbin/selinuxenabled",
},
);
my $eummv = eval $ExtUtils::MakeMaker::VERSION;
$eummv > 6.30 and $wm{LICENSE} = "perl";
$Config{myarchname} eq "ia64-hpux" and delete $wm{macro}{CC};
my $rv = WriteMakefile (%wm);
# perlcriticrc uses Config::Tiny, which does not support nesting
if (-f ".perlcriticrc" && -s "$ENV{HOME}/.perlcriticrc") {
open my $fh, ">", ".perlcriticrc";
print $fh do {
local (@ARGV, $/) = ("$ENV{HOME}/.perlcriticrc"); <> };
print $fh join "\n" => "",
"[-Documentation::RequireLinkedURLs]", # L<DBI|http://...] requires 5.12
"[-Modules::ProhibitMultiplePackages]",
"[-Modules::RequireExplicitPackage]", # use 5.008000
"[-RegularExpressions::ProhibitFixedStringMatches]", # deliberate
"[-Subroutines::ProhibitBuiltinHomonyms]", # connect
"[-Subroutines::ProtectPrivateSubs]",
"[-TooMuchCode::ProhibitDuplicateSub]", # sub private_attribute_info
"[-ValuesAndExpressions::ProhibitVersionStrings]", # use 5.008000
"[-Variables::ProhibitPackageVars]", # our
"";
close $fh;
}
if ($rv && <ulib/*.s[lo] >) {
open my $mf, "<Makefile" or die "Cannot read Makefile: $!\n";
my @MF = <$mf>;
close $mf;
s/\bPERL_DL_NONLAZY=\d+\s+// for @MF;
open $mf, ">Makefile" or die "Cannot modify Makefile: $!\n";
print $mf @MF;
close $mf;
}
sub CheckUnify {
unless (exists $ENV{UNIFY}) {
print STDERR
"\$UNIFY not set. This probably means that you either do not have\n",
"Unify products installed on your system, or you did not set up a\n",
"minimal runtime environment to make it work.\n";
exit 1;
}
unless (exists $ENV{DBPATH}) {
print STDERR
"\$DBPATH not set. Even if your UNIFY environment might be set up\n",
"correctly, building and testing will need an available database.\n";
exit 1;
}
$UNIFY = abs_path $ENV{UNIFY};
-d $UNIFY or die "\$UNIFY is not a valid directory\n";
-d $ENV{DBPATH} or die "\$DBPATH is not a valid directory\n";
$UNITOP = abs_path "$UNIFY/..";
my $cwd = cwd;
my @sqlv = `SQL -version`;
unlink "ulib";
symlink $UNIFY, "./ulib";
# Checked for A/SQL DS 6.3 AB and beyond
my @ulibs = grep { -f "ulib/$_" } qw(
ACCELL.a
S2000e.a S2000c.a
libuse.a
U2000c.a U2000u.a U2000k.a
U2000c.a
S2000u.a S2000c.a U2000r.a
libnwrpc.a libnwstcp.a
( run in 0.805 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )