On 2012-05-07 12:22, Hartmann, O. wrote:
...
> The error I faced was introduced by the port net/libcmis, which in my
> case was built via gcc 4.6 (and doesn't build with CLANG). After
> building libcmis with legacy gcc 4.2.1, I was able to build
> editors/libreoffice without problems (as far as the selected options
> concern).

Here's a diff for the net/libcmis port, to make it compile with clang.
Can someone from ports please apply this?

The software has some very basic C++ problems, such as non-virtual
destructors, and tends to compile everything with -Werror -Wall
-pedantic, so some errors are expected. :)

Another approach, which takes less modifications, is to just run its
configure script with --disable-error.
Index: net/libcmis/files/patch-configure
===================================================================
RCS file: net/libcmis/files/patch-configure
diff -N net/libcmis/files/patch-configure
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libcmis/files/patch-configure	7 May 2012 18:11:21 -0000
@@ -0,0 +1,42 @@
+--- configure.orig	2011-10-04 10:45:11.000000000 +0200
++++ configure	2012-05-07 20:03:00.000000000 +0200
+@@ -3178,19 +3178,6 @@ else
+ 
+ fi
+ 
+-if test x"$enable_werror" != "xno"; then :
+-
+-	CFLAGS="$CFLAGS -Werror"
+-	CXXFLAGS="$CXXFLAGS -Werror"
+-
+-fi
+-if test x"$GCC" = xyes; then :
+-
+-	# Be tough with warnings and produce less careless code
+-	CFLAGS="$CFLAGS -Wall -pedantic"
+-	CXXFLAGS="$CXXFLAGS -Wall -pedantic"
+-
+-fi
+ 
+ LIBCMIS_API_VERSION=0.2
+ 
+@@ -15971,6 +15958,19 @@ fi
+ 
+ ac_config_files="$ac_config_files Makefile libcmis.pc src/Makefile src/libcmis/Makefile"
+ 
++if test x"$enable_werror" != "xno"; then :
++
++	CFLAGS="$CFLAGS -Werror"
++	CXXFLAGS="$CXXFLAGS -Werror"
++
++fi
++if test x"$GCC" = xyes; then :
++
++	# Be tough with warnings and produce less careless code
++	CFLAGS="$CFLAGS -Wall -pedantic"
++	CXXFLAGS="$CXXFLAGS -Wall -pedantic"
++
++fi
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
Index: net/libcmis/files/patch-src__libcmis__atom-document.hxx
===================================================================
RCS file: net/libcmis/files/patch-src__libcmis__atom-document.hxx
diff -N net/libcmis/files/patch-src__libcmis__atom-document.hxx
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libcmis/files/patch-src__libcmis__atom-document.hxx	7 May 2012 18:11:21 -0000
@@ -0,0 +1,11 @@
+--- src/libcmis/atom-document.hxx.orig	2011-10-01 14:26:15.000000000 +0200
++++ src/libcmis/atom-document.hxx	2012-05-07 20:06:51.000000000 +0200
+@@ -44,7 +44,7 @@ class AtomDocument : public libcmis::Doc
+     public:
+         AtomDocument( AtomPubSession* session, std::string url );
+         AtomDocument( AtomPubSession* session, xmlNodePtr entryNd );
+-        ~AtomDocument( );
++        virtual ~AtomDocument( );
+ 
+         // Override content methods
+         virtual FILE* getContent( const char* path = NULL );
Index: net/libcmis/files/patch-src__libcmis__atom-folder.hxx
===================================================================
RCS file: net/libcmis/files/patch-src__libcmis__atom-folder.hxx
diff -N net/libcmis/files/patch-src__libcmis__atom-folder.hxx
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libcmis/files/patch-src__libcmis__atom-folder.hxx	7 May 2012 18:11:21 -0000
@@ -0,0 +1,11 @@
+--- src/libcmis/atom-folder.hxx.orig	2011-09-30 20:52:01.000000000 +0200
++++ src/libcmis/atom-folder.hxx	2012-05-07 20:06:29.000000000 +0200
+@@ -42,7 +42,7 @@ class AtomFolder : public libcmis::Folde
+     public:
+         AtomFolder( AtomPubSession* session, std::string url );
+         AtomFolder( AtomPubSession* session, xmlNodePtr entryNd );
+-        ~AtomFolder( );
++        virtual ~AtomFolder( );
+ 
+         // virtual pure methods from Folder
+         virtual std::vector< libcmis::CmisObjectPtr > getChildren( );
Index: net/libcmis/files/patch-src__libcmis__session.hxx
===================================================================
RCS file: net/libcmis/files/patch-src__libcmis__session.hxx
diff -N net/libcmis/files/patch-src__libcmis__session.hxx
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/libcmis/files/patch-src__libcmis__session.hxx	7 May 2012 18:11:21 -0000
@@ -0,0 +1,10 @@
+--- src/libcmis/session.hxx.orig	2011-09-30 20:38:39.000000000 +0200
++++ src/libcmis/session.hxx	2012-05-07 19:23:43.000000000 +0200
+@@ -36,6 +36,7 @@ namespace libcmis
+     class Session
+     {
+         public:
++            virtual ~Session( ) { }
+ 
+             /** Get the Root folder of the repository
+               */
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to