aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Barboza <bmg.andre@gmail.com>2017-01-06 00:15:43 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-01-06 00:20:07 +0700
commit643eb91e6fcdc7aca0aa02881f303a4cc80305f3 (patch)
tree6277a60d85d93c580ca13ef6869ce93d63de4515
parent9aeca180be4637334afba35b70785c0885edf154 (diff)
libraries/proxygen: Added (Facebook's C++ HTTP Libraries).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/proxygen/README9
-rw-r--r--libraries/proxygen/ax_prefix_config_h.m4203
-rw-r--r--libraries/proxygen/proxygen.SlackBuild104
-rw-r--r--libraries/proxygen/proxygen.info12
-rw-r--r--libraries/proxygen/proxygen.patch15
-rw-r--r--libraries/proxygen/slack-desc19
6 files changed, 362 insertions, 0 deletions
diff --git a/libraries/proxygen/README b/libraries/proxygen/README
new file mode 100644
index 0000000000000..afff9833d9117
--- /dev/null
+++ b/libraries/proxygen/README
@@ -0,0 +1,9 @@
+Proxygen: Facebook's C++ HTTP Libraries
+
+This project comprises the core C++ HTTP abstractions used at Facebook.
+Internally, it is used as the basis for building many HTTP servers,
+proxies, and clients. This release focuses on the common HTTP
+abstractions and our simple HTTPServer framework. Future releases will
+provide simple client APIs as well. The framework supports HTTP/1.1,
+SPDY/3, SPDY/3.1, and HTTP/2. The goal is to provide a simple,
+performant, and modern C++ HTTP library.
diff --git a/libraries/proxygen/ax_prefix_config_h.m4 b/libraries/proxygen/ax_prefix_config_h.m4
new file mode 100644
index 0000000000000..c17563f4411d8
--- /dev/null
+++ b/libraries/proxygen/ax_prefix_config_h.m4
@@ -0,0 +1,203 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
+#
+# DESCRIPTION
+#
+# Generate an installable config.h.
+#
+# A package should not normally install its config.h as a system header,
+# but if it must, this macro can be used to avoid namespace pollution by
+# making a copy of config.h with a prefix added to all the macro names.
+#
+# Each "#define SOMEDEF" line of the configuration header has the given
+# prefix added, in the same case as the first character of the macro name.
+#
+# Defaults:
+#
+# OUTPUT-HEADER = $PACKAGE-config.h
+# PREFIX = $PACKAGE
+# ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
+#
+# Your configure.ac script should contain both macros in this order.
+#
+# Example:
+#
+# AC_INIT(config.h.in) # config.h.in as created by "autoheader"
+# AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
+# AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
+# AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
+# AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
+# AC_C_CONST_H # makes "#undef const"
+# AC_OUTPUT(Makefile) # creates the "config.h" now
+# # and also mylib/_config.h
+#
+# If the argument to AX_PREFIX_CONFIG_H would have been omitted then the
+# default output file would have been called simply "testpkg-config.h",
+# but even under the name "mylib/_config.h" it contains prefix-defines
+# like
+#
+# #ifndef TESTPKG_VERSION
+# #define TESTPKG_VERSION "0.1.1"
+# #endif
+# #ifndef TESTPKG_NEED_MEMORY_H
+# #define TESTPKG_NEED_MEMORY_H 1
+# #endif
+# #ifndef _testpkg_const
+# #define _testpkg_const _const
+# #endif
+#
+# and this "mylib/_config.h" can be installed along with other header
+# files, which is most convenient when creating a shared library (that has
+# some headers) whose functionality depends on features detected at
+# compile-time. No need to invent some "mylib-confdefs.h.in" manually.
+#
+# Note that some AC_DEFINEs that end up in the config.h file are actually
+# self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T
+# say that they "will define inline|const|off_t if the system does not do
+# it by itself". You might want to clean up about these - consider an
+# extra mylib/conf.h that reads something like:
+#
+# #include <mylib/_config.h>
+# #ifndef _testpkg_const
+# #define _testpkg_const const
+# #endif
+#
+# and then start using _testpkg_const in the header files. That is also a
+# good thing to differentiate whether some library-user has starting to
+# take up with a different compiler, so perhaps it could read something
+# like this:
+#
+# #ifdef _MSC_VER
+# #include <mylib/_msvc.h>
+# #else
+# #include <mylib/_config.h>
+# #endif
+# #ifndef _testpkg_const
+# #define _testpkg_const const
+# #endif
+#
+# LICENSE
+#
+# Copyright (c) 2014 Reuben Thomas <rrt@sc3d.org>
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2008 Marten Svantesson
+# Copyright (c) 2008 Gerald Point <Gerald.Point@labri.fr>
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 15
+
+AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl
+AC_PREREQ([2.62])
+AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl
+AC_CONFIG_COMMANDS(m4_default([$1], [$PACKAGE-config.h]),[dnl
+AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
+AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
+AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
+AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
+AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
+AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
+m4_pushdef([_script],[conftest.prefix])dnl
+m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
+_OUT=`echo m4_default([$1], [$PACKAGE-config.h])`
+_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
+_PKG=`echo m4_default([$2], [$PACKAGE])`
+_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
+_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
+_INP=`echo "$3" | sed -e 's/ *//'`
+if test ".$_INP" = "."; then
+ for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
+ case "$ac_file" in
+ *.h) _INP=$ac_file ;;
+ *)
+ esac
+ test ".$_INP" != "." && break
+ done
+fi
+if test ".$_INP" = "."; then
+ case "$_OUT" in
+ */*) _INP=`basename "$_OUT"`
+ ;;
+ *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
+ ;;
+ *) _INP=config.h
+ ;;
+ esac
+fi
+if test -z "$_PKG" ; then
+ AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
+else
+ if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
+ _INP="$srcdir/$_INP"
+ fi fi
+ AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
+ if test -f $_INP ; then
+ AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"]) > _script
+ AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"]) >> _script
+ AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"]) >> _script
+ AS_ECHO(["@%:@def[]ine $_UPP""_\\1\\2\\"]) >> _script
+ AS_ECHO(["@%:@endif/"]) >> _script
+ AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"]) >> _script
+ AS_ECHO(["@%:@define $_LOW""_\\1\\2\\"]) >> _script
+ AS_ECHO(["@%:@endif/"]) >> _script
+ # now executing _script on _DEF input to create _OUT output file
+ echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
+ echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
+
+ sed -f _script $_INP >>$tmp/pconfig.h
+ echo ' ' >>$tmp/pconfig.h
+ echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
+ echo "@%:@endif" >>$tmp/pconfig.h
+ if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
+ AC_MSG_NOTICE([$_OUT is unchanged])
+ else
+ ac_dir=`AS_DIRNAME(["$_OUT"])`
+ AS_MKDIR_P(["$ac_dir"])
+ rm -f "$_OUT"
+ mv $tmp/pconfig.h "$_OUT"
+ fi
+ else
+ AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
+ fi
+ rm -f conftest.*
+fi
+m4_popdef([_symbol])dnl
+m4_popdef([_script])dnl
+AS_VAR_POPDEF([_INP])dnl
+AS_VAR_POPDEF([_UPP])dnl
+AS_VAR_POPDEF([_LOW])dnl
+AS_VAR_POPDEF([_PKG])dnl
+AS_VAR_POPDEF([_DEF])dnl
+AS_VAR_POPDEF([_OUT])dnl
+],[PACKAGE="$PACKAGE"])])
diff --git a/libraries/proxygen/proxygen.SlackBuild b/libraries/proxygen/proxygen.SlackBuild
new file mode 100644
index 0000000000000..97f18399846cb
--- /dev/null
+++ b/libraries/proxygen/proxygen.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Slackware build script for Facebook Proxygen
+
+# Copyright 2017 Andre Barboza, Belo Horizonte - Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=proxygen
+VERSION=${VERSION:-20161230}
+COMMIT=${COMMIT:-eb6235bf1f9c36756934b6619bf82a4070828288}
+GTEST_VERSION=${GTEST_VERSION:-1.8.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$COMMMIT
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$COMMIT
+patch -p 1 < $CWD/proxygen.patch
+( cd proxygen/lib/test
+ tar xvf $CWD/googletest-release-${GTEST_VERSION}.tar.gz
+)
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+pushd proxygen
+cp $CWD/ax_prefix_config_h.m4 m4/
+autoreconf -ivf
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -std=c++14" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+popd
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CONTRIBUTING.md LICENSE PATENTS README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/proxygen/proxygen.info b/libraries/proxygen/proxygen.info
new file mode 100644
index 0000000000000..ebe3176010635
--- /dev/null
+++ b/libraries/proxygen/proxygen.info
@@ -0,0 +1,12 @@
+PRGNAM="proxygen"
+VERSION="20161230"
+HOMEPAGE="https://github.com/facebook/proxygen"
+DOWNLOAD="https://github.com/facebook/proxygen/archive/eb6235b/proxygen-20161230.tar.gz \
+ https://github.com/google/googletest/archive/release-1.8.0/googletest-release-1.8.0.tar.gz"
+MD5SUM="63727aad4e3272c7a93c82a42a14c172 \
+ 16877098823401d1bf2ed7891d7dce36"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="glog gflags double-conversion folly wangle"
+MAINTAINER="Andre Barboza"
+EMAIL="bmg.andre@gmail.com"
diff --git a/libraries/proxygen/proxygen.patch b/libraries/proxygen/proxygen.patch
new file mode 100644
index 0000000000000..32fd3c8947680
--- /dev/null
+++ b/libraries/proxygen/proxygen.patch
@@ -0,0 +1,15 @@
+diff -ur proxygen-eb6235bf1f9c36756934b6619bf82a4070828288.old/proxygen/lib/test/Makefile.am proxygen-eb6235bf1f9c36756934b6619bf82a4070828288/proxygen/lib/test/Makefile.am
+--- proxygen-eb6235bf1f9c36756934b6619bf82a4070828288.old/proxygen/lib/test/Makefile.am 2016-12-30 17:26:15.000000000 -0200
++++ proxygen-eb6235bf1f9c36756934b6619bf82a4070828288/proxygen/lib/test/Makefile.am 2017-01-04 23:48:53.053074604 -0200
+@@ -2,11 +2,6 @@
+
+ BUILT_SOURCES = googletest-release-1.8.0/googletest/src/gtest-all.cc
+
+-googletest-release-1.8.0/googletest/src/gtest-all.cc:
+- wget https://github.com/google/googletest/archive/release-1.8.0.zip
+- unzip release-1.8.0.zip
+-
+-
+ check_LTLIBRARIES = libtesttransport.la
+ libtesttransport_la_SOURCES = TestAsyncTransport.cpp
+
diff --git a/libraries/proxygen/slack-desc b/libraries/proxygen/slack-desc
new file mode 100644
index 0000000000000..6599fcf0678b6
--- /dev/null
+++ b/libraries/proxygen/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+proxygen: proxygen (Facebook's C++ HTTP Libraries)
+proxygen:
+proxygen: This project comprises the core C++ HTTP abstractions used at
+proxygen: Facebook. Internally, it is used as the basis for building many
+proxygen: HTTP servers, proxies, and clients. This release focuses on
+proxygen: the common HTTP abstractions and our simple HTTPServer framework.
+proxygen:
+proxygen:
+proxygen:
+proxygen: https://github.com/facebook/proxygen
+proxygen: