public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opusfile/files/, media-libs/opusfile/
@ 2021-01-07 11:33 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-01-07 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     ad06c59965c3c5d69ca9bbfb89e1acd1bd255353
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  7 11:33:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 11:33:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad06c599

media-libs/opusfile: cleanup old

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/opusfile/Manifest                       |   1 -
 .../opusfile/files/opusfile-0.11-libressl.patch    | 142 ---------------------
 media-libs/opusfile/opusfile-0.11.ebuild           |  43 -------
 3 files changed, 186 deletions(-)

diff --git a/media-libs/opusfile/Manifest b/media-libs/opusfile/Manifest
index 8b094452949..9926dad15af 100644
--- a/media-libs/opusfile/Manifest
+++ b/media-libs/opusfile/Manifest
@@ -1,2 +1 @@
-DIST opusfile-0.11.tar.gz 467420 BLAKE2B e3e6ee2d1d4c7030bdd5f7ec14503d46ebbfcbc4481ab4652a0be9171d45fe2e855e0f17801cf28fda66f44496ba9f9a2996af7e5aaf5b008e4c3b14263f3160 SHA512 ec3e282310cc4f25475c27b7bc8d1652dcb25d3ac6badf87bd1b4e5397fbe106a0dab81c60d88d198003a23d8a2c9bae8b661edc9b31433effeca438ce56a349
 DIST opusfile-0.12.tar.gz 471354 BLAKE2B d54d9b8ed011c018dc6de77afab524d2e47ba6cca69b911efacf361b41f3b59a31424cb15a778db14166815ba5e2352f33f8aa7987c30e5e14339c652558d18d SHA512 e25e6968a3183ac0628ce1000840fd6f9f636e92ba984d6a72b76fb2a98ec632d2de4c66a8e4c05ef30655c2a4a13ab35f89606fa7d79a54cfa8506543ca57af

diff --git a/media-libs/opusfile/files/opusfile-0.11-libressl.patch b/media-libs/opusfile/files/opusfile-0.11-libressl.patch
deleted file mode 100644
index 72d807623a8..00000000000
--- a/media-libs/opusfile/files/opusfile-0.11-libressl.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 27ab318babb96e10a9f007b7c7936fd42425f488 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <stefan.strogin@gmail.com>
-Date: Thu, 27 Sep 2018 04:53:29 +0300
-Subject: [PATCH] http: fix compilation with LibreSSL
-
-LibreSSL defines OPENSSL_VERSION_NUMBER to 0x20000000L, but its API is
-compatible with OpenSSL 1.0.1.
-Therefore redefine OPENSSL_VERSION_NUMBER to 0x1000115fL (1.0.1u) if
-LibreSSL is used.
-
-Fixes: #2327
-
-http: use new API with LibreSSL >=2.7.0
-
-LibreSSL is not yet fully API compatible with OpenSSL 1.0.2 and later,
-However many APIs from OpenSSL 1.0.2 and 1.1 are already implemented in
-LibreSSL 2.7.0 and later. Old approach works in newer LibreSSL version
-as well, but it's not nice to force deprecated functions on LibreSSL
-users.
-
-Add additional conditionals for new LibreSSL versions to use the
-available new APIs.
----
- src/http.c | 27 ++++++++++++++++-----------
- 1 file changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/src/http.c b/src/http.c
-index 8ba9b28..a47648f 100644
---- a/src/http.c
-+++ b/src/http.c
-@@ -358,6 +358,11 @@ typedef int op_sock;
- # include <sys/timeb.h>
- # include <openssl/x509v3.h>
- 
-+# if (defined(LIBRESSL_VERSION_NUMBER)&&OPENSSL_VERSION_NUMBER==0x20000000L)
-+#  undef OPENSSL_VERSION_NUMBER
-+#  define OPENSSL_VERSION_NUMBER 0x1000115fL
-+# endif
-+
- /*The maximum number of simultaneous connections.
-   RFC 2616 says this SHOULD NOT be more than 2, but everyone on the modern web
-    ignores that (e.g., IE 8 bumped theirs up from 2 to 6, Firefox uses 15).
-@@ -1530,7 +1535,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){
-   return ret;
- }
- 
--# if OPENSSL_VERSION_NUMBER<0x10100000L
-+# if (OPENSSL_VERSION_NUMBER<0x10100000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
- #  define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr))
- #  define BIO_set_init(_b,_init) ((_b)->init=(_init))
- #  define ASN1_STRING_get0_data ASN1_STRING_data
-@@ -1538,7 +1543,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){
- 
- static int op_bio_retry_new(BIO *_b){
-   BIO_set_init(_b,1);
--# if OPENSSL_VERSION_NUMBER<0x10100000L
-+# if (OPENSSL_VERSION_NUMBER<0x10100000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
-   _b->num=0;
- # endif
-   BIO_set_data(_b,NULL);
-@@ -1549,7 +1554,7 @@ static int op_bio_retry_free(BIO *_b){
-   return _b!=NULL;
- }
- 
--# if OPENSSL_VERSION_NUMBER<0x10100000L
-+# if (OPENSSL_VERSION_NUMBER<0x10100000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
- /*This is not const because OpenSSL doesn't allow it, even though it won't
-    write to it.*/
- static BIO_METHOD op_bio_retry_method={
-@@ -1570,7 +1575,7 @@ static BIO_METHOD op_bio_retry_method={
-    proxying https URL requests.*/
- static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
-  OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){
--# if OPENSSL_VERSION_NUMBER>=0x10100000L
-+# if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
-   BIO_METHOD *bio_retry_method;
- # endif
-   BIO  *retry_bio;
-@@ -1583,7 +1588,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
-   ret=op_http_conn_write_fully(_conn,
-    _stream->proxy_connect.buf,_stream->proxy_connect.nbuf);
-   if(OP_UNLIKELY(ret<0))return ret;
--# if OPENSSL_VERSION_NUMBER>=0x10100000L
-+# if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
-   bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry");
-   if(bio_retry_method==NULL)return OP_EFAULT;
-   BIO_meth_set_write(bio_retry_method,op_bio_retry_write);
-@@ -1606,7 +1611,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
-   /*This shouldn't succeed, since we can't read yet.*/
-   OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0);
-   SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio);
--# if OPENSSL_VERSION_NUMBER>=0x10100000L
-+# if (OPENSSL_VERSION_NUMBER>=0x10100000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
-   BIO_meth_free(bio_retry_method);
- # endif
-   /*Only now do we disable write coalescing, to allow the CONNECT
-@@ -1635,7 +1640,7 @@ static struct addrinfo *op_inet_pton(const char *_host){
-   return NULL;
- }
- 
--# if OPENSSL_VERSION_NUMBER<0x10002000L
-+# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
- /*Match a host name against a host with a possible wildcard pattern according
-    to the rules of RFC 6125 Section 6.4.3.
-   Return: 0 if the pattern doesn't match, and a non-zero value if it does.*/
-@@ -1893,7 +1898,7 @@ static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
-   SSL_set_tlsext_host_name(_ssl_conn,_stream->url.host);
- # endif
-   skip_certificate_check=_stream->skip_certificate_check;
--# if OPENSSL_VERSION_NUMBER>=0x10002000L
-+# if (OPENSSL_VERSION_NUMBER>=0x10002000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
-   /*As of version 1.0.2, OpenSSL can finally do hostname checks automatically.
-     Of course, they make it much more complicated than it needs to be.*/
-   if(!skip_certificate_check){
-@@ -1956,13 +1961,13 @@ static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
-   if(OP_UNLIKELY(ret<=0))return OP_FALSE;
-   ssl_session=_stream->ssl_session;
-   if(ssl_session==NULL
--# if OPENSSL_VERSION_NUMBER<0x10002000L
-+# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
-    ||!skip_certificate_check
- # endif
-    ){
-     ret=op_do_ssl_step(_ssl_conn,_fd,SSL_do_handshake);
-     if(OP_UNLIKELY(ret<=0))return OP_FALSE;
--# if OPENSSL_VERSION_NUMBER<0x10002000L
-+# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
-     /*OpenSSL before version 1.0.2 does not do automatic hostname verification,
-        despite the fact that we just passed it the hostname above in the call
-        to SSL_set_tlsext_host_name().
-@@ -2314,7 +2319,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url,
-     /*Initialize the SSL library if necessary.*/
-     if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){
-       SSL_CTX *ssl_ctx;
--# if OPENSSL_VERSION_NUMBER<0x10100000L
-+# if (OPENSSL_VERSION_NUMBER<0x10100000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
- #  if !defined(OPENSSL_NO_LOCKING)
-       /*The documentation says SSL_library_init() is not reentrant.
-         We don't want to add our own depenencies on a threading library, and it
--- 
-2.19.1
-

diff --git a/media-libs/opusfile/opusfile-0.11.ebuild b/media-libs/opusfile/opusfile-0.11.ebuild
deleted file mode 100644
index f8f7409434e..00000000000
--- a/media-libs/opusfile/opusfile-0.11.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A high-level decoding and seeking API for .opus files"
-HOMEPAGE="https://www.opus-codec.org/"
-SRC_URI="https://downloads.xiph.org/releases/opus/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
-IUSE="doc fixed-point +float +http libressl static-libs"
-
-RDEPEND="media-libs/libogg
-	media-libs/opus
-	http? (
-		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)"
-
-DEPEND="${RDEPEND}
-	doc? ( app-doc/doxygen )"
-
-REQUIRED_USE="^^ ( fixed-point float )"
-
-PATCHES=( "${FILESDIR}/opusfile-0.11-libressl.patch" )
-
-src_configure() {
-	local myeconfargs=(
-		$(use_enable doc)
-		$(use_enable fixed-point)\
-		$(use_enable float)
-		$(use_enable http)
-		$(use_enable static-libs static)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	find "${ED}" -name "*.la" -delete || die
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opusfile/files/, media-libs/opusfile/
@ 2022-11-22  3:23 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-11-22  3:23 UTC (permalink / raw
  To: gentoo-commits

commit:     754c8b4df67d9e16962c4d41c5d4730218c86346
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 03:17:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 03:17:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754c8b4d

media-libs/opusfile: EAPI 8, fix configure w/ clang 16

Closes: https://bugs.gentoo.org/879707
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/opusfile-0.12-configure-clang16.patch    | 77 ++++++++++++++++++++++
 media-libs/opusfile/opusfile-0.12-r1.ebuild        | 54 +++++++++++++++
 2 files changed, 131 insertions(+)

diff --git a/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch b/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch
new file mode 100644
index 000000000000..2319b06e652b
--- /dev/null
+++ b/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch
@@ -0,0 +1,77 @@
+https://gitlab.xiph.org/xiph/opusfile/-/merge_requests/42
+https://bugs.gentoo.org/879707
+
+From 9c7915c120c399a6a001c2a34e9040c9c5c9d340 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 02:59:20 +0000
+Subject: [PATCH] m4: fix -Wstrict-protoypes
+
+In preparation for C23. Fixes the following error if Clang 16 is
+cranked up to be stricter:
+```
+-warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
++error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
+```
+
+Bug: https://bugs.gentoo.org/879701
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/m4/attributes.m4
++++ b/m4/attributes.m4
+@@ -39,7 +39,7 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
+   AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
+     [ac_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS $1"
+-     AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
++     AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; }])],
+        [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
+        [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
+      CFLAGS="$ac_save_CFLAGS"
+@@ -89,7 +89,7 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
+     AS_TR_SH([cc_cv_ldflags_$1]),
+     [ac_save_LDFLAGS="$LDFLAGS"
+      LDFLAGS="$LDFLAGS $1"
+-     AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
++     AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 1; }])],
+        [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
+        [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
+      LDFLAGS="$ac_save_LDFLAGS"
+@@ -165,16 +165,16 @@ AC_DEFUN([CC_CHECK_ATTRIBUTE], [
+ AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
+   CC_CHECK_ATTRIBUTE(
+     [constructor],,
+-    [extern void foo();
+-     void __attribute__((constructor)) ctor() { foo(); }],
++    [extern void foo(void);
++     void __attribute__((constructor)) ctor(void) { foo(); }],
+     [$1], [$2])
+ ])
+ 
+ AC_DEFUN([CC_ATTRIBUTE_DESTRUCTOR], [
+   CC_CHECK_ATTRIBUTE(
+     [destructor],,
+-    [extern void foo();
+-     void __attribute__((destructor)) dtor() { foo(); }],
++    [extern void foo(void);
++     void __attribute__((destructor)) dtor(void) { foo(); }],
+     [$1], [$2])
+ ])
+ 
+@@ -195,7 +195,7 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
+ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
+   CC_CHECK_ATTRIBUTE(
+     [visibility_$1], [visibility("$1")],
+-    [void __attribute__((visibility("$1"))) $1_function() { }],
++    [void __attribute__((visibility("$1"))) $1_function(void) { }],
+     [$2], [$3])
+ ])
+ 
+@@ -306,7 +306,7 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
+      CFLAGS="$CFLAGS $cc_cv_werror"
+      for cc_attribute_align_try in 64 32 16 8 4 2; do
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+-          int main() {
++          int main(void) {
+             static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
+             return c;
+           }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
+GitLab

diff --git a/media-libs/opusfile/opusfile-0.12-r1.ebuild b/media-libs/opusfile/opusfile-0.12-r1.ebuild
new file mode 100644
index 000000000000..0aab5f8e89cc
--- /dev/null
+++ b/media-libs/opusfile/opusfile-0.12-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A high-level decoding and seeking API for .opus files"
+HOMEPAGE="https://www.opus-codec.org/"
+SRC_URI="https://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc fixed-point +float +http static-libs"
+
+RDEPEND="
+	media-libs/libogg
+	media-libs/opus
+	http? (
+		dev-libs/openssl:=
+	)
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="^^ ( fixed-point float )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.12-configure-clang16.patch
+)
+
+src_prepare() {
+	default
+
+	# Drop once configure patch merged
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_enable doc)
+		$(use_enable fixed-point)\
+		$(use_enable float)
+		$(use_enable http)
+		$(use_enable static-libs static)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${ED}" -type f -name "*.la" -delete || die
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-22  3:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22  3:23 [gentoo-commits] repo/gentoo:master commit in: media-libs/opusfile/files/, media-libs/opusfile/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-01-07 11:33 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox