summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/pficommon')
-rw-r--r--dev-cpp/pficommon/Manifest1
-rw-r--r--dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc-4.7.patch50
-rw-r--r--dev-cpp/pficommon/files/pficommon-1.3.1.0-libdir.patch49
-rw-r--r--dev-cpp/pficommon/files/pficommon-1.3.1.0-postgresql.patch13
-rw-r--r--dev-cpp/pficommon/files/pficommon-1.3.1.0-soname.patch200
-rw-r--r--dev-cpp/pficommon/metadata.xml14
-rw-r--r--dev-cpp/pficommon/pficommon-1.3.1.0.ebuild58
7 files changed, 385 insertions, 0 deletions
diff --git a/dev-cpp/pficommon/Manifest b/dev-cpp/pficommon/Manifest
new file mode 100644
index 00000000000..18ff347fc4b
--- /dev/null
+++ b/dev-cpp/pficommon/Manifest
@@ -0,0 +1 @@
+DIST pficommon-1.3.1.0.tar.gz 441406 SHA256 4b644f38825f939e3c9e3649af4a35fee00ea7343dd7711770c6ec713be859c0 SHA512 95ef445c2f004c0921bdcae7ee50fc3a744d4960f9bc76c13254394c4ae41fad11ea200002b9fde3e099ef509ffe9ba9ea21d69ba1123699ab3338d7afbcf420 WHIRLPOOL 00d8c92c1a8bd4ee80167eb0032e97b327ee40bad41b18e6567da90a1462f431c22e75a0b02568bac6686e693a954ef2ff5628225f81b88397727e789395c4fc
diff --git a/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc-4.7.patch b/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc-4.7.patch
new file mode 100644
index 00000000000..283ef2d7da9
--- /dev/null
+++ b/dev-cpp/pficommon/files/pficommon-1.3.1.0-gcc-4.7.patch
@@ -0,0 +1,50 @@
+From 5669e7ea665323ee774eda9c77206102fa499453 Mon Sep 17 00:00:00 2001
+From: Hideyuki Tanaka <tanaka.hideyuki@gmail.com>
+Date: Mon, 21 May 2012 17:21:34 +0900
+Subject: [PATCH] add include <unistd.h> (for gcc-4.7.0)
+
+---
+ src/network/socket.cpp | 1 +
+ src/system/mmapper.cpp | 1 +
+ tools/genrpc/main.cpp | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/network/socket.cpp b/src/network/socket.cpp
+index b5c50e4..1fba6e6 100644
+--- a/src/network/socket.cpp
++++ b/src/network/socket.cpp
+@@ -40,6 +40,7 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
++#include <unistd.h>
+
+ #include "dns.h"
+ #include "../system/syscall.h"
+diff --git a/src/system/mmapper.cpp b/src/system/mmapper.cpp
+index 90eb7b8..e963fd8 100644
+--- a/src/system/mmapper.cpp
++++ b/src/system/mmapper.cpp
+@@ -35,6 +35,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <sys/mman.h>
++#include <unistd.h>
+
+ #include "syscall.h"
+
+diff --git a/tools/genrpc/main.cpp b/tools/genrpc/main.cpp
+index 100ea4e..3e5ef16 100644
+--- a/tools/genrpc/main.cpp
++++ b/tools/genrpc/main.cpp
+@@ -4,6 +4,7 @@
+ #include <cctype>
+ #include <cstring>
+ #include <cstdio>
++#include <unistd.h>
+ using namespace std;
+
+ #include "../../src/lang/shared_ptr.h"
+--
+1.7.10
+
diff --git a/dev-cpp/pficommon/files/pficommon-1.3.1.0-libdir.patch b/dev-cpp/pficommon/files/pficommon-1.3.1.0-libdir.patch
new file mode 100644
index 00000000000..9bd0e4bf560
--- /dev/null
+++ b/dev-cpp/pficommon/files/pficommon-1.3.1.0-libdir.patch
@@ -0,0 +1,49 @@
+diff --git a/wscript b/wscript
+index dc1866e..c5b800c 100644
+--- a/wscript
++++ b/wscript
+@@ -6,18 +6,21 @@ out = 'build'
+
+ import Options
+ import sys
++import os
+
+ subdirs = 'src tools'
+
+ def options(opt):
+ opt.load('compiler_cxx')
+ opt.load('unittest_gtest')
++ opt.load('gnu_dirs')
+
+ opt.recurse(subdirs)
+
+ def configure(conf):
+ conf.check_tool('compiler_cxx')
+ conf.check_tool('unittest_gtest')
++ conf.check_tool('gnu_dirs')
+
+ conf.env.append_unique(
+ 'CXXFLAGS',
+@@ -28,6 +31,8 @@ def configure(conf):
+ conf.recurse(subdirs)
+
+ conf.define('PFICOMMON_VERSION', VERSION)
++
++ conf.env['VERSION'] = VERSION
+
+ conf.write_config_header('src/pfi-config.h')
+
+@@ -72,11 +77,11 @@ def build(bld):
+ bld(source = 'pficommon.pc.in',
+ prefix = bld.env['PREFIX'],
+ exec_prefix = '${prefix}',
+- libdir = '${prefix}/lib',
++ libdir = bld.env['LIBDIR'],
+ includedir = '${prefix}/include',
+ PACKAGE = APPNAME,
+ VERSION = VERSION)
+
+- bld.install_files('${PREFIX}/lib/pkgconfig', 'pficommon.pc')
++ bld.install_files(os.path.join(bld.env['LIBDIR'], 'pkgconfig'), 'pficommon.pc')
+
+ bld.recurse(subdirs)
diff --git a/dev-cpp/pficommon/files/pficommon-1.3.1.0-postgresql.patch b/dev-cpp/pficommon/files/pficommon-1.3.1.0-postgresql.patch
new file mode 100644
index 00000000000..0bf7096ad94
--- /dev/null
+++ b/dev-cpp/pficommon/files/pficommon-1.3.1.0-postgresql.patch
@@ -0,0 +1,13 @@
+diff --git a/src/database/wscript b/src/database/wscript
+index 8eca1d0..3916a7d 100644
+--- a/src/database/wscript
++++ b/src/database/wscript
+@@ -20,7 +20,7 @@ def configure(conf):
+ conf.env.BUILD_PGSQL = False
+ if not Options.options.disable_database:
+ try:
+- incdir = subprocess.check_output(['pg_config', '--includedir-server']).decode()
++ incdir = subprocess.check_output(['pg_config', '--includedir-server']).decode('utf-8')
+ libdir = subprocess.check_output(['pg_config', '--libdir']).decode()
+ if conf.check_cxx(lib = 'pq',
+ header_name = 'postgres.h',
diff --git a/dev-cpp/pficommon/files/pficommon-1.3.1.0-soname.patch b/dev-cpp/pficommon/files/pficommon-1.3.1.0-soname.patch
new file mode 100644
index 00000000000..040fb259bc7
--- /dev/null
+++ b/dev-cpp/pficommon/files/pficommon-1.3.1.0-soname.patch
@@ -0,0 +1,200 @@
+diff --git a/src/concurrent/wscript b/src/concurrent/wscript
+index 5aeb5ab..8700d68 100644
+--- a/src/concurrent/wscript
++++ b/src/concurrent/wscript
+@@ -19,6 +19,7 @@ def build(bld):
+ source = 'thread.cpp mutex.cpp rwmutex.cpp condition.cpp internal.cpp',
+ target = 'pficommon_concurrent',
+ includes = '.',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_system PTHREAD')
+
+ bld.program(
+diff --git a/src/data/wscript b/src/data/wscript
+index e99c7c3..df47caf 100644
+--- a/src/data/wscript
++++ b/src/data/wscript
+@@ -61,6 +61,7 @@ def build(bld):
+ ],
+ target = 'pficommon_data',
+ includes = incdirs,
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_system')
+
+ def t(src):
+diff --git a/src/database/mysql/wscript b/src/database/mysql/wscript
+index 79d5a23..5407091 100644
+--- a/src/database/mysql/wscript
++++ b/src/database/mysql/wscript
+@@ -7,4 +7,5 @@ def build(bld):
+ source = 'connection.cpp statement.cpp value.cpp',
+ target = 'pficommon_database_mysql',
+ includes = '. ..',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_concurrent MYSQL')
+diff --git a/src/database/postgresql/wscript b/src/database/postgresql/wscript
+index 9b834f8..5040a69 100644
+--- a/src/database/postgresql/wscript
++++ b/src/database/postgresql/wscript
+@@ -7,4 +7,5 @@ def build(bld):
+ source = 'connection.cpp statement.cpp result.cpp value.cpp',
+ target = 'pficommon_database_postgresql',
+ includes = '. ..',
++ vnum = bld.env['VERSION'],
+ use = 'PGSQL')
+diff --git a/src/database/wscript b/src/database/wscript
+index b491d4f..3916a7d 100644
+--- a/src/database/wscript
++++ b/src/database/wscript
+@@ -44,6 +44,7 @@ def build(bld):
+ t = bld.shlib(
+ source = '',
+ target = 'pficommon_database',
++ vnum = bld.env['VERSION'],
+ use = [])
+
+ if bld.env.BUILD_MYSQL:
+diff --git a/src/lang/wscript b/src/lang/wscript
+index e5538d9..e0ad364 100644
+--- a/src/lang/wscript
++++ b/src/lang/wscript
+@@ -20,6 +20,7 @@ def build(bld):
+
+ bld.shlib(
+ source = 'empty.cpp',
++ vnum = bld.env['VERSION'],
+ target = 'pficommon_lang')
+
+ bld.program(
+diff --git a/src/math/wscript b/src/math/wscript
+index 8e8e271..f855b3a 100644
+--- a/src/math/wscript
++++ b/src/math/wscript
+@@ -14,6 +14,7 @@ def build(bld):
+ bld.shlib(
+ source = 'random/mersenne_twister.cpp',
+ target = 'pficommon_math',
++ vnum = bld.env['VERSION'],
+ includes = '.')
+
+ def t(src):
+diff --git a/src/network/wscript b/src/network/wscript
+index 4b0873c..d5a9aee 100644
+--- a/src/network/wscript
++++ b/src/network/wscript
+@@ -56,11 +56,13 @@ def build(bld):
+ source = 'socket.cpp ipv4.cpp dns.cpp uri.cpp',
+ target = 'pficommon_network_base',
+ includes = '.',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_concurrent')
+
+ pfin = bld.shlib(
+ source = '',
+ target = 'pficommon_network',
++ vnum = bld.env['VERSION'],
+ use = [
+ 'pficommon_network_base',
+ 'pficommon_network_http',
+diff --git a/src/system/wscript b/src/system/wscript
+index 4068967..a6fc70c 100644
+--- a/src/system/wscript
++++ b/src/system/wscript
+@@ -21,6 +21,7 @@ def build(bld):
+ 'sysstat.cpp',
+ 'mmapper.cpp'],
+ target = 'pficommon_system',
++ vnum = bld.env['VERSION'],
+ includes = '.')
+
+ bld.program(
+diff --git a/src/text/wscript b/src/text/wscript
+index 2cb54df..e18310c 100644
+--- a/src/text/wscript
++++ b/src/text/wscript
+@@ -16,6 +16,7 @@ def build(bld):
+ source = 'xhtml.cpp csv.cpp json/parser.cpp',
+ target = 'pficommon_text',
+ includes = '. json',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_data pficommon_system')
+
+ bld.program(
+diff --git a/src/util/wscript b/src/util/wscript
+index c971da4..7ed427f 100644
+--- a/src/util/wscript
++++ b/src/util/wscript
+@@ -8,6 +8,7 @@ def build(bld):
+
+ bld.shlib(
+ source = '',
++ vnum = bld.env['VERSION'],
+ target = 'pficommon_util')
+
+ bld(features = 'cxx cprogram gtest',
+diff --git a/src/visualization/wscript b/src/visualization/wscript
+index bf0500a..04469a1 100644
+--- a/src/visualization/wscript
++++ b/src/visualization/wscript
+@@ -27,6 +27,7 @@ def build(bld):
+ v = bld.shlib(
+ source = ['empty.cpp'],
+ target = 'pficommon_visualization',
++ vnum = bld.env['VERSION'],
+ use = [])
+
+ bld.program(
+diff --git a/src/wscript b/src/wscript
+index 8dfd9e8..4af7585 100644
+--- a/src/wscript
++++ b/src/wscript
+@@ -26,6 +26,7 @@ def build(bld):
+ b = bld.shlib(
+ source = 'empty.cpp',
+ target = 'pficommon',
++ vnum = bld.env['VERSION'],
+ use = [
+ 'pficommon_concurrent',
+ 'pficommon_data',
+diff --git a/src/network/cgi/wscript b/src/network/cgi/wscript
+index 29c44fa..1863394 100644
+--- a/src/network/cgi/wscript
++++ b/src/network/cgi/wscript
+@@ -47,6 +47,7 @@ def build(bld):
+ source = 'base.cpp xhtml_cgi.cpp xhtml_builder.cpp inserter.cpp cgi.cpp server.cpp util.cpp',
+ target = 'pficommon_network_cgi',
+ includes = '. ..',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_text pficommon_concurrent pficommon_network_http PTHREAD')
+
+ if bld.env.BUILD_FCGI:
+diff --git a/src/network/http/wscript b/src/network/http/wscript
+index 7e2bbbe..dbfe480 100644
+--- a/src/network/http/wscript
++++ b/src/network/http/wscript
+@@ -14,4 +14,5 @@ def build(bld):
+ source = 'base.cpp',
+ target = 'pficommon_network_http',
+ includes = '. ..',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_network_base')
+diff --git a/src/network/mprpc/wscript b/src/network/mprpc/wscript
+index 940bdd4..0e093f6 100644
+--- a/src/network/mprpc/wscript
++++ b/src/network/mprpc/wscript
+@@ -21,4 +21,5 @@ def build(bld):
+ 'socket.cpp'
+ ],
+ target = 'pficommon_network_mprpc',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_concurrent pficommon_network_base MSGPACK')
+diff --git a/src/network/rpc/wscript b/src/network/rpc/wscript
+index 74c006c..46121d6 100644
+--- a/src/network/rpc/wscript
++++ b/src/network/rpc/wscript
+@@ -17,4 +17,5 @@ def build(bld):
+ source = 'base.cpp',
+ target = 'pficommon_network_rpc',
+ includes = '. ..',
++ vnum = bld.env['VERSION'],
+ use = 'pficommon_network_base pficommon_concurrent pficommon_system')
diff --git a/dev-cpp/pficommon/metadata.xml b/dev-cpp/pficommon/metadata.xml
new file mode 100644
index 00000000000..d2476e20793
--- /dev/null
+++ b/dev-cpp/pficommon/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="fcgi">Build FCGI feature</flag>
+ <flag name="mprpc">Build MessagePack RPC feature</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pfi/pficommon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild b/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild
new file mode 100644
index 00000000000..775c4587a3e
--- /dev/null
+++ b/dev-cpp/pficommon/pficommon-1.3.1.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+inherit python-any-r1 waf-utils eutils
+
+DESCRIPTION="General purpose C++ library for PFI"
+HOMEPAGE="https://github.com/pfi/pficommon"
+SRC_URI="https://github.com/pfi/pficommon/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="fcgi imagemagick mprpc mysql postgres test"
+
+RDEPEND="fcgi? ( dev-libs/fcgi )
+ imagemagick? (
+ media-libs/lcms
+ media-gfx/imagemagick[cxx]
+ sys-devel/libtool
+ )
+ mprpc? ( dev-libs/msgpack )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ "
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ test? ( dev-cpp/gtest )"
+
+src_unpack() {
+ unpack ${A}
+ mv pfi-pficommon-* "${S}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libdir.patch \
+ "${FILESDIR}"/${P}-soname.patch \
+ "${FILESDIR}"/${P}-postgresql.patch \
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+}
+
+src_configure() {
+ if use fcgi; then
+ myconf="${myconf} --with-fcgi=/usr"
+ else
+ myconf="${myconf} --disable-fcgi"
+ fi
+ use imagemagick || myconf="${myconf} --disable-magickpp"
+ use mprpc || myconf="${myconf} --disable-mprpc"
+ if ! use mysql && ! use postgres; then
+ myconf="${myconf} --disable-database"
+ fi
+ waf-utils_src_configure ${myconf}
+}