summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-02-05 06:12:30 +0000
committerobrien <obrien@FreeBSD.org>1999-02-05 06:12:30 +0000
commit4887d362cd7fa4cedb6dbfc1bc50312f616e323b (patch)
tree846fe89b131b15161cf89da4d6e79b6e337f52de /devel
parent9a86d52011fefbe5292aa20bdba7c7da47c0a72f (diff)
downloadFreeBSD-ports-4887d362cd7fa4cedb6dbfc1bc50312f616e323b.zip
FreeBSD-ports-4887d362cd7fa4cedb6dbfc1bc50312f616e323b.tar.gz
* there were two patches in the last patch-aa, so I ended up spamming one
of them on my last cleanup. * really fix for ELF
Diffstat (limited to 'devel')
-rw-r--r--devel/libmalloc/Makefile4
-rw-r--r--devel/libmalloc/files/patch-ad92
-rw-r--r--devel/libmalloc/pkg-plist5
3 files changed, 97 insertions, 4 deletions
diff --git a/devel/libmalloc/Makefile b/devel/libmalloc/Makefile
index 47f3efa..7247373 100644
--- a/devel/libmalloc/Makefile
+++ b/devel/libmalloc/Makefile
@@ -3,7 +3,7 @@
# Date created: 11 January 1995
# Whom: jkh
#
-# $Id: Makefile,v 1.14 1998/11/28 01:48:32 asami Exp $
+# $Id: Makefile,v 1.15 1998/12/01 10:13:02 obrien Exp $
#
DISTNAME= malloc-1.18
@@ -18,7 +18,7 @@ MAINTAINER= obrien@FreeBSD.org
MANUAL_PACKAGE_BUILD= installs malloc.h
post-install:
- ${LDCONFIG} -m ${PREFIX}/lib
+ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
@(cd ${PREFIX}/include ; ln -sf malloc.h libmalloc.h)
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/libmalloc
diff --git a/devel/libmalloc/files/patch-ad b/devel/libmalloc/files/patch-ad
new file mode 100644
index 0000000..8a92c2b
--- /dev/null
+++ b/devel/libmalloc/files/patch-ad
@@ -0,0 +1,92 @@
+--- Makefile.orig Mon Apr 3 10:55:32 1995
++++ Makefile Thu Feb 4 22:08:18 1999
+@@ -11,8 +11,8 @@
+ # puts malloc.h in $INCDIR.
+ #
+
+-LIBDIR=$(HOME)/lib/$(ARCH)
+-INCDIR=$(HOME)/include
++LIBDIR=${PREFIX}/lib
++INCDIR=${PREFIX}/include
+
+ # neutralize SystemV genius
+ SHELL=/bin/sh
+@@ -46,7 +46,7 @@
+ # -DHAVE_MMAP can be defined for SunOS4.x and other systems
+ # that have a general purpose mmap call that allows memory-mapped files.
+ #
+-NORMALDEFS=-DHAVE_MMAP # -DSTDHEADERS -DSHORTNAMES -DUSESTDIO
++NORMALDEFS=-DHAVE_MMAP -DSTDHEADERS # -DSHORTNAMES -DUSESTDIO
+
+ # CC = gcc -ansi -Wall -O # -pedantic # add -pedantic if you fixed your includes.
+ # SGI needs cc -xansi -D__STDC__ on Irix4.0.5.
+@@ -62,11 +62,20 @@
+ RANLIB = ranlib
+
+ LDFLAGS=#-Bstatic
++.if (${PORTOBJFORMAT} == "elf")
++CFLAGS_SHARED= -shared -Wl,-soname,${LIBSMALLOC}
++VERSION=1
++.else
++CFLAGS_SHARED= -shared
++VERSION=1.18
++.endif
+
+ # 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,9 +117,16 @@
+
+ CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
+
+-all: pass clean libmalloc
++.c.o:
++ ${CC} -c ${CFLAGS} $< -o $@
++ ${CC} -c -fpic ${CFLAGS} $< -o shared/$@
++
++all: mkdir pass clean libmalloc
+
+-pass: $(LIBMALLOC) $(PROGS) out$(EXT)
++mkdir:
++ @mkdir -p shared
++
++pass: $(LIBMALLOC) ${LIBSMALLOC} $(PROGS) out$(EXT)
+
+ libmalloc:
+ $(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
+@@ -135,6 +151,12 @@
+ -$(RANLIB) $(LIBMALLOC)
+ touch .lib$(EXT)
+
++${LIBSMALLOC}: ${OBJS}
++ rm -f ${LIBSMALLOC} ${SPLAYOBJ}
++ cd splay; ${MAKE} ${MFLAGS} DEFINES="${DEFINES}" \
++ LIBMALLOC=../${LIBMALLOC} CC="${CC} -fpic"
++ (cd shared; ${CC} ${CFLAGS_SHARED} -o ../${LIBSMALLOC} ${OBJS} ../${SPLAYOBJ})
++
+ $(SPLAYOBJ): .foo
+ cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
+ LIBMALLOC=../$(LIBMALLOC) CC="$(CC)"
+@@ -164,6 +186,7 @@
+
+ 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
+@@ -175,6 +198,8 @@
+ -$(RANLIB) $(LIBDIR)/libmalloc.a
+ install -c -m 644 libmalloc_d.a $(LIBDIR)
+ -$(RANLIB) $(LIBDIR)/libmalloc_d.a
++ install -c -m 644 ${LIBSMALLOC} ${LIBDIR}
++ ln -sf ${LIBDIR}/${LIBSMALLOC} ${LIBDIR}/libmalloc${EXT}.so
+ install -c -m 644 malloc.h $(INCDIR)
+
+ .id: $(SRCS)
diff --git a/devel/libmalloc/pkg-plist b/devel/libmalloc/pkg-plist
index c251791..e6251db 100644
--- a/devel/libmalloc/pkg-plist
+++ b/devel/libmalloc/pkg-plist
@@ -4,8 +4,9 @@ lib/libmalloc_d.a
@exec ranlib %D/%F
include/malloc.h
include/libmalloc.h
+lib/libmalloc_d.so
lib/libmalloc_d.so.1.18
-@exec /sbin/ldconfig -m %B
-@unexec /sbin/ldconfig -R
+@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B
+@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
share/doc/libmalloc/malloc.doc
share/doc/libmalloc/NOTE
OpenPOWER on IntegriCloud