aboutsummaryrefslogtreecommitdiff
path: root/devel/libhoard
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2003-06-21 20:32:55 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2003-06-21 20:32:55 +0000
commit242b05c89bc24db8d81090912a9e8bb6fed09c81 (patch)
treef1a68751f999fbe891e321d423b54423254c277b /devel/libhoard
parentfd41cc90a709a9f03b94bdcb761b53576baf09cb (diff)
downloadports-242b05c89bc24db8d81090912a9e8bb6fed09c81.tar.gz
ports-242b05c89bc24db8d81090912a9e8bb6fed09c81.zip
Notes
Diffstat (limited to 'devel/libhoard')
-rw-r--r--devel/libhoard/Makefile52
-rw-r--r--devel/libhoard/distinfo1
-rw-r--r--devel/libhoard/files/patch-Makefile.common77
-rw-r--r--devel/libhoard/files/testos.c16
-rw-r--r--devel/libhoard/pkg-descr15
-rw-r--r--devel/libhoard/pkg-plist5
6 files changed, 166 insertions, 0 deletions
diff --git a/devel/libhoard/Makefile b/devel/libhoard/Makefile
new file mode 100644
index 000000000000..ea580ff87e4e
--- /dev/null
+++ b/devel/libhoard/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: libhoard
+# Date created: May 24, 2003
+# Whom: Sergey A. Osokin <osa@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libhoard
+PORTVERSION= 2.1.2d
+CATEGORIES= devel
+MASTER_SITES= http://www.cs.umass.edu/~emery/software/
+
+MAINTAINER= osa@FreeBSD.org
+COMMENT= Fast, scalable and memory-efficient allocator for MP
+
+USE_GMAKE= yes
+MAKE_ENV= USE_FREEBSD=1 \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
+INSTALLS_SHLIB= YES
+
+.include <bsd.port.pre.mk>
+
+TESTPROG= testos
+
+check-os:
+.if !defined(SKIP_OS_TEST)
+ -@${MKDIR} ${WRKSRC} ; \
+ ${RM} -f ${WRKSRC}/${TESTPROG} ; \
+ ${CC} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -o ${WRKSRC}/${TESTPROG} \
+ ${PATCHDIR}/${TESTPROG}.c > /dev/null 2>&1 ;
+ @if [ ! -f ${WRKSRC}/${TESTPROG} ] ; \
+ then \
+ ${ECHO_MSG} "You must have a version of FreeBSD later than 4.8-STABLE" ; \
+ ${ECHO_MSG} "27 May 2003 or 5.1-RELEASE to compile and use libhoard" ; \
+ exit 1 ; \
+ fi
+ @${WRKSRC}/${TESTPROG} 2>/dev/null
+.endif
+
+pre-fetch: check-os
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/libhoard.so ${PREFIX}/lib/libhoard.so.1
+ ${LN} -sf ${PREFIX}/lib/libhoard.so.1 ${PREFIX}/lib/libhoard.so
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d -m 0755 ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/asplos2000.pdf ${DOCSDIR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/libhoard/distinfo b/devel/libhoard/distinfo
new file mode 100644
index 000000000000..372d76a6b728
--- /dev/null
+++ b/devel/libhoard/distinfo
@@ -0,0 +1 @@
+MD5 (libhoard-2.1.2d.tar.gz) = fd0247f3ec28f507e2eb6b437263fcfe
diff --git a/devel/libhoard/files/patch-Makefile.common b/devel/libhoard/files/patch-Makefile.common
new file mode 100644
index 000000000000..7834d417d6eb
--- /dev/null
+++ b/devel/libhoard/files/patch-Makefile.common
@@ -0,0 +1,77 @@
+--- Makefile.common.orig Mon Apr 7 19:57:11 2003
++++ Makefile.common Sun May 25 12:53:38 2003
+@@ -21,8 +21,17 @@
+ # or supply new values as parameters to make, e.g.:
+ # make USE_WINDOWS=1 DEBUG=1
+
++ifeq ($(OSTYPE),freebsd)
++USE_FREEBSD = 1
++USE_LINUX = 0
++USE_HPUX = 0
++USE_WINDOWS = 0
++USE_SOLARIS = 0
++UNIX = 1
++endif
+
+ ifeq ($(OSTYPE),hpux)
++USE_FREEBSD = 0
+ USE_LINUX = 0
+ USE_HPUX = 1
+ USE_WINDOWS = 0
+@@ -31,6 +40,7 @@
+ endif
+
+ ifeq ($(OSTYPE),linux)
++USE_FREEBSD = 0
+ USE_HPUX = 0
+ USE_LINUX = 1 # Linux
+ USE_WINDOWS = 0
+@@ -39,6 +49,7 @@
+ endif
+
+ ifeq ($(OSTYPE),linux-gnu)
++USE_FREEBSD = 0
+ USE_HPUX = 0
+ USE_LINUX = 1 # Linux
+ USE_WINDOWS = 0
+@@ -47,6 +58,7 @@
+ endif
+
+ ifeq ($(OSTYPE),solaris)
++USE_FREEBSD = 0
+ USE_HPUX = 0
+ USE_LINUX = 0
+ USE_WINDOWS = 0
+@@ -55,6 +67,7 @@
+ endif
+
+ ifeq ($(OS),Windows_NT)
++USE_FREEBSD = 0
+ USE_HPUX = 0
+ USE_LINUX = 0
+ USE_WINDOWS = 1
+@@ -109,6 +122,15 @@
+ # LIBSO = $(CC) -shared
+ endif
+
++ifeq ($(USE_FREEBSD),1)
++ GNUC = 1
++ VPATH = ../run-freebsd
++ FEATURES = ${PTHREAD_FLAGS}
++ LIBS = ${PTHREAD_LIBS}
++ UNIX = 1
++endif
++
++
+ ifdef BROKEN
+ CPATH = /usr/bin/
+ endif
+@@ -127,7 +149,7 @@
+ ifdef GNUC
+ CC = $(CPATH)gcc
+ CXX = $(CPATH)g++
+- FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions #-fPIC
++ FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions -Wno-deprecated
+ OPTIMIZE = -O6 -fexpensive-optimizations -finline-functions -fomit-frame-pointer -ffast-math
+ FEATURESXX = $(FEATURES)
+ OPTIMIZEXX = $(OPTIMIZE)
diff --git a/devel/libhoard/files/testos.c b/devel/libhoard/files/testos.c
new file mode 100644
index 000000000000..c4413db9c9af
--- /dev/null
+++ b/devel/libhoard/files/testos.c
@@ -0,0 +1,16 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+ static int level;
+
+ level = pthread_getconcurrency();
+ (void)pthread_setconcurrency(level++);
+
+ printf("LIBC_R TEST PASSED: All ok\n");
+
+ exit(0);
+}
diff --git a/devel/libhoard/pkg-descr b/devel/libhoard/pkg-descr
new file mode 100644
index 000000000000..632ca0e3bcf7
--- /dev/null
+++ b/devel/libhoard/pkg-descr
@@ -0,0 +1,15 @@
+The Hoard memory allocator is a fast, scalable, and memory-efficient
+memory allocator for shared-memory multiprocessors.
+
+Multithreaded programs that perform dynamic memory allocation do not
+scale because the heap is a bottleneck. When multiple threads
+simultaneously allocate or deallocate memory from the heap, they will
+be serialized while waiting for the heap lock. Programs making
+intensive use of the heap actually slow down as the number of
+processors increases. (Note: If you make a lot of use of the STL, you
+may not know it, but you are making a lot of use of the heap.)
+
+Hoard is a fast allocator that solves this problem. In addition, it
+has very reasonable bounds on memory consumption.
+
+WWW: http://www.hoard.org/
diff --git a/devel/libhoard/pkg-plist b/devel/libhoard/pkg-plist
new file mode 100644
index 000000000000..0101054f5993
--- /dev/null
+++ b/devel/libhoard/pkg-plist
@@ -0,0 +1,5 @@
+lib/libhoard.so
+lib/libhoard.so.1
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/asplos2000.pdf
+%%PORTDOCS%%@dirrm %%DOCSDIR%%