Hello all.
I compiled enlightenment in FreeBSD amd64 (only the bare minimum for a
functional e17 minus the battery module as I don't care about it :D)
and here are my findings.
Small things will be explained below, bigger patches will be attached.

etk needs to depend on gettext 0.17, else it will fail in @mkinstalld...@.

-AM_GNU_GETTEXT_VERSION(0.14.1)
+AM_GNU_GETTEXT_VERSION(0.17)

ecore needs sys/select.h else e_slider.c will fail wondering about
fd_set. (Patch #1)

evas_common.h needs sysctl.h for the portion of code to calculate the
number of cpus and
evas_cpu.c includes num of cpus calculation for FreeBSD (Patch #2)

There is also an issue with eet using gnutls, but cedric (irc) is
already aware of it.

Hope you find this useful.

P.S.: only tested in BSD... so some stuff from my patches might get
redundant in Linux.
P.S.2: excuse the spam in the ml (I hope patches with .txt in the end
will make gmail happy)
--
Norberto
--- Ecore.h     2009-07-20 12:51:37.000000000 +0200
+++ Ecore.h.patched     2009-07-20 12:52:12.000000000 +0200
@@ -52,6 +52,7 @@
 #ifdef _WIN32
 # include <winsock2.h>
 #else
+# include <sys/select.h>
 # include <sys/types.h>
 # include <sys/time.h>
 # include <signal.h>
--- evas/src/lib/include/evas_common.h  2009-07-20 14:56:11.000000000 +0200
+++ evas/src/lib/include/evas_common.h.patched  2009-07-20 15:02:01.000000000 
+0200
@@ -126,9 +126,13 @@
 #include <ctype.h>
 #include <stdint.h>
 
+#ifdef __FreeBSD__
+# include <sys/sysctl.h>
+#endif
+
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
-#elif defined __GNUC__
+#elif defined __GNUC__ && !defined __FreeBSD__
 # define alloca __builtin_alloca
 #elif defined _AIX
 # define alloca __alloca
--- evas/src/lib/engines/common/evas_cpu.c      2009-07-20 14:58:52.000000000 
+0200
+++ evas/src/lib//engines/common/evas_cpu.c.patched     2009-07-20 
15:05:32.000000000 +0200
@@ -249,26 +249,41 @@
 EAPI int
 evas_common_cpu_count(void)
 {
-#ifdef BUILD_PTHREAD
-   cpu_set_t cpu;
-   int i;
-   static int cpus = 0;
-
-   if (cpus != 0) return cpus;
-
-   CPU_ZERO(&cpu);
-   if (sched_getaffinity(0, sizeof(cpu), &cpu) != 0)
-     {
-       printf("[Evas] could not get cpu affinity: %s\n", strerror(errno));
-       return 1;
-     }
-   for (i = 0; i < TH_MAX; i++)
-     {
-       if (CPU_ISSET(i, &cpu)) cpus = i + 1;
-       else break;
-     }
-   return cpus;
+#ifdef __FreeBSD__
+ int cpus ;
+ int mib[2];
+ size_t len = sizeof(cpus);
+  
+ mib[0] = CTL_HW;
+ mib[1] = HW_NCPU;
+  
+ if (sysctl(&mib[0], 2, &cpus, &len, NULL, 0) != 0) 
+   {
+     cpus = 1;
+   }
+ return cpus;
 #else
+# ifdef BUILD_PTHREAD
+  cpu_set_t cpu;
+  int i;
+  static int cpus = 0;
+  
+  if (cpus != 0) return cpus;
+  
+  CPU_ZERO(&cpu);
+  if (sched_getaffinity(0, sizeof(cpu), &cpu) != 0)
+    {
+      printf("[Evas] could not get cpu affinity: %s\n", strerror(errno));
+      return 1;
+    }      
+    for (i = 0; i < TH_MAX; i++)
+      {
+        if (CPU_ISSET(i, &cpu)) cpus = i + 1;
+        else break;
+      }
+   return cpus;
+# else
    return 1;
+# endif 
 #endif
 }
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to