Hi,

As i'm working on an audio/chromaprint update (that you can find on -wip
[0]) to fix narrowing issues on macppc/arm, i've found another port in my
way that has narrowing issues ;)

> http://build-failures.rhaalovely.net/aarch64/last/audio/taglib.log
(same on macppc, it doesn't occur on arm surprisingly).

Upstream committed a fix [1], that does the job. While here i have also
moved to PERMIT_PACKAGE.

Tests are passing on amd64 and macppc [2].

Comments/feedback are welcome!

Charlène.


[0]
https://github.com/jasperla/openbsd-wip/tree/master/audio/chromaprint
[1]
https://github.com/taglib/taglib/commit/0b583bafd09c29695af9e84f7e7182280411a78e
[2] https://bin.charlenew.xyz/taglib.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/taglib/Makefile,v
retrieving revision 1.44
diff -u -p -u -p -r1.44 Makefile
--- Makefile    23 Jun 2019 09:00:21 -0000      1.44
+++ Makefile    7 Jul 2019 10:06:43 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=       managing meta-data of audio formats
 DISTNAME=      taglib-1.11.1
-REVISION=      2
+REVISION=      3
 
 CATEGORIES=    audio devel
 
@@ -12,11 +12,11 @@ SHARED_LIBS +=      tag_c   3.0     # 0.0.0
 HOMEPAGE=      https://taglib.github.io/
 
 # LGPLv2.1 / MPLv1.1
-PERMIT_PACKAGE_CDROM=  Yes
+PERMIT_PACKAGE=        Yes
 
 WANTLIB=       ${COMPILER_LIBCXX} m z
 
-COMPILER =             base-clang ports-gcc base-gcc
+COMPILER =     base-clang ports-gcc base-gcc
 
 MASTER_SITES=  https://taglib.github.io/releases/
 
Index: patches/patch-tests_test_synchdata_cpp
===================================================================
RCS file: patches/patch-tests_test_synchdata_cpp
diff -N patches/patch-tests_test_synchdata_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_test_synchdata_cpp      7 Jul 2019 10:06:43 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+Fix narrowing error on archs where char is unsigned by default (ppc,arm).
+From: 
+https://github.com/taglib/taglib/commit/0b583bafd09c29695af9e84f7e7182280411a78e
+
+Index: tests/test_synchdata.cpp
+--- tests/test_synchdata.cpp.orig
++++ tests/test_synchdata.cpp
+@@ -75,8 +75,8 @@ class TestID3v2SynchData : public CppUnit::TestFixture
+ 
+   void testToUIntBroken()
+   {
+-    char data[] = { 0, 0, 0, -1 };
+-    char data2[] = { 0, 0, -1, -1 };
++    char data[] = { 0, 0, 0, (char)-1 };
++    char data2[] = { 0, 0, (char)-1, (char)-1 };
+ 
+     CPPUNIT_ASSERT_EQUAL((unsigned int)255, 
ID3v2::SynchData::toUInt(ByteVector(data, 4)));
+     CPPUNIT_ASSERT_EQUAL((unsigned int)65535, 
ID3v2::SynchData::toUInt(ByteVector(data2, 4)));
+@@ -84,7 +84,7 @@ class TestID3v2SynchData : public CppUnit::TestFixture
+ 
+   void testToUIntBrokenAndTooLarge()
+   {
+-    char data[] = { 0, 0, 0, -1, 0 };
++    char data[] = { 0, 0, 0, (char)-1, 0 };
+     ByteVector v(data, 5);
+ 
+     CPPUNIT_ASSERT_EQUAL((unsigned int)255, ID3v2::SynchData::toUInt(v));

Reply via email to