diff --git a/build-fail-blacklist b/build-fail-blacklist index b943bbeea2caf..34903cb850dd9 100644 --- a/build-fail-blacklist +++ b/build-fail-blacklist @@ -709,7 +709,6 @@ recipes/edlib recipes/esimsa recipes/fastuniq recipes/fgap -recipes/gclib recipes/funcannot recipes/genepender recipes/genometester4 diff --git a/recipes/gclib/Makefile.osx.patch b/recipes/gclib/Makefile.osx.patch index 3aa6e8c61e165..a50d00058ad77 100644 --- a/recipes/gclib/Makefile.osx.patch +++ b/recipes/gclib/Makefile.osx.patch @@ -1,17 +1,15 @@ -diff --git a/Makefile b/Makefile -index 43a9c91..9a7beca 100644 ---- a/Makefile -+++ b/Makefile -@@ -65,6 +65,8 @@ else - endif - endif +--- /tmp/Makefile 2018-06-26 00:26:41.000000000 +0200 ++++ Makefile 2018-11-29 12:35:29.172992192 +0100 +@@ -41,7 +41,7 @@ + CC := g++ -+CFLAGS += -fPIC -+ - %.o : %.cpp - ${CC} ${CFLAGS} -c $< -o $@ + BASEFLAGS := -Wall -Wextra ${SEARCHDIRS} $(MARCH) \ +- -D_REENTRANT -fno-exceptions -fno-rtti ++ -D_REENTRANT -fno-exceptions -fno-rtti -fPIC -@@ -73,14 +75,17 @@ endif + #add the link-time optimization flag if gcc version > 4.5 + GCC_VERSION:=$(subst ., ,$(shell gcc -dumpversion)) +@@ -73,14 +73,17 @@ LINKER := g++ LIBS := OBJS := GBase.o GStr.o GArgs.o diff --git a/recipes/gclib/Makefile.patch b/recipes/gclib/Makefile.patch index cd325fb59856e..e31226344a97f 100644 --- a/recipes/gclib/Makefile.patch +++ b/recipes/gclib/Makefile.patch @@ -1,26 +1,34 @@ -diff --git a/Makefile b/Makefile -index 43a9c91..d937ddd 100644 ---- a/Makefile -+++ b/Makefile -@@ -65,6 +65,8 @@ else - endif - endif - -+CFLAGS += -fPIC -+ - %.o : %.cpp - ${CC} ${CFLAGS} -c $< -o $@ - -@@ -73,14 +75,17 @@ endif +# this patch does two things: +# 1. replace gcc by g++ for getting the version (otherwise +# both compilers would be necessary for compiling) +# 2. gclib does not provide the objects/libraries necessary +# for building gffcompare, so they are added as shared +# object +--- /tmp/Makefile 2018-06-26 00:26:41.000000000 +0200 ++++ Makefile 2018-11-29 13:00:38.899628706 +0100 +@@ -41,10 +41,10 @@ + CC := g++ + + BASEFLAGS := -Wall -Wextra ${SEARCHDIRS} $(MARCH) \ +- -D_REENTRANT -fno-exceptions -fno-rtti ++ -D_REENTRANT -fno-exceptions -fno-rtti -fPIC + + #add the link-time optimization flag if gcc version > 4.5 +-GCC_VERSION:=$(subst ., ,$(shell gcc -dumpversion)) ++GCC_VERSION:=$(subst ., ,$(shell g++ -dumpversion)) + GCC_MAJOR:=$(word 1,$(GCC_VERSION)) + GCC_MINOR:=$(word 2,$(GCC_VERSION)) + #GCC_SUB:=$(word 3,$(GCC_VERSION)) +@@ -73,14 +73,17 @@ LINKER := g++ - LIBS := + LIBS := OBJS := GBase.o GStr.o GArgs.o +GCLIBS := GFastaIndex.o GFaSeqGet.o gff.o gdna.o codons.o GBase.o GStr.o GArgs.o - + .PHONY : all -all: gtest threads +all: gtest threads gffcomparelibs - + version: ; @echo "GCC Version is: "$(GCC_MAJOR)":"$(GCC_MINOR)":"$(GCC_SUB) @echo "> GCC Opt. string is: "$(GCC45OPTS) debug: gtest threads diff --git a/recipes/gclib/chrono.patch b/recipes/gclib/chrono.patch new file mode 100644 index 0000000000000..71d71a2971750 --- /dev/null +++ b/recipes/gclib/chrono.patch @@ -0,0 +1,67 @@ +# gclib includes a chrono namespace which is nowadays +# also in C++ stdlib. As a result the compiler complains about +# ambiguous namespace which is resolved by this patch +# reported upstream: https://github.com/gpertea/gclib/issues/3 +diff -ruN /tmp/gclib-0.10.3/GThreads.cpp ./GThreads.cpp +--- ./GThreads.cpp 2018-06-26 00:26:41.000000000 +0200 ++++ ./GThreads.cpp 2018-11-29 13:55:31.212906749 +0100 +@@ -375,7 +375,7 @@ + + void GThread::wait_all() { + while (GThread::num_running()>0) +- this_thread::sleep_for(chrono::milliseconds(4)); ++ this_thread::sleep_for(gclib::chrono::milliseconds(4)); + } + + +diff -ruN /tmp/gclib-0.10.3/GThreads.h ./GThreads.h +--- ./GThreads.h 2018-06-26 00:26:41.000000000 +0200 ++++ ./GThreads.h 2018-11-29 13:56:50.372545993 +0100 +@@ -822,7 +822,7 @@ + + /// Minimal implementation of the \c chrono namespace. + /// The \c chrono namespace provides types for specifying time intervals. +-namespace chrono { ++namespace gclib{ namespace chrono { + /// Duration template class. This class provides enough functionality to + /// implement \c this_thread::sleep_for(). + template > class duration { +@@ -850,7 +850,7 @@ + typedef duration seconds; ///< Duration with the unit seconds. + typedef duration > minutes; ///< Duration with the unit minutes. + typedef duration > hours; ///< Duration with the unit hours. +-} ++}} + + /// The namespace \c this_thread provides methods for dealing with the + /// calling thread. +@@ -879,7 +879,7 @@ + /// @endcode + /// @note Supported duration types are: nanoseconds, microseconds, + /// milliseconds, seconds, minutes and hours. +- template void sleep_for(const chrono::duration<_Rep, _Period>& aTime) ++ template void sleep_for(const gclib::chrono::duration<_Rep, _Period>& aTime) + { + #if defined(_GTHREADS_WIN32_) + Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5)); +diff -ruN /tmp/gclib-0.10.3/threads.cpp ./threads.cpp +--- ./threads.cpp 2018-06-26 00:26:41.000000000 +0200 ++++ ./threads.cpp 2018-11-29 13:57:33.300350761 +0100 +@@ -28,7 +28,7 @@ + //cout << " My thread id is " << thisThread->get_id() << "." << endl << flush; + cout << " My thread id is " << my.thread->get_id() << "." << endl << flush; + } +- this_thread::sleep_for(chrono::seconds(4)); ++ this_thread::sleep_for(gclib::chrono::seconds(4)); + } + + #ifndef GTHREADS_NO_TLS +@@ -209,7 +209,7 @@ + // Start the waiting thread (it will wait for gCount to reach zero). + GThread t1(ThreadCondition2, 0); + +- this_thread::sleep_for(chrono::milliseconds(400)); ++ this_thread::sleep_for(gclib::chrono::milliseconds(400)); + { + + for (int c=5;c>=0;c--) { diff --git a/recipes/gclib/meta.yaml b/recipes/gclib/meta.yaml index 32aea3ecc272e..6c461d418be0a 100644 --- a/recipes/gclib/meta.yaml +++ b/recipes/gclib/meta.yaml @@ -1,22 +1,22 @@ package: name: gclib - version: "0.0.1" + version: "0.10.13" build: - number: 5 + number: 0 skip: False source: - url: https://github.com/gpertea/gclib/archive/907a9d6484b92ea0c357baf2da5d85bc6e6b82b1.tar.gz - md5: 13891db103fab3457beb621ab43f8843 + url: https://github.com/gpertea/gclib/archive/v0.10.3.tar.gz + sha256: f5f9d4764afe83d5b9cc851c4dab352906505be7a6c03958c2af51c554118c18 patches: - Makefile.patch # [not osx] - Makefile.osx.patch # [osx] + - chrono.patch requirements: build: - {{ compiler('cxx') }} - run: test: commands: