Mercurial > pidgin
annotate libpurple/plugins/test.pl @ 24389:2b62300d2c19
Use libtool to build static archives when --with-static-prpls is passed
to configure. Does anyone know why we weren't using libtool before? We
were building old-fashioned .a files. But libtool archives (.la) can
contain either static or shared libraries.
I found it a lot easier to get static prpl compilation working after
making this change (that is to say, it worked). Without this I got this
error, which is probably fixable, but consistently using libtool seems
like it makes things easier:
*** Warning: Linking the shared library libpurple.la against the
*** static library ../libpurple/protocols/msn/libmsn.a is not portable!
/usr/bin/ld: ../libpurple/protocols/msn/libmsn.a(libmsn_a-msn.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../libpurple/protocols/msn/libmsn.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Wed, 12 Nov 2008 11:30:51 +0000 |
| parents | c9dc220e0301 |
| children |
| rev | line source |
|---|---|
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
1 use Purple; |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 %PLUGIN_INFO = ( |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 perl_api_version => 2, |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 name => 'Test Perl Plugin', |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 version => '1.0', |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 summary => 'Provides as a test base for the perl plugin.', |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 description => 'Provides as a test base for the perl plugin.', |
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
9 author => 'Etan Reisner <deryni\@pidgin.im>', |
|
16184
22f65e75980c
Point to the Pidgin website.
Richard Laager <rlaager@wiktel.com>
parents:
15373
diff
changeset
|
10 url => 'http://pidgin.im', |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 |
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
12 load => "plugin_load" |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 ); |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 sub plugin_init { |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 return %PLUGIN_INFO; |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 } |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 |
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
19 sub account_status_cb { |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
20 my ($account, $old, $new, $data) = @_; |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
21 |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
22 Purple::Debug::info("perl test plugin", "In account_status_cb\n"); |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
23 |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
24 Purple::Debug::info("perl test plugin", "Account " . |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
25 $account->get_username() . " changed status.\n"); |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
26 Purple::Debug::info("perl test plugin", $data . "\n"); |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
27 } |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
28 |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 sub plugin_load { |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 my $plugin = shift; |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
32 Purple::Debug::info("perl test plugin", "plugin_load\n"); |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
33 |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
34 Purple::Debug::info("perl test plugin", "Listing accounts.\n"); |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
35 foreach $account (Purple::Accounts::get_all()) { |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
36 Purple::Debug::info("perl test plugin", $account->get_username() . "\n"); |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 } |
|
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 |
|
22521
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
39 Purple::Signal::connect(Purple::Accounts::get_handle(), |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
40 "account-status-changed", $plugin, |
|
c9dc220e0301
Bring the test.pl plugin at least theoretically up to date (I haven't tried it
Etan Reisner <pidgin@unreliablesource.net>
parents:
22113
diff
changeset
|
41 \&account_status_cb, "test"); |
|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 } |
