Fix build and install errors on Mac OS X. Add missing scripts to forward IP ports on Mac OS X.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1209010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
adfedb08bb
commit
cc233e5d22
11 changed files with 85 additions and 17 deletions
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = etc kernel modules components samples doc ubuntu
|
||||
SUBDIRS = etc kernel modules components samples doc macos ubuntu
|
||||
|
||||
datadir=$(prefix)
|
||||
dist_data_DATA = AUTHORS README LICENSE COPYING NOTICE NEWS
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ private:
|
|||
template<typename A, typename B> friend const bool hasContent(const failable<A, B>& m);
|
||||
template<typename A, typename B> friend const A content(const failable<A, B>& m);
|
||||
template<typename A, typename B> friend const B reason(const failable<A, B>& m);
|
||||
template<typename A, typename B> friend const failable<A, B> mkfailure(const B& f, const bool log = true);
|
||||
template<typename A, typename B> friend const failable<A, B> mkfailure(const B& f, const bool log);
|
||||
template<typename A> friend const failable<A, string> mkfailure();
|
||||
|
||||
bool hasv;
|
||||
|
|
@ -296,7 +296,7 @@ template<typename V, typename F> const failable<V, F> mkfailure(const F& f, cons
|
|||
}
|
||||
|
||||
template<typename V> const failable<V> mkfailure(const char* f, const bool log = true) {
|
||||
return mkfailure<V, string>(string(f));
|
||||
return mkfailure<V, string>(string(f), log);
|
||||
}
|
||||
|
||||
template<typename V> const failable<V> mkfailure() {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
dist_macos_SCRIPTS =
|
||||
dist_macos_SCRIPTS = ip-redirect ip-redirect-all
|
||||
macosdir=$(prefix)/macos
|
||||
|
||||
dist_noinst_SCRIPTS = macos-install
|
||||
|
|
|
|||
36
sca-cpp/trunk/macos/ip-redirect
Executable file
36
sca-cpp/trunk/macos/ip-redirect
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Redirect TCP/IP traffic to a particular IP address from one port to another
|
||||
# port. This is useful to handle incoming traffic on a standard reserved port
|
||||
# like 80 or 443 for example in an unprivileged user process bound to a non
|
||||
# reserved port.
|
||||
# Example: ip-redirect 80 8090 10.1.1.1
|
||||
|
||||
sport=$1
|
||||
tport=$2
|
||||
dest=$3
|
||||
if [ "$dest" = "" ]; then
|
||||
dest="127.0.0.1"
|
||||
fi
|
||||
|
||||
# Delete existing rule
|
||||
sudo /sbin/ipfw list | grep "fwd $dest,$sport tcp from any" | awk '{ printf "sudo ipfw delete %s\n", $1 }' | /bin/sh
|
||||
|
||||
# Redirect incoming traffic
|
||||
sudo /sbin/ipfw add $sport fwd $dest,$sport tcp from any to $dest $tport
|
||||
|
||||
27
sca-cpp/trunk/macos/ip-redirect-all
Executable file
27
sca-cpp/trunk/macos/ip-redirect-all
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Redirect TCP/IP traffic to all local addresses from one port to another
|
||||
# Example: ip-redirect-all 80 8090
|
||||
|
||||
here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
|
||||
sport=$1
|
||||
tport=$2
|
||||
|
||||
# Redirect traffic
|
||||
/sbin/ifconfig | grep "inet " | awk '{ print $2 }' | xargs -I {} $here/ip-redirect $sport $tport {}
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
# under the License.
|
||||
|
||||
# Install a complete distribution, the required system tools and libraries, the
|
||||
# runtime dependencies and the Tuscany SCA runtime on a fresh MacOS 10.6.7
|
||||
# runtime dependencies and the Tuscany SCA runtime on a fresh Mac OS X 10.6.7
|
||||
# system.
|
||||
|
||||
# Display commands as they are executed
|
||||
|
|
@ -24,10 +24,6 @@ set -x
|
|||
|
||||
# Build and install in the current directory
|
||||
build=`pwd`
|
||||
build=$build/build
|
||||
rm -rf $build
|
||||
mkdir $build
|
||||
cd $build
|
||||
|
||||
# Install pkg-config
|
||||
curl -OL http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz
|
||||
|
|
|
|||
|
|
@ -17,16 +17,21 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Create app links and sub-directories if needed
|
||||
aprefix=$1
|
||||
tprefix=$2
|
||||
nprefix=$3
|
||||
|
||||
# Create app links to Nuvem and Tuscany components
|
||||
cd $1
|
||||
for n in `ls apps | awk '{ printf "apps/%s/nuvem\n", $1 }'`; do
|
||||
if [ ! -e "$n" ]; then
|
||||
ln -s ../../../../../nuvem/nuvem-parallel/nuvem "$n"
|
||||
ln -s "$nprefix/nuvem-parallel/nuvem" "$n"
|
||||
fi
|
||||
done
|
||||
|
||||
for n in `ls apps | awk '{ printf "apps/%s/lib\n", $1 }'`; do
|
||||
if [ ! -e "$n" ]; then
|
||||
ln -s ../../../../components "$n"
|
||||
ln -s "$tprefix/components" "$n"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ Alias /home/home.b64 $here/htdocs/home/home.b64
|
|||
|
||||
EOF
|
||||
|
||||
# Create app links and sub-directories if needed
|
||||
./mkapplinks
|
||||
# Create app resource links
|
||||
./mkapplinks . ../../../.. ../../../../../nuvem
|
||||
|
||||
# Configure app resource aliases
|
||||
cat >>tmp/conf/svhost-ssl.conf <<EOF
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ Alias /home/home.b64 $here/htdocs/home/home.b64
|
|||
|
||||
EOF
|
||||
|
||||
# Create app links and sub-directories if needed
|
||||
./mkapplinks
|
||||
# Create app resource links
|
||||
./mkapplinks . ../../../.. ../../../../../nuvem
|
||||
|
||||
# Configure app resource aliases
|
||||
cat >>tmp/conf/svhost.conf <<EOF
|
||||
|
|
|
|||
|
|
@ -45,13 +45,17 @@
|
|||
#include <http_request.h>
|
||||
// Ignore conversion warnings in HTTPD 2.3.15 header
|
||||
#ifdef WANT_MAINTAINER_MODE
|
||||
#ifndef IS_DARWIN
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif
|
||||
#endif
|
||||
#include <http_protocol.h>
|
||||
// Re-enable conversion warnings
|
||||
#ifdef WANT_MAINTAINER_MODE
|
||||
#ifndef IS_DARWIN
|
||||
#pragma GCC diagnostic warning "-Wconversion"
|
||||
#endif
|
||||
#endif
|
||||
// Hack to workaround compile error with HTTPD 2.3.8
|
||||
#define aplog_module_index aplog_module_index = 0
|
||||
#include <http_log.h>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
# under the License.
|
||||
|
||||
# Redirect TCP/IP traffic to all local addresses from one port to another
|
||||
# Example: ip-redirect 80 8090
|
||||
# Example: ip-redirect-all 80 8090
|
||||
|
||||
here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
|
||||
sport=$1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue