summaryrefslogtreecommitdiff
path: root/dev-libs/OpenSRF
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/OpenSRF
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/OpenSRF')
-rw-r--r--dev-libs/OpenSRF/Manifest9
-rw-r--r--dev-libs/OpenSRF/OpenSRF-1.2.0.ebuild118
-rw-r--r--dev-libs/OpenSRF/OpenSRF-2.1.1.ebuild122
-rw-r--r--dev-libs/OpenSRF/files/OpenSRF-1.2.0-buildfix.patch136
-rw-r--r--dev-libs/OpenSRF/files/OpenSRF-2.1.1-buildfix.patch70
-rw-r--r--dev-libs/OpenSRF/metadata.xml7
6 files changed, 462 insertions, 0 deletions
diff --git a/dev-libs/OpenSRF/Manifest b/dev-libs/OpenSRF/Manifest
new file mode 100644
index 000000000000..60b5b3a42654
--- /dev/null
+++ b/dev-libs/OpenSRF/Manifest
@@ -0,0 +1,9 @@
+AUX OpenSRF-1.2.0-buildfix.patch 5565 SHA256 9aaaf8e81fb19060cc0f8de675383868356cca82a8de4bfd39da05a057fdd53c SHA512 febe3759fd4923f686bfc46f8d8f18bd463521e0ff930d0259533f173f11cb42842c3ddfe2930b52648873aad45b19eff1d5f328a8237f7e8f94eba63a35830f WHIRLPOOL 7d423e655e5a98a1275b3a16466d8c24dde01f5dba366c8c45e648373aeb71a7ac7aae1f8b3052f8e9348f34df194ac70fa03933901a7249ed50ed2885c18f79
+AUX OpenSRF-2.1.1-buildfix.patch 3436 SHA256 899c6e2239992b8c75df3485770595bc21ac09bfa4917924d019447e12dba990 SHA512 5db2d704a3d539c1c57ee3b5d4e0965f60c23134c68746ab84655d698388e10b7d611dff0e25db4c633fce462816c4d76afae9d74acdee5a95baeb99528e2b5b WHIRLPOOL 7a59f45e780dccfc6c42f7b4c851c91ed3954d445b683291ca8f6a6eace3941c62668011397109800a1d19e677848c18ecf3713100e09c8466da19cc02771bc1
+DIST OpenSRF-1.2.0.tar.gz 1096952 SHA256 e1cba4710f5244fdcc5afae84b71d7b2f8265f1fdea72b51cf0f64e756617f2d SHA512 f6ee045b32464316eefb457dc74bd08f3a613fcd22ea54ea719a1762b38ea14972d75802d2a542f3c7489c86cea25cb6a9de61662031104b0c0b3634e1d09cd1 WHIRLPOOL 74ae8c5f464e8e3e3cc8ac35f0ba09ec8734f1e8f724f7161956917d2c80dfe4cc8ac8bff6c232483e4ec016a82e5dcc919f9c0e5b38aac55fbd7f75d0fd2997
+DIST opensrf-2.1.1.tar.gz 1058060 SHA256 cf58f744ec18dcfeaf0b0f2199c499b0742ecc35e7adf1e27614ca210f70c5b8 SHA512 5294ae2c9410ae52964067cd9090f9b7b5424e96f1731868cd896c1928ef1e89729af4a83f804f491bf2da0c6d129149105309afa18531b184098ebff2820306 WHIRLPOOL fce4ca8fbebfcec091232ab156e9c4ea4bd445cc90528dc82b61a3e7cd8766382c551d3a277f7a76eea44c0c2e3d347d7805861c46581c89463f3689622fa0be
+EBUILD OpenSRF-1.2.0.ebuild 3583 SHA256 5c2ea439baac44a578dd6d41ee43ae772d55bcec9f355f1268f10e7adfdac6ae SHA512 594295b75ef2f9b12ac2383af47bfffc023c3016f8726dbd5d5bef3c4046ce99f091e607b2c9a25347700adbcda7341d4c8ab4d511a353c3aec614a7e4d5c904 WHIRLPOOL 366bc48574b63f79391a6e67d0f04caa1946c7daf336322fa81320b01396cb270434e3672b52c97af6ee0144531aa52102224e3168f611501754004b65662966
+EBUILD OpenSRF-2.1.1.ebuild 3729 SHA256 ebca96fe0d906d2162fcb2b59ff939ae2024fbc68f834bd9e1b9a41dcdf32243 SHA512 5c1fd4aa3c3e66a7d434fa1d9b83b5bb8dfdd913bdee83ec8ab4b84192a2256fd4cb006c158b1ae71a9c5c1f947f69ade123ef874545137d91ecddb6068cd1c8 WHIRLPOOL d70184855f0b10b8ed479c620154ec7452db7d5eedc3b04b926076caccbd64cd97139fd8d8737a2c57d5452e769a4888adfe35f6b5ab6eaf1785dc8c2aed6462
+MISC ChangeLog 2640 SHA256 24d2af326a653ebe3b1bd11f65e5f38b97a8f51e1703955a5931c13d0c852548 SHA512 42a5b13b3876ec39ba90e66448834c437a5c5976a4f771e1d5cf38fa8d92d19f10488a6c6ea2df2daeee1cd075b6bf312ca10bd0e69a26c42869c906dce9e9c1 WHIRLPOOL 2f69b90ba50940c5482a477a488d5a10e444f5190270cfcd0f5ef297a883f9b3c0cabce3352f16f3e14f8e4fbd8fedec9d45f53d1f4aca23d060141d08d26430
+MISC ChangeLog-2015 2388 SHA256 daea8ead98d94b163651364a44111cf14671111603992a1dc8278a769bff45fb SHA512 041c7513aa9637275bbdf236538d04db810d4719badaf1c016c61e871c0560bde799e15d23ce9e823d6048ee879ad358dd6ea0000726cff321ab5c7a3065e428 WHIRLPOOL db2b7fafd35cd2a9042655173ec14a7a50e69c12ff05fcc777b53d147753242712c0d7f8dada6d09079b94e341c2593aafca1af3c83133e2545f918a54f82165
+MISC metadata.xml 216 SHA256 f7475919f28a8a93ec8bd025c8f8bbab918f66d0d1737420c876f0480308fe6a SHA512 e881b59fe49746eb25ad66c258b41aba501e4eb563129093a3898ea970a20506e7898f7c355cfcf99605234962bf2c77c1309c258b9a2b84ee4302ccb71c9dbd WHIRLPOOL 163285b60aa93e00993af659dc1e29a9eb245bd3415dd5ec75b284250596165f469028102b72fa0c344834443a44c1bbcf6272fe6a3f5211f721fc96e1c6ec16
diff --git a/dev-libs/OpenSRF/OpenSRF-1.2.0.ebuild b/dev-libs/OpenSRF/OpenSRF-1.2.0.ebuild
new file mode 100644
index 000000000000..b6ea23b6ef85
--- /dev/null
+++ b/dev-libs/OpenSRF/OpenSRF-1.2.0.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib flag-o-matic apache-module autotools perl-module
+
+DESCRIPTION="Framework for the high-level development of the Evergreen ILS software"
+HOMEPAGE="http://open-ils.org/"
+SRC_URI="http://open-ils.org/downloads/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="postgres +sqlite"
+DEPEND=">=www-servers/apache-2.2.9
+ >=dev-db/libdbi-drivers-0.8.2
+ >=dev-db/libdbi-0.8.2
+ net-im/ejabberd
+ dev-libs/libmemcache
+ dev-perl/Cache-Memcached
+ dev-perl/Class-DBI-AbstractSearch
+ sqlite? ( dev-perl/DBD-SQLite )
+ postgres? ( dev-perl/DBD-Pg )
+ virtual/perl-Digest-MD5
+ dev-perl/JSON-XS
+ dev-perl/Net-Server
+ dev-perl/UNIVERSAL-require
+ dev-perl/Unix-Syslog
+ dev-perl/XML-LibXML
+ "
+
+PERL_S="${S}/src/perl"
+
+APXS2_S="${S}/src/gateway/.libs/"
+APACHE2_MOD_FILE="${APXS2_S}/osrf_json_gateway.so ${APXS2_S}/osrf_http_translator.so"
+#APACHE2_MOD_CONF="42_${PN}"
+#APACHE2_MOD_DEFINE="FOO"
+#DOCFILES="docs/*.html"
+need_apache2_2
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ perl_set_version
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.0-buildfix.patch
+ eautoreconf
+}
+
+#src_compile() {
+# LIBXML2_CFLAGS=$(xml2-config --cflags)
+# LIBXML2_CFLAGS="${LIBXML2_CFLAGS//*-I}"
+# LIBXML2_HEADERS="${LIBXML2_CFLAGS// *}"
+# APR_HEADERS=$(apr-1-config --includedir)
+# APACHE2_HEADERS=$(apxs2 -q INCLUDEDIR)
+# sed -i \
+# -e '/^export PREFIX=/s,/.*,/usr,' \
+# -e '/^export BINDIR=/s,/.*,${PREFIX}/bin,' \
+# -e "/^export LIBDIR=/s,/.*,\${PREFIX}/$(get_libdir)," \
+# -e '/^export PERLDIR=/s,/.*,${LIBDIR}/perl5,' \
+# -e '/^export INCLUDEDIR=/s,/.*,${PREFIX}/include,' \
+# -e '/^export ETCDIR=/s,/.*,/etc,' \
+# -e '/^export SOCK=/s,/.*,/var/run/opensrf,' \
+# -e '/^export PID=/s,/.*,/var/run/opensrf,' \
+# -e '/^export LOG=/s,/.*,/var/log,' \
+# -e '/^export TMP=/s,/.*,/tmp,' \
+# -e '/^export APXS2=/s,/.*,/usr/sbin/apxs2,' \
+# -e "/^export APACHE2_HEADERS=/s,/.*,${APACHE2_HEADERS}," \
+# -e "/^export APR_HEADERS=/s,/.*,${APR_HEADERS}," \
+# -e "/^export LIBXML2_HEADERS=/s,/.*,${LIBXML2_HEADERS}," \
+# install.conf
+# emake verbose || die "Failed to build"
+#}
+src_configure() {
+ econf \
+ --with-apxs=/usr/sbin/apxs2 \
+ --sysconfdir=/etc/opensrf \
+ --localstatedir=/var \
+ || die "econf failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_configure || die "perl-module_src_configure failed"
+}
+
+src_compile() {
+ emake || die "main emake failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_compile || die "perl-module_src_compile failed"
+}
+
+src_install() {
+ einfo "Doing src_install"
+ #emake install-verbose DESTDIR="${D}" || die "Failed to install"
+ emake install DESTDIR="${D}" || die "Failed to install"
+ apache-module_src_install || die "apache-module_src_install failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_install || die "perl-module_src_install failed"
+ cd "${S}"
+
+ # Docs
+ dodoc README doc/*
+}
+
+src_test() {
+ emake check || die "emake check failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_test || die "perl-module_src_test failed"
+}
+
+pkg_config() {
+ :
+ #JABBER_SERVER=${JABBER_SERVER:=localhost}
+ #JABBER_PORT=${JABBER_PORT:=5222}
+ #PASSWORD=${PASSWORD:=osrf}
+ #einfo "Using Jabber server at ${JABBER_SERVER}:${JABBER_PORT}"
+ #einfo "Adding 'osrf' and 'router' users with password ${PASSWORD}"
+ #cd "${ROOT}"/usr/share/doc/${PF}/examples
+ #for user in osrf router ; do
+ # perl register.pl ${JABBER_SERVER} ${JABBER_PORT} ${user} ${PASSWORD} \
+ # || die "Failed to add $user user to server"
+ #done
+}
diff --git a/dev-libs/OpenSRF/OpenSRF-2.1.1.ebuild b/dev-libs/OpenSRF/OpenSRF-2.1.1.ebuild
new file mode 100644
index 000000000000..66eff92d51a2
--- /dev/null
+++ b/dev-libs/OpenSRF/OpenSRF-2.1.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib flag-o-matic apache-module autotools perl-module
+
+DESCRIPTION="Framework for the high-level development of the Evergreen ILS software"
+HOMEPAGE="http://open-ils.org/"
+MY_PN="opensrf" # upstream lowercased the tarball in 2.x
+MY_P="${MY_PN}-${PV}"
+SRC_URI="http://open-ils.org/downloads/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="postgres +sqlite"
+DEPEND=">=www-servers/apache-2.2.9
+ >=dev-db/libdbi-drivers-0.8.2
+ >=dev-db/libdbi-0.8.2
+ net-im/ejabberd
+ dev-libs/libmemcache
+ dev-perl/Cache-Memcached
+ dev-perl/Class-DBI-AbstractSearch
+ sqlite? ( dev-perl/DBD-SQLite )
+ postgres? ( dev-perl/DBD-Pg )
+ virtual/perl-Digest-MD5
+ dev-perl/JSON-XS
+ dev-perl/Net-Server
+ dev-perl/UNIVERSAL-require
+ dev-perl/Unix-Syslog
+ dev-perl/XML-LibXML
+ "
+
+S="${WORKDIR}/${MY_P}"
+PERL_S="${S}/src/perl"
+
+APXS2_S="${S}/src/gateway/.libs/"
+APACHE2_MOD_FILE="${APXS2_S}/osrf_json_gateway.so ${APXS2_S}/osrf_http_translator.so"
+#APACHE2_MOD_CONF="42_${PN}"
+#APACHE2_MOD_DEFINE="FOO"
+#DOCFILES="docs/*.html"
+need_apache2_2
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ perl_set_version
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1.1-buildfix.patch
+ eautoreconf
+}
+
+#src_compile() {
+# LIBXML2_CFLAGS=$(xml2-config --cflags)
+# LIBXML2_CFLAGS="${LIBXML2_CFLAGS//*-I}"
+# LIBXML2_HEADERS="${LIBXML2_CFLAGS// *}"
+# APR_HEADERS=$(apr-1-config --includedir)
+# APACHE2_HEADERS=$(apxs2 -q INCLUDEDIR)
+# sed -i \
+# -e '/^export PREFIX=/s,/.*,/usr,' \
+# -e '/^export BINDIR=/s,/.*,${PREFIX}/bin,' \
+# -e "/^export LIBDIR=/s,/.*,\${PREFIX}/$(get_libdir)," \
+# -e '/^export PERLDIR=/s,/.*,${LIBDIR}/perl5,' \
+# -e '/^export INCLUDEDIR=/s,/.*,${PREFIX}/include,' \
+# -e '/^export ETCDIR=/s,/.*,/etc,' \
+# -e '/^export SOCK=/s,/.*,/var/run/opensrf,' \
+# -e '/^export PID=/s,/.*,/var/run/opensrf,' \
+# -e '/^export LOG=/s,/.*,/var/log,' \
+# -e '/^export TMP=/s,/.*,/tmp,' \
+# -e '/^export APXS2=/s,/.*,/usr/sbin/apxs2,' \
+# -e "/^export APACHE2_HEADERS=/s,/.*,${APACHE2_HEADERS}," \
+# -e "/^export APR_HEADERS=/s,/.*,${APR_HEADERS}," \
+# -e "/^export LIBXML2_HEADERS=/s,/.*,${LIBXML2_HEADERS}," \
+# install.conf
+# emake verbose || die "Failed to build"
+#}
+src_configure() {
+ APXS2_INSTALL="-i" \
+ econf \
+ --with-apxs=/usr/sbin/apxs2 \
+ --sysconfdir=/etc/opensrf \
+ --localstatedir=/var \
+ || die "econf failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_configure || die "perl-module_src_configure failed"
+}
+
+src_compile() {
+ emake || die "main emake failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_compile || die "perl-module_src_compile failed"
+}
+
+src_install() {
+ einfo "Doing src_install"
+ #emake install-verbose DESTDIR="${D}" || die "Failed to install"
+ emake install DESTDIR="${D}" APXS2_INSTALL="-i" || die "Failed to install"
+ apache-module_src_install || die "apache-module_src_install failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_install || die "perl-module_src_install failed"
+ cd "${S}"
+
+ # Docs
+ dodoc README doc/*
+}
+
+src_test() {
+ emake check || die "emake check failed"
+ cd "${PERL_S}" && S="${PERL_S}" perl-module_src_test || die "perl-module_src_test failed"
+}
+
+pkg_config() {
+ :
+ #JABBER_SERVER=${JABBER_SERVER:=localhost}
+ #JABBER_PORT=${JABBER_PORT:=5222}
+ #PASSWORD=${PASSWORD:=osrf}
+ #einfo "Using Jabber server at ${JABBER_SERVER}:${JABBER_PORT}"
+ #einfo "Adding 'osrf' and 'router' users with password ${PASSWORD}"
+ #cd "${ROOT}"/usr/share/doc/${PF}/examples
+ #for user in osrf router ; do
+ # perl register.pl ${JABBER_SERVER} ${JABBER_PORT} ${user} ${PASSWORD} \
+ # || die "Failed to add $user user to server"
+ #done
+}
diff --git a/dev-libs/OpenSRF/files/OpenSRF-1.2.0-buildfix.patch b/dev-libs/OpenSRF/files/OpenSRF-1.2.0-buildfix.patch
new file mode 100644
index 000000000000..33963fe30436
--- /dev/null
+++ b/dev-libs/OpenSRF/files/OpenSRF-1.2.0-buildfix.patch
@@ -0,0 +1,136 @@
+diff -Nuar OpenSRF-1.2.0.orig/Makefile.am OpenSRF-1.2.0/Makefile.am
+--- OpenSRF-1.2.0.orig/Makefile.am 2008-10-27 05:07:06.000000000 +0000
++++ OpenSRF-1.2.0/Makefile.am 2012-11-12 20:53:22.079732392 +0000
+@@ -115,14 +115,14 @@
+ SUBDIRS = src
+
+ jserver:
+- make -s -C src jserver
++ $(MAKE) -s -C src jserver
+
+ jserver-install:
+- make -s -C src jserver-install
++ $(MAKE) -s -C src jserver-install
+
+ javascript-install:
+- make -s -C src javascript-install
++ $(MAKE) -s -C src javascript-install
+
+ install-data-hook:
+- cp @srcdir@/src/gateway/apachetools.h @includedir@/opensrf/apachetools.h
++ cp @srcdir@/src/gateway/apachetools.h $(DESTDIR)@includedir@/opensrf/apachetools.h
+
+diff -Nuar OpenSRF-1.2.0.orig/src/gateway/Makefile.am OpenSRF-1.2.0/src/gateway/Makefile.am
+--- OpenSRF-1.2.0.orig/src/gateway/Makefile.am 2008-08-18 19:14:00.000000000 +0000
++++ OpenSRF-1.2.0/src/gateway/Makefile.am 2012-11-12 20:53:22.079732392 +0000
+@@ -16,16 +16,25 @@
+
+ AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS)
+ AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
++APACHE_DEPS = apachetools.c apachetools.h
++LIBS=libopensrf.so
++TARGETS = osrf_json_gateway.la osrf_http_translator.la
+
+-install-exec-local:
+- if [ ! "$$(grep mod_placeholder `apxs2 -q SYSCONFDIR`/httpd.conf)" ]; \
+- then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
+- >> `apxs2 -q SYSCONFDIR`/httpd.conf; \
+- fi
+- $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
+- $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so
+- $(APXS2) -i -a @srcdir@/osrf_json_gateway.la
+- $(APXS2) -i -a @srcdir@/osrf_http_translator.la
++all: $(TARGETS)
++
++osrf_json_gateway.la: osrf_json_gateway.c $(APACHE_DEPS)
++ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) $^ $(LIBS)
++
++osrf_http_translator.la: osrf_http_translator.c $(APACHE_DEPS)
++ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) $^ $(LIBS)
++
++#install-exec-local: $(TARGETS)
++# if [ ! "$$(grep mod_placeholder `apxs2 -q SYSCONFDIR`/httpd.conf)" ]; \
++# then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
++# >> `apxs2 -q SYSCONFDIR`/httpd.conf; \
++# fi
++# $(APXS2) -i -a osrf_json_gateway.la
++# $(APXS2) -i -a osrf_http_translator.la
+
+ clean-local:
+ rm -f @srcdir@/osrf_http_translator.la @srcdir@/osrf_http_translator.lo @srcdir@/osrf_http_translator.slo @srcdir@/osrf_json_gateway.la @srcdir@/osrf_json_gateway.lo @srcdir@/osrf_json_gateway.slo
+diff -Nuar OpenSRF-1.2.0.orig/src/java/Makefile.am OpenSRF-1.2.0/src/java/Makefile.am
+--- OpenSRF-1.2.0.orig/src/java/Makefile.am 2008-07-17 18:15:09.000000000 +0000
++++ OpenSRF-1.2.0/src/java/Makefile.am 2012-11-12 20:53:22.079732392 +0000
+@@ -48,8 +48,8 @@
+ rm files;
+
+ install-data-local:
+- mkdir -p $(LIBDIR)/java
+- cp opensrf.jar $(LIBDIR)/java
++ mkdir -p $(DESTDIR)$(LIBDIR)/java
++ cp opensrf.jar $(DESTDIR)$(LIBDIR)/java
+
+ dep_clean:
+ rm -rf deps
+diff -Nuar OpenSRF-1.2.0.orig/src/libopensrf/Makefile.am OpenSRF-1.2.0/src/libopensrf/Makefile.am
+--- OpenSRF-1.2.0.orig/src/libopensrf/Makefile.am 2009-04-08 02:48:02.000000000 +0000
++++ OpenSRF-1.2.0/src/libopensrf/Makefile.am 2012-11-12 20:53:22.079732392 +0000
+@@ -99,6 +99,7 @@
+ opensrf_c_SOURCES = opensrf.c
+ opensrf_c_DEPENDENCIES = libopensrf.la
+
++osrf_json_test_DEPENDENCIES = libopensrf.la libosrf_json.la
+ osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
+
+ noinst_LTLIBRARIES = libosrf_json.la
+diff -Nuar OpenSRF-1.2.0.orig/src/Makefile.am OpenSRF-1.2.0/src/Makefile.am
+--- OpenSRF-1.2.0.orig/src/Makefile.am 2009-05-31 19:49:00.000000000 +0000
++++ OpenSRF-1.2.0/src/Makefile.am 2012-11-12 20:53:52.475676800 +0000
+@@ -17,7 +17,7 @@
+ export OPENSRF = opensrf
+ export BINDIR = @bindir@
+ export LIBDIR = @libdir@
+-jsdir = $(LIBDIR)/javascript
++jsdir = $(datarootdir)/opensrf/javascript
+ export OSRF_JAVA_DEPSDIR = @OSRF_JAVA_DEPSDIR@
+ etcdir = $(ETCDIR)
+
+@@ -33,7 +33,7 @@
+ MAYBE_JA = java
+ endif
+
+-SUBDIRS = libopensrf c-apps router srfsh jserver gateway perl $(MAYBE_PY) $(MAYBE_JA)
++SUBDIRS = libopensrf c-apps router srfsh jserver gateway $(MAYBE_PY) $(MAYBE_JA) # perl is now seperate
+
+ dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl
+ bin_SCRIPTS = @top_srcdir@/bin/osrf_config @top_srcdir@/bin/osrf_ctl.sh
+@@ -41,11 +41,11 @@
+ dist_sysconf_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example
+
+ install-exec-local:
+- mkdir -p $(VAR)
+- mkdir -p $(PID)
+- mkdir -p $(LOG)
+- mkdir -p $(SOCK)
+- mkdir -p $(jsdir)
++ mkdir -p $(DESTDIR)$(VAR)
++ mkdir -p $(DESTDIR)$(PID)
++ mkdir -p $(DESTDIR)$(LOG)
++ mkdir -p $(DESTDIR)$(SOCK)
++ mkdir -p $(DESTDIR)$(jsdir)
+
+ install-exec-hook:
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
+@@ -54,9 +54,9 @@
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
+ sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
+ sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
+- cp -r @srcdir@/javascript/* $(jsdir)/
++ cp -r @srcdir@/javascript/* $(DESTDIR)$(jsdir)/
+
+ uninstall-hook:
+- rm @includedir@/opensrf/apachetools.h
+- rm -R $(jsdir)
++ rm $(DESTDIR)@includedir@/opensrf/apachetools.h
++ rm -R $(DESTDIR)$(jsdir)
+
diff --git a/dev-libs/OpenSRF/files/OpenSRF-2.1.1-buildfix.patch b/dev-libs/OpenSRF/files/OpenSRF-2.1.1-buildfix.patch
new file mode 100644
index 000000000000..767a478b53a8
--- /dev/null
+++ b/dev-libs/OpenSRF/files/OpenSRF-2.1.1-buildfix.patch
@@ -0,0 +1,70 @@
+Upstream uses DESTDIR, but then tries to hard-install the apache config
+modules, as well as not allowing other arguments to Build.PL easily.
+
+Split apache modules to be built during compile phase, and allow control of
+apxs2 install mode (for Gentoo, pass APXS2_INSTALL=-i).
+
+For the Build.PL problem, just disable it entirely here, and use the Gentoo
+build functions to call Build.PL instead
+(presently does --installdirs=vendor --libdoc= --destdir="${D}" --create_packlist=0).
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar opensrf-2.1.1.orig/src/gateway/Makefile.am opensrf-2.1.1/src/gateway/Makefile.am
+--- opensrf-2.1.1.orig/src/gateway/Makefile.am 2012-11-06 17:39:46.000000000 +0000
++++ opensrf-2.1.1/src/gateway/Makefile.am 2012-11-12 21:56:52.108564157 +0000
+@@ -17,20 +17,23 @@
+ AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS)
+ AM_LDFLAGS = -L$(LIBDIR) -L@top_builddir@/src/libopensrf
+ AP_LIBEXECDIR = `$(APXS2) -q LIBEXECDIR`
++APXS2_INSTALL = -i -a
+
+ DISTCLEANFILES = Makefile.in Makefile
+
+-install-exec-local:
+- d=`$(APXS2) -q SYSCONFDIR` && \
+- if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \
+- then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
+- >> $${d}/httpd.conf; \
+- fi
++all:
+ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_json_gateway.c apachetools.c apachetools.h libopensrf.so
+ $(APXS2) -c $(DEF_LDLIBS) $(AM_CFLAGS) $(AM_LDFLAGS) @srcdir@/osrf_http_translator.c apachetools.c apachetools.h libopensrf.so
++
++install-exec-local:
++# d=`$(APXS2) -q SYSCONFDIR` && \
++# if ! grep mod_placeholder $${d}/httpd.conf 2>&1 >/dev/null ; \
++# then echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
++# >> $${d}/httpd.conf; \
++# fi
+ $(MKDIR_P) $(DESTDIR)$(AP_LIBEXECDIR)
+- $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_json_gateway.la
+- $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/osrf_http_translator.la
++ $(APXS2) $(APXS2_INSTALL) -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) @srcdir@/osrf_json_gateway.la
++ $(APXS2) $(APXS2_INSTALL) -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) @srcdir@/osrf_http_translator.la
+
+ clean-local:
+ rm -f @srcdir@/osrf_http_translator.la @srcdir@/osrf_http_translator.lo @srcdir@/osrf_http_translator.slo @srcdir@/osrf_json_gateway.la @srcdir@/osrf_json_gateway.lo @srcdir@/osrf_json_gateway.slo
+diff -Nuar opensrf-2.1.1.orig/configure.ac opensrf-2.1.1/configure.ac
+--- opensrf-2.1.1.orig/configure.ac 2012-11-06 17:39:46.000000000 +0000
++++ opensrf-2.1.1/configure.ac 2012-11-12 22:04:38.673403306 +0000
+@@ -352,7 +352,6 @@
+ src/gateway/Makefile
+ src/jserver/Makefile
+ src/libopensrf/Makefile
+- src/perl/Makefile
+ src/ports/strn_compat/Makefile
+ src/python/opensrf.py
+ src/router/Makefile
+diff -Nuar opensrf-2.1.1.orig/src/Makefile.am opensrf-2.1.1/src/Makefile.am
+--- opensrf-2.1.1.orig/src/Makefile.am 2012-11-06 17:39:46.000000000 +0000
++++ opensrf-2.1.1/src/Makefile.am 2012-11-12 22:04:35.580149012 +0000
+@@ -40,7 +40,7 @@
+ endif
+
+ if BUILDCORE
+-MAYBE_CORE = libopensrf c-apps router srfsh gateway perl
++MAYBE_CORE = libopensrf c-apps router srfsh gateway
+ if BUILDPYTHON
+ dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl @top_srcdir@/src/python/opensrf.py @top_srcdir@/src/python/srfsh.py
+ else
diff --git a/dev-libs/OpenSRF/metadata.xml b/dev-libs/OpenSRF/metadata.xml
new file mode 100644
index 000000000000..79d462e85571
--- /dev/null
+++ b/dev-libs/OpenSRF/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>