summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--Makefile56
-rw-r--r--PKGBUILD35
-rw-r--r--replace_internal_h.patch59
4 files changed, 169 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..66094adc1d2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Sun Dec 6 21:28:02 UTC 2015
+pkgbase = pidgin-quote-text
+ pkgdesc = Quote selected message into the entry area
+ pkgver = 0.9.3
+ pkgrel = 2
+ url = https://launchpad.net/quote/
+ arch = any
+ license = GPL2
+ depends = pidgin
+ source = git://github.com/pomozoff/quotetext.git
+ source = replace_internal_h.patch
+ source = Makefile
+ md5sums = SKIP
+ md5sums = 876d904e0dd3a65acda07a0de0218267
+ md5sums = ea42e6a112fc97896f5b09fe12e27fd6
+
+pkgname = pidgin-quote-text
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..1d107d1729d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,56 @@
+#
+# pidgin-quote-text Makefile
+#
+# Copyright 2015 Glinsky Vladislav <cl0ne[at]mithril.org.ua>
+#
+# Copied from:
+# Pidgin-Latex Plugin Makefile
+# Copyright 2004-2009 Edouard Geuten <thegrima AT altern DOT 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+CC := gcc
+LIBTOOL := libtool
+
+ifeq ($(DESTDIR),)
+ LIB_INSTALL_DIR = $(HOME)/.purple/plugins
+else
+ LIB_INSTALL_DIR = $(DESTDIR)/lib/pidgin
+endif
+
+PIDGIN_QUOTE = quote_text
+
+GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags)
+GTK_LIBS = $(shell pkg-config gtk+-2.0 --libs)
+
+PIDGIN_CFLAGS = $(shell pkg-config pidgin --cflags)
+PIDGIN_LIBS = $(shell pkg-config pidgin --libs)
+PIDGIN_LIBDIR = $(shell pkg-config --variable=libdir pidgin)/pidgin
+
+all: $(PIDGIN_QUOTE).so
+
+install: all
+ mkdir -p $(LIB_INSTALL_DIR)
+ cp $(PIDGIN_QUOTE).so $(LIB_INSTALL_DIR)
+
+$(PIDGIN_QUOTE).so: $(PIDGIN_QUOTE).o
+ $(CC) $(LDFLAGS) -shared $(CFLAGS) $< -o $@ $(PIDGIN_LIBS) $(GTK_LIBS) -Wl,--export-dynamic -Wl,-soname
+
+$(PIDGIN_QUOTE).o:$(PIDGIN_QUOTE).c
+ $(CC) $(CFLAGS) -fPIC -c $< -o $@ $(PIDGIN_CFLAGS) $(GTK_CFLAGS)
+
+clean:
+ rm -rf *.o *.c~ *.h~ *.so *.la .libs
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3ea74e083e0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Vladislav Glinsky <cl0ne[at]mithril.org.ua>
+# Contributor: Pavel <otchertsov@gmail.com>
+
+pkgname=pidgin-quote-text
+pkgver=0.9.3
+pkgrel=2
+pkgdesc="Quote selected message into the entry area"
+arch=('any')
+url="https://launchpad.net/quote/"
+license=('GPL2')
+depends=('pidgin')
+source=(
+ 'git://github.com/pomozoff/quotetext.git'
+ 'replace_internal_h.patch'
+ 'Makefile'
+)
+md5sums=(
+ 'SKIP'
+ '876d904e0dd3a65acda07a0de0218267'
+ 'ea42e6a112fc97896f5b09fe12e27fd6'
+)
+
+build()
+{
+ mv "${srcdir}/Makefile" "${srcdir}/quotetext/"
+ cd "${srcdir}/quotetext"
+ patch -p0 < "${srcdir}/replace_internal_h.patch"
+ make
+}
+
+package()
+{
+ cd "${srcdir}/quotetext"
+ make DESTDIR="$pkgdir/usr" install
+}
diff --git a/replace_internal_h.patch b/replace_internal_h.patch
new file mode 100644
index 00000000000..6936468cc66
--- /dev/null
+++ b/replace_internal_h.patch
@@ -0,0 +1,59 @@
+diff --git quote_text.c quote_text.c
+index 5a3db7a..52db241 100755
+--- quote_text.c
++++ quote_text.c
+@@ -23,15 +23,29 @@
+ *
+ */
+
+-#include "internal.h"
+-#include "version.h"
+-#include "pidginstock.h"
+-#include "gtkutils.h"
+-#include "gtkimhtml.h"
+-//#include "debug.h"
++#include <locale.h>
++#include <glib.h>
+
+-#define PLUGIN_ID "gtk-quotetext"
+-#define QUOTE_VERSION "0.9.3"
++#ifdef ENABLE_NLS
++# ifndef __APPLE_CC__
++# define __APPLE_CC__ 0
++# endif
++# include <libintl.h>
++# undef printf
++# define _(String) ((const char *)dgettext(PACKAGE, String))
++# ifdef gettext_noop
++# define N_(String) gettext_noop (String)
++# else
++# define N_(String) (String)
++# endif
++#else
++# define N_(String) (String)
++# ifndef _
++# define _(String) ((const char *)String)
++# endif
++# define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
++# define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
++#endif
+
+ /* config.h may define PURPLE_PLUGINS; protect the definition here so that we
+ * don't get complaints about redefinition when it's not necessary. */
+@@ -51,6 +65,16 @@
+ # include <config.h>
+ #endif
+
++#include <string.h>
++#include "version.h"
++#include "gtkutils.h"
++#include "pidginstock.h"
++#include "gtkimhtml.h"
++//#include "debug.h"
++
++#define PLUGIN_ID "gtk-quotetext"
++#define QUOTE_VERSION "0.9.3"
++
+ static void quote_button_press(GtkWidget *button, PidginConversation *gtkconv){
+ GtkIMHtml *imhtml = GTK_IMHTML(gtkconv->imhtml);
+ GtkTextBuffer *buffer = imhtml->text_buffer;