summaryrefslogtreecommitdiff
path: root/sci-mathematics/frobby/files
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/frobby/files')
-rw-r--r--sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch47
-rw-r--r--sci-mathematics/frobby/files/frobby-gcc-4.7.patch32
-rw-r--r--sci-mathematics/frobby/files/frobby-gmp-5.1.patch12
3 files changed, 91 insertions, 0 deletions
diff --git a/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch b/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch
new file mode 100644
index 000000000000..2f5721d62a71
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch
@@ -0,0 +1,47 @@
+diff -U 3 -dHrN frobby_v0.9.0.orig/Makefile frobby_v0.9.0/Makefile
+--- frobby_v0.9.0.orig/Makefile 2013-01-15 22:40:13.127937655 +0100
++++ frobby_v0.9.0/Makefile 2013-02-16 10:54:42.265322522 +0100
+@@ -70,7 +70,7 @@
+ BIN_INSTALL_DIR = "/usr/local/bin/"
+ endif
+
+-cflags = $(CFLAGS) $(CPPFLAGS) -Wall -ansi -pedantic -I $(GMP_INC_DIR) \
++cflags = $(CPPFLAGS) -Wall -ansi -pedantic -I $(GMP_INC_DIR) \
+ -Wno-uninitialized -Wno-unused-parameter
+ program = frobby
+ library = libfrobby.a
+@@ -87,7 +87,6 @@
+ MATCH=false
+ ifeq ($(MODE), release)
+ outdir = bin/release/
+- cflags += -O2
+ MATCH=true
+ endif
+ ifeq ($(MODE), debug)
+@@ -99,7 +98,7 @@
+ endif
+ ifeq ($(MODE), shared)
+ outdir = bin/shared/
+- cflags += -O2 -fPIC
++ cflags += -fPIC
+ library = libfrobby.so
+ MATCH=true
+ endif
+@@ -204,16 +203,13 @@
+ mv -f $@.exe $@; \
+ fi
+ endif
+-ifeq ($(MODE), release)
+- strip $@
+-endif
+
+ # Link object files into library
+ library: bin/$(library)
+ bin/$(library): $(objs) | bin/
+ rm -f bin/$(library)
+ ifeq ($(MODE), shared)
+- $(CXX) -shared -o bin/$(library) $(ldflags) \
++ $(CXX) -shared -Wl,-soname,libfrobby.so.0 -o bin/$(library) $(ldflags) \
+ $(patsubst $(outdir)main.o,,$(objs))
+ else
+ ar crs bin/$(library) $(patsubst $(outdir)main.o,,$(objs))
diff --git a/sci-mathematics/frobby/files/frobby-gcc-4.7.patch b/sci-mathematics/frobby/files/frobby-gcc-4.7.patch
new file mode 100644
index 000000000000..4a73161166d9
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-gcc-4.7.patch
@@ -0,0 +1,32 @@
+ src/main.cpp | 3 +++
+ src/randomDataGenerators.cpp | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index a16754e..315ea53 100755
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -25,6 +25,9 @@
+ #include <ctime>
+ #include <cstdlib>
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ /** This function runs the Frobby console interface. the ::main
+ function calls this function after having set up DEBUG-specific
+ things, catching exceptions, setting the random seed and so on.
+diff --git a/src/randomDataGenerators.cpp b/src/randomDataGenerators.cpp
+index 432a90a..1de3559 100755
+--- a/src/randomDataGenerators.cpp
++++ b/src/randomDataGenerators.cpp
+@@ -26,6 +26,9 @@
+ #include <limits>
+ #include <ctime>
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ void generateLinkedListIdeal(BigIdeal& ideal, size_t variableCount) {
+ VarNames names(variableCount);
+ ideal.clearAndSetNames(variableCount);
diff --git a/sci-mathematics/frobby/files/frobby-gmp-5.1.patch b/sci-mathematics/frobby/files/frobby-gmp-5.1.patch
new file mode 100644
index 000000000000..23cf295b8965
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-gmp-5.1.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN frobby_v0.9.0.orig/src/StatisticsStrategy.cpp frobby_v0.9.0/src/StatisticsStrategy.cpp
+--- frobby_v0.9.0.orig/src/StatisticsStrategy.cpp 2013-01-15 22:40:13.186967442 +0100
++++ frobby_v0.9.0/src/StatisticsStrategy.cpp 2013-01-15 22:40:33.267100780 +0100
+@@ -140,7 +140,7 @@
+ if (_nodeCount == 0)
+ return 0.0;
+ else {
+- mpz_class q = mpq_class(_subGenSum) / _nodeCount;
++ mpq_class q = mpq_class(_subGenSum) / _nodeCount;
+ return q.get_d();
+ }
+ }