Re: [NEW] audio/libopenmpt
On Fri, Jul 12, 2019 at 11:13:31AM +0200, Raphael Graf wrote: > 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. Thanks for diving into this and for the diff, rapha@. Here is a new tarball with those changes included. OK to import? libopenmpt.tar.gz Description: application/tar-gz
Re: [NEW] audio/libopenmpt
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/MakefileFri Jul 12 10:40:03 2019 @@ -14,13 +14,15 @@ HOMEPAGE = https://lib.openmpt.org/libopenmpt/ MAINTAINER = Frederic Cambus # 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
Re: [NEW] audio/libopenmpt
On 2019/06/25 14:49, Raphael Graf wrote: > diff -uNpr /tmp/libopenmpt/Makefile /usr/ports/audio/libopenmpt/Makefile > --- /tmp/libopenmpt/Makefile Sat Jun 22 10:42:41 2019 > +++ /usr/ports/audio/libopenmpt/Makefile Tue Jun 25 12:58:44 2019 > @@ -21,6 +21,8 @@ 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 \ ^ yes, that is needed. If there are C++ libs in WANTLIB then COMPILER should be set unless there's a special case.
Re: [NEW] audio/libopenmpt
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. -- Christian "naddy" Weisgerber na...@mips.inka.de
Re: [NEW] audio/libopenmpt
On Sat, Jun 22, 2019 at 10:45:16AM +0200, Frederic Cambus wrote: > Hi ports@, > > Here is a new port: audio/libopenmpt. > > From DESCR: > > libopenmpt is a cross-platform C++ and C library to decode tracked music > files (modules) into a raw PCM audio stream. > > openmpt123 is a cross-platform command-line or terminal based module file > player. > > libopenmpt is based on the player code of the OpenMPT project (Open ModPlug > Tracker). In order to avoid code base fragmentation, libopenmpt is developed > in the same source code repository as OpenMPT. > > Comments? OK? It looks good and works on amd64. I also tried enabling it in ffmpeg (--enable-libopenmpt) which works fine too. On macppc however, linking fails with the following errors: bin/.libs/libopenmpt.so.0.0: undefined reference to `mpg123_open_handle_64' bin/.libs/libopenmpt.so.0.0: undefined reference to `mpg123_replace_reader_handle_64' bin/.libs/libopenmpt.so.0.0: undefined reference to `mpg123_length_64' collect2: error: ld returned 1 exit status Does anyone know why the large file support is disabled in mpg123? With the diffs below (one is for mpg123), it seems to work.. diff -uNpr /tmp/libopenmpt/Makefile /usr/ports/audio/libopenmpt/Makefile --- /tmp/libopenmpt/MakefileSat Jun 22 10:42:41 2019 +++ /usr/ports/audio/libopenmpt/MakefileTue Jun 25 12:58:44 2019 @@ -21,6 +21,8 @@ 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 \ Index: Makefile === RCS file: /cvs/ports/audio/mpg123/Makefile,v retrieving revision 1.97 diff -u -p -u -p -r1.97 Makefile --- Makefile10 Jul 2018 15:28:51 - 1.97 +++ Makefile25 Jun 2019 11:53:37 - @@ -22,7 +22,6 @@ WANTLIB= c m sndio CONFIGURE_STYLE=gnu CONFIGURE_ARGS=--enable-static \ - --disable-lfs-alias \ --with-audio=sndio \ --with-optimization=0 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \