Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

barracuda156

macrumors 68000
Original poster
Sep 3, 2021
1,782
1,299
If anyone is interested in building ffmpeg, I have fixed several its components to build for PowerPC and in particular 10A190.

libsdl2 – updated to v. 2.0.9
libzvbi – fixed build on 10A190
libass – fixed build on 10A190
libvpx – updated to the latest version

Here is the config which currently builds:

Code:
./configure --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-libzvbi --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-zlib --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-indev=jack --disable-opencl --disable-outdev=xv --disable-audiotoolbox --disable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-mp-7 --enable-libzimg --disable-filter=coreimage --disable-filter=coreimagesrc --enable-libdav1d --disable-indev=avfoundation --arch=ppc --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-version3 --enable-libsmbclient --enable-nonfree --enable-libfdk-aac

Result:

Code:
36-227:~ svacchanda$ port -v installed ffmpeg
The following ports are currently installed:
  ffmpeg @4.4.1_1+gpl2+gpl3+nonfree+x11 (active) requested_variants='+gpl2+gpl3+nonfree+x11' platform='darwin 10' archs='ppc' date='2022-03-03T00:27:18+0800'
 

alex_free

macrumors 65816
Feb 24, 2020
1,060
2,245
Did you use libvpx and/or libsdl2? If yes, which versions? I am asking since may be you or someone have done better fixes for them.
Libvpx - No.
Libdsdl2 - Yes! (I modified those patches for Tiger and got it working on Panther with my fork called Panther_SDL2)

This is my custom build system I use for almost all my projects like PPCMC7. That along with the patches (all included in the PPCMC7 source, and only requiring Xcode 2.5 and no MacPorts installation) will tell you everything I did.
 
  • Like
Reactions: barracuda156

barracuda156

macrumors 68000
Original poster
Sep 3, 2021
1,782
1,299
Libpvpx - No.
Libdsdl2 - Yes! (I modified those patches for Tiger and got it working on Panther with my fork called Panther_SDL2)

Ah, so you are still on 2.0.3.

If you are interested, I can upload patches and port file I used for 2.0.9 to build. (Honestly I hope someone can join in to review and help, since I am nowhere expert in this.) However as of now I verified it builds on 10A190 and 10.6.8 (with Rosetta). I pulled the port file into Leopard, however it failed. I don’t know how hard it is to fix it further (maybe trivial, I didn’t look into it in detail).
 
  • Like
Reactions: alex_free

alex_free

macrumors 65816
Feb 24, 2020
1,060
2,245
Ah, so you are still on 2.0.3.

If you are interested, I can upload patches and port file I used for 2.0.9 to build. (Honestly I hope someone can join in to review and help, since I am nowhere expert in this.) However as of now I verified it builds on 10A190 and 10.6.8 (with Rosetta). I pulled the port file into Leopard, however it failed. I don’t know how hard it is to fix it further (maybe trivial, I didn’t look into it in detail).
Ditto, I also made Leopard_sdl2.0.6 in the same vein. As you go up on Mac OS X versions it is easier to get newer releases to work, but 2.0.9 is very impressive! Espically on PPC, one day I will revisit this SDL2 stuff and try to improve it myself I hope.
 
  • Like
Reactions: barracuda156

barracuda156

macrumors 68000
Original poster
Sep 3, 2021
1,782
1,299
Ditto, I also made Leopard_sdl2.0.6 in the same vein. As you go up on Mac OS X versions it is easier to get newer releases to work, but 2.0.9 is very impressive! Espically on PPC, one day I will revisit this SDL2 stuff and try to improve it myself I hope.

Okay, let me go through my patches a bit, there is one thing which I want to change, and then I post it here. If you (or anyone) can test it then, it gonna be helpful.
 
  • Like
Reactions: alex_free

ahurst

macrumors 6502
Oct 12, 2021
410
815
Okay, let me go through my patches a bit, there is one thing which I want to change, and then I post it here. If you (or anyone) can test it then, it gonna be helpful.
As someone who's spend a lot of time in the guts of the SDL2 source, have you (or alex_free) considered defining a new "macosx_legacy" platform within SDL2 and creating corresponding 'cocoa_legacy' modules your patched platform-specific code, so you don't need to do as much work to support newer versions as they're released?

What I mean is taking the 'include/SDL_config_macosx.h' file, tweaking it to reflect what's needed for compiling on 10.3-10.5, and defining corresponding 'cocoa_legacy' video and audio drivers with your patched versions of the base 'cocoa' drivers. Would hopefully make the patches much cleaner and easier to maintain long-term!
 

barracuda156

macrumors 68000
Original poster
Sep 3, 2021
1,782
1,299
As someone who's spend a lot of time in the guts of the SDL2 source, have you (or alex_free) considered defining a new "macosx_legacy" platform within SDL2 and creating corresponding 'cocoa_legacy' modules your patched platform-specific code, so you don't need to do as much work to support newer versions as they're released?

What I mean is taking the 'include/SDL_config_macosx.h' file, tweaking it to reflect what's needed for compiling on 10.3-10.5, and defining corresponding 'cocoa_legacy' video and audio drivers with your patched versions of the base 'cocoa' drivers. Would hopefully make the patches much cleaner and easier to maintain long-term!

I am afraid I have neither expertise nor time for such a task. When/if libsdl2 2.0.9 ppc gets tested enough to be sure it is actually functional in all required ways, I may try fixing some later version on its basis, but I saw this more of a one-time bump for PowerPC than an ongoing commitment. (Same goes for other ffmpeg components.)

I am more interested personally in having ghc and i2pd fixed, for instance, so rather spend more time on those.
 
  • Love
Reactions: alex_free

barracuda156

macrumors 68000
Original poster
Sep 3, 2021
1,782
1,299
Upped to v. 5:

Code:
36-109% port -v installed ffmpeg
The following ports are currently installed:
  ffmpeg @4.4.1_1+gpl2 requested_variants='+gpl2' platform='darwin 10' archs='ppc' date='2022-02-15T18:07:25+0800'
  ffmpeg @4.4.1_1+gpl2+gpl3+nonfree requested_variants='+gpl2+gpl3+nonfree' platform='darwin 10' archs='ppc' date='2022-03-02T22:47:45+0800'
  ffmpeg @4.4.1_1+gpl2+gpl3+nonfree+x11 requested_variants='+gpl2+gpl3+nonfree+x11' platform='darwin 10' archs='ppc' date='2022-03-03T00:27:18+0800'
  ffmpeg @5.0.0_0+gpl2+gpl3+libdc1394+nonfree+x11 (active) requested_variants='+gpl2+gpl3+libdc1394+nonfree+x11' platform='darwin 10' archs='ppc' date='2022-03-30T20:48:14+0800'
 
  • Like
Reactions: cellularmitosis
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.