aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/libmalloc/Makefile12
-rw-r--r--devel/libmalloc/distinfo1
-rw-r--r--devel/libmalloc/files/patch-aa109
-rw-r--r--devel/libmalloc/pkg-comment1
-rw-r--r--devel/libmalloc/pkg-descr17
-rw-r--r--devel/libmalloc/pkg-plist7
6 files changed, 147 insertions, 0 deletions
diff --git a/devel/libmalloc/Makefile b/devel/libmalloc/Makefile
new file mode 100644
index 00000000000..bdd3ef72a7b
--- /dev/null
+++ b/devel/libmalloc/Makefile
@@ -0,0 +1,12 @@
+# New ports collection makefile for: Mark Moraes malloc library
+# Version required: 1.13??
+# Date created: 11 January 1995
+# Whom: jkh
+#
+# $Id: Makefile,v 1.5 1994/11/28 23:33:53 torstenb Exp $
+#
+
+DISTNAME= malloc
+MASTER_SITES= ftp.cs.toronto.edu:/pub/moraes/
+
+.include <bsd.port.mk>
diff --git a/devel/libmalloc/distinfo b/devel/libmalloc/distinfo
new file mode 100644
index 00000000000..67645da0ee9
--- /dev/null
+++ b/devel/libmalloc/distinfo
@@ -0,0 +1 @@
+MD5 (malloc.tar.gz) = 0a849b322ea5c74b41ddcc59d313bff2
diff --git a/devel/libmalloc/files/patch-aa b/devel/libmalloc/files/patch-aa
new file mode 100644
index 00000000000..db565aa4766
--- /dev/null
+++ b/devel/libmalloc/files/patch-aa
@@ -0,0 +1,109 @@
+*** Makefile.orig Sun Jan 8 23:34:51 1995
+--- Makefile Thu Jan 12 00:44:38 1995
+***************
+*** 11,18 ****
+ # puts malloc.h in $INCDIR.
+ #
+
+! LIBDIR=$(HOME)/lib/$(ARCH)
+! INCDIR=$(HOME)/include
+
+ # neutralize SystemV genius
+ SHELL=/bin/sh
+--- 11,18 ----
+ # puts malloc.h in $INCDIR.
+ #
+
+! LIBDIR=${PREFIX}/lib
+! INCDIR=${PREFIX}/include
+
+ # neutralize SystemV genius
+ SHELL=/bin/sh
+***************
+*** 62,72 ****
+--- 62,75 ----
+ RANLIB = ranlib
+
+ LDFLAGS=#-Bstatic
++ VERSION=1.13
+
+ # only developers should have to change stuff below this line
+
+ EXT=_d
+ LIBMALLOC=libmalloc$(EXT).a
++ LIBSMALLOC=libmalloc${EXT}.so.${VERSION}
++
+ PROGS=testmalloc$(EXT) simumalloc$(EXT) teststomp$(EXT) maltrace$(EXT)
+
+ DEFINES= $(NORMALDEFS) $(DEBUGDEFS)
+***************
+*** 108,116 ****
+
+ CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
+
+! all: pass clean libmalloc
+
+! pass: $(LIBMALLOC) $(PROGS) out$(EXT)
+
+ libmalloc:
+ $(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
+--- 111,126 ----
+
+ CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
+
+! .c.o:
+! ${CC} -c ${CFLAGS} $< -o $@
+! ${CC} -c -fpic ${CFLAGS} $< -o shared/$@
+!
+! all: mkdir pass clean libmalloc
+!
+! mkdir:
+! @mkdir -p shared
+
+! pass: $(LIBMALLOC) $(LIBSMALLOC) $(PROGS) out$(EXT)
+
+ libmalloc:
+ $(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
+***************
+*** 134,139 ****
+--- 144,155 ----
+ -$(RANLIB) $(LIBMALLOC)
+ touch .lib$(EXT)
+
++ $(LIBSMALLOC): $(OBJS)
++ rm -f $(LIBSMALLOC) ${SPLAYOBJ}
++ cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
++ LIBMALLOC=../$(LIBMALLOC) CC="$(CC) -fpic"
++ (cd shared; ld -Bshareable -o ../$(LIBSMALLOC) $(OBJS) ../${SPLAYOBJ})
++
+ $(SPLAYOBJ): .foo
+ cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
+ LIBMALLOC=../$(LIBMALLOC) CC="$(CC)"
+***************
+*** 163,169 ****
+
+ clean:
+ -rm -f *.o \#* *~ core a.out gmon.out mon.out onefile.c *.sL prof.out
+! cd splay; $(MAKE) clean
+
+ veryclean: clean cleanprogs
+ make EXT= cleanprogs
+--- 179,186 ----
+
+ clean:
+ -rm -f *.o \#* *~ core a.out gmon.out mon.out onefile.c *.sL prof.out
+! -(cd shared; rm -f *.o \#* *~)
+! (cd splay; $(MAKE) clean)
+
+ veryclean: clean cleanprogs
+ make EXT= cleanprogs
+***************
+*** 174,179 ****
+--- 191,197 ----
+ -$(RANLIB) $(LIBDIR)/libmalloc.a
+ install -c -m 644 libmalloc_d.a $(LIBDIR)
+ -$(RANLIB) $(LIBDIR)/libmalloc_d.a
++ install -c -m 644 ${LIBSMALLOC} $(LIBDIR)
+ install -c -m 644 malloc.h $(INCDIR)
+
+ .id: $(SRCS)
diff --git a/devel/libmalloc/pkg-comment b/devel/libmalloc/pkg-comment
new file mode 100644
index 00000000000..2de5f8c2603
--- /dev/null
+++ b/devel/libmalloc/pkg-comment
@@ -0,0 +1 @@
+Small, fast malloc library with comprehensive error checking
diff --git a/devel/libmalloc/pkg-descr b/devel/libmalloc/pkg-descr
new file mode 100644
index 00000000000..40778a38319
--- /dev/null
+++ b/devel/libmalloc/pkg-descr
@@ -0,0 +1,17 @@
+This is a complete set of memory allocation functions (malloc and
+friends).
+ The allocator is small, fast and space-efficient.
+
+ It performs coalescing on frees.
+
+ It has hooks for profiling, tracing and memory leak detection.
+
+ It has very comprehensive and paranoid errorchecking as a compile
+ time option, enough to detect most forms of heap corruption.
+
+ Optionally, it attempts to be compatible with the proposed ANSI C
+ Standard definition for the standard library functions malloc(),
+ calloc(), realloc() and free(). By default, it is more or less
+ compatible with existing Unix malloc() functions - some
+ differences do exist. (Notably free(), cfree() returning void,
+ realloc() not accepting a freed block)
diff --git a/devel/libmalloc/pkg-plist b/devel/libmalloc/pkg-plist
new file mode 100644
index 00000000000..907518ae38f
--- /dev/null
+++ b/devel/libmalloc/pkg-plist
@@ -0,0 +1,7 @@
+@cd /usr/local
+lib/libmalloc.a
+@exec ranlib %D/%F
+lib/libmalloc_d.a
+@exec ranlib %D/%F
+include/malloc.h
+lib/libmalloc_d.so.1.13