Date: Monday, May 18, 2015 @ 14:11:43 Author: arojas Revision: 133717
archrelease: copy trunk to community-staging-i686, community-staging-x86_64 Added: coxeter3/repos/community-staging-i686/ coxeter3/repos/community-staging-i686/PKGBUILD (from rev 133716, coxeter3/trunk/PKGBUILD) coxeter3/repos/community-staging-i686/gcc5.patch (from rev 133716, coxeter3/trunk/gcc5.patch) coxeter3/repos/community-staging-i686/makefile.patch (from rev 133716, coxeter3/trunk/makefile.patch) coxeter3/repos/community-staging-i686/sage.cpp (from rev 133716, coxeter3/trunk/sage.cpp) coxeter3/repos/community-staging-i686/sage.h (from rev 133716, coxeter3/trunk/sage.h) coxeter3/repos/community-staging-x86_64/ coxeter3/repos/community-staging-x86_64/PKGBUILD (from rev 133716, coxeter3/trunk/PKGBUILD) coxeter3/repos/community-staging-x86_64/gcc5.patch (from rev 133716, coxeter3/trunk/gcc5.patch) coxeter3/repos/community-staging-x86_64/makefile.patch (from rev 133716, coxeter3/trunk/makefile.patch) coxeter3/repos/community-staging-x86_64/sage.cpp (from rev 133716, coxeter3/trunk/sage.cpp) coxeter3/repos/community-staging-x86_64/sage.h (from rev 133716, coxeter3/trunk/sage.h) -----------------------------------------+ community-staging-i686/PKGBUILD | 42 ++++++++++++ community-staging-i686/gcc5.patch | 32 +++++++++ community-staging-i686/makefile.patch | 97 ++++++++++++++++++++++++++++++ community-staging-i686/sage.cpp | 60 ++++++++++++++++++ community-staging-i686/sage.h | 26 ++++++++ community-staging-x86_64/PKGBUILD | 42 ++++++++++++ community-staging-x86_64/gcc5.patch | 32 +++++++++ community-staging-x86_64/makefile.patch | 97 ++++++++++++++++++++++++++++++ community-staging-x86_64/sage.cpp | 60 ++++++++++++++++++ community-staging-x86_64/sage.h | 26 ++++++++ 10 files changed, 514 insertions(+) Copied: coxeter3/repos/community-staging-i686/PKGBUILD (from rev 133716, coxeter3/trunk/PKGBUILD) =================================================================== --- community-staging-i686/PKGBUILD (rev 0) +++ community-staging-i686/PKGBUILD 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,42 @@ +# Maintainer: Antonio Rojas <aro...@archlinux.org> + +pkgname=coxeter3 +pkgver=3.0beta3 +_pkgver=3.0_beta3 +pkgrel=2 +pkgdesc="A computer program for the study of combinatorial aspects of Coxeter group theory" +arch=('i686' 'x86_64') +url="http://math.univ-lyon1.fr/~ducloux/coxeter/coxeter3/english/coxeter3_e.html" +license=('GPL3') +depends=('gcc-libs') +source=("http://math.univ-lyon1.fr/~ducloux/coxeter/coxeter3/english/coxeter_$_pkgver.tgz" + 'makefile.patch' 'sage.cpp' 'sage.h' 'gcc5.patch') +md5sums=('5e0ac6f2fa179d94fcf33f18ef282dde' + 'f757ee88e333a5bf850af1d810d7cb7b' + '79756f28b67b1f678e3ac5dd8d67fb49' + '57e8806f9fc6bb4604016ee727210993' + 'd93367abeb8a51b364c96ff669cd5158') + +prepare() { + cd coxeter_$_pkgver + + cp ../sage.* . + patch -p1 -i "$srcdir"/makefile.patch + +# fix build with GCC 5 + patch -p0 -i "$srcdir"/gcc5.patch +} + +build() { + cd coxeter_$_pkgver + + make all +} + +package() { + cd coxeter_$_pkgver + + mkdir -p "$pkgdir"/usr/{bin,lib} + make install INSTALL_DIR="$pkgdir"/usr +} + Copied: coxeter3/repos/community-staging-i686/gcc5.patch (from rev 133716, coxeter3/trunk/gcc5.patch) =================================================================== --- community-staging-i686/gcc5.patch (rev 0) +++ community-staging-i686/gcc5.patch 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,32 @@ +--- files.h.orig 2004-11-19 22:00:56.000000000 +0100 ++++ files.h 2015-05-18 14:06:21.109931758 +0200 +@@ -108,17 +108,17 @@ + template <class H> + void printHeckeElt(FILE* file, const H& h, const SchubertContext& p, + const Interface& I, OutputTraits& traits, +- const Length& l = undef_length); ++ const Length& l); + template <class H> + void printHeckeElt(FILE* file, const H& h, const SchubertContext& p, + const Interface& I, OutputTraits& traits, +- const Length& l = undef_length); ++ const Length& l); + template <class H> + void printHeckeElt(FILE* file, const H& h, const Permutation& a, + const SchubertContext& p, const Interface& I, + HeckeTraits& hTraits, + PolynomialTraits& pTraits, +- const Length& l = undef_length); ++ const Length& l); + void printHomology(FILE* file, const Homology& h, OutputTraits& traits); + template <class KL> + void printIHBetti(FILE* file, const CoxNbr& y, KL& kl, OutputTraits& traits); +@@ -187,7 +187,7 @@ + template <class H> + bool setTwoSided(const H& h, const Permutation& a, const SchubertContext& p, + const Interface& I, HeckeTraits& hTraits, +- PolynomialTraits& pTraits, const Length& l = undef_length); ++ PolynomialTraits& pTraits, const Length& l); + void sortLists(List<List<CoxNbr> >& lc, schubert::NFCompare& nfc, + Permutation& a); + void writeClasses(List<List<CoxNbr> >& lc, const Partition& pi); Copied: coxeter3/repos/community-staging-i686/makefile.patch (from rev 133716, coxeter3/trunk/makefile.patch) =================================================================== --- community-staging-i686/makefile.patch (rev 0) +++ community-staging-i686/makefile.patch 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,97 @@ +diff -druN src.orig/makefile src/makefile +--- src.orig/makefile 2013-02-14 18:26:28.000000000 +0100 ++++ src/makefile 2013-02-15 14:34:54.082756900 +0100 +@@ -12,6 +12,7 @@ + gflags = -c $(includedirs) -g + + cflags = $(gflags) # the default setting ++cflags = -c $(includedirs) -O2 -fPIC -g -DFAST -DALLTRUE + + ifdef optimize + NDEBUG = true +@@ -22,18 +23,64 @@ + cflags = $(pflags) + endif + +-cc = g++ ++EXENAME = coxeter ++LIBNAME = coxeter3 ++ifeq ($(UNAME),Darwin) ++ EXEEXT = ++ LIBPREFIX = lib ++ LIBEXT = .dylib ++ LIBDIR = lib ++ LINKFLAGS = -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,3.0,-current_version,3.0,-install_name,$(SAGE_LOCAL)/lib/$(LIBPREFIX)$(LIBNAME)$(LIBEXT) ++ LINKLIBS = ++else ++ifeq ($(UNAME),CYGWIN) ++ EXEEXT = .exe ++ LIBPREFIX = cyg ++ LIBEXT = .dll ++ LIBDIR = bin ++ IMPLIB = lib$(LIBNAME).dll.a ++ LINKFLAGS = -shared -Wl,--out-implib=$(IMPLIB) -Wl,--export-all-symbols ++ LINKLIBS = -lc ++else ++ EXEEXT = ++ LIBPREFIX = lib ++ LIBEXT = .so ++ LIBDIR = lib ++ LINKFLAGS = -shared -Wl,-soname,libcoxeter3.so ++ LINKLIBS = -lc ++endif ++endif ++LIBRARY = $(LIBPREFIX)$(LIBNAME)$(LIBEXT) + +-all: coxeter #clean ++all: coxeter executable + + coxeter: $(objects) +- $(cc) -o coxeter $(objects) ++ $(CXX) $(LINKFLAGS) -o $(LIBRARY) $(objects) $(LINKLIBS) ++ ++executable: $(objects) ++ $(CXX) -o $(EXENAME)$(EXEEXT) $(objects) ++ ++DATADIR="$(INSTALL_DIR)/share/coxeter/" ++INCLUDEDIR="$(INSTALL_DIR)/include/coxeter/" ++LIBRARYDIR="$(INSTALL_DIR)/lib/" ++ ++install: coxeter executable ++ cp $(EXENAME)$(EXEEXT) "$(INSTALL_DIR)/bin/" ++ cp $(LIBRARY) $(LIBRARYDIR) ++ if [ $(UNAME) = "CYGWIN" ]; then \ ++ cp $(IMPLIB) "$$SAGE_LOCAL/lib/"; \ ++ fi ++ ++ mkdir -p $(DATADIR) ++ cp -r coxeter_matrices headers messages $(DATADIR) ++ mkdir -p $(INCLUDEDIR) ++ cp -r *.h *.hpp $(INCLUDEDIR) + + clean: + rm -f $(objects) + + %.o:%.cpp +- $(cc) $(cflags) $*.cpp ++ $(CXX) $(cflags) $*.cpp + + # dependencies --- these were generated automatically by make depend on my + # system; they are explicitly copied for portability. Only local dependencies +@@ -33,7 +90,7 @@ + # contents of tmp in lieu of the dependencies listed here. + + %.d:%.cpp +- @$(cc) -MM $*.cpp ++ @$(CXX) -MM $*.cpp + depend: $(dependencies) + + affine.o: affine.cpp affine.h globals.h coxgroup.h coxtypes.h io.h list.h \ +@@ -142,6 +199,7 @@ + posets.o: posets.cpp posets.h globals.h bits.h list.h memory.h \ + constants.h list.hpp error.h io.h wgraph.h interface.h automata.h \ + coxtypes.h minroots.h dotval.h graph.h type.h transducer.h ++sage.o: sage.cpp sage.h globals.h coxtypes.h coxgroup.h list.h schubert.h + schubert.o: schubert.cpp schubert.h globals.h coxtypes.h io.h list.h \ + memory.h constants.h list.hpp error.h bits.h interface.h automata.h \ + minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp Copied: coxeter3/repos/community-staging-i686/sage.cpp (from rev 133716, coxeter3/trunk/sage.cpp) =================================================================== --- community-staging-i686/sage.cpp (rev 0) +++ community-staging-i686/sage.cpp 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,60 @@ +/* + This is coxgroup.cpp + + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen + See file main.cpp for full copyright notice +*/ + +#include "sage.h" + +#include "error.h" + +namespace sage { + + void interval(List<CoxWord>& list, coxgroup::CoxGroup& W, const CoxWord& g, const CoxWord& h) + + /* + Returns a list of the elements in the Bruhat interval between g and h. + Note that this assumes that g and h are in order. + */ + { + if (not W.inOrder(g,h)) { + return; + } + + W.extendContext(h); + + CoxNbr x = W.contextNumber(g); + CoxNbr y = W.contextNumber(h); + + BitMap b(W.contextSize()); + W.extractClosure(b,y); + + BitMap::ReverseIterator b_rend = b.rend(); + List<CoxNbr> res(0); + + for (BitMap::ReverseIterator i = b.rbegin(); i != b_rend; ++i) + if (not W.inOrder(x,*i)) { + BitMap bi(W.contextSize()); + W.extractClosure(bi,*i); + CoxNbr z = *i; // andnot will invalidate iterator + b.andnot(bi); + b.setBit(z); // otherwise the decrement will not be correct + } else + res.append(*i); + + schubert::NFCompare nfc(W.schubert(),W.ordering()); + Permutation a(res.size()); + sortI(res,nfc,a); + + list.setSize(0); + for (size_t j = 0; j < res.size(); ++j) { + CoxWord w(0); + W.schubert().append(w, res[a[j]]); + list.append(w); + } + + return; + } + +} Copied: coxeter3/repos/community-staging-i686/sage.h (from rev 133716, coxeter3/trunk/sage.h) =================================================================== --- community-staging-i686/sage.h (rev 0) +++ community-staging-i686/sage.h 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,26 @@ +/* + This is interactive.h + + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen + See file main.cpp for full copyright notice +*/ + +#ifndef SAGE_H /* guard against multiple inclusions */ +#define SAGE_H + +#include "globals.h" +#include "coxgroup.h" +#include "coxtypes.h" +#include "schubert.h" + +namespace sage { + using namespace globals; +} + +/******** function declarations **********************************************/ + +namespace sage { + void interval(List<CoxWord>& result, coxgroup::CoxGroup& W, const CoxWord& g, const CoxWord& h); +} + +#endif Copied: coxeter3/repos/community-staging-x86_64/PKGBUILD (from rev 133716, coxeter3/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,42 @@ +# Maintainer: Antonio Rojas <aro...@archlinux.org> + +pkgname=coxeter3 +pkgver=3.0beta3 +_pkgver=3.0_beta3 +pkgrel=2 +pkgdesc="A computer program for the study of combinatorial aspects of Coxeter group theory" +arch=('i686' 'x86_64') +url="http://math.univ-lyon1.fr/~ducloux/coxeter/coxeter3/english/coxeter3_e.html" +license=('GPL3') +depends=('gcc-libs') +source=("http://math.univ-lyon1.fr/~ducloux/coxeter/coxeter3/english/coxeter_$_pkgver.tgz" + 'makefile.patch' 'sage.cpp' 'sage.h' 'gcc5.patch') +md5sums=('5e0ac6f2fa179d94fcf33f18ef282dde' + 'f757ee88e333a5bf850af1d810d7cb7b' + '79756f28b67b1f678e3ac5dd8d67fb49' + '57e8806f9fc6bb4604016ee727210993' + 'd93367abeb8a51b364c96ff669cd5158') + +prepare() { + cd coxeter_$_pkgver + + cp ../sage.* . + patch -p1 -i "$srcdir"/makefile.patch + +# fix build with GCC 5 + patch -p0 -i "$srcdir"/gcc5.patch +} + +build() { + cd coxeter_$_pkgver + + make all +} + +package() { + cd coxeter_$_pkgver + + mkdir -p "$pkgdir"/usr/{bin,lib} + make install INSTALL_DIR="$pkgdir"/usr +} + Copied: coxeter3/repos/community-staging-x86_64/gcc5.patch (from rev 133716, coxeter3/trunk/gcc5.patch) =================================================================== --- community-staging-x86_64/gcc5.patch (rev 0) +++ community-staging-x86_64/gcc5.patch 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,32 @@ +--- files.h.orig 2004-11-19 22:00:56.000000000 +0100 ++++ files.h 2015-05-18 14:06:21.109931758 +0200 +@@ -108,17 +108,17 @@ + template <class H> + void printHeckeElt(FILE* file, const H& h, const SchubertContext& p, + const Interface& I, OutputTraits& traits, +- const Length& l = undef_length); ++ const Length& l); + template <class H> + void printHeckeElt(FILE* file, const H& h, const SchubertContext& p, + const Interface& I, OutputTraits& traits, +- const Length& l = undef_length); ++ const Length& l); + template <class H> + void printHeckeElt(FILE* file, const H& h, const Permutation& a, + const SchubertContext& p, const Interface& I, + HeckeTraits& hTraits, + PolynomialTraits& pTraits, +- const Length& l = undef_length); ++ const Length& l); + void printHomology(FILE* file, const Homology& h, OutputTraits& traits); + template <class KL> + void printIHBetti(FILE* file, const CoxNbr& y, KL& kl, OutputTraits& traits); +@@ -187,7 +187,7 @@ + template <class H> + bool setTwoSided(const H& h, const Permutation& a, const SchubertContext& p, + const Interface& I, HeckeTraits& hTraits, +- PolynomialTraits& pTraits, const Length& l = undef_length); ++ PolynomialTraits& pTraits, const Length& l); + void sortLists(List<List<CoxNbr> >& lc, schubert::NFCompare& nfc, + Permutation& a); + void writeClasses(List<List<CoxNbr> >& lc, const Partition& pi); Copied: coxeter3/repos/community-staging-x86_64/makefile.patch (from rev 133716, coxeter3/trunk/makefile.patch) =================================================================== --- community-staging-x86_64/makefile.patch (rev 0) +++ community-staging-x86_64/makefile.patch 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,97 @@ +diff -druN src.orig/makefile src/makefile +--- src.orig/makefile 2013-02-14 18:26:28.000000000 +0100 ++++ src/makefile 2013-02-15 14:34:54.082756900 +0100 +@@ -12,6 +12,7 @@ + gflags = -c $(includedirs) -g + + cflags = $(gflags) # the default setting ++cflags = -c $(includedirs) -O2 -fPIC -g -DFAST -DALLTRUE + + ifdef optimize + NDEBUG = true +@@ -22,18 +23,64 @@ + cflags = $(pflags) + endif + +-cc = g++ ++EXENAME = coxeter ++LIBNAME = coxeter3 ++ifeq ($(UNAME),Darwin) ++ EXEEXT = ++ LIBPREFIX = lib ++ LIBEXT = .dylib ++ LIBDIR = lib ++ LINKFLAGS = -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,3.0,-current_version,3.0,-install_name,$(SAGE_LOCAL)/lib/$(LIBPREFIX)$(LIBNAME)$(LIBEXT) ++ LINKLIBS = ++else ++ifeq ($(UNAME),CYGWIN) ++ EXEEXT = .exe ++ LIBPREFIX = cyg ++ LIBEXT = .dll ++ LIBDIR = bin ++ IMPLIB = lib$(LIBNAME).dll.a ++ LINKFLAGS = -shared -Wl,--out-implib=$(IMPLIB) -Wl,--export-all-symbols ++ LINKLIBS = -lc ++else ++ EXEEXT = ++ LIBPREFIX = lib ++ LIBEXT = .so ++ LIBDIR = lib ++ LINKFLAGS = -shared -Wl,-soname,libcoxeter3.so ++ LINKLIBS = -lc ++endif ++endif ++LIBRARY = $(LIBPREFIX)$(LIBNAME)$(LIBEXT) + +-all: coxeter #clean ++all: coxeter executable + + coxeter: $(objects) +- $(cc) -o coxeter $(objects) ++ $(CXX) $(LINKFLAGS) -o $(LIBRARY) $(objects) $(LINKLIBS) ++ ++executable: $(objects) ++ $(CXX) -o $(EXENAME)$(EXEEXT) $(objects) ++ ++DATADIR="$(INSTALL_DIR)/share/coxeter/" ++INCLUDEDIR="$(INSTALL_DIR)/include/coxeter/" ++LIBRARYDIR="$(INSTALL_DIR)/lib/" ++ ++install: coxeter executable ++ cp $(EXENAME)$(EXEEXT) "$(INSTALL_DIR)/bin/" ++ cp $(LIBRARY) $(LIBRARYDIR) ++ if [ $(UNAME) = "CYGWIN" ]; then \ ++ cp $(IMPLIB) "$$SAGE_LOCAL/lib/"; \ ++ fi ++ ++ mkdir -p $(DATADIR) ++ cp -r coxeter_matrices headers messages $(DATADIR) ++ mkdir -p $(INCLUDEDIR) ++ cp -r *.h *.hpp $(INCLUDEDIR) + + clean: + rm -f $(objects) + + %.o:%.cpp +- $(cc) $(cflags) $*.cpp ++ $(CXX) $(cflags) $*.cpp + + # dependencies --- these were generated automatically by make depend on my + # system; they are explicitly copied for portability. Only local dependencies +@@ -33,7 +90,7 @@ + # contents of tmp in lieu of the dependencies listed here. + + %.d:%.cpp +- @$(cc) -MM $*.cpp ++ @$(CXX) -MM $*.cpp + depend: $(dependencies) + + affine.o: affine.cpp affine.h globals.h coxgroup.h coxtypes.h io.h list.h \ +@@ -142,6 +199,7 @@ + posets.o: posets.cpp posets.h globals.h bits.h list.h memory.h \ + constants.h list.hpp error.h io.h wgraph.h interface.h automata.h \ + coxtypes.h minroots.h dotval.h graph.h type.h transducer.h ++sage.o: sage.cpp sage.h globals.h coxtypes.h coxgroup.h list.h schubert.h + schubert.o: schubert.cpp schubert.h globals.h coxtypes.h io.h list.h \ + memory.h constants.h list.hpp error.h bits.h interface.h automata.h \ + minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp Copied: coxeter3/repos/community-staging-x86_64/sage.cpp (from rev 133716, coxeter3/trunk/sage.cpp) =================================================================== --- community-staging-x86_64/sage.cpp (rev 0) +++ community-staging-x86_64/sage.cpp 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,60 @@ +/* + This is coxgroup.cpp + + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen + See file main.cpp for full copyright notice +*/ + +#include "sage.h" + +#include "error.h" + +namespace sage { + + void interval(List<CoxWord>& list, coxgroup::CoxGroup& W, const CoxWord& g, const CoxWord& h) + + /* + Returns a list of the elements in the Bruhat interval between g and h. + Note that this assumes that g and h are in order. + */ + { + if (not W.inOrder(g,h)) { + return; + } + + W.extendContext(h); + + CoxNbr x = W.contextNumber(g); + CoxNbr y = W.contextNumber(h); + + BitMap b(W.contextSize()); + W.extractClosure(b,y); + + BitMap::ReverseIterator b_rend = b.rend(); + List<CoxNbr> res(0); + + for (BitMap::ReverseIterator i = b.rbegin(); i != b_rend; ++i) + if (not W.inOrder(x,*i)) { + BitMap bi(W.contextSize()); + W.extractClosure(bi,*i); + CoxNbr z = *i; // andnot will invalidate iterator + b.andnot(bi); + b.setBit(z); // otherwise the decrement will not be correct + } else + res.append(*i); + + schubert::NFCompare nfc(W.schubert(),W.ordering()); + Permutation a(res.size()); + sortI(res,nfc,a); + + list.setSize(0); + for (size_t j = 0; j < res.size(); ++j) { + CoxWord w(0); + W.schubert().append(w, res[a[j]]); + list.append(w); + } + + return; + } + +} Copied: coxeter3/repos/community-staging-x86_64/sage.h (from rev 133716, coxeter3/trunk/sage.h) =================================================================== --- community-staging-x86_64/sage.h (rev 0) +++ community-staging-x86_64/sage.h 2015-05-18 12:11:43 UTC (rev 133717) @@ -0,0 +1,26 @@ +/* + This is interactive.h + + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen + See file main.cpp for full copyright notice +*/ + +#ifndef SAGE_H /* guard against multiple inclusions */ +#define SAGE_H + +#include "globals.h" +#include "coxgroup.h" +#include "coxtypes.h" +#include "schubert.h" + +namespace sage { + using namespace globals; +} + +/******** function declarations **********************************************/ + +namespace sage { + void interval(List<CoxWord>& result, coxgroup::CoxGroup& W, const CoxWord& g, const CoxWord& h); +} + +#endif