1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Update to version 0.9.11

- Use sysconf(3) to get number of active CPUs instead of sysctl(3)
  and thus clean up the patch
- Remove BROKEN_ia64 statement at it makes little use these days as ia64
  was never a first-class citizen in FreeBSD and officially killed in
  -CURRENT for a while now

PR:		203426
Submitted by:	maintainer
This commit is contained in:
Alexey Dokuchaev 2015-10-30 10:45:41 +00:00
parent 5936e660d2
commit 50b3884364
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400495
3 changed files with 23 additions and 22 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= desmume
PORTVERSION= 0.9.10
PORTREVISION= 3
PORTVERSION= 0.9.11
CATEGORIES= emulators
MASTER_SITES= SF
@ -29,6 +28,4 @@ CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib -DGTKGLEXT_AVAILABLE \
-DHAVE_LIBGDKGLEXT_X11_1_0 -DHAVE_GL_GL_H -DHAVE_GL_GLU_H
CXXFLAGS+= ${CFLAGS}
BROKEN_ia64= Does not compile on ia64
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (desmume-0.9.10.tar.gz) = 8900a7a1fc849fdd33b014748dd97a6cda4c32548b8d2e06511e6ed8d5ba7445
SIZE (desmume-0.9.10.tar.gz) = 4141586
SHA256 (desmume-0.9.11.tar.gz) = 3ab34ba6cc009566245025c1dd94bf449b6a1b416d24387cb42e183c78e38896
SIZE (desmume-0.9.11.tar.gz) = 5359305

View File

@ -1,22 +1,26 @@
--- src/utils/task.cpp.orig 2013-11-28 01:37:27.373159000 +0100
+++ src/utils/task.cpp 2013-12-14 19:49:02.000000000 +0100
@@ -26,6 +26,7 @@
#if defined HOST_LINUX || defined HOST_DARWIN
--- src/utils/task.cpp.orig 2015-10-30 09:34:37 UTC
+++ src/utils/task.cpp
@@ -23,9 +23,9 @@
#include <windows.h>
#else
#include <pthread.h>
-#if defined HOST_LINUX
+#if defined HOST_LINUX || defined HOST_BSD
#include <unistd.h>
#elif defined HOST_BSD
+#include <iostream>
-#elif defined HOST_BSD || defined HOST_DARWIN
+#elif defined HOST_DARWIN
#include <sys/sysctl.h>
#endif
#endif // HOST_WINDOWS
@@ -41,9 +42,8 @@
@@ -37,9 +37,9 @@ int getOnlineCores (void)
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
-#elif defined HOST_LINUX
+#elif defined HOST_LINUX || defined HOST_BSD
return sysconf(_SC_NPROCESSORS_ONLN);
#elif defined HOST_BSD
-#elif defined HOST_BSD || defined HOST_DARWIN
+#elif defined HOST_DARWIN
int cores;
- const int mib[4] = { CTL_HW, HW_NCPU, 0, 0 };
- const size_t len = sizeof(cores);
- sysctl(mib, 2, &cores, &len, NULL, 0);
+ size_t len = sizeof(cores);
+ sysctlbyname("hw.ncpu", &cores, &len, NULL, 0);
return (cores < 1) ? 1 : cores;
#else
return 1;
int mib[4] = { CTL_HW, HW_NCPU, 0, 0 };
size_t len = sizeof(cores); //don't make this const, i guess sysctl can't take a const *