Start transitioning everyting over to meson
--- a/Makefile.example Mon Aug 07 20:40:31 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-PIDGIN_TREE_TOP ?= ../pidgin-2.12.0
-WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
-PLUGIN_NAME := helloworld
-PLUGIN_SOURCES := helloworld.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hello-world.c Mon Aug 07 21:11:37 2017 -0500
@@ -0,0 +1,66 @@
+ * HelloWorld - A hello world libpurple plugin + * Copyright (C) 2006 John Bailey <rekkanoryo@rekkanoryo.org> + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +plugin_load(PurplePlugin *plugin) { + PURPLE_NOTIFY_MSG_INFO, + "This is the Hello World! plugin :)", +static PurplePluginInfo info = { + .magic = PURPLE_PLUGIN_MAGIC, + .major_version = PURPLE_MAJOR_VERSION, + .minor_version = PURPLE_MINOR_VERSION, + .type = PURPLE_PLUGIN_STANDARD, + .priority = PURPLE_PRIORITY_DEFAULT, + .id = "core-hello_world", + .name = "Hello World!", + .version = PLUGIN_VERSION, + .summary = "Hello World Plugin", + .description = "Hello World Plugin", + .author = "My Name <email@helloworld.tld>", + .homepage = "http://helloworld.tld", +init_plugin(PurplePlugin *plugin) { +PURPLE_INIT_PLUGIN(hello_world, init_plugin, info); --- a/helloworld.c Mon Aug 07 20:40:31 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
- * HelloWorld - A hello world libpurple plugin
- * Copyright (C) 2006 John Bailey <rekkanoryo@rekkanoryo.org>
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-plugin_load(PurplePlugin *plugin) {
- PURPLE_NOTIFY_MSG_INFO,
- "This is the Hello World! plugin :)",
-static PurplePluginInfo info = {
- .magic = PURPLE_PLUGIN_MAGIC,
- .major_version = PURPLE_MAJOR_VERSION,
- .minor_version = PURPLE_MINOR_VERSION,
- .type = PURPLE_PLUGIN_STANDARD,
- .priority = PURPLE_PRIORITY_DEFAULT,
- .id = "core-hello_world",
- .name = "Hello World!",
- .version = PLUGIN_VERSION,
- .summary = "Hello World Plugin",
- .description = "Hello World Plugin",
- .author = "My Name <email@helloworld.tld>",
- .homepage = "http://helloworld.tld",
-init_plugin(PurplePlugin *plugin) {
-PURPLE_INIT_PLUGIN(hello_world, init_plugin, info);
--- a/libpurple.mk Mon Aug 07 20:40:31 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-# skeleton-libpurple - A skeleton for developing libpurple plugins
-# Copyright (C) 2017 Gary Kramlich <grim@reaperworld.com>
-# Copyright (C) 2016-2017 Eion Robb <eion@robbmob.com>
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# figure out the os and set the proper variables for it
-ifeq ($(OS),Windows_NT) # window
-PLUGIN_TARGET := $(PLUGIN_NAME).dll
-# set the platform cflags and libs
-PLATFORM_CFLAGS := $(PLUGIN_CFLAGS_WIN32)
-PLATFORM_LIBS := $(PLUGIN_LIBS_WIN32)
-# set the variables for windows that are usually populated by pkg-config
-CC ?= $(WIN32_DEV_TOP)/mingw-4.7.2/bin/gcc
-LIBPURPLE_PLUGIN_DIR := $(PROGRAMFILES)/Pidgin/plugins
-PLUGIN_PIXMAPSDIR := $(PROGRAMFILES)/Pidgin/pixmaps/pidgin
- -I$(WIN32_DEV_TOP)/glib-2.28.8/include \
- -I$(WIN32_DEV_TOP)/glib-2.28.8/include/glib-2.0 \
- -I$(WIN32_DEV_TOP)/glib-2.28.8/lib/glib-2.0/include \
- -I$(PIDGIN_TREE_TOP)/libpurple \
- -L$(WIN32_DEV_TOP)/glib-2.28.8/lib \
- -L$(PIDGIN_TREE_TOP)/libpurple \
-PLUGIN_TARGET := $(PLUGIN_NAME).so
-UNAME_S := $(shell uname -s)
-ifeq ($(UNAME_S),Darwin)
-PLATFORM_CFLAGS := $(PLUGIN_CFLAGS_DARWIN)
-PLATFORM_LIBS := $(PLUGIN_LIBS_DARWIN)
-PLATFORM_CFLAGS := $(PLUGIN_CFLAGS_LINUX)
-PLATFORM_LIBS := $(PLUGIN_LIBS_LINUX)
-# set a bunch of variables if there weren't set already
- -Wall -Wextra -Werror -Wformat \
- -Wno-deprecated-declarations -Wno-unused-parameter \
-# pkg-config if necessary
-PKG_CONFIG ?= pkg-config
-LIBPURPLE_PC_MODULE ?= purple
-LIBPURPLE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags $(LIBPURPLE_PC_MODULE))
-LIBPURPLE_LIBS ?= $(shell $(PKG_CONFIG) --libs $(LIBPURPLE_PC_MODULE))
-LIBPURPLE_PLUGIN_DIR ?= $(shell $(PKG_CONFIG) --variable=plugindir $(LIBPURPLE_PC_MODULE))
-LIBPURPLE_DATA_DIR ?= $(shell $(PKG_CONFIG) --variable=datadir $(LIBPURPLE_PC_MODULE))
-LIBPURPLE_LIB_DIR ?= $(shell $(PKG_CONFIG) --variable=libdir $(LIBPURPLE_PC_MODULE))
-PLUGIN_PIXMAPSDIR := $(LIBPURPLE_DATA_DIR)/pixmaps/pidgin
-# Variables that are platform independent
-PLUGIN_OBJECTS := $(PLUGIN_SOURCES:%.c=%.o)
- -DDATADIR=$(LIBPURPLE_DATA_DIR) \
- -DLIBDIR=$(LIBPURPLE_LIB_DIR) \
- -DPIXMAPSDIR=$(PLUGIN_PIXMAPSDIR) \
- -DPLUGIN_VERSION=\"$(PLUGIN_VERSION)\"
-# Generate a list of destination of the pixmaps to install
-INSTALLED_PIXMAPS := $(PLUGIN_PIXMAPS:%=$(PLUGIN_PIXMAPSDIR)/%)
-# Generate a list of protocol icons based on their sizes. We need to stash
-# everything in a temp variable so that we can do the final substitution.
-INSTALLED_PROTOCOL_PIXMAPS :=
-_PIXMAP_TEMP := $(subst 16,,$(filter %16.png,$(PROTOCOL_PIXMAPS)))
-INSTALLED_PROTOCOL_PIXMAPS += $(_PIXMAP_TEMP:%=$(PLUGIN_PIXMAPSDIR)/protocols/16/%)
-_PIXMAP_TEMP := $(subst 22,,$(filter %22.png,$(PROTOCOL_PIXMAPS)))
-INSTALLED_PROTOCOL_PIXMAPS += $(_PIXMAP_TEMP:%=$(PLUGIN_PIXMAPSDIR)/protocols/22/%)
-_PIXMAP_TEMP := $(subst 48,,$(filter %48.png,$(PROTOCOL_PIXMAPS)))
-INSTALLED_PROTOCOL_PIXMAPS += $(_PIXMAP_TEMP:%=$(PLUGIN_PIXMAPSDIR)/protocols/48/%)
-_PIXMAP_TEMP := $(subst scaled,,$(filter %scaled.svg,$(PROTOCOL_PIXMAPS)))
-INSTALLED_PROTOCOL_PIXMAPS += $(_PIXMAP_TEMP:%=$(PLUGIN_PIXMAPSDIR)/protocols/scaled/%)
-.PHONY: all clean install uninstall
- rm -f $(PLUGIN_OBJECTS) $(PLUGIN_TARGET) $(CLEAN_FILES)
-install: $(PLUGIN_TARGET) $(INSTALLED_PIXMAPS) $(INSTALLED_PROTOCOL_PIXMAPS)
- install -D $(PLUGIN_TARGET) $(LIBPURPLE_PLUGIN_DIR)/$(PLUGIN_TARGET)
-# This target will fulfill the dependency of the INSTALLED_PIXMAPS variable above
-$(PLUGIN_PIXMAPSDIR)/%: %
- install -D -m 644 $< $@
-$(PLUGIN_PIXMAPSDIR)/protocols/16/%.png: %16.png
- install -D -m 644 $< $@
-$(PLUGIN_PIXMAPSDIR)/protocols/22/%.png: %22.png
- install -D -m 644 $< $@
-$(PLUGIN_PIXMAPSDIR)/protocols/48/%.png: %48.png
- install -D -m 644 $< $@
-$(PLUGIN_PIXMAPSDIR)/protocols/scaled/%.svg: %scaled.svg
- install -D -m 644 $< $@
- rm -f $(LIBPURPLE_PLUGIN_DIR)/$(PLUGIN_TARGET)
- rm -f $(INSTALLED_PIXMAPS) $(INSTALLED_PROTOCOL_PIXMAPS)
-%.o: %.c $(MAKEFILE_LIST)
- $(CC) $(CFLAGS) $(ADDITIONAL_CFLAGS) $(PLATFORM_CFLAGS) $(LIBPURPLE_CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<
-$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(PLUGIN_HEADERS) $(MAKEFILE_LIST) $(PLUGIN_DEPENDENCIES)
- $(CC) -o $@ -shared $(PLUGIN_OBJECTS) $(LDFLAGS) $(PLUGIN_LIBS) $(LIBS) $(LIBPURPLE_LIBS) $(PLATFORM_LIBS)
- echo $(PROTOCOL_PIXMAPS_16)
- echo $(PROTOCOL_PIXMAPS_22)
- echo $(PROTOCOL_PIXMAPS_48)
- echo $(PROTOCOL_PIXMAPS_SCALED)
- echo $(INSTALLED_PROTOCOL_PIXMAPS)
- echo $(PLUGIN_PIXMAPSDIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meson.build Mon Aug 07 21:11:37 2017 -0500
@@ -0,0 +1,27 @@
+plugin_name = 'hello-world' + '-DPREFIX="@0@"'.format(get_option('prefix')), + '-DLIBDIR="@0@"'.format(get_option('libdir')), + '-DPLUGIN_VERSION="@0@"'.format(meson.project_version()), +PURPLE = dependency('purple', version: '>=2.0.0') +shared_library(plugin_name, + dependencies: [PURPLE], + install_dir: PURPLE.get_pkgconfig_variable('plugindir'),