Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2023 09:25:14 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 082c2a33647f - main - audio/p5-Ogg-Vorbis-Header: unbreak the port's build against Clang 16
Message-ID:  <202309240925.38O9PEnv097010@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=082c2a33647f8921c7bf815a02c9bd62eeb91a08

commit 082c2a33647f8921c7bf815a02c9bd62eeb91a08
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-09-24 09:24:30 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-09-24 09:24:30 +0000

    audio/p5-Ogg-Vorbis-Header: unbreak the port's build against Clang 16
    
    write_vorbis() must return an integer, but was returning &PL_sv_undef
    in several places vs. zero in other error paths.  Follow the original*
    implementation and replace those with zeros as well.
    
    To make hunting potential compiler-related bugs easier in the future,
    respect ${CC} and mute one harmless but particularly annoying warning
    which clutters the build log way more than does any good.
    
    *) https://www.perlmonks.org/?node_id=200588
---
 audio/p5-Ogg-Vorbis-Header/Makefile                |  6 +-
 .../files/patch-lib_Ogg_Vorbis_Header.pm           | 66 ++++++++++++++++++++++
 audio/p5-Ogg-Vorbis-Header/pkg-descr               |  2 +-
 3 files changed, 69 insertions(+), 5 deletions(-)

diff --git a/audio/p5-Ogg-Vorbis-Header/Makefile b/audio/p5-Ogg-Vorbis-Header/Makefile
index c6f83ae36add..ea84faabfa46 100644
--- a/audio/p5-Ogg-Vorbis-Header/Makefile
+++ b/audio/p5-Ogg-Vorbis-Header/Makefile
@@ -5,18 +5,16 @@ MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
 
 MAINTAINER=	perl@FreeBSD.org
-COMMENT=	Manipulate / fetch info from Ogg-Vorbis audio files
+COMMENT=	Fetch/manipulate information from Ogg-Vorbis audio files
 WWW=		https://metacpan.org/release/Ogg-Vorbis-Header
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/LICENSE.GPL
 
-BROKEN_FreeBSD_14=	fails to compile: incompatible pointer to integer conversion returning 'SV *' (aka 'struct sv *')
-
 BUILD_DEPENDS=	${RUN_DEPENDS}
 LIB_DEPENDS=	libogg.so:audio/libogg \
 		libvorbis.so:audio/libvorbis
-RUN_DEPENDS=	p5-Inline>=0:devel/p5-Inline \
+RUN_DEPENDS=	p5-Inline>=0.44:devel/p5-Inline \
 		p5-Inline-C>=0:devel/p5-Inline-C
 
 USES=		perl5
diff --git a/audio/p5-Ogg-Vorbis-Header/files/patch-lib_Ogg_Vorbis_Header.pm b/audio/p5-Ogg-Vorbis-Header/files/patch-lib_Ogg_Vorbis_Header.pm
new file mode 100644
index 000000000000..bb5a63851aaf
--- /dev/null
+++ b/audio/p5-Ogg-Vorbis-Header/files/patch-lib_Ogg_Vorbis_Header.pm
@@ -0,0 +1,66 @@
+--- lib/Ogg/Vorbis/Header.pm.orig	2021-01-04 13:38:15 UTC
++++ lib/Ogg/Vorbis/Header.pm
+@@ -7,8 +7,9 @@ use warnings;
+ our $VERSION = '0.11';
+ 
+ use Inline C => 'DATA',
++  CC => $ENV{CC},
++  CCFLAGSEX => '-Wno-compound-token-split-by-macro',
+   LIBS => '-logg -lvorbis -lvorbisfile',
+-  INC => '-I/inc',
+   AUTO_INCLUDE => '#include "inc/vcedit.h"',
+   AUTO_INCLUDE => '#include "inc/vcedit.c"',
+   VERSION => '0.11',
+@@ -476,14 +477,14 @@ int write_vorbis (SV *obj)
+   if ((fd = fopen(inpath, "rb")) == NULL) {
+     perror("Error opening file in Ogg::Vorbis::Header::write\n");
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+ 
+   if ((fd2 = fopen(outpath, "w+b")) == NULL) {
+     perror("Error opening temp file in Ogg::Vorbis::Header::write\n");
+     fclose(fd);
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+ 
+   /* Setup the state and comments structs */
+@@ -494,7 +495,7 @@ int write_vorbis (SV *obj)
+     fclose(fd2);
+     unlink(outpath);
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+   vc = vcedit_comments(state);
+ 
+@@ -526,7 +527,7 @@ int write_vorbis (SV *obj)
+     vcedit_clear(state);
+     unlink(outpath);
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+ 
+   fclose(fd);
+@@ -536,7 +537,7 @@ int write_vorbis (SV *obj)
+     perror("Error copying tempfile in Ogg::Vorbis::Header::add_comment\n");
+     unlink(outpath);
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+ 
+   if ((fd2 = fopen(inpath, "wb")) == NULL) {
+@@ -544,7 +545,7 @@ int write_vorbis (SV *obj)
+     fclose(fd);
+     unlink(outpath);
+     free(outpath);
+-    return &PL_sv_undef;
++    return 0;
+   }
+ 
+   while ((bytes = fread(buffer, 1, BUFFSIZE, fd)) > 0)
diff --git a/audio/p5-Ogg-Vorbis-Header/pkg-descr b/audio/p5-Ogg-Vorbis-Header/pkg-descr
index 7ff7e3f14f79..e34e57482d10 100644
--- a/audio/p5-Ogg-Vorbis-Header/pkg-descr
+++ b/audio/p5-Ogg-Vorbis-Header/pkg-descr
@@ -1 +1 @@
-Fetch/manipulate from Ogg-Vorbis audio files.
+Perl module to fetch and manipulate information from Ogg-Vorbis audio files.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309240925.38O9PEnv097010>