From nobody@FreeBSD.org  Wed Sep  1 22:16:44 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EECF010656B3
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Sep 2010 22:16:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C3CDC8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Sep 2010 22:16:44 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o81MGiES026671
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Sep 2010 22:16:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o81MGicN026669;
	Wed, 1 Sep 2010 22:16:44 GMT
	(envelope-from nobody)
Message-Id: <201009012216.o81MGicN026669@www.freebsd.org>
Date: Wed, 1 Sep 2010 22:16:44 GMT
From: Rodrigo OSORIO <rodrigo@bebik.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: audio/lmms : port fix
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150205
>Category:       ports
>Synopsis:       audio/lmms : port fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 01 22:20:04 UTC 2010
>Closed-Date:    Fri Sep 03 09:39:04 UTC 2010
>Last-Modified:  Fri Sep  3 09:40:07 UTC 2010
>Originator:     Rodrigo OSORIO
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD home 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
audio/lmms was broken due to incompatibles calls to scandir(3) function in different versions of FreeBSD.

FreeBSD < 80501 and between 900000 and  900006 uses the old version :
int scandir(const char *dirname, struct dirent ***namelist,
	 int (*select)(struct dirent *),
	 int (*compar)(const void *, const void *));

When the versions >= 80501 in 8 branch and > 900006 in 9 branch uses the IEEE
Std 1003.1-2008 version :
int scandir(const char *dirname, struct dirent ***namelist,
	 int (*select)(const struct dirent *),
	 int (*compar)(const struct dirent **, const struct dirent **));

This patch tries to fix the problem for all the versions, including the current branch.

Also request the port maintnership.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ru lmms/Makefile lmms-new/Makefile
--- lmms/Makefile	2010-09-01 23:47:46.000000000 +0200
+++ lmms-new/Makefile	2010-09-01 23:46:46.000000000 +0200
@@ -7,12 +7,12 @@
 
 PORTNAME=	lmms
 PORTVERSION=	0.4.6
-PORTREVISION=	2
+PORTREVISION=	3
 PORTEPOCH=	1
 CATEGORIES=	audio
 MASTER_SITES=	SF
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	rodrigo@bebik.net
 COMMENT=	An all-in-one sequencer, drum machine, sampler and more
 
 BUILD_DEPENDS=	${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa
@@ -54,10 +54,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 800501
-BROKEN=		does not build
-.endif
-
 .if defined(WITH_JACK)
 LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
 .else
diff -ru lmms/files/patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx lmms-new/files/patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx
--- lmms/files/patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx	2010-09-01 23:47:46.000000000 +0200
+++ lmms-new/files/patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx	2010-09-01 23:26:45.000000000 +0200
@@ -16,7 +16,7 @@
  #ifndef HAVE_SCANDIR
    int n = scandir(d, list, 0, sort);
 -#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 )
-+#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) || (defined(__FreeBSD__) && __FreeBSD_version >= 900006)
++#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) || (defined(__FreeBSD__) && ( (__FreeBSD_version < 900000 && __FreeBSD_version >= 800501) || (__FreeBSD_version >= 900006)))
    // HP-UX, Cygwin and POSIX (2008) define the comparison function like this:
    int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
  #elif defined(__osf__)


>Release-Note:
>Audit-Trail:

From: "Rodrigo OSORIO (ros)" <rodrigo@bebik.net>
To: bug-followup@FreeBSD.org, rodrigo@bebik.net
Cc:  
Subject: Re: ports/150205: audio/lmms : port fix
Date: Thu, 02 Sep 2010 00:27:36 +0200

 I forgot, this pr may close the ports/144036 one....
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Sep 3 08:39:27 UTC 2010 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150205 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150205: commit references a PR
Date: Fri,  3 Sep 2010 09:39:02 +0000 (UTC)

 pav         2010-09-03 09:38:53 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/lmms           Makefile 
     audio/lmms/files     
                          patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx 
   Log:
   - Unbreak on recent 8.X
   - Grant maintainership to the submitter
   
   PR:             ports/150205
   Submitted by:   Rodrigo OSORIO <rodrigo@bebik.net>
   
   Revision  Changes    Path
   1.31      +1 -5      ports/audio/lmms/Makefile
   1.2       +1 -1      ports/audio/lmms/files/patch-plugins__zynaddsubfx__fltk__src__filename_list.cxx
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
