[vlc-devel] Contrib Tree improvement for MacOSX in clang

Diego Fernando Nieto diegofn at me.com
Sun Nov 13 00:53:14 CET 2011


Hi,

I'm made some testing in the Contrib Tree for Mac OS X using clang since @feepk. upgrade the bootstrap script adding new support for clang

I can share with you the problems and my Patch for it to request upload to the main tree.

libdvbpsi

This library return the following error: http://pastebin.com/sNBWdBZ1
The problem is that clang doesn't have O6, optimization level, Then I patch the configure script with this:ç

--- configure-old   2011-11-07 10:21:50.000000000 -0500
+++ configure   2011-11-07 09:52:04.000000000 -0500
@@ -11655,7 +11655,7 @@

if test "$release" = "true"
then
-  CFLAGS="${CFLAGS} -O6"
+  CFLAGS="${CFLAGS} -O2"
else
   CFLAGS="${CFLAGS} -O2"
fi

And its works. However I don't know how can I publish this changes in a sed command in Makefile or one Patch file in the Patches directory. Can somebody give a clue


live555

I'm download the latest version of live555 and I receive the Patch fail. I suggest to you the following Patch.

@@ -40,13 +40,13 @@ diff -ru live.orig//groupsock/GroupsockHelper.cpp live//groupsock/GroupsockHelpe
 +      freeaddrinfo(res);
        if (addr != 0) {
  	fromAddr.sin_addr.s_addr = addr;
        } else {
 diff -ru live.orig//groupsock/inet.c live//groupsock/inet.c
---- live.orig//groupsock/inet.c	2010-04-09 22:27:39.000000000 +0300
-+++ live//groupsock/inet.c	2010-04-17 20:14:07.000000000 +0300
-@@ -83,16 +83,6 @@
+--- live.orig//groupsock/inet.c.orig	2011-11-12 15:06:09.000000000 -0500
++++ live//groupsock/inet.c	2011-11-12 15:06:26.000000000 -0500
+@@ -76,16 +76,6 @@
  #define NULL 0
  #endif
  
 -#if !defined(VXWORKS)
 -struct hostent* our_gethostbyname(name)
@@ -56,11 +56,11 @@ diff -ru live.orig//groupsock/inet.c live//groupsock/inet.c
 -
 -	return (struct hostent*) gethostbyname(name);
 -}
 -#endif
 -
- #ifndef USE_OUR_RANDOM
+ #ifdef USE_SYSTEM_RANDOM
  /* Use the system-supplied "random()" and "srandom()" functions */
  #include <stdlib.h>
 diff -ru live.orig//groupsock/NetAddress.cpp live//groupsock/NetAddress.cpp
 --- live.orig//groupsock/NetAddress.cpp	2010-04-09 22:27:39.000000000 +0300
 +++ live//groupsock/NetAddress.cpp	2010-04-17 20:13:29.000000000 +0300



libcaca

clang doesn't support weak,alias. My Patch is from libcaca website http://caca.zoy.org/ticket/90

$ cat extras/contrib/src/Patches/libcaca_clang.patch
* ASCII text
--- libcaca/caca/caca.h.orig	2011-11-12 18:02:44.000000000 -0500
+++ libcaca/caca/caca.h	2011-11-12 18:03:06.000000000 -0500
@@ -646,7 +646,7 @@
 #   endif
 
 #   if defined __GNUC__ && __GNUC__ > 3
-#       define CACA_ALIAS(x) __attribute__ ((weak, alias(#x)))
+#       define CACA_ALIAS(x) 
 #   else
 #       define CACA_ALIAS(x)
 #   endif

Makefile

For last, my Makefile script to run the new Patches

@@ -1264,11 +1264,11 @@ ifdef HAVE_BIGENDIAN
 LIVE_TARGET-$(HAVE_UCLIBC)    = armeb-uclib
 endif
 
 LIVE_PATCH-$(ENABLED)        =
 LIVE_PATCH-$(HAVE_WINCE)     = sed -e 's/-lws2_32/-lws2/g' -i.orig config.mingw
-LIVE_PATCH-$(HAVE_DARWIN_OS) = sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%'  -e 's%c++%$(CXX)\ $(EXTRA_LDFLAGS)%' -i.orig  config.macosx
+LIVE_PATCH-$(HAVE_DARWIN_OS) = sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%'  -e 's%c++%$(CXX)\ $(EXTRA_LDFLAGS)%' -e 's%libtool\ -s\ -o%ar\ cr%' -i.orig  config.macosx
 LIVE_PATCH-$(HAVE_LINUX)     = sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head
 
 ifndef HAVE_UCLIBC
 ifneq ($(ARCH),armel)
 LIVE_PATCH-$(HAVE_LINUX)    += ; sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux
@@ -1335,10 +1335,11 @@ libcaca-$(LIBCACA_VERSION).tar.gz:
 
 libcaca: libcaca-$(LIBCACA_VERSION).tar.gz
 	$(EXTRACT_GZ)
 ifdef HAVE_MACOSX
 	patch -p0 < Patches/libcaca-osx-sdkofourchoice.patch
+	patch -p0 < Patches/libcaca_clang.patch
 	(cd $@; sed -e 's%/Developer/SDKs/MacOSX10.4u.sdk%$(MACOSX_SDK)%' -i.orig  configure)
 endif
 ifdef HAVE_WIN32
 	patch -p0 < Patches/libcaca-win32-static.patch
 endif


gcrypt

Currently, I have the following error compiling gcrypt. somebody knows the reason :( http://pastebin.com/uhKbz8rU

I hope that this patches are useful for you. Greetings from Colombia

Sincerely,



Diego Fernando Nieto
------------------------------
VLC User

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111112/7bca5fe1/attachment.html>


More information about the vlc-devel mailing list