# -*- coding: ascii; tab-width: 4; x-counterpart: duma.patch -*-
Package: duma
Version: 2.5.15
Revision: 1
Description: Detect Unintended Memory Access
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>
Homepage: http://duma.sourceforge.net/
License: GPL2+
DescDetail: <<
DUMA is an open-source library (under GNU General Public License) to detect
buffer overruns and under-runs in C and C++ programs.
This library is a fork of Buce Perens Electric Fence library and adds some
new features to it. Features of the DUMA library:
	*	"overloads" all standard memory allocation functions like
		malloc(), calloc(), memalign(), strdup(), operator new, operator new[]
		and also their counterpart deallocation functions like free(),
		operator delete and operator delete[]
	*	utilizes the MMU (memory management unit) of the CPU:
		allocates and protects an extra memory page to detect any illegal
		access beyond the top of the buffer (or bottom, at the user's option)
	*	stops the program at exactly that instruction, which does the
		erroneous access to the protected memory page,
		allowing location of the defectice source code in a debugger
	*	detects erroneous writes at the non-protected end of the memory
		block at deallocation of the memory block
	*	detects mismatch of allocation/deallocation functions: f.e.
		allocation with malloc() but deallocation with operator delete
	*	leak detection: detect memory blocks which were not deallocated
		until program exit
	*	runs on Linux / U*ix and MS Windows NT/2K/XP operating systems
	*	preloading of the library on Linux (and some U*ix) systems
		allowing tests without necessity of changing source code or
		recompilation
<<
DescUsage: <<
	Link programs against libduma.a or use the "duma" script to run
	a single executable with libduma.dylib. You can also run a program
	with (export LD_PRELOAD=%p/lib/libduma.0.dylib; \
	export DYLD_INSERT_LIBRARIES=%p/lib/libduma.0.dylib; \
	export DYLD_FORCE_FLAT_NAMESPACE=1; exec programname)
<<

Source: mirror:sourceforge:%n/%n_2_5_15.tar.gz
Source-Checksum: SHA256(baaf794854e3093ad1bddadbfb8ad4b220a7117d70359ee216bd59e353734e17)

PatchFile: %n.patch
PatchFile-MD5: f649dcb63161693a435c4841e172b7f4
PatchScript: sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1

Depends: %n-shlibs (= %v-%r)
BuildDepends: fink (>= 0.24.12-1)

UseMaxBuildJobs: false

CompileScript: make prefix=%p OS=osx DUMASO=libduma.0.dylib

InfoTest: TestScript: make check prefix=%p OS=osx DUMASO=libduma.0.dylib || exit 2

InstallScript: make install prefix=%i OS=osx DUMASO=libduma.0.dylib

DocFiles: CHANGELOG COPYING* README.txt TODO

SplitOff: <<
	Package: %N-shlibs
	
	Files: lib/libduma.0.dylib
	Shlibs: %p/lib/libduma.0.dylib 1.0.0 %n (>= 2.5.15-1)
	
	DocFiles: CHANGELOG COPYING* README.txt TODO
<<

SplitOff2: <<
	Package: %N-dev
	
	Depends: %N-shlibs (= %v-%r)
	BuildDependsOnly: true
	
	Files: include lib
	
	DocFiles: CHANGELOG COPYING* README.txt TODO
<<