Fix Meson build with mostly everything enabled. meson

Fri, 16 Jun 2017 02:30:21 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Fri, 16 Jun 2017 02:30:21 -0400
branch
meson
changeset 38503
fbf8f6020744
parent 38502
448ad2f8f29d
child 38504
dc50aedf5c91

Fix Meson build with mostly everything enabled.

Skip unity integration and external zephyr options because the dependencies
are not available on Fedora.

meson.build file | annotate | diff | comparison | revisions
pidgin/meson.build file | annotate | diff | comparison | revisions
pidgin/plugins/cap/meson.build file | annotate | diff | comparison | revisions
--- a/meson.build	Fri Jun 16 02:01:19 2017 -0400
+++ b/meson.build	Fri Jun 16 02:30:21 2017 -0400
@@ -564,18 +564,24 @@
 	# Check for stuff needed by the Evolution integration plugin.
 	#######################################################################
 	if enable_gevolution
-		evo_deps = ['libebook-1.2', 'libedata-book-1.2', 'evolution-data-server-1.2 >= 3.6']
+		evo_deps = [
+		    ['libebook-1.2', []],
+		    ['libedata-book-1.2', []],
+		    ['evolution-data-server-1.2', '>= 3.6']
+		]
 		EVOLUTION_ADDRESSBOOK = []
 		foreach dep : evo_deps
-			EVOLUTION_ADDRESSBOOK.append(
-				dependency(dep, required : force_deps)
-			)
+			EVOLUTION_ADDRESSBOOK += [
+			    dependency(dep[0], version : dep[1], required : force_deps)
+			]
+			if not EVOLUTION_ADDRESSBOOK[-1].found()
+				enable_gevolution = false
+			endif
 		endforeach
-		if enable_gevolution
-			conf.set('HAVE_EVOLUTION_ADDRESSBOOK', true)
-#			AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
-#			AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
-		endif
+	endif
+	conf.set('HAVE_EVOLUTION_ADDRESSBOOK', enable_gevolution)
+	if not enable_gevolution
+		EVOLUTION_ADDRESSBOOK = []
 	endif
 
 	#######################################################################
@@ -596,6 +602,8 @@
 		else
 			enable_gcr = false
 		endif
+	else
+		GCR = []
 	endif
 
 
@@ -1118,9 +1126,6 @@
 		dependency('messaging-menu', version : '>= 12.10')
 	]
 	USES_MM_CHAT_SECTION = 'X-MessagingMenu-UsesChatSection=true'
-#	AC_SUBST(UNITY_CFLAGS)
-#	AC_SUBST(UNITY_LIBS)
-#	AC_SUBST(USES_MM_CHAT_SECTION)
 endif
 ENABLE_UNITY = enable_unity
 
@@ -1541,37 +1546,14 @@
 # Check for external libzephyr
 #######################################################################
 zephyr = get_option('zephyr')
-EXTERNAL_LIBZEPHYR = zephyr
-#AC_SUBST(ZEPHYR_CFLAGS)
-#AC_SUBST(ZEPHYR_LDFLAGS)
-#AC_SUBST(ZEPHYR_LIBS)
 if zephyr
-#	if test '$zephyr' != 'yes' ; then
-#		ZEPHYR_CFLAGS='-I${zephyr}/include'
-#		ZEPHYR_LDFLAGS='-L${zephyr}/lib'
-#	elif test -d /usr/athena/include/zephyr ; then
-#		ZEPHYR_CFLAGS='-I/usr/athena/include'
-#	elif test -d /usr/include/zephyr ; then
-#		ZEPHYR_CFLAGS='-I/usr/include'
-#	elif test -d /usr/local/include/zephyr ; then
-#		ZEPHYR_CFLAGS='-I/usr/local/include'
-#	fi
-	conf.set('LIBZEPHYR_EXT', true)
-	EXTERNAL_LIBZEPHYR = zephyr
-#	orig_LDFLAGS='$LDFLAGS'
-#	LDFLAGS='$LDFLAGS $ZEPHYR_LDFLAGS'
-#	AC_CHECK_LIB(zephyr, ZInitialize,
-#		[ZEPHYR_LIBS='-lzephyr'],
-#		[AC_MSG_ERROR([Zephyr libraries not found])],
-#		-lzephyr)
-#	orig_LIBS='$LIBS'
-#	LIBS='$orig_LIBS'
-#	LDFLAGS='$orig_LDFLAGS'
+	ext_zephyr = dependency('zephyr', required : force_deps)
+	zephyr = ext_zephyr.found()
+else
 	ext_zephyr = []
 endif
-if not zephyr
-	ext_zephyr = []
-endif
+EXTERNAL_LIBZEPHYR = zephyr
+conf.set('LIBZEPHYR_EXT', EXTERNAL_LIBZEPHYR)
 
 #AC_MSG_CHECKING(for me pot o' gold)
 #AC_MSG_RESULT(no)
--- a/pidgin/meson.build	Fri Jun 16 02:01:19 2017 -0400
+++ b/pidgin/meson.build	Fri Jun 16 02:30:21 2017 -0400
@@ -143,7 +143,7 @@
 	    include_directories : [toplevel_inc],
 	    soversion : purple_lt_current,
 	    version : PURPLE_LT_VERSION_INFO,
-	    dependencies : [gtk, gstreamer_video, webkit, enchant, dbus, x11, sm, xss, libpurple_dep, glib, math],
+	    dependencies : [gtk, gstreamer_video, webkit, enchant, dbus, x11, sm, xss, GCR, libpurple_dep, glib, math],
 	    install : true)
 	libpidgin_dep = declare_dependency(
 	    include_directories : [toplevel_inc, libpidgin_inc],
--- a/pidgin/plugins/cap/meson.build	Fri Jun 16 02:01:19 2017 -0400
+++ b/pidgin/plugins/cap/meson.build	Fri Jun 16 02:30:21 2017 -0400
@@ -1,6 +1,6 @@
 if PLUGINS
 	cap = library('cap', 'cap.c', 'cap.h', 'cap_statistics.h',
-	    dependencies : [sqlite, libpurple_dep, libpidgin_dep, glib],
+	    dependencies : [SQLITE3, libpurple_dep, libpidgin_dep, glib],
 	    name_prefix : '',
 	    install : true, install_dir : PIDGIN_PLUGINDIR)
 endif

mercurial