23215099 Deliver libvpx in Solaris
authorNiveditha Rau <Niveditha.Rau@Oracle.COM>
Fri, 06 May 2016 13:33:29 -0700
changeset 5939 77fb180fb4fa
parent 5938 71aca4f1b60a
child 5940 44e86e881acf
23215099 Deliver libvpx in Solaris PSARC/2016/270 libvpx and libwebp
components/desktop/libvpx/Makefile
components/desktop/libvpx/libvpx.license
components/desktop/libvpx/libvpx.p5m
components/desktop/libvpx/patches/00-ignore-unknown-configure.patch
components/desktop/libvpx/patches/02-solaris-shared.patch
components/desktop/libvpx/patches/03-exports.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/Makefile	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,73 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+# Prefer 32-bit over 64-bit for now.
+BUILD_BITS=32_and_64
+# For now, all things built for C++11 require gcc.
+COMPILER= gcc
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		libvpx
+COMPONENT_VERSION=	1.4.0
+COMPONENT_PROJECT_URL=	http://www.webmproject.org/
+COMPONENT_ARCHIVE= 	$(COMPONENT_SRC).tar.bz2
+COMPONENT_ARCHIVE_HASH= \
+	sha256:f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4
+COMPONENT_ARCHIVE_URL=	http://downloads.webmproject.org/releases/webm/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	library/libvpx
+TPNO=			25516
+
+# Required for 64-bit builds.
+LDFLAGS += $(CC_BITS)
+LDFLAGS += -Wl,-zgnu-version-script-compat
+
+ASLR_MODE = $(ASLR_ENABLE)
+
+TEST_TARGET= $(NO_TESTS)
+
+include $(WS_MAKE_RULES)/common.mk
+
+# Assumes GNU versions of tools such as awk and grep.
+CONFIGURE_ENV += PATH=$(GNUBIN):$(PATH)
+COMPONENT_BUILD_ENV += PATH=$(GNUBIN):$(PATH)
+COMPONENT_INSTALL_ENV += PATH=$(GNUBIN):$(PATH)
+COMPONENT_TEST_ENV += PATH=$(GNUBIN):$(PATH)
+
+# Only deliver 64-bit binaries.
+CONFIGURE_OPTIONS.32 += --disable-install-bins
+CONFIGURE_OPTIONS += --disable-install-srcs
+CONFIGURE_OPTIONS += --disable-static
+CONFIGURE_OPTIONS += --enable-pic
+CONFIGURE_OPTIONS += --enable-shared
+
+# specify the targets
+CONFIGURE_OPTIONS.sparc += --target=sparc-solaris-gcc
+CONFIGURE_OPTIONS.i386.32 += --target=x86-solaris-gcc
+CONFIGURE_OPTIONS.i386.64 += --target=x86_64-solaris-gcc
+
+REQUIRED_PACKAGES += developer/yasm
+REQUIRED_PACKAGES += system/library/math
+REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/libvpx.license	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,180 @@
+Copyright (c) 2010, The WebM Project authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+  * Neither the name of Google, nor the WebM Project, nor the names
+    of its contributors may be used to endorse or promote products
+    derived from this software without specific prior written
+    permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"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 COPYRIGHT
+HOLDER OR CONTRIBUTORS 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.
+
+---
+googletest
+
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"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 COPYRIGHT
+OWNER OR CONTRIBUTORS 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.
+
+---
+libwebm
+
+Copyright (c) 2010, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+  * Neither the name of Google nor the names of its contributors may
+    be used to endorse or promote products derived from this software
+    without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"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 COPYRIGHT
+HOLDER OR CONTRIBUTORS 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.
+
+---
+libyuv
+
+Copyright 2011 The LibYuv Project Authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+	
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+	
+  * Neither the name of Google nor the names of its contributors may
+    be used to endorse or promote products derived from this software
+    without specific prior written permission.
+	
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"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 COPYRIGHT
+HOLDER OR CONTRIBUTORS 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.
+
+---
+x86inc
+
+Copyright (C) 2005-2012 x264 project
+
+Authors: Loren Merritt <[email protected]>
+         Anton Mitrofanov <[email protected]>
+         Jason Garrett-Glaser <[email protected]>
+         Henrik Gramner <[email protected]>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+---
+tools/cpplint.py
+
+# Copyright (c) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#    * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#    * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#    * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "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 COPYRIGHT
+# OWNER OR CONTRIBUTORS 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.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/libvpx.p5m	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,60 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> \
+    default mangler.man.stability "pass-through volatile">
+set name=pkg.fmri \
+    value=pkg:/codec/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="Google VP8/VP9 video codec"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value="org.opensolaris.category.2008:System/Multimedia Libraries"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=name value=com.oracle.info.description=libvpx
+set name=org.opensolaris.arc-caseid value=PSARC/2016/270
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file path=usr/bin/vpxdec
+file path=usr/bin/vpxenc
+file path=usr/include/vpx/vp8.h
+file path=usr/include/vpx/vp8cx.h
+file path=usr/include/vpx/vp8dx.h
+file path=usr/include/vpx/vpx_codec.h
+file path=usr/include/vpx/vpx_decoder.h
+file path=usr/include/vpx/vpx_encoder.h
+file path=usr/include/vpx/vpx_frame_buffer.h
+file path=usr/include/vpx/vpx_image.h
+file path=usr/include/vpx/vpx_integer.h
+link path=usr/lib/$(MACH64)/libvpx.so target=libvpx.so.2.0.0
+link path=usr/lib/$(MACH64)/libvpx.so.2 target=libvpx.so.2.0.0
+link path=usr/lib/$(MACH64)/libvpx.so.2.0 target=libvpx.so.2.0.0
+file path=usr/lib/$(MACH64)/libvpx.so.2.0.0
+file path=usr/lib/$(MACH64)/pkgconfig/vpx.pc
+link path=usr/lib/libvpx.so target=libvpx.so.2.0.0
+link path=usr/lib/libvpx.so.2 target=libvpx.so.2.0.0
+link path=usr/lib/libvpx.so.2.0 target=libvpx.so.2.0.0
+file path=usr/lib/libvpx.so.2.0.0
+file path=usr/lib/pkgconfig/vpx.pc
+license libvpx.license license="WebM License"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/patches/00-ignore-unknown-configure.patch	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,28 @@
+Needed because our configure.mk assumes it can blindly use unknown
+configure options and livbpx doesn't actually use GNU autoconf.
+
+Not appropriate for upstream.
+
+--- libvpx-1.4.0/build/make/configure.sh	2015-04-03 11:49:19.000000000 -0700
++++ libvpx-1.4.0/build/make/configure.sh	2015-06-12 13:11:14.117716080 -0700
[email protected]@ -13,6 +13,11 @@
+ #
+ # Logging / Output Functions
+ #
++warn_unknown(){
++  echo "Ignoring unknown option \"$1\"."
++  echo "See $0 --help for available options."
++}
++
+ die_unknown(){
+   echo "Unknown option \"$1\"."
+   echo "See $0 --help for available options."
[email protected]@ -567,7 +572,7 @@
+         show_help
+         ;;
+       *)
+-        die_unknown $opt
++        warn_unknown $opt
+         ;;
+     esac
+   done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/patches/02-solaris-shared.patch	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,21 @@
+A proper fix to include Solaris in the exception is needed before this can go upstream.
+
+Not appropriate for upstream in current form.
+
+XXX file upstream bug
+
+--- libvpx-1.4.0/configure	2015-04-03 11:49:19.000000000 -0700
++++ libvpx-1.4.0/configure	2015-06-15 13:37:48.713588212 -0700
[email protected]@ -548,11 +548,7 @@
+         # here rather than at option parse time because the target auto-detect
+         # magic happens after the command line has been parsed.
+         if ! enabled linux; then
+-            if enabled gnu; then
+-                echo "--enable-shared is only supported on ELF; assuming this is OK"
+-            else
+-                die "--enable-shared only supported on ELF for now"
+-            fi
++            echo "--enable-shared is only supported on ELF; assuming this is OK"
+         fi
+     fi
+     if [ -z "$CC" ] || enabled external_build; then
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/libvpx/patches/03-exports.patch	Fri May 06 13:33:29 2016 -0700
@@ -0,0 +1,33 @@
+The *_mem_map symbols only exist in an older version; this fix should be
+upstreamed.
+
+The vpx_svc_* symbols only exist if you enable experimental spatial service
+support.  This part of the patch is not appropriate for upstream.
+
+XXX file upstream bug
+
+--- libvpx-1.4.0/vpx/exports_dec	2015-04-03 11:49:19.000000000 -0700
++++ libvpx-1.4.0.new/vpx/exports_dec	2015-06-15 14:07:20.317823881 -0700
[email protected]@ -1,10 +1,8 @@
+ text vpx_codec_dec_init_ver
+ text vpx_codec_decode
+ text vpx_codec_get_frame
+-text vpx_codec_get_mem_map
+ text vpx_codec_get_stream_info
+ text vpx_codec_peek_stream_info
+ text vpx_codec_register_put_frame_cb
+ text vpx_codec_register_put_slice_cb
+ text vpx_codec_set_frame_buffer_functions
+-text vpx_codec_set_mem_map
+--- libvpx-1.4.0/vpx/exports_enc	2015-04-03 11:49:19.000000000 -0700
++++ libvpx-1.4.0.new/vpx/exports_enc	2015-06-15 14:51:05.518298961 -0700
[email protected]@ -7,9 +7,3 @@
+ text vpx_codec_get_global_headers
+ text vpx_codec_get_preview_frame
+ text vpx_codec_set_cx_data_buf
+-text vpx_svc_dump_statistics
+-text vpx_svc_encode
+-text vpx_svc_get_message
+-text vpx_svc_init
+-text vpx_svc_release
+-text vpx_svc_set_options