summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-02-09 21:04:17 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-02-09 21:04:17 +0800
commitc52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec (patch)
treee27172b05e6bb821d816368b4b4dbd8e89e7733c
parent45481de29c8dd2fc2fce4c2bdbb99324a41c7756 (diff)
downloadmarcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar.gz
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar.bz2
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar.lz
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar.xz
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.tar.zst
marcuscom-ports-c52d29171d2dcaf022c2f84c54a8fb48ec3ef0ec.zip
- Add liboil at version 0.3.6, in preps of gstreamer 0.10.3
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5646 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--devel/liboil/Makefile33
-rw-r--r--devel/liboil/distinfo3
-rw-r--r--devel/liboil/files/patch-configure18
-rw-r--r--devel/liboil/files/patch-liboil_liboilcpu.c107
-rw-r--r--devel/liboil/pkg-descr13
-rw-r--r--devel/liboil/pkg-plist54
6 files changed, 228 insertions, 0 deletions
diff --git a/devel/liboil/Makefile b/devel/liboil/Makefile
new file mode 100644
index 000000000..e579e1a2f
--- /dev/null
+++ b/devel/liboil/Makefile
@@ -0,0 +1,33 @@
+# New ports collection makefile for: liboil
+# Date created: Nov 24, 2004
+# Whom: ijliao
+#
+# $FreeBSD$
+#
+
+PORTNAME= liboil
+PORTVERSION= 0.3.6
+CATEGORIES= devel
+MASTER_SITES= http://liboil.freedesktop.org/download/
+
+MAINTAINER= kwm@FreeBSD.org
+COMMENT= Library of optimized inner loops
+
+USE_GNOME= glib20
+USE_REINPLACE= yes
+USE_AUTOTOOLS= libtool:15
+USE_GCC= 3.4
+INSTALLS_SHLIB= yes
+CONFIGURE_ARGS= --disable-gtk-doc
+
+PLIST_SUB= VERSION=${PORTVERSION:R}
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|stdint\.h|inttypes.h|g' \
+ ${WRKSRC}/liboil/liboiltypes.h \
+ ${WRKSRC}/liboil/liboilprofile.h \
+ ${WRKSRC}/liboil/liboil.h
+
+.include <bsd.port.post.mk>
diff --git a/devel/liboil/distinfo b/devel/liboil/distinfo
new file mode 100644
index 000000000..61c484106
--- /dev/null
+++ b/devel/liboil/distinfo
@@ -0,0 +1,3 @@
+MD5 (liboil-0.3.6.tar.gz) = a36b2d9cc71d75d814d7bdca2263290f
+SHA256 (liboil-0.3.6.tar.gz) = 52cb40905064ef836527b01c86650bebf662e1224da43c6fb0f3e1f443de232c
+SIZE (liboil-0.3.6.tar.gz) = 714947
diff --git a/devel/liboil/files/patch-configure b/devel/liboil/files/patch-configure
new file mode 100644
index 000000000..63ebd636c
--- /dev/null
+++ b/devel/liboil/files/patch-configure
@@ -0,0 +1,18 @@
+--- configure.orig Fri Sep 30 01:52:47 2005
++++ configure Fri Oct 21 11:14:15 2005
+@@ -21513,13 +21513,13 @@
+
+
+
+-LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -O2"
++LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) $(CFLAGS)"
+
+
+ LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la"
+
+
+-pkgconfigdir="\$(libdir)/pkgconfig"
++pkgconfigdir="\$(prefix)/libdata/pkgconfig"
+
+
+ #CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9*]//g'`
diff --git a/devel/liboil/files/patch-liboil_liboilcpu.c b/devel/liboil/files/patch-liboil_liboilcpu.c
new file mode 100644
index 000000000..6d5a57f46
--- /dev/null
+++ b/devel/liboil/files/patch-liboil_liboilcpu.c
@@ -0,0 +1,107 @@
+--- liboil/liboilcpu.c.orig Sat May 21 14:12:56 2005
++++ liboil/liboilcpu.c Sat May 21 14:34:37 2005
+@@ -59,7 +59,11 @@
+ cpuinfo = malloc(4096);
+ if (cpuinfo == NULL) return NULL;
+
++#if defined(__FreeBSD__)
++ fd = open("/var/run/dmesg.boot", O_RDONLY);
++#else
+ fd = open("/proc/cpuinfo", O_RDONLY);
++#endif
+ if (fd < 0) return NULL;
+
+ n = read(fd, cpuinfo, 4095);
+@@ -84,6 +88,37 @@
+ }
+
+ flags = strsplit(cpuinfo_flags);
++#if defined(__FreeBSD__)
++ for (f = flags; *f; f++) {
++ if (strcmp (*f, "CMOV") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_CMOV;
++ }
++ if (strcmp (*f, "MMX") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_MMX;
++ }
++ if (strcmp (*f, "SSE") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_SSE;
++ }
++ if (strcmp (*f, "AMIE") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT;
++ }
++ if (strcmp (*f, "SSE2") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_SSE2;
++ }
++ if (strcmp (*f, "3DNow!") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_3DNOW;
++ }
++ if (strcmp (*f, "DSP") == 0) {
++ OIL_DEBUG ("cpu flag %s", *f);
++ oil_cpu_flags |= OIL_IMPL_FLAG_3DNOWEXT;
++ }
++#else
+ for (f = flags; *f; f++) {
+ if (strcmp (*f, "cmov") == 0) {
+ OIL_DEBUG ("cpu flag %s", *f);
+@@ -113,6 +148,7 @@
+ OIL_DEBUG ("cpu flag %s", *f);
+ oil_cpu_flags |= OIL_IMPL_FLAG_3DNOWEXT;
+ }
++#endif
+
+ free (*f);
+ }
+@@ -282,12 +318,22 @@
+ char *end;
+ char *colon;
+
++#if defined(__FreeBSD__)
++ flags = strstr(cpuinfo,"Features");
++#else
+ flags = strstr(cpuinfo,"flags");
++#endif
+ if (flags == NULL) return NULL;
+
++#if defined(__FreeBSD__)
++ end = strchr(flags, '>');
++ if (end == NULL) return NULL;
++ colon = strchr (flags, '<');
++#else
+ end = strchr(flags, '\n');
+ if (end == NULL) return NULL;
+ colon = strchr (flags, ':');
++#endif
+ if (colon == NULL) return NULL;
+ colon++;
+ if(colon >= end) return NULL;
+@@ -303,15 +349,22 @@
+ char *tok;
+ int n = 0;
+
++#if !defined(__FreeBSD__)
+ while (*s == ' ') s++;
++#endif
+
+ list = malloc (1 * sizeof(char *));
+ while (*s) {
+ tok = s;
++#if defined(__FreeBSD__)
++ while (*s && *s != ',') s++;
++ list[n] = _strndup (tok, s - tok);
++ s++;
++#else
+ while (*s && *s != ' ') s++;
+-
+ list[n] = _strndup (tok, s - tok);
+ while (*s && *s == ' ') s++;
++#endif
+ list = realloc (list, (n + 2) * sizeof(char *));
+ n++;
+ }
diff --git a/devel/liboil/pkg-descr b/devel/liboil/pkg-descr
new file mode 100644
index 000000000..f2850d13d
--- /dev/null
+++ b/devel/liboil/pkg-descr
@@ -0,0 +1,13 @@
+Liboil is a library of simple functions that are optimized for various CPUs.
+These functions are generally loops implementing simple algorithms, such as
+converting an array of N integers to floating-point numbers or multiplying
+and summing an array of N numbers. Clearly such functions are candidates for
+significant optimization using various techniques, especially by using
+extended instructions provided by modern CPUs (Altivec, MMX, SSE, etc.).
+
+Many multimedia applications and libraries already do similar things
+internally. The goal of this project is to consolidate some of the code used
+by various multimedia projects, and also make optimizations easier to use by
+a broad range of applications.
+
+WWW: http://liboil.freedesktop.org
diff --git a/devel/liboil/pkg-plist b/devel/liboil/pkg-plist
new file mode 100644
index 000000000..458597eb9
--- /dev/null
+++ b/devel/liboil/pkg-plist
@@ -0,0 +1,54 @@
+include/liboil-%%VERSION%%/liboil/liboil.h
+include/liboil-%%VERSION%%/liboil/liboilclasses.h
+include/liboil-%%VERSION%%/liboil/liboilcpu.h
+include/liboil-%%VERSION%%/liboil/liboildebug.h
+include/liboil-%%VERSION%%/liboil/liboilfuncs.h
+include/liboil-%%VERSION%%/liboil/liboilfunction.h
+include/liboil-%%VERSION%%/liboil/liboilgcc.h
+include/liboil-%%VERSION%%/liboil/liboilinternal.h
+include/liboil-%%VERSION%%/liboil/liboilparameter.h
+include/liboil-%%VERSION%%/liboil/liboilprofile.h
+include/liboil-%%VERSION%%/liboil/liboilprototype.h
+include/liboil-%%VERSION%%/liboil/liboilrandom.h
+include/liboil-%%VERSION%%/liboil/liboiltest.h
+include/liboil-%%VERSION%%/liboil/liboiltypes.h
+lib/liboil-%%VERSION%%.a
+lib/liboil-%%VERSION%%.so
+lib/liboil-%%VERSION%%.so.1
+libdata/pkgconfig/liboil-%%VERSION%%.pc
+share/gtk-doc/html/liboil/ch01.html
+share/gtk-doc/html/liboil/ch02.html
+share/gtk-doc/html/liboil/home.png
+share/gtk-doc/html/liboil/index.html
+share/gtk-doc/html/liboil/index.sgml
+share/gtk-doc/html/liboil/left.png
+share/gtk-doc/html/liboil/liboil-liboilclass-unstable.html
+share/gtk-doc/html/liboil/liboil-liboilcpu.html
+share/gtk-doc/html/liboil/liboil-liboildebug.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-conv.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-copy.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-dct.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-doc.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-math.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-math8x8.html
+share/gtk-doc/html/liboil/liboil-liboilfuncs-pixel.html
+share/gtk-doc/html/liboil/liboil-liboilimpl-unstable.html
+share/gtk-doc/html/liboil/liboil-liboilinit-unstable.html
+share/gtk-doc/html/liboil/liboil-liboilinit.html
+share/gtk-doc/html/liboil/liboil-liboiljunk.html
+share/gtk-doc/html/liboil/liboil-liboilmacros.html
+share/gtk-doc/html/liboil/liboil-liboilparameter.html
+share/gtk-doc/html/liboil/liboil-liboilprofile.html
+share/gtk-doc/html/liboil/liboil-liboilprototype.html
+share/gtk-doc/html/liboil/liboil-liboilrandom.html
+share/gtk-doc/html/liboil/liboil-liboiltest.html
+share/gtk-doc/html/liboil/liboil-liboiltypes.html
+share/gtk-doc/html/liboil/liboil.devhelp
+share/gtk-doc/html/liboil/right.png
+share/gtk-doc/html/liboil/style.css
+share/gtk-doc/html/liboil/up.png
+@dirrm share/gtk-doc/html/liboil
+@dirrmtry share/gtk-doc/html
+@dirrmtry share/gtk-doc
+@dirrm include/liboil-%%VERSION%%/liboil
+@dirrm include/liboil-%%VERSION%%