From 3ad4df44d5e95f1e0787c00ca699d7075e34bfee Mon Sep 17 00:00:00 2001 From: "Vanilla I. Shu" Date: Sat, 23 Jun 2007 02:03:36 +0000 Subject: [PATCH] Upgrade to 1.15. --- devel/mq4cpp/Makefile | 2 +- devel/mq4cpp/distinfo | 6 ++-- devel/mq4cpp/files/patch-src_FileSystem.cpp | 31 +++------------------ devel/mq4cpp/files/patch-src_Socket.cpp | 20 +++++++++++++ devel/mq4cpp/files/patch-src_Thread.cpp | 18 ++++++++++-- 5 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 devel/mq4cpp/files/patch-src_Socket.cpp diff --git a/devel/mq4cpp/Makefile b/devel/mq4cpp/Makefile index c224fb9eaa8a..d9b80514afb6 100644 --- a/devel/mq4cpp/Makefile +++ b/devel/mq4cpp/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mq4cpp -PORTVERSION= 1.14 +PORTVERSION= 1.15 CATEGORIES= devel MASTER_SITES= http://www.sixtyfourbit.org/Download/ diff --git a/devel/mq4cpp/distinfo b/devel/mq4cpp/distinfo index 718e68f4185e..ba40c883257e 100644 --- a/devel/mq4cpp/distinfo +++ b/devel/mq4cpp/distinfo @@ -1,3 +1,3 @@ -MD5 (mq4cpp-1.14.tar.bz2) = a41fadd676a163700072a261125277fa -SHA256 (mq4cpp-1.14.tar.bz2) = 032634e679d6a9b1eb742c14aacd510a29388207202d9e3ee21afc3f1e061845 -SIZE (mq4cpp-1.14.tar.bz2) = 1731994 +MD5 (mq4cpp-1.15.tar.bz2) = 64f71109adfc0fdbbc44ca81752493fb +SHA256 (mq4cpp-1.15.tar.bz2) = cba884139ba1c1aa0092e8d108b03c897d489766832e1a0cb8214bdf017ff8a7 +SIZE (mq4cpp-1.15.tar.bz2) = 1863842 diff --git a/devel/mq4cpp/files/patch-src_FileSystem.cpp b/devel/mq4cpp/files/patch-src_FileSystem.cpp index 9d592d6d9549..6b02dcd575fd 100644 --- a/devel/mq4cpp/files/patch-src_FileSystem.cpp +++ b/devel/mq4cpp/files/patch-src_FileSystem.cpp @@ -1,34 +1,11 @@ ---- src/FileSystem.cpp.orig Wed Jan 3 21:57:08 2007 -+++ src/FileSystem.cpp Thu Jan 4 16:43:02 2007 -@@ -28,7 +28,9 @@ - #ifndef WIN32 - #include - #include --#include -+#include -+#include -+#include - #include - #include - #include -@@ -258,7 +260,11 @@ - int out_fd = ::open(theDestFullName, O_WRONLY|O_CREAT|O_TRUNC, statbuf.st_mode); - if(out_fd<0) - throw FileSystemException(); -+#ifdef __FreeBSD__ -+ sendfile(in_fd, out_fd, 0, statbuf.st_size, NULL, NULL, 0); -+#else - sendfile(out_fd, in_fd, 0, statbuf.st_size); -+#endif - ::close(out_fd); - ::close(in_fd); - #endif -@@ -321,7 +327,11 @@ +--- src/FileSystem.cpp.orig Sat Mar 17 09:51:21 2007 ++++ src/FileSystem.cpp Sat Jun 23 09:45:31 2007 +@@ -354,7 +354,11 @@ Directory* ret=new Directory(path); ret->search(); #else +#ifdef __FreeBSD__ -+ char* ptr = getcwd (NULL, PATH_MAX); ++ char* ptr=getcwd (NULL, PATH_MAX); +#else char* ptr=get_current_dir_name(); +#endif diff --git a/devel/mq4cpp/files/patch-src_Socket.cpp b/devel/mq4cpp/files/patch-src_Socket.cpp new file mode 100644 index 000000000000..cb0869686aa6 --- /dev/null +++ b/devel/mq4cpp/files/patch-src_Socket.cpp @@ -0,0 +1,20 @@ +--- src/Socket.cpp.orig Sat Jun 23 09:55:17 2007 ++++ src/Socket.cpp Sat Jun 23 09:58:16 2007 +@@ -156,7 +156,7 @@ + } while (IFRSIZE <= ifc.ifc_len); + + ifr = ifc.ifc_req; +- for(; (ifr - ifc.ifc_req) * sizeof(ifreq) < static_cast(ifc.ifc_len); ++ifr) ++ for(; (ifr - ifc.ifc_req) * sizeof(ifreq) < static_cast(ifc.ifc_len); ++ifr) + { + if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) continue; // duplicate, skip it + +@@ -168,7 +168,7 @@ + string ip = inet_ntoa(inaddrr(ifr_addr.sa_data)); + + // ------ get HW_ADDRESS ------ +- if (ioctl(sockfd, SIOCGIFHWADDR, ifr) != 0) continue; // failed to get mac, skip it ++ if (ioctl(sockfd, SIOCGIFMAC, ifr) != 0) continue; // failed to get mac, skip it + + string mac=string((char*)ifr->ifr_addr.sa_data,MAC_ADDRESS_CHAR_LEN); + diff --git a/devel/mq4cpp/files/patch-src_Thread.cpp b/devel/mq4cpp/files/patch-src_Thread.cpp index 3c845af68499..12d5a1bf266c 100644 --- a/devel/mq4cpp/files/patch-src_Thread.cpp +++ b/devel/mq4cpp/files/patch-src_Thread.cpp @@ -1,6 +1,6 @@ ---- src/Thread.cpp.orig Thu Jan 4 12:31:04 2007 -+++ src/Thread.cpp Thu Jan 4 12:31:22 2007 -@@ -76,7 +76,7 @@ +--- src/Thread.cpp.orig Sat Mar 17 10:20:15 2007 ++++ src/Thread.cpp Sat Jun 23 09:54:56 2007 +@@ -78,7 +78,7 @@ #ifdef WIN32 return GetCurrentThreadId(); #else @@ -9,3 +9,15 @@ #endif } +@@ -277,10 +277,10 @@ + if(SetThreadAffinityMask(m_hThread,mask)==0) + throw ThreadException("Failed to set affinity"); + #else ++#ifdef HAVE_PTHREAD_SETAFFINITY_NP + cpu_set_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(cpu, &cpuset); +-#ifdef HAVE_PTHREAD_SETAFFINITY_NP + #ifndef P2_PTHREAD_SETAFFINITY + if(pthread_setaffinity_np(m_hThread, sizeof(cpuset), &cpuset)!=0) + throw ThreadException("Failed to set affinity");