Thread: IPlug - Youlean
View Single Post
Old 07-05-2017, 05:23 AM   #146
HoRNet
Human being with feelings
 
Join Date: Feb 2011
Posts: 171
Default

Quote:
Originally Posted by Youlean View Post
Maybe Saverio can share his script...

Sorry i simply forgot to check the thread, here's my modified build script for 10.6

Code:
#! /bin/bash

# Set build directory same as script location
#export BuildDir="$(dirname "$0")"
export BuildDir="${PWD}"

# Set deployment target, architectures and SDK
export MACOSX_DEPLOYMENT_TARGET=10.6
export LDFLAGS="-arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
export CFLAGS="-Os -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
export CPPFLAGS=""

# Build expat  =============================================
cd ${BuildDir}/expat
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libexpat.a ../

# End ======================================================


# Build fontconfig  ========================================
cd ${BuildDir}/fontconfig
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libfontconfig.a ../

# End ======================================================


# Build bzip2  =============================================
cd ${BuildDir}/bzip2
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libbz2.a ../

# End ======================================================


# Build freetype  ==========================================
cd ${BuildDir}/freetype
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static --with-bzip2=no
make clean
make
make install
sudo cp ${PWD}/lib/libfreetype.a ../

# End ======================================================

# Build zlib  ============================================
cd ${BuildDir}/zlib
./configure --prefix=${BuildDir} --static
make clean
make
make install
sudo cp ${PWD}/lib/libz.a ../

# End ======================================================

# Build libpng  ============================================
cd ${BuildDir}/libpng
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static --with-zlib-prefix=${BuildDir}/lib
make clean
make
make install
sudo cp ${PWD}/lib/libpng16.a ../

# End ======================================================


# Build pixman  ============================================
cd ${BuildDir}/pixman
./configure --prefix=${BuildDir} --disable-dependency-tracking --enable-static
make clean
make
make install
sudo cp ${PWD}/lib/libpixman-1.a ../

# End ======================================================


# Build cairo  ============================================
cd ${BuildDir}/cairo
./configure --prefix=${BuildDir} --disable-xlib --disable-dependency-tracking --enable-static --enable-ft --disable-xlib --enable-gl
make clean
make
make install
sudo cp ${PWD}/lib/libcairo.a ../

# End ======================================================
the issue is that libpng won't compile because of zlib conflicts between the headers found in the 10.6 sdk and the version detected by the configure script on the running MacOS (or at least it's the case on my 10.12 machine)

To fix it you have to open the pnglibconf.h file (after you have first run configure) and replace the ZLIB version number with this line:

Code:
#define PNG_ZLIB_VERNUM 0x1230
this should allow you to build pnglib

BTW for convenience, here's my static libs:

http://cloud.hor-net.com/index.php/s/wzYIEKkMLbMJFEg

I don't take any responsibility if my binaries fries your HD they work on my machine and the plugins produced with them seems to work elsewhere but i don't know if they owrk on other build environments.

(ps. here i'm with XCode 8.3.3 on MacOS 10.12.5)

Saverio
HoRNet is offline   Reply With Quote