diff options
author | megabaks <megagreener@gmail.com> | 2012-10-10 12:46:52 -0700 |
---|---|---|
committer | megabaks <megagreener@gmail.com> | 2012-10-10 12:46:52 -0700 |
commit | 5823c4e12a372cccf4304954068cbc28d70cea71 (patch) | |
tree | 287a3418efe407cc65220dc690dcbd7f2a628030 | |
parent | 758f2f0f75b53588248134148c716cd6ae06c9d5 (diff) | |
parent | a410b9df1bf4e65b115efc2fe5e228b1f64a4e5c (diff) | |
download | profanity-5823c4e12a372cccf4304954068cbc28d70cea71.tar.gz profanity-5823c4e12a372cccf4304954068cbc28d70cea71.tar.xz |
Merge pull request #20 from pasis/master
dev-libs/libstrophe: build shared library
3 files changed, 115 insertions, 1 deletions
diff --git a/dev-libs/libstrophe/files/libstrophe-build-shared-library.patch b/dev-libs/libstrophe/files/libstrophe-build-shared-library.patch new file mode 100644 index 0000000..10c9bef --- /dev/null +++ b/dev-libs/libstrophe/files/libstrophe-build-shared-library.patch @@ -0,0 +1,61 @@ +diff --git a/Makefile.am b/Makefile.am +index 788d37c..b09ee58 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,15 +6,16 @@ PARSER_CFLAGS=@PARSER_CFLAGS@ + PARSER_LIBS=@PARSER_LIBS@ + + SSL_LIBS = -lssl -lcrypto -lz ++LIBS += $(SSL_LIBS) $(PARSER_LIBS) + + STROPHE_FLAGS = -I$(top_srcdir) +-STROPHE_LIBS = libstrophe.a $(PARSER_LIBS) $(SSL_LIBS) ++STROPHE_LIBS = libstrophe.la + + ## Main build targets +-lib_LIBRARIES = libstrophe.a ++lib_LTLIBRARIES = libstrophe.la + +-libstrophe_a_CFLAGS=$(STROPHE_FLAGS) $(PARSER_CFLAGS) +-libstrophe_a_SOURCES = src/auth.c src/conn.c src/ctx.c \ ++libstrophe_la_CFLAGS=$(STROPHE_FLAGS) $(PARSER_CFLAGS) ++libstrophe_la_SOURCES = src/auth.c src/conn.c src/ctx.c \ + src/event.c src/handler.c src/hash.c \ + src/jid.c src/md5.c src/sasl.c src/sha1.c \ + src/snprintf.c src/sock.c src/stanza.c src/thread.c \ +@@ -23,9 +24,9 @@ libstrophe_a_SOURCES = src/auth.c src/conn.c src/ctx.c \ + src/sasl.h src/sha1.h src/sock.h src/thread.h src/tls.h src/util.h + + if PARSER_EXPAT +-libstrophe_a_SOURCES += src/parser_expat.c ++libstrophe_la_SOURCES += src/parser_expat.c + else +-libstrophe_a_SOURCES += src/parser_libxml2.c ++libstrophe_la_SOURCES += src/parser_libxml2.c + endif + + include_HEADERS = strophe.h +diff --git a/bootstrap.sh b/bootstrap.sh +index 473f746..3b72d88 100755 +--- a/bootstrap.sh ++++ b/bootstrap.sh +@@ -5,6 +5,7 @@ if [ -d /usr/local/share/aclocal ]; then + ACFLAGS="-I /usr/local/share/aclocal" + fi + ++libtoolize + aclocal ${ACFLAGS} + automake --add-missing --foreign --copy + autoconf +diff --git a/configure.ac b/configure.ac +index e170fc3..9ad2c1b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3,6 +3,7 @@ AM_INIT_AUTOMAKE + + AC_PROG_CC + AC_PROG_RANLIB ++AC_PROG_LIBTOOL + AM_PROG_CC_C_O + + AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([couldn't find openssl headers, openssl required])]) diff --git a/dev-libs/libstrophe/files/libstrophe-pkg-config-support.patch b/dev-libs/libstrophe/files/libstrophe-pkg-config-support.patch new file mode 100644 index 0000000..db16f0d --- /dev/null +++ b/dev-libs/libstrophe/files/libstrophe-pkg-config-support.patch @@ -0,0 +1,50 @@ +diff --git a/Makefile.am b/Makefile.am +index b09ee58..d6c534e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS = subdir-objects + + CFLAGS = -g -Wall + ++pkgconfigdir = $(libdir)/pkgconfig ++ + PARSER_CFLAGS=@PARSER_CFLAGS@ + PARSER_LIBS=@PARSER_LIBS@ + +@@ -34,6 +36,8 @@ noinst_HEADERS = strophepp.h + + EXTRA_DIST = docs + ++pkgconfig_DATA = libstrophe.pc ++ + ## Examples + noinst_PROGRAMS = examples/active examples/roster examples/basic examples/bot + examples_active_SOURCES = examples/active.c +diff --git a/configure.ac b/configure.ac +index 9ad2c1b..1496990 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,5 +43,5 @@ AM_CONDITIONAL([PARSER_EXPAT], [test x$with_parser != xlibxml2]) + AC_SUBST(PARSER_NAME) + AC_SUBST(PARSER_CFLAGS) + AC_SUBST(PARSER_LIBS) +-AC_CONFIG_FILES([Makefile]) ++AC_CONFIG_FILES([Makefile libstrophe.pc]) + AC_OUTPUT +diff --git a/libstrophe.pc.in b/libstrophe.pc.in +new file mode 100644 +index 0000000..9ab13d4 +--- /dev/null ++++ b/libstrophe.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libstrophe ++Description: A simple, lightweight C library for writing XMPP clients ++Requires: ++Version: @PACKAGE_VERSION@ ++Libs: -L${libdir} -lstrophe ++Cflags: -I${includedir} diff --git a/dev-libs/libstrophe/libstrophe-9999.ebuild b/dev-libs/libstrophe/libstrophe-9999.ebuild index 5b4ae9d..a06dce6 100644 --- a/dev-libs/libstrophe/libstrophe-9999.ebuild +++ b/dev-libs/libstrophe/libstrophe-9999.ebuild @@ -6,7 +6,7 @@ EAPI=4 EGIT_REPO_URI="git://github.com/metajack/libstrophe.git" -inherit autotools eutils git-2 +inherit libtool autotools eutils git-2 DESCRIPTION="A simple, lightweight C library for writing XMPP clients" HOMEPAGE="http://strophe.im/libstrophe" @@ -26,6 +26,9 @@ S="${WORKDIR}/${P/-/_}" src_prepare() { epatch "${FILESDIR}"/${PN}-libxml2-build-fix.patch + epatch "${FILESDIR}"/${PN}-build-shared-library.patch + epatch "${FILESDIR}"/${PN}-pkg-config-support.patch + elibtoolize eautoreconf } |