Skip to content

Commit

Permalink
=== Polymake 3.2r3 ===
Browse files Browse the repository at this point in the history
-- distribution --
 * small bug fixes
 * threejs is the default viewer if jreality is not configured
 * support for java 10
 * adapt to changes in boost 1.67
 * fix for JuPyMake support on Mac OS X
 * removed fink as the default package manager for Mac OS X
 * included support for the brew package manager on Mac OS X
  • Loading branch information
benlorenz committed May 7, 2018
1 parent 2486cc7 commit 8ba686f
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 65 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
Changelog

=== Polymake 3.2r3 ===

-- distribution --
* small bug fixes
* threejs is the default viewer if jreality is not configured
* support for java 10
* adapt to changes in boost 1.67
* fix for JuPyMake support on Mac OS X
* removed fink as the default package manager for Mac OS X
* included support for the brew package manager on Mac OS X


=== Polymake 3.2r2 ===

-- distribution --
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The step-by-step installation instructions can be found on the
polymake Wiki site:

http://www.polymake.org/polymake/doku.php/howto/install
https://www.polymake.org/doku.php/howto/install

The shortest possible summary for the truly impatient:

Expand Down
2 changes: 1 addition & 1 deletion apps/common/rules/algebraic_types
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ user_function householder_trafo(Vector<Float>) : c++ (include => "polymake/linal
# QR decomposition of a Matrix //M// with rows > cols
# @param Matrix<Float> M
# @return Pair<Matrix,Matrix>
# @example
# @example [nocompare]
# > $M = new Matrix<Float>([23,4],[6,42]);
# > $qr = qr_decomp($M);
# > print $qr->first;
Expand Down
5 changes: 4 additions & 1 deletion apps/common/rules/jupyter.rules
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ use feature 'state';

prefer threejs

prefer svg.lattice
if (application::self()->configured->{"svg.rules"} > 0) {

prefer svg.lattice
}

$ThreeJS::is_used_in_jupyter=1;

Expand Down
2 changes: 2 additions & 0 deletions apps/common/rules/threejs.rules
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ sub append {
# Create a three.js file.
label threejs

prefer threejs

# The following are rarely used.
# Much more common are the methods in apps/{graph,polytope,...}/rules/threejs.rules

Expand Down
54 changes: 38 additions & 16 deletions bundled/java/java/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
<property name="package.prefix" value="de/tuberlin/polymake" />
<property name="build.sysclasspath" value="ignore" />

<condition property="use-nativeheaderdir">
<and>
<antversion atleast="1.9.8"/>
<not>
<equals arg1="${ant.java.version}" arg2="1.7"/>
</not>
</and>
</condition>

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}/bundled/java/java" />
</target>

<target name="compile" depends="init">
<target name="compile-with-javah" depends="init" unless="use-nativeheaderdir">
<sequential>
<javac
executable="${javac}"
Expand All @@ -21,26 +30,39 @@
encoding="UTF8">
<include name="${package.prefix}/**"/>
</javac>
<copy todir="${build.dir}/bundled/java/java"
preservelastmodified="yes">
<fileset
dir="src"
includes="**/*.txt"
excludes="**/*.java" />
</copy>
<javah
force="yes"
class="de.tuberlin.polymake.common.SharedMemoryMatrix"
outputfile="native/de_tuberlin_polymake_common_SharedMemoryMatrix.h">
<classpath location="${build.dir}/bundled/java/java" />
</javah>
</sequential>
</target>

<target name="native-header" depends="compile">
<javah
force="yes"
class="de.tuberlin.polymake.common.SharedMemoryMatrix"
outputfile="native/SharedMemoryMatrix_jni.h">
<classpath location="${build.dir}/bundled/java/java" />
</javah>
<target name="compile-with-native" depends="init" if="use-nativeheaderdir">
<javac
executable="${javac}"
srcdir="src"
destdir="${build.dir}/bundled/java/java"
nativeheaderdir="native"
failonerror="true"
debug="${debug}"
encoding="UTF8">
<include name="${package.prefix}/**"/>
</javac>
</target>

<target name="copy-files">
<copy todir="${build.dir}/bundled/java/java"
preservelastmodified="yes">
<fileset
dir="src"
includes="**/*.txt"
excludes="**/*.java" />
</copy>
</target>

<target name="all" depends="compile,native-header">
<target name="all" depends="compile-with-native,compile-with-javah,copy-files">
<jar destfile="${build.dir}/jars/${jar.name}">
<fileset
dir="${build.dir}/bundled/java/java"
Expand Down
2 changes: 1 addition & 1 deletion bundled/java/java/native/SharedMemoryMatrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
--------------------------------------------------------------------------------
*/

#include "SharedMemoryMatrix_jni.h"
#include "de_tuberlin_polymake_common_SharedMemoryMatrix.h"
#include <sys/ipc.h>
#include <sys/shm.h>
#include <errno.h>
Expand Down
9 changes: 6 additions & 3 deletions bundled/java/support/configure.pl
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ sub proceed {
# check Java version

my ($java_version)= `$JAVACMD -version 2>&1` =~ /version "([\d.]+)/s;
Polymake::Configure::v_cmp($java_version_num, "1.5") >= 0
Polymake::Configure::v_cmp($java_version, "1.7") >= 0
or die "Java run-time interpreter $JAVACMD",
$found_by eq "PATH"
? " found along your program PATH"
: $found_by && " found by environment variable $found_by",
" reports its version as $java_version, while minimal required is 1.5\n",
" reports its version as $java_version, while minimal required is 1.7\n",
"\nPlease upgrade your Java run-time system or JDK to a modern version,\n",
$found_by && "or specify a correct location in the option --with-java,\n",
"or disable using Java components completely: --without-java\n",
Expand Down Expand Up @@ -166,7 +166,10 @@ sub proceed {
}
my ($ant_version)= `$ANT -version` =~ /version ([\d.]+)/;
Polymake::Configure::v_cmp($ant_version, "1.7.1") >= 0
or die "$ANT reports its version as $ant_version, while minimal required version is 1.7.1\n";
or die "$ANT reports its version as $ant_version, while minimal required version is 1.7.1\n";
# Java 10 needs javac with nativeheaderdir instead of javah task which requires ant 1.9.8
Polymake::Configure::v_cmp($java_version, "10") >= 0 and Polymake::Configure::v_cmp($ant_version, "1.9.8") < 0
and die "$ANT reports its version as $ant_version, while minimal required version for Java 10 is 1.9.8\n";

$NativeSO="so";

Expand Down
7 changes: 7 additions & 0 deletions external/permlib/include/permlib/bsgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@
#include <list>
#include <vector>

#include <boost/version.hpp>

#include <boost/cstdint.hpp>
#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>

#if BOOST_VERSION / 100 >= 1067
#include <boost/next_prior.hpp>
#else
#include <boost/utility.hpp>
#endif

#include <permlib/bsgs_core.h>

Expand Down
11 changes: 10 additions & 1 deletion external/permlib/include/permlib/permutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@
#include <boost/dynamic_bitset.hpp>
#include <boost/foreach.hpp>
#include <boost/cstdint.hpp>

#include <boost/version.hpp>

#if BOOST_VERSION / 100 >= 1067
#include <boost/integer/common_factor_rt.hpp>
#define permlib_boost_lcm boost::integer::lcm
#else
#include <boost/math/common_factor_rt.hpp>
#define permlib_boost_lcm boost::math::lcm
#endif

namespace permlib {

Expand Down Expand Up @@ -343,7 +352,7 @@ inline boost::uint64_t Permutation::order() const {
std::list<CyclePair> cycleList = this->cycles();
boost::uint64_t ord = 1;
BOOST_FOREACH(const CyclePair& cyc, cycleList) {
ord = boost::math::lcm(ord, static_cast<boost::uint64_t>(cyc.second));
ord = permlib_boost_lcm(ord, static_cast<boost::uint64_t>(cyc.second));
}
return ord;
}
Expand Down
8 changes: 8 additions & 0 deletions external/permlib/include/permlib/test/primitivity_sgs_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@

#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>

#include <boost/version.hpp>

#if BOOST_VERSION / 100 >= 1067
#include <boost/next_prior.hpp>
#else
#include <boost/utility.hpp>
#endif

#include <vector>
#include <list>

Expand Down
3 changes: 3 additions & 0 deletions perllib/Polymake/Configure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ use warnings qw(FATAL void syntax misc);
# load the non-interactive basis routines first
use Polymake::ConfigureStandalone;

# the values of these variables are growing when extension configure script assigns something to them
my %augmented_vars=( CFLAGS=>1, CXXFLAGS=>1, CflagsSuppressWarnings=>1, LDFLAGS=>1, LIBS=>1 );

package Polymake::Configure;

if ($ENV{POLYMAKE_HOST_AGENT}) {
Expand Down
3 changes: 1 addition & 2 deletions perllib/Polymake/ConfigureStandalone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ BEGIN {
GCCversion ICCversion CLANGversion CPPStd AppleClang
LDFLAGS LDsharedFLAGS LDcallableFLAGS LDsonameFLAGS LIBS
LIBXML2_CFLAGS LIBXML2_LIBS ExternalHeaders
Arch FinkBase BundledExts BuildModes
Arch FinkBase BrewBase BundledExts BuildModes
InstallTop InstallArch InstallBin InstallInc InstallLib InstallDoc DESTDIR );
}

use vars map { "\$$_" } @conf_vars;

my %augmented_vars=( CFLAGS=>1, CXXFLAGS=>1, CflagsSuppressWarnings=>1, LDFLAGS=>1, LIBS=>1 );
my %supported_build_modes=( Cov => 1, San => 1 );

###############################################################################################
Expand Down
1 change: 1 addition & 0 deletions perllib/Polymake/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ sub diff_with {
# @param Int expected completion offset from the end of input_string
# @param String+ expected completions;
# the last one is interpreted as the expected append character if it consists of exactly one char
# if the last word is "..." all subsequent words in the output are ignored
sub check_completion {
unless (@_>3 && (is_string($_[0]) || is_integer($_[0])) && is_string($_[1]) && is_integer($_[2])) {
croak( "usage: check_completion('ID', 'partial input', expected_offset, 'expected completion', ...)" );
Expand Down
4 changes: 3 additions & 1 deletion perllib/Polymake/Test/Shell.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ sub new {

sub execute {
my ($self)=@_;
my $eq=equal_string_lists($self->expected_words, $self->gotten_words);
my $eq= $self->expected_words->[-1] eq "..." ?
@{$self->expected_words}-1 == equal_string_list_prefixes($self->expected_words, $self->gotten_words) :
equal_string_lists($self->expected_words, $self->gotten_words);
my $eq_append=!defined($self->expected_append) || $self->expected_append eq $self->gotten_append;
unless ($eq && $eq_append && $self->expected_offset==$self->gotten_offset) {
unless ($eq) {
Expand Down
4 changes: 2 additions & 2 deletions resources/JuPyMake/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def conditional_decode( string ):
os.environ["CC"] = polymake_cc
os.environ["CXX"] = polymake_cc
if platform.system() == "Darwin" :
version = platform.mac_ver()[0]
os.environ["MACOSX_DEPLOYMENT_TARGET"] = version.rsplit('.',1)[0]
version_arr = platform.mac_ver()[0].split('.')
os.environ["MACOSX_DEPLOYMENT_TARGET"] = version_arr[0]+'.'+version_arr[1]

setup(
name = 'JuPyMake',
Expand Down
Loading

0 comments on commit 8ba686f

Please sign in to comment.