summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorreed <reed@pkgsrc.org>2010-02-14 00:06:16 +0000
committerreed <reed@pkgsrc.org>2010-02-14 00:06:16 +0000
commite23cabd37321ad567b29d34f77200fc62bb34405 (patch)
tree7fe4e338e4fa49ef6a9ca6b1c6c69c9983549d25 /devel
parentc112c7cfd153bcf372671282479fe1c657acaf20 (diff)
downloadpkgsrc-e23cabd37321ad567b29d34f77200fc62bb34405.tar.gz
Per my old PR #40238: Match up the directory name and package name
to match the source distfile name. (It had three different names, including, the distfile name.) This moves electricfence to electricfence and renames the package from ElectricFence to electric-fence.
Diffstat (limited to 'devel')
-rw-r--r--devel/electric-fence/DESCR7
-rw-r--r--devel/electric-fence/Makefile32
-rw-r--r--devel/electric-fence/PLIST3
-rw-r--r--devel/electric-fence/distinfo8
-rw-r--r--devel/electric-fence/patches/patch-aa85
-rw-r--r--devel/electric-fence/patches/patch-ab28
-rw-r--r--devel/electric-fence/patches/patch-ac13
7 files changed, 176 insertions, 0 deletions
diff --git a/devel/electric-fence/DESCR b/devel/electric-fence/DESCR
new file mode 100644
index 00000000000..dccc91bf84b
--- /dev/null
+++ b/devel/electric-fence/DESCR
@@ -0,0 +1,7 @@
+Electric Fence is a different kind of malloc() debugger. It uses the virtual
+memory hardware of your system to detect when software overruns the boundaries
+of a malloc() buffer. It will also detect any accesses of memory that has
+been released by free(). Because it uses the VM hardware for detection,
+Electric Fence stops your program on the first instruction that causes
+a bounds violation. It's then trivial to use a debugger to display the
+offending statement.
diff --git a/devel/electric-fence/Makefile b/devel/electric-fence/Makefile
new file mode 100644
index 00000000000..f157f942900
--- /dev/null
+++ b/devel/electric-fence/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+
+DISTNAME= electric-fence_2.1.13-0.1
+PKGNAME= electric-fence-2.1.13.0.1
+CATEGORIES= devel
+MASTER_SITES= http://perens.com/works/software/ElectricFence/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.perens.com/FreeSoftware/
+COMMENT= Different kind of malloc() debugger
+
+PREV_PKGPATH= devel/electricfence
+SUPERSEDES= ElectricFence<=2.1.13.0.1
+
+PKG_DESTDIR_SUPPORT= user-destdir
+USE_LIBTOOL= yes
+WRKSRC= ${WRKDIR}/${DISTNAME:C/-0.1//1:C/_/-/1}
+
+MAKE_FLAGS= INSTALL_MAN=${INSTALL_MAN:Q}
+PTHREAD_AUTO_VARS= yes
+AUTO_MKDIRS= yes
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "mipsel" || ${OPSYS} == "DragonFly"
+CFLAGS+= -g -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
+.else
+CFLAGS+= -g
+.endif
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/electric-fence/PLIST b/devel/electric-fence/PLIST
new file mode 100644
index 00000000000..1ef091964c5
--- /dev/null
+++ b/devel/electric-fence/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+lib/libefence.la
+man/man3/libefence.3
diff --git a/devel/electric-fence/distinfo b/devel/electric-fence/distinfo
new file mode 100644
index 00000000000..ea952a1a9fe
--- /dev/null
+++ b/devel/electric-fence/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+
+SHA1 (electric-fence_2.1.13-0.1.tar.gz) = e6765bcb1543272040b806eea706fc7ae9b60524
+RMD160 (electric-fence_2.1.13-0.1.tar.gz) = 75e41de7bef263007f24a1053528959f9f7fe1fa
+Size (electric-fence_2.1.13-0.1.tar.gz) = 29991 bytes
+SHA1 (patch-aa) = 9b2f1720a92c805d8d4b36631317493124c2f2d7
+SHA1 (patch-ab) = 64c503ce8d2ea9b55432d59a187e644af38e257b
+SHA1 (patch-ac) = 4c56eeea0b8e53cdf260b61aa8fdef16f601b186
diff --git a/devel/electric-fence/patches/patch-aa b/devel/electric-fence/patches/patch-aa
new file mode 100644
index 00000000000..33a397d66be
--- /dev/null
+++ b/devel/electric-fence/patches/patch-aa
@@ -0,0 +1,85 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+
+--- Makefile.orig 2002-02-19 23:51:44.000000000 +0200
++++ Makefile
+@@ -1,12 +1,14 @@
+-ASFLAGS= -mips2
+-CC= cc
+-AR= ar
+-INSTALL= install
+-MV= mv
+-CHMOD= chmod
+-CFLAGS= -g
+-LIB_INSTALL_DIR= /usr/lib
+-MAN_INSTALL_DIR= /usr/man/man3
++#ASFLAGS= -mips2
++#CC= cc
++#AR= ar
++#INSTALL= install
++#MV= mv
++#CHMOD= chmod
++#CFLAGS= -g
++LIB_INSTALL_DIR= ${PREFIX}/lib
++MAN_INSTALL_DIR= ${PREFIX}/${PKGMANDIR}/man3
++SO_VER= 0:0
++LIBTOOL= libtool
+
+ PACKAGE_SOURCE= README libefence.3 Makefile efence.h \
+ efence.c page.c print.c eftest.c tstheap.c CHANGES COPYING
+@@ -26,9 +28,9 @@ PACKAGE_SOURCE= README libefence.3 Makef
+ # as well if using Sun's compiler, -static if using GCC.
+ # CFLAGS= -g -Bstatic -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
+
+-OBJECTS= efence.o page.o print.o
++OBJECTS= efence.lo page.lo print.lo
+
+-all: libefence.a tstheap eftest
++all: libefence.la tstheap eftest
+ @ echo
+ @ echo "Testing Electric Fence."
+ @ echo "After the last test, it should print that the test has PASSED."
+@@ -38,11 +40,9 @@ all: libefence.a tstheap eftest
+ @ echo "Electric Fence confidence test PASSED."
+ @ echo
+
+-install: libefence.a libefence.3
+- $(MV) libefence.a $(LIB_INSTALL_DIR)
+- $(CHMOD) 644 $(LIB_INSTALL_DIR)/libefence.a
+- $(INSTALL) libefence.3 $(MAN_INSTALL_DIR)/libefence.3
+- $(CHMOD) 644 $(MAN_INSTALL_DIR)/libefence.3
++install: libefence.la libefence.3
++ $(LIBTOOL) --mode=install $(INSTALL) -c libefence.la $(DESTDIR)${LIB_INSTALL_DIR}
++ $(INSTALL_MAN) libefence.3 ${DESTDIR}$(MAN_INSTALL_DIR)/libefence.3
+
+ clean:
+ - rm -f $(OBJECTS) tstheap.o eftest.o tstheap eftest libefence.a \
+@@ -57,16 +57,22 @@ ElectricFence.shar: $(PACKAGE_SOURCE)
+
+ shar: ElectricFence.shar
+
+-libefence.a: $(OBJECTS)
+- - rm -f libefence.a
+- $(AR) crv libefence.a $(OBJECTS)
++libefence.la: $(OBJECTS)
++ $(LIBTOOL) --tag=CC --mode=link ${CC} -o libefence.la \
++ ${OBJECTS} ${LDFLAGS} ${LIBS} \
++ -rpath ${LIB_INSTALL_DIR} -version-info ${SO_VER}
+
+-tstheap: libefence.a tstheap.o
++tstheap: libefence.la tstheap.o
+ - rm -f tstheap
+- $(CC) $(CFLAGS) tstheap.o libefence.a -o tstheap -lpthread
++ $(CC) $(CFLAGS) tstheap.o .libs/libefence.a -o tstheap -lpthread
+
+-eftest: libefence.a eftest.o
++eftest: libefence.la eftest.o
+ - rm -f eftest
+- $(CC) $(CFLAGS) eftest.o libefence.a -o eftest -lpthread
++ $(CC) $(CFLAGS) eftest.o .libs/libefence.a -o eftest -lpthread
+
+ $(OBJECTS) tstheap.o eftest.o: efence.h
++
++.SUFFIXES: .lo
++.c.lo:
++ $(LIBTOOL) --tag=CC --mode=compile $(CC) -o ${.TARGET} \
++ -c ${CPPFLAGS} ${CFLAGS} ${.IMPSRC}
diff --git a/devel/electric-fence/patches/patch-ab b/devel/electric-fence/patches/patch-ab
new file mode 100644
index 00000000000..5c9cfc36eed
--- /dev/null
+++ b/devel/electric-fence/patches/patch-ab
@@ -0,0 +1,28 @@
+$NetBSD: patch-ab,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+
+--- page.c.orig 2001-04-11 17:44:04.000000000 +0300
++++ page.c
+@@ -29,7 +29,7 @@
+
+ static caddr_t startAddr = (caddr_t) 0;
+
+-#if ( !defined(sgi) && !defined(_AIX) )
++#if ( !defined(sgi) && !defined(_AIX) && !(defined(BSD) && BSD >= 199306) && !defined(linux) && !defined(__INTERIX) )
+ extern int sys_nerr;
+ /*extern char * sys_errlist[];*/
+ #endif
+@@ -39,13 +39,8 @@ stringErrorReport(void)
+ {
+ #if ( defined(sgi) )
+ return strerror(oserror());
+-#elif ( defined(_AIX) )
+- return strerror(errno);
+ #else
+- if ( errno > 0 && errno < sys_nerr )
+- return sys_errlist[errno];
+- else
+- return "Unknown error.\n";
++ return strerror(errno);
+ #endif
+ }
+
diff --git a/devel/electric-fence/patches/patch-ac b/devel/electric-fence/patches/patch-ac
new file mode 100644
index 00000000000..ccd3df4eb21
--- /dev/null
+++ b/devel/electric-fence/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2010/02/14 00:06:16 reed Exp $
+
+--- tstheap.c.orig Fri Jan 20 05:54:32 1995
++++ tstheap.c
+@@ -47,7 +47,7 @@
+
+ for ( ; count < duration; count++ ) {
+ void * * element = &pool[(int)(drand48() * POOL_SIZE)];
+- size_t size = (size_t)(drand48() * (LARGEST_BUFFER + 1));
++ size_t size = (size_t)(lrand48() % (LARGEST_BUFFER + 1));
+
+ if ( *element ) {
+ free( *element );