[Orca-checkins] r442 - in trunk/orca: . lib/Orca orca packages packages/version-0.42
blair at orcaware.com
blair at orcaware.com
Mon May 2 18:42:14 PDT 2005
Author: blair at orcaware.com
Date: Mon May 2 18:41:27 2005
New Revision: 442
Removed:
trunk/orca/packages/version-0.42/
Modified:
trunk/orca/INSTALL
trunk/orca/configure.in
trunk/orca/lib/Orca/Config.pm
trunk/orca/orca/orca.pl.in
trunk/orca/packages/Makefile.in
Log:
Do not use the Perl version module to compare Orca's version number
with the required Orca version number specified in Orca's
configuration file. Do the comparison in Perl code.
* lib/Orca/Config.pm:
(main):
Do not 'use version'.
Import $ORCA_VER_MAJOR, $ORCA_VER_MINOR and $ORCA_VER_PATCH from
Orca::Constants.
(check_config):
Check the required Orca version with Orca's version here.
Be stricter in the formatting of Orca version numbers that are
accepted.
* packages/version-0.42:
Delete.
* packages/Makefile.in:
Remove all rules to descend into and build the Perl version module.
* configure.in:
No longer check if Perl's version module is installed.
Do not substitute the following autoconf variables:
@VERSION_DIR@
@VERSION_VER@
@MAKE_VERSION@
@TEST_VERSION@
@INSTALL_PERL_VERSION@
@CLEAN_VERSION@
@DISTCLEAN_VERSION@
* orca/orca.pl.in:
Do not 'use version' any more.
* INSTALL:
Remove all references to the Perl version module.
Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL (original)
+++ trunk/orca/INSTALL Mon May 2 18:41:27 2005
@@ -178,9 +178,8 @@
RRDs >= 1.000502 >= 1.0.50 1.0.50
Storable >= 2.14 >= 2.14 2.14
Time::HiRes Not required by Orca 1.66
- version >= 0.42 >= 0.42 0.42
- All seven of these modules are included with the Orca distribution
+ All eight of these modules are included with the Orca distribution
in the packages directory. When you configure Orca in step 3),
configure will determine if you need any of these modules compiled
and installed. configure will then modify the packages/Makefile
@@ -288,17 +287,6 @@
% make test
% make install UNINST=1
- version
-
- http://www.perl.com/CPAN/authors/id/J/JP/JPEACOCK/version-0.42.tar.gz
-
- % gunzip -c version-0.42.tar.gz | tar xvf -
- % cd version-0.42
- % perl Makefile.PL
- % make
- % make test
- % make install UNINST=1
-
5) Make Orca and any necessary Perl modules.
To make Orca and these Perl modules run the following command:
Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in (original)
+++ trunk/orca/configure.in Mon May 2 18:41:27 2005
@@ -43,8 +43,6 @@
STORABLE_VER=2.14
TIME_HIRES_DIR=Time-HiRes-1.66
TIME_HIRES_VER=1.66
-VERSION_DIR=version-0.42
-VERSION_VER=0.42
AC_SUBST(COMPRESS_ZLIB_DIR)
AC_SUBST(DATA_DUMPER_DIR)
@@ -55,7 +53,6 @@
AC_SUBST(RRDTOOL_DIR)
AC_SUBST(STORABLE_DIR)
AC_SUBST(TIME_HIRES_DIR)
-AC_SUBST(VERSION_DIR)
AC_SUBST(COMPRESS_ZLIB_VER)
AC_SUBST(DATA_DUMPER_VER)
@@ -66,7 +63,6 @@
AC_SUBST(RRDTOOL_VER)
AC_SUBST(STORABLE_VER)
AC_SUBST(TIME_HIRES_VER)
-AC_SUBST(VERSION_VER)
# Get the current working directory and the config directory.
cwd=`pwd`
@@ -537,24 +533,6 @@
AC_SUBST(DISTCLEAN_TIME_HIRES)
AC_SUBST(PERL_USE_TIME_HIRES)
-BORP_PERL_MODULE(orca_cv_perl_module_version,
- $PERL,
- version,
- $VERSION_VER)
-test "$ALWAYS_BUILD_PERL_MODULES" && orca_cv_perl_module_version=no
-if test "$orca_cv_perl_module_version" = no; then
- MAKE_VERSION=make_version
- TEST_VERSION=test_version
- INSTALL_PERL_VERSION=install_perl_version
- CLEAN_VERSION=clean_version
- DISTCLEAN_VERSION=distclean_version
-fi
-AC_SUBST(MAKE_VERSION)
-AC_SUBST(TEST_VERSION)
-AC_SUBST(INSTALL_PERL_VERSION)
-AC_SUBST(CLEAN_VERSION)
-AC_SUBST(DISTCLEAN_VERSION)
-
# Define the INSTALL and MKDIR variables to point to the scripts in
# the config directory.
INSTALL="$config_dir/install-sh -c"
Modified: trunk/orca/lib/Orca/Config.pm
==============================================================================
--- trunk/orca/lib/Orca/Config.pm (original)
+++ trunk/orca/lib/Orca/Config.pm Mon May 2 18:41:27 2005
@@ -30,11 +30,13 @@
use strict;
use Carp;
use Exporter;
-use version;
use Orca::Constants qw($opt_verbose
$is_sub_re
die_when_called
+ $ORCA_VER_MAJOR
+ $ORCA_VER_MINOR
+ $ORCA_VER_PATCH
$ORCA_VER_QUOTED
@CONST_IMAGE_PLOT_TYPES
%CONST_IMAGE_PLOT_INFO
@@ -346,36 +348,56 @@
if (defined $config_global{require}) {
my @require = @{$config_global{require}};
if (@require == 2) {
- my ($require_what, $require_version) = @require;
+ my ($require_what, $required_version) = @require;
if ($require_what eq 'Orca') {
- # Normalize the required version string to the form
- # \d+\.\d+\.\d+ . To handle almost any input version string,
- # split on the existing periods and for each substring, if it
- # is not defined or has 0 length, then set it to 0. Do not
- # worry about there being more than two periods in the given
- # string, the regular expression match below will catch
- # invalid version strings.
- my @vers = split(/\./, $require_version);
-
- for (my $i=0; $i<3; ++$i) {
- unless (defined $vers[$i] and length $vers[$i]) {
- $vers[$i] = 0;
+ # Split the required Orca version string on periods and
+ # compare each element in an array created from the split
+ # string with an array created from the Orca version numbers.
+ my @required_version = split(/\./, $required_version);
+
+ # Check each substring. If it is not defined or has 0 length
+ # or is not an integer number, then set it to 0 and complain.
+ my $warned = 0;
+ for (my $i=0; $i<@required_version; ++$i) {
+ unless (defined $required_version[$i] and
+ length $required_version[$i] and
+ $required_version[$i] =~ /^\d+$/) {
+ unless ($warned) {
+ warn "$0: error: 'require Orca $required_version' has an ",
+ "illegally formatted version string in ",
+ "'$config_filename'.\n";
+ $warned = 1;
+ }
+ ++$number_errors;
+ $required_version[$i] = 0;
}
}
- my $reformulated_required_version = join('.', @vers);
- if ($reformulated_required_version =~ /^\d+\.\d+\.\d+$/) {
- $require_version = version->new($reformulated_required_version);
- my $orca_version = version->new($ORCA_VER_QUOTED);
-
- if ($orca_version < $require_version) {
- warn "$0: Orca version $ORCA_VER_QUOTED less than required ",
- "version $require_version specified in '$config_filename'.\n";
- ++$number_errors;
+ # The Orca version number has three elements, so to have a
+ # good comparison, ensure that the required version number
+ # array has at least three elements.
+ for (my $i=@required_version; $i<3; ++$i) {
+ $required_version[$i] = 0;
+ }
+
+ # If the required version string has more elements than the
+ # Orca version array, then extend the Orca version array.
+ my @orca_version = ($ORCA_VER_MAJOR, $ORCA_VER_MINOR, $ORCA_VER_PATCH);
+ for (my $i=@orca_version; $i<@required_version; ++$i) {
+ $orca_version[$i] = 0;
+ }
+
+ my $orca_version_ok = 1;
+ for (my $i=0; $i<@orca_version; ++$i) {
+ if ($orca_version[$i] < $required_version[$i]) {
+ $orca_version_ok = 0;
+ last;
}
- } else {
- warn "$0: error: 'require' second argument '$require_version' is ",
- "not a valid version number in '$config_filename'.\n";
+ }
+
+ unless ($orca_version_ok) {
+ warn "$0: Orca version $ORCA_VER_QUOTED is less than the required ",
+ "version $required_version specified in '$config_filename'.\n";
++$number_errors;
}
} else {
Modified: trunk/orca/orca/orca.pl.in
==============================================================================
--- trunk/orca/orca/orca.pl.in (original)
+++ trunk/orca/orca/orca.pl.in Mon May 2 18:41:27 2005
@@ -53,7 +53,6 @@
use Math::IntervalSearch @MATH_INTERVALSEARCH_VER@ qw(interval_search);
use Storable @STORABLE_VER@;
use RRDs @RRDTOOL_VER@;
-use version @VERSION_VER@;
# Set behavior of the Data::Dumper module.
$Data::Dumper::Indent = 1;
Modified: trunk/orca/packages/Makefile.in
==============================================================================
--- trunk/orca/packages/Makefile.in (original)
+++ trunk/orca/packages/Makefile.in Mon May 2 18:41:27 2005
@@ -18,7 +18,6 @@
math_intervalsearch_dir = @MATH_INTERVALSEARCH_DIR@
rrdtool_dir = @RRDTOOL_DIR@
storable_dir = @STORABLE_DIR@
-version_dir = @VERSION_DIR@
MAKE_COMPRESS_ZLIB = @MAKE_COMPRESS_ZLIB@
MAKE_DATA_DUMPER = @MAKE_DATA_DUMPER@
@@ -28,7 +27,6 @@
MAKE_MATH_INTERVALSEARCH = @MAKE_MATH_INTERVALSEARCH@
MAKE_RRDTOOL = @MAKE_RRDTOOL@
MAKE_STORABLE = @MAKE_STORABLE@
-MAKE_VERSION = @MAKE_VERSION@
MAKE_TARGETS = $(MAKE_COMPRESS_ZLIB) \
$(MAKE_DATA_DUMPER) \
$(MAKE_DATE_PARSE) \
@@ -36,8 +34,7 @@
$(MAKE_DIGEST_MD5) \
$(MAKE_MATH_INTERVALSEARCH) \
$(MAKE_RRDTOOL) \
- $(MAKE_STORABLE) \
- $(MAKE_VERSION)
+ $(MAKE_STORABLE)
TEST_COMPRESS_ZLIB = @TEST_COMPRESS_ZLIB@
TEST_DATA_DUMPER = @TEST_DATA_DUMPER@
@@ -47,7 +44,6 @@
TEST_MATH_INTERVALSEARCH = @TEST_MATH_INTERVALSEARCH@
TEST_RRDTOOL = @TEST_RRDTOOL@
TEST_STORABLE = @TEST_STORABLE@
-TEST_VERSION = @TEST_VERSION@
TEST_TARGETS = $(TEST_COMPRESS_ZLIB) \
$(TEST_DATA_DUMPER) \
$(TEST_DATE_PARSE) \
@@ -55,8 +51,7 @@
$(TEST_DIGEST_MD5) \
$(TEST_MATH_INTERVALSEARCH) \
$(TEST_RRDTOOL) \
- $(TEST_STORABLE) \
- $(TEST_VERSION)
+ $(TEST_STORABLE)
INSTALL_PERL_COMPRESS_ZLIB = @INSTALL_PERL_COMPRESS_ZLIB@
INSTALL_PERL_DATA_DUMPER = @INSTALL_PERL_DATA_DUMPER@
@@ -66,7 +61,6 @@
INSTALL_PERL_MATH_INTERVALSEARCH = @INSTALL_PERL_MATH_INTERVALSEARCH@
INSTALL_PERL_RRDTOOL = @INSTALL_PERL_RRDTOOL@
INSTALL_PERL_STORABLE = @INSTALL_PERL_STORABLE@
-INSTALL_PERL_VERSION = @INSTALL_PERL_VERSION@
INSTALL_PERL_TARGETS = $(INSTALL_PERL_COMPRESS_ZLIB) \
$(INSTALL_PERL_DATA_DUMPER) \
$(INSTALL_PERL_DATE_PARSE) \
@@ -74,8 +68,7 @@
$(INSTALL_PERL_DIGEST_MD5) \
$(INSTALL_PERL_MATH_INTERVALSEARCH) \
$(INSTALL_PERL_RRDTOOL) \
- $(INSTALL_PERL_STORABLE) \
- $(INSTALL_PERL_VERSION)
+ $(INSTALL_PERL_STORABLE)
INSTALL_LIB_RRDTOOL = @INSTALL_LIB_RRDTOOL@
INSTALL_LIB_TARGETS = $(INSTALL_LIB_RRDTOOL)
@@ -88,7 +81,6 @@
CLEAN_MATH_INTERVALSEARCH = @CLEAN_MATH_INTERVALSEARCH@
CLEAN_RRDTOOL = @CLEAN_RRDTOOL@
CLEAN_STORABLE = @CLEAN_STORABLE@
-CLEAN_VERSION = @CLEAN_VERSION@
CLEAN_TARGETS = $(CLEAN_COMPRESS_ZLIB) \
$(CLEAN_DATA_DUMPER) \
$(CLEAN_DATE_PARSE) \
@@ -96,8 +88,7 @@
$(CLEAN_DIGEST_MD5) \
$(CLEAN_MATH_INTERVALSEARCH) \
$(CLEAN_RRDTOOL) \
- $(CLEAN_STORABLE) \
- $(CLEAN_VERSION)
+ $(CLEAN_STORABLE)
DISTCLEAN_COMPRESS_ZLIB = @DISTCLEAN_COMPRESS_ZLIB@
DISTCLEAN_DATA_DUMPER = @DISTCLEAN_DATA_DUMPER@
@@ -107,7 +98,6 @@
DISTCLEAN_MATH_INTERVALSEARCH = @DISTCLEAN_MATH_INTERVALSEARCH@
DISTCLEAN_RRDTOOL = @DISTCLEAN_RRDTOOL@
DISTCLEAN_STORABLE = @DISTCLEAN_STORABLE@
-DISTCLEAN_VERSION = @DISTCLEAN_VERSION@
DISTCLEAN_TARGETS = $(DISTCLEAN_COMPRESS_ZLIB) \
$(DISTCLEAN_DATA_DUMPER) \
$(DISTCLEAN_DATE_PARSE) \
@@ -115,8 +105,7 @@
$(DISTCLEAN_DIGEST_MD5) \
$(DISTCLEAN_MATH_INTERVALSEARCH) \
$(DISTCLEAN_RRDTOOL) \
- $(DISTCLEAN_STORABLE) \
- $(DISTCLEAN_VERSION)
+ $(DISTCLEAN_STORABLE)
all: Makefile $(MAKE_TARGETS)
@@ -174,12 +163,6 @@
$(storable_dir)/Makefile: $(storable_dir)/Makefile.PL $(PERL)
cd $(storable_dir) && $(PERL) Makefile.PL
-make_version: $(version_dir)/Makefile
- cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)"
-
-$(version_dir)/Makefile: $(version_dir)/Makefile.PL $(PERL)
- cd $(version_dir) && $(PERL) Makefile.PL
-
test:
test_modules: $(TEST_TARGETS)
@@ -208,9 +191,6 @@
test_storable: $(storable_dir)/Makefile
cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test
-test_version: $(version_dir)/Makefile
- cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" test
-
install: $(INSTALL_LIB_TARGETS)
install_lib_rrdtool: make_rrdtool
@@ -242,9 +222,6 @@
install_perl_storable: $(storable_dir)/Makefile
cd $(storable_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install
-install_perl_version: $(version_dir)/Makefile
- cd $(version_dir) && $(MAKE) OPTIMIZE="$(CFLAGS)" UNINST="$(UNINST)" install
-
clean: $(CLEAN_TARGETS)
clean_compress_zlib: clean_rrdtool
@@ -292,12 +269,6 @@
(cd $(storable_dir) && $(MAKE) clean); \
fi
-clean_version:
- @if test -r $(version_dir)/Makefile; then \
- echo 'cd $(version_dir) && $(MAKE) clean'; \
- (cd $(version_dir) && $(MAKE) clean); \
- fi
-
distclean: $(DISTCLEAN_TARGETS)
$(RM) Makefile
@@ -318,7 +289,5 @@
distclean_storable: clean_storable
-distclean_version: clean_version
-
Makefile: Makefile.in
cd .. && CONFIG_FILES=packages/Makefile ./config.status
More information about the Orca-checkins
mailing list