- Include a patch from FreeBSD which fixes a problem with DSSI.

- Use pkgsrc-provided pthread flags, and make sure they're added to
   pkg-config.

 - This package [I think] needs a thread-safe resolver, so add that.

 - Remove BUILDLINK_DEPMETHOD?= build from b3.mk file; I cannot
   see how this could be a good default (the package I'm working on
   certainly needs to link against it).

 - Add DESTDIR support.

 - This is probably good enough to import to pkgsrc now, though I'm
   not 100% certain about the resolver/threading stuff.

 - Bump rev.
This commit is contained in:
Blair Sadewitz 2008-02-17 22:16:29 +00:00 committed by Thomas Klausner
parent 6b00eb684c
commit 644470bbfe
5 changed files with 82 additions and 8 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.3 2007/04/26 12:28:47 netcap Exp $
# $NetBSD: Makefile,v 1.4 2008/02/17 22:16:29 bsadewitz Exp $
#
DISTNAME= liblo-0.24
PKGREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=liblo/}
@ -9,11 +10,24 @@ MAINTAINER= jfranz@bsdprojects.net
HOMEPAGE= http://liblo.sourceforge.net/
COMMENT= Lightweight Open Sound Control implementation
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
USE_LANGUAGES= c
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
CFLAGS+= ${PTHREAD_CFLAGS}
PKGCONFIG_OVERRIDE+= liblo.pc.in
PTHREAD_OPTS+= require
RESOLV_AUTO_VARS= yes # gethostbyname and friends
SUBST_CLASSES= conf
SUBST_FILES.conf= configure Makefile.in src/Makefile.in liblo.pc.in
SUBST_MESSAGE.conf= Performing build-time configuration substitutions.
SUBST_SED.conf= -e 's,-lpthread,$${PTHREAD_LDFLAGS} $${PTHREAD_LIBS},'
SUBST_STAGE.conf= post-patch
SUBST_VARS.conf= PTHREAD_CFLAGS PTHREAD_LDFLAGS PTHREAD_LIBS
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/resolv.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2007/01/16 13:00:49 netcap Exp $
# $NetBSD: buildlink3.mk,v 1.2 2008/02/17 22:16:30 bsadewitz Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBLO_BUILDLINK3_MK:= ${LIBLO_BUILDLINK3_MK}+
@ -14,7 +14,8 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}liblo
.if ${LIBLO_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.liblo+= liblo>=0.23
BUILDLINK_PKGSRCDIR.liblo?= ../../wip/liblo
BUILDLINK_DEPMETHOD.liblo?= build
.endif # LIBLO_BUILDLINK3_MK
.include "../../mk/pthread.buildlink3.mk"
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

View file

@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.2 2007/04/26 12:28:47 netcap Exp $
$NetBSD: distinfo,v 1.3 2008/02/17 22:16:30 bsadewitz Exp $
SHA1 (liblo-0.24.tar.gz) = 429505bcb00b789811e0c90ad7130e5976e613c1
RMD160 (liblo-0.24.tar.gz) = d40cfb849cb84924a03800ba7de21b1134862e1d
Size (liblo-0.24.tar.gz) = 432285 bytes
SHA1 (patch-aa) = bb6bcd986611e860d6deb9ee6361c6d112a43786
SHA1 (patch-ab) = ec91b6954be3261193afb44ef894d2bc0926b390
SHA1 (patch-ac) = 790a52fdb7d66a724f156e37c8c5a1f6cd3aa062

45
liblo/patches/patch-ab Normal file
View file

@ -0,0 +1,45 @@
$NetBSD: patch-ab,v 1.1 2008/02/17 22:16:30 bsadewitz Exp $
--- src/server.c.orig 2007-03-21 19:48:37.000000000 -0400
+++ src/server.c
@@ -659,38 +659,11 @@ static void dispatch_method(lo_server s,
//inet_ntop(s->addr.ss_family, &s->addr.padding, hostname, sizeof(hostname));
if (s->protocol == LO_UDP) {
- err = getnameinfo((struct sockaddr *)&s->addr, sizeof(s->addr),
+ err = getnameinfo((struct sockaddr *)&s->addr, s->addr.ss_len,
hostname, sizeof(hostname), portname, sizeof(portname),
NI_NUMERICHOST | NI_NUMERICSERV);
if (err) {
- switch (err) {
- case EAI_AGAIN:
- lo_throw(s, err, "Try again", path);
- break;
- case EAI_BADFLAGS:
- lo_throw(s, err, "Bad flags", path);
- break;
- case EAI_FAIL:
- lo_throw(s, err, "Failed", path);
- break;
- case EAI_FAMILY:
- lo_throw(s, err, "Cannot resolve address family", path);
- break;
- case EAI_MEMORY:
- lo_throw(s, err, "Out of memory", path);
- break;
- case EAI_NONAME:
- lo_throw(s, err, "Cannot resolve", path);
- break;
-#ifndef WIN32
- case EAI_SYSTEM:
- lo_throw(s, err, strerror(err), path);
- break;
-#endif
- default:
- lo_throw(s, err, "Unknown error", path);
- break;
- }
+ lo_throw(s, err, gai_strerror(err), path);
return;
}

12
liblo/patches/patch-ac Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: patch-ac,v 1.1 2008/02/17 22:16:30 bsadewitz Exp $
--- liblo.pc.in.orig 2007-03-21 19:48:37.000000000 -0400
+++ liblo.pc.in
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: liblo
Version: @PACKAGE_VERSION@
Description: A lightweight OSC server/client library
-Libs: -L${libdir} -llo -lpthread
-Cflags: -I${includedir}
+Libs: -L${libdir} -llo @PTHREAD_LDFLAGS@ @PTHREAD_LIBS@
+Cflags: -I${includedir} @PTHREAD_CFLAGS@