[21717] trunk/dports/devel/liboil

source_changes at macosforge.org source_changes at macosforge.org
Sat Feb 3 11:43:03 PST 2007


Revision: 21717
          http://trac.macosforge.org/projects/macports/changeset/21717
Author:   rhwood at macports.org
Date:     2007-02-03 11:43:02 -0800 (Sat, 03 Feb 2007)

Log Message:
-----------
Add patches from https://bugs.freedesktop.org/show_bug.cgi?id=7275 to fix build failure on PowerPC.

Modified Paths:
--------------
    trunk/dports/devel/liboil/Portfile

Added Paths:
-----------
    trunk/dports/devel/liboil/files/patch-liboil_liboilcpu.c.diff

Modified: trunk/dports/devel/liboil/Portfile
===================================================================
--- trunk/dports/devel/liboil/Portfile	2007-02-03 18:19:17 UTC (rev 21716)
+++ trunk/dports/devel/liboil/Portfile	2007-02-03 19:43:02 UTC (rev 21717)
@@ -2,6 +2,7 @@
 PortSystem 1.0
 name		liboil
 version		0.3.10
+revision	1
 description	A library of simple functions that are optimized for various CPUs.
 long_description	${description}
 maintainers	landonf at macports.org
@@ -13,7 +14,9 @@
 		sha1 00183731d417047a3b7715532b9d6ca5cce16cc4 \
 		rmd160 585413d5955b08b24cec18f588927ac071a44098
 
-patchfiles	patch-liboiltmp.c
+patchfiles	\
+	patch-liboiltmp.c \
+	patch-liboil_liboilcpu.c.diff
 
 configure.args	--mandir=${prefix}/share/man 
 configure.env   CPPFLAGS="-I${prefix}/include -L${prefix}/lib" \

Added: trunk/dports/devel/liboil/files/patch-liboil_liboilcpu.c.diff
===================================================================
--- trunk/dports/devel/liboil/files/patch-liboil_liboilcpu.c.diff	                        (rev 0)
+++ trunk/dports/devel/liboil/files/patch-liboil_liboilcpu.c.diff	2007-02-03 19:43:02 UTC (rev 21717)
@@ -0,0 +1,43 @@
+--- liboil/liboilcpu.c~	2007-02-03 12:06:32.000000000 -0500
++++ liboil/liboilcpu.c	2007-02-03 12:43:36.000000000 -0500
+@@ -42,7 +42,7 @@
+ #include <sys/time.h>
+ #include <time.h>
+ 
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__APPLE__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
+@@ -587,25 +587,17 @@
+ }
+ 
+ static void
+-test_altivec (void * ignored)
+-{
+-  char x[16] = { 0, };
+-
+-  asm volatile (
+-      "  lvx %%v0, %0, %%r0  \n"
+-      :: "r" (x));
+-}
+-
+-static void
+ oil_cpu_detect_powerpc(void)
+ {
+-
+-  oil_cpu_fault_check_enable ();
+-  if (oil_cpu_fault_check_try(test_altivec, NULL)) {
++  int sels[2] = { CTL_HW, HW_VECTORUNIT };
++  int vType = 0; //0 == scalar only
++  size_t length = sizeof(vType);
++  int error = sysctl(sels, 2, &vType, &length, NULL, 0);
++ 
++  if ( 0 == error ) {
+     OIL_DEBUG ("cpu flag altivec");
+     oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC;
+   }
+-  oil_cpu_fault_check_disable ();
+ 
+   _oil_profile_stamp = oil_profile_stamp_tb;
+ }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070203/03ce647e/attachment.html


More information about the macports-changes mailing list