PortSystem 1.0

name		libpdel
version		0.6.1
revision	2
categories	devel www
license		Permissive BSD
maintainers	nomaintainer
description	Packet Design multi-purpose C library for embedded applications.

long_description	The Packet Design Embedded Library (PDEL) is a kitchen \
		sink C library containing an assorted collection of code \
		useful for developing embedded applications: \
		-   C data structure run-time introspection library \
		-   Threaded HTTP client/server library with SSL and XML-RPC support \
		-   PPP library using netgraph(4) with PPTP and L2TP servers \
		-   Application configuration framework \
		-   Heap memory accounting and sanity checking \
		-   Generic template processing library \
		-   Routines to configure networking interfaces, ARP and routing tables \
		-   Logging library \
		-   Generic TCP server \
		-   Generic hash table implementation \
		-   Generic balanced tree implementation \
		-   Miscellaneous FILE * enhancements \
		-   Base-64 encoding/decoding \
		-   Events and actions with automated locking \
		-   Generalized per-thread variables \
		-   Message ports \
		-   Digital signature creation/verification \
		-   Filesystem mounting/unmounting \
		-   String quoting/parsing

homepage	https://web.archive.org/web/20080925073208/http://www.dellroad.org/pdel/index
platforms	darwin

depends_lib	port:expat \
		path:lib/libssl.dylib:openssl

master_sites	sourceforge:project/libpdel/libpdel-combined/${version}
use_bzip2	yes
checksums	md5 13af4b8eb09602838e99c41a05712f56 \
		sha1 dad96204f2d4f737326d8622f069bb74186c84f9 \
		rmd160 5e99afa267fd20e6bfff2437b01065d85063f4a7

worksrcdir	${name}-${version}/pdel

# Darwin's sendfile() has a different prototype, so we skip the optimization.
patchfiles	GNUmakefile.patch \
		http_servlet_file.c.patch \
		pd_port.h.patch \
		http_http_server.patch \
		ppp_ppp__msoft.c.patch

post-patch {
    file copy -force ${filespath}/Darwin ${worksrcpath}/ports/
}

build.type	gnu
build.args	prefix=${prefix} \
		mandir=${prefix}/share/man \
		cc=${configure.cc} \
		MP_CFLAGS="${configure.cflags} [get_canonical_archflags cc]"
destroot.args	{*}${build.args}

use_configure	no
