[arch-commits] Commit in (6 files)
Antonio Rojas
arojas at archlinux.org
Sun Jan 4 19:51:19 UTC 2015
Date: Sunday, January 4, 2015 @ 20:51:18
Author: arojas
Revision: 125347
New Sage dependency
Added:
coxeter3/
coxeter3/trunk/
coxeter3/trunk/PKGBUILD
coxeter3/trunk/makefile.patch
coxeter3/trunk/sage.cpp
coxeter3/trunk/sage.h
----------------+
PKGBUILD | 37 ++++++++++++++++++++
makefile.patch | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
sage.cpp | 60 ++++++++++++++++++++++++++++++++++
sage.h | 26 ++++++++++++++
4 files changed, 220 insertions(+)
Added: coxeter3/trunk/PKGBUILD
===================================================================
--- coxeter3/trunk/PKGBUILD (rev 0)
+++ coxeter3/trunk/PKGBUILD 2015-01-04 19:51:18 UTC (rev 125347)
@@ -0,0 +1,37 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=coxeter3
+pkgver=3.0beta3
+_pkgver=3.0_beta3
+pkgrel=1
+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')
+md5sums=('5e0ac6f2fa179d94fcf33f18ef282dde'
+ 'f757ee88e333a5bf850af1d810d7cb7b'
+ '79756f28b67b1f678e3ac5dd8d67fb49'
+ '57e8806f9fc6bb4604016ee727210993')
+
+prepare() {
+ cd coxeter_$_pkgver
+
+ cp ../sage.* .
+ patch -p1 -i "$srcdir"/makefile.patch
+}
+
+build() {
+ cd coxeter_$_pkgver
+
+ make all
+}
+
+package() {
+ cd coxeter_$_pkgver
+
+ mkdir -p "$pkgdir"/usr/{bin,lib}
+ make install INSTALL_DIR="$pkgdir"/usr
+}
+
Property changes on: coxeter3/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: coxeter3/trunk/makefile.patch
===================================================================
--- coxeter3/trunk/makefile.patch (rev 0)
+++ coxeter3/trunk/makefile.patch 2015-01-04 19:51:18 UTC (rev 125347)
@@ -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
Added: coxeter3/trunk/sage.cpp
===================================================================
--- coxeter3/trunk/sage.cpp (rev 0)
+++ coxeter3/trunk/sage.cpp 2015-01-04 19:51:18 UTC (rev 125347)
@@ -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;
+ }
+
+}
Added: coxeter3/trunk/sage.h
===================================================================
--- coxeter3/trunk/sage.h (rev 0)
+++ coxeter3/trunk/sage.h 2015-01-04 19:51:18 UTC (rev 125347)
@@ -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
More information about the arch-commits
mailing list