pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

audio/libsndfile with sun studio



Hi,

here are tow patches needed to compile libsndfile with sun studio.
patch-aa fixes src/common.h so that it knows how to define a 64bit integer constant. I took it from opensolaris (http://jucr.opensolaris.org/files/425/1014/patch/libsndfile-01-common.diff)

The patch on the Makefile is needed, because sun studio needs the option -features=extensions to have a __func__ macro defined (http://docs.sun.com/app/docs/doc/819-5267/bkaeo?a=view)

Daniel

$NetBSD$

--- Makefile.orig       2009-05-18 13:08:50.608183737 +0200
+++ Makefile
@@ -36,6 +36,11 @@ CONFIGURE_ENV+=              ac_cv_c_struct_hack=yes
 BUILDLINK_PASSTHRU_DIRS+=      /Developer
 .endif
 
+# Needed for sun studio having __func__ defined
+.if ${PKGSRC_COMPILER} == "sunpro"
+CFLAGS+=        -features=extensions
+.endif
+
 .include "../../audio/flac/buildlink3.mk"
 #BUILDLINK_API_DEPENDS.libvorbis+=     libvorbis>=1.2.1
 .include "../../audio/libvorbis/buildlink3.mk"
$NetBSD$

--- src/common.h.orig   2009-02-13 22:24:08.000000000 +0100
+++ src/common.h
@@ -39,7 +39,7 @@
 
 #if (SIZEOF_LONG == 8)
 #      define  SF_PLATFORM_S64(x)              x##l
-#elif COMPILER_IS_GCC
+#elif COMPILER_IS_GCC || __SUNPRO_C
 #      define  SF_PLATFORM_S64(x)              x##ll
 #elif OS_IS_WIN32
 #      define  SF_PLATFORM_S64(x)              x##I64


Home | Main Index | Thread Index | Old Index