On Tue, Jun 25, 2019 at 04:13:51PM +0200, Christian Weisgerber wrote:
> Raphael Graf:
> 
> > Does anyone know why the large file support is disabled in mpg123?
> 
> Because it doesn't make sense.  off_t is always the same on OpenBSD
> and does not change depending on how code defines _FILE_OFFSET_BITS.
> 

Yes, the problem is that libopenmpt sets _FILE_OFFSET_BITS=64.

>From a comment in mpg123.h:
"When the app defines _FILE_OFFSET_BITS, it wants non-default large file
support, and thus functions with added suffix (mpg123_open_64)."

This can be worked around in the libopenmpt port by setting
MPG123_NO_LARGENAME, see attached diff.
With this diff, the port works fine on macppc too.

diff -uNpr libopenmpt/Makefile /usr/ports/audio/libopenmpt/Makefile
--- libopenmpt/Makefile Sat Jun 22 10:42:41 2019
+++ /usr/ports/audio/libopenmpt/Makefile        Fri Jul 12 10:40:03 2019
@@ -14,13 +14,15 @@ HOMEPAGE =  https://lib.openmpt.org/libopenmpt/
 MAINTAINER =   Frederic Cambus <fcam...@openbsd.org>
 
 # BSD
-PERMIT_PACKAGE_CDROM = Yes
+PERMIT_PACKAGE =       Yes
 
 WANTLIB +=     ${COMPILER_LIBCXX} FLAC c m mpg123 ogg portaudio sndfile
 WANTLIB +=     sndio vorbis vorbisenc vorbisfile z
 
 MASTER_SITES = https://lib.openmpt.org/files/libopenmpt/src/
 
+COMPILER =     base-clang ports-gcc
+
 LIB_DEPENDS =  audio/flac \
                audio/libsndfile \
                audio/libvorbis \
@@ -31,7 +33,8 @@ CONFIGURE_STYLE = gnu
 
 CONFIGURE_ARGS += --without-portaudiocpp
 
-CXXFLAGS +=    -D_LIBCPP_HAS_C11_FEATURES
+CXXFLAGS +=    -D_LIBCPP_HAS_C11_FEATURES \
+               -DMPG123_NO_LARGENAME
 
 NO_TEST =      Yes
 

Reply via email to