From e15b0af40926a6636fbcac2f75b9a97349a6c47d Mon Sep 17 00:00:00 2001
From: blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sun, 7 Oct 2007 00:13:24 +0000
Subject: [PATCH] added opal #2486

git-svn-id: svn://svn.openwrt.org/openwrt/packages@9165 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 libs/opal/Makefile                         | 59 ++++++++++++++++
 libs/opal/patches/001-opal-configure.patch | 78 ++++++++++++++++++++++
 2 files changed, 137 insertions(+)
 create mode 100644 libs/opal/Makefile
 create mode 100644 libs/opal/patches/001-opal-configure.patch

diff --git a/libs/opal/Makefile b/libs/opal/Makefile
new file mode 100644
index 000000000..8d1c9aaff
--- /dev/null
+++ b/libs/opal/Makefile
@@ -0,0 +1,59 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 8274 2007-07-31 11:22:44Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=opal
+PKG_VERSION:=2.3.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=ftp://peternixon.net/pub/voxgratia
+PKG_MD5SUM:=5a9d7f060527885bed3a26324de6dcfc
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+# Set location of pwlib (Which needs to have been built already)
+PWLIBDIR=$(BUILD_DIR)/pwlib-1.11.1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libopal
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+pwlib +uclibcxx
+  TITLE:=Open Phone Abstraction Library
+  DESCRIPTION:=\
+	Open Phone Abstraction Library, implementation of the ITU H.323\\\
+	teleconferencing protocol, and successor of the openh323 library. It\\\
+	supports not only the H.323 protocol but also SIP and IAX2.\\\
+  URL:=http://www.voxgratia.org/
+endef
+
+CONFIGURE_ARGS += \
+	--enable-minsize \
+	--enable-audio \
+	--disable-video
+
+CONFIGURE_VARS += \
+	CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
+
+MAKE_FLAGS += \
+	CFLAGS="$(TARGET_CFLAGS)" \
+	CCFLAGS="$(TARGET_CFLAGS)" \
+	optnoshared
+
+define Build/InstallDev
+	ln -sf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
+endef
+
+define Build/UninstallDev
+	rm -rf $(BUILD_DIR)/$(PKG_NAME)
+endef
+
+$(eval $(call BuildPackage,libopal))
diff --git a/libs/opal/patches/001-opal-configure.patch b/libs/opal/patches/001-opal-configure.patch
new file mode 100644
index 000000000..a12ef8d76
--- /dev/null
+++ b/libs/opal/patches/001-opal-configure.patch
@@ -0,0 +1,78 @@
+diff -u -r1.42 configure
+--- opal/configure	5 Aug 2007 22:34:08 -0000	1.42
++++ opal/configure	6 Oct 2007 17:33:21 -0000
+@@ -2668,10 +2668,10 @@
+ if eval "test \"\${$as_ac_File+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+-   { (exit 1); exit 1; }; }
++#  test "$cross_compiling" = yes &&
++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
++#   { (exit 1); exit 1; }; }
+ if test -r "${PWLIBDIR}/version.h"; then
+   eval "$as_ac_File=yes"
+ else
+@@ -2692,10 +2692,10 @@
+ if eval "test \"\${$as_ac_File+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+-   { (exit 1); exit 1; }; }
++#  test "$cross_compiling" = yes &&
++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
++#   { (exit 1); exit 1; }; }
+ if test -r "${OPALDIR}/../pwlib/version.h"; then
+   eval "$as_ac_File=yes"
+ else
+@@ -2717,10 +2717,10 @@
+ if eval "test \"\${$as_ac_File+set}\" = set"; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+-   { (exit 1); exit 1; }; }
++#  test "$cross_compiling" = yes &&
++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
++#   { (exit 1); exit 1; }; }
+ if test -r "${HOME}/pwlib/include/ptlib.h"; then
+   eval "$as_ac_File=yes"
+ else
+@@ -2741,10 +2741,10 @@
+ if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+-   { (exit 1); exit 1; }; }
++#  test "$cross_compiling" = yes &&
++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
++#   { (exit 1); exit 1; }; }
+ if test -r "/usr/local/include/ptlib.h"; then
+   ac_cv_file__usr_local_include_ptlib_h=yes
+ else
+@@ -2803,10 +2803,10 @@
+ if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  test "$cross_compiling" = yes &&
+-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+-   { (exit 1); exit 1; }; }
++#  test "$cross_compiling" = yes &&
++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
++#   { (exit 1); exit 1; }; }
+ if test -r "/usr/include/ptlib.h"; then
+   ac_cv_file__usr_include_ptlib_h=yes
+ else