MAKE=make
TAR=tar
-PREFIX=$(HOME)/FIX/Darwin.i386
+PREFIX=$(HOME)/FIX/leopard
-ARCHS=-arch ppc -arch i386
+ARCHS=-arch ppc -arch i386 -arch ppc64 -arch x86_64
# package URL
include Makefile-packages.incl
-# bins
-AUTOCONF=autoconf
-AUTOMAKE=automake
-LIBTOOL=libtoolize
-PKGCONFIG=pkg-config
+# GLIB 2.27.3 doesn't build
+# GLIB 2.20 was OK
+GLIB_URL=http://ftp.gnome.org/pub/gnome/sources/glib/2.20/glib-2.20.1.tar.gz
+
+# CAIRO 1.10.2 doesn't build
+# CAIRO 1.8.10 was OK
+CAIRO_URL=http://cairographics.org/releases/cairo-1.8.8.tar.gz
+
+# libraries
-# libs
+PKGCONFIG=pkg-config
FREETYPE=libfreetype.la
FONTCONFIG=libfontconfig.la
XFT=libXft.la
-FFI=libffi.la
GD=libgd.la
PIXMAN=libpixman-1.la
PNG=libpng15.la
# directories
dirname=$(basename $(basename $(notdir $(1))))
-AUTOCONF_DIR=$(call dirname, $(AUTOCONF_URL))
-AUTOMAKE_DIR=$(call dirname, $(AUTOMAKE_URL))
-LIBTOOL_DIR=$(call dirname, $(LIBTOOL_URL))
PKGCONFIG_DIR=$(call dirname, $(PKGCONFIG_URL))
FREETYPE_DIR=$(call dirname, $(FREETYPE_URL))
FONTCONFIG_DIR=$(call dirname, $(FONTCONFIG_URL))
XFT_DIR=$(call dirname, $(XFT_URL))
-FFI_DIR=$(call dirname, $(FFI_URL))
GD_DIR=$(call dirname, $(GD_URL))
PIXMAN_DIR=$(call dirname, $(PIXMAN_URL))
PNG_DIR=$(call dirname, $(PNG_URL))
BASE_CONFIG=--prefix=$(PREFIX) --disable-dependency-tracking --enable-static=yes --enable-shared=no PKG_CONFIG="$(PREFIX)/bin/pkg-config" PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:/usr/X11/lib/pkgconfig"
FLAG_CONFIG=CFLAGS="-O2 $(ARCHS) -I$(PREFIX)/include" LDFLAGS="$(ARCHS) -L$(PREFIX)/lib -framework CoreFoundation -framework CoreServices"
-install: install-bins install-libs
-install-bins: $(PREFIX)/bin/$(AUTOCONF) $(PREFIX)/bin/$(AUTOMAKE) $(PREFIX)/bin/$(LIBTOOL) $(PREFIX)/bin/$(PKGCONFIG)
-install-libs: $(PREFIX)/lib/$(PANGO) $(PREFIX)/lib/$(GD) $(PREFIX)/lib/$(GTS)
+install: $(PREFIX)/lib/$(PANGO) $(PREFIX)/lib/$(GD) $(PREFIX)/lib/$(GTS)
# gtk dropped, unable to build....
# $(PREFIX)/lib/$(GTK)
@echo INSTALLING JPEG...
@echo
$(MAKE) -C $(JPEG_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(JPEG_DIR)/$(JPEG): $(JPEG_DIR)/Makefile
@echo
@echo INSTALLING TIFF...
@echo
$(MAKE) -C $(TIFF_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(TIFF_DIR)/libtiff/$(TIFF): $(TIFF_DIR)/Makefile
@echo
@echo INSTALLING ATK...
@echo
$(MAKE) -C $(ATK_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(ATK_DIR)/atk/$(ATK): $(ATK_DIR)/Makefile
@echo
@echo INSTALLING GTK...
@echo
$(MAKE) -C $(GTK_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(GTK_DIR)/gtk/$(GTK): $(GTK_DIR)/Makefile
@echo
@echo INSTALLING GTS...
@echo
$(MAKE) -C $(GTS_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(GTS_DIR)/src/$(GTS): $(GTS_DIR)/Makefile
@echo
@echo INSTALLING PANGO...
@echo
$(MAKE) -C $(PANGO_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(PANGO_DIR)/pango/$(PANGO): $(PANGO_DIR)/Makefile
@echo
#
# patch to fix libiconv_open absent in 64-bit
# run configure + make once to create glib-genmarshal for cross-building support
-# run configure once for each architecture, capturing config.h and glib/glibconfig.h
-# run configure again for Universal Binary, recomposing config.h and glib/glibconfig.h from captured versions
+# run configure once for each architecture, capturing config.h and glibconfig.h
+# run configure again for Universal Binary, recomposing config.h and glibconfig.h from captured versions
$(PREFIX)/lib/$(GLIB): $(GLIB_DIR)/glib/$(GLIB)
@echo
@echo INSTALLING GLIB...
@echo
$(MAKE) -C $(GLIB_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(GLIB_DIR)/glib/$(GLIB): $(GLIB_DIR)/Makefile
@echo
if [[ -e $@ ]]; then $(MAKE) -C $(GLIB_DIR) clean; fi && \
$(MAKE) -C $(GLIB_DIR)
-$(GLIB_DIR)/Makefile: $(PREFIX)/lib/$(INTL) | $(PREFIX)/bin/$(PKGCONFIG) $(GLIB_DIR)/configure
+$(GLIB_DIR)/Makefile: $(PREFIX)/lib/$(INTL) | $(PREFIX)/bin/$(PKGCONFIG) $(GLIB_DIR)/configure
@echo
@echo CONFIGURING GLIB...
@echo
echo "ac_cv_func_posix_getgrgid_r=yes" >>darwin.cache && \
echo "ac_cv_func_vsnprintf_c99=yes" >>darwin.cache && \
echo "ac_cv_func_printf_unix98=yes" >>darwin.cache && \
- PATH=$(PREFIX)/bin:gobject:gio:$$PATH && \
+ PATH=$(PREFIX)/bin:gobject:$$PATH && \
echo --- GLIB-GENMARSHAL PASS --- && \
./configure $(BASE_CONFIG) CFLAGS="-I$(PREFIX)/include" LDFLAGS="-L$(PREFIX)/lib" && \
$(MAKE) -C glib && \
- $(MAKE) -C gthread && \
- $(MAKE) -C gobject && \
- $(MAKE) -C gmodule && \
- $(MAKE) -C gio && \
$(MAKE) -C gobject glib-genmarshal && \
cp darwin.cache darwinian.cache && \
echo --- PPC PASS --- && \
./configure --cache-file=darwinian.cache --build=$$BUILD --host=powerpc-apple-darwin$$OSREL $(BASE_CONFIG) CFLAGS="-O2 -arch ppc -I$(PREFIX)/include" LDFLAGS="-arch ppc -L$(PREFIX)/lib" && \
cp config.h config.ppc.h && \
- cp glib/glibconfig.h glib/glibconfig.ppc.h && \
+ cp glibconfig.h glibconfig.ppc.h && \
cp darwin.cache darwinian.cache && \
echo --- I386 PASS --- && \
./configure --cache-file=darwinian.cache --build=$$BUILD --host=i686-apple-darwin$$OSREL $(BASE_CONFIG) CFLAGS="-O2 -arch i386 -I$(PREFIX)/include" LDFLAGS="-arch i386 -L$(PREFIX)/lib" && \
cp config.h config.i386.h && \
- cp glib/glibconfig.h glib/glibconfig.i386.h && \
+ cp glibconfig.h glibconfig.i386.h && \
cp darwin.cache darwinian.cache && \
- echo --- PPC PASS --- && \
- ./configure --cache-file=darwinian.cache --build=$$BUILD --host=powerpc-apple-darwin$$OSREL $(BASE_CONFIG) CFLAGS="-O2 -arch ppc -I$(PREFIX)/include" LDFLAGS="-arch ppc -L$(PREFIX)/lib" && \
- cp config.h config.ppc.h && \
- cp glib/glibconfig.h glib/glibconfig.ppc.h && \
+ echo --- PPC64 PASS --- && \
+ ./configure --cache-file=darwinian.cache --build=$$BUILD --host=powerpc-apple-darwin$$OSREL $(BASE_CONFIG) CFLAGS="-O2 -arch ppc64 -I$(PREFIX)/include" LDFLAGS="-arch ppc64 -L$(PREFIX)/lib" && \
+ cp config.h config.ppc64.h && \
+ cp glibconfig.h glibconfig.ppc64.h && \
+ cp darwin.cache darwinian.cache && \
+ echo --- X86_64 PASS --- && \
+ ./configure --cache-file=darwinian.cache --build=$$BUILD --host=x86_64-apple-darwin$$OSREL $(BASE_CONFIG) CFLAGS="-O2 -arch x86_64 -I$(PREFIX)/include" LDFLAGS="-arch x86_64 -L$(PREFIX)/lib" && \
+ cp config.h config.x86_64.h && \
+ cp glibconfig.h glibconfig.x86_64.h && \
cp darwin.cache darwinian.cache && \
echo --- UNIVERSAL BINARY PASS --- && \
./configure $(BASE_CONFIG) CFLAGS="-O2 $(ARCHS) -I$(PREFIX)/include" LDFLAGS="$(ARCHS) -L$(PREFIX)/lib" && \
cat config.ppc.h >>config.h && \
echo "#elif defined(__i386__)" >>config.h && \
cat config.i386.h >>config.h && \
+ echo "#elif defined(__ppc64__)" >>config.h && \
+ cat config.ppc64.h >>config.h && \
+ echo "#elif defined(__x86_64__)" >>config.h && \
+ cat config.x86_64.h >>config.h && \
echo "#endif" >>config.h && \
- rm glib/glibconfig.h && \
- echo "#if defined(__ppc__)" >>glib/glibconfig.h && \
- cat glib/glibconfig.ppc.h >>glib/glibconfig.h && \
- echo "#elif defined(__i386__)" >>glib/glibconfig.h && \
- cat glib/glibconfig.i386.h >>glib/glibconfig.h && \
- echo "#endif" >>glib/glibconfig.h && \
+ rm glibconfig.h && \
+ echo "#if defined(__ppc__)" >>glibconfig.h && \
+ cat glibconfig.ppc.h >>glibconfig.h && \
+ echo "#elif defined(__i386__)" >>glibconfig.h && \
+ cat glibconfig.i386.h >>glibconfig.h && \
+ echo "#elif defined(__ppc64__)" >>glibconfig.h && \
+ cat glibconfig.ppc64.h >>glibconfig.h && \
+ echo "#elif defined(__x86_64__)" >>glibconfig.h && \
+ cat glibconfig.x86_64.h >>glibconfig.h && \
+ echo "#endif" >>glibconfig.h && \
touch stamp-gc-h && \
$(MAKE) clean
@echo
@echo CONFIGURING GLIB...
@echo
- $(TAR) xzf $|
- # $(TAR) xzf $| && (cd $(GLIB_DIR); patch -p1 <../glib.patch)
+ $(TAR) xzf $| && (cd $(GLIB_DIR); patch -p1 <../glib.leopard.patch)
$(GLIB_DIR).tar.gz:
@echo
@echo INSTALLING GETTEXT...
@echo
$(MAKE) -C $(GETTEXT_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(GETTEXT_DIR)/gettext-runtime/intl/$(INTL): $(GETTEXT_DIR)/Makefile
@echo
@echo INSTALLING CAIRO...
@echo
$(MAKE) -C $(CAIRO_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(CAIRO_DIR)/src/$(CAIRO): $(CAIRO_DIR)/Makefile
@echo
@echo
@echo CONFIGURING CAIRO...
@echo
- cd $(CAIRO_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG) --enable-quartz --enable-quartz-font --enable-quartz-image
+ cd $(CAIRO_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG)
$(CAIRO_DIR)/configure: | $(CAIRO_DIR).tar.gz
@echo
@echo INSTALLING PNG...
@echo
$(MAKE) -C $(PNG_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(PNG_DIR)/$(PNG): $(PNG_DIR)/Makefile
@echo
@echo INSTALLING PIXMAN...
@echo
$(MAKE) -C $(PIXMAN_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(PIXMAN_DIR)/pixman/$(PIXMAN): $(PIXMAN_DIR)/Makefile
@echo
@echo INSTALLING GD...
@echo
$(MAKE) -C $(GD_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(GD_DIR)/$(GD): $(GD_DIR)/Makefile
@echo
@echo
@echo CONFIGURING GD...
@echo
- cd $(GD_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG) LIBS="-liconv -lexpat" --with-fontconfig=$(PREFIX) --with-png=$(PREFIX)
+ cd $(GD_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG) LIBS="-liconv -lexpat" --with-fontconfig=$(PREFIX)
$(GD_DIR)/configure: | $(GD_DIR).tar.gz
@echo
@echo INSTALLING FREETYPE...
@echo
$(MAKE) -C $(FREETYPE_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(FREETYPE_DIR)/objs/$(FREETYPE): $(FREETYPE_DIR)/Makefile
@echo
@echo INSTALLING XFT...
@echo
$(MAKE) -C $(XFT_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(XFT_DIR)/src/$(XFT): $(XFT_DIR)/Makefile
@echo
$(MAKE) -C $(FONTCONFIG_DIR)/fc-cat install
$(MAKE) -C $(FONTCONFIG_DIR)/fc-list install
$(MAKE) -C $(FONTCONFIG_DIR)/fc-match install
- rm -f $(PREFIX)/lib/*.la
$(FONTCONFIG_DIR)/src/$(FONTCONFIG): $(FONTCONFIG_DIR)/Makefile
@echo
@echo
@echo CONFIGURING FONTCONFIG...
@echo
- cd $(FONTCONFIG_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG) --with-confdir="$(PREFIX)/etc/fontconfig" --with-cache-dir="$(PREFIX)/var/cache/fontconfig"
+ cd $(FONTCONFIG_DIR) && ./configure $(BASE_CONFIG) $(FLAG_CONFIG) --with-confdir="/usr/X11/lib/X11/fontconfig" --with-cache-dir="/usr/X11/var/cache/fontconfig"
$(FONTCONFIG_DIR)/configure: | $(FONTCONFIG_DIR).tar.gz
@echo
@echo
$(CURL) --remote-name --location $(FONTCONFIG_URL) || rm -f $(FONTCONFIG_DIR).tar.gz
-#
-# autoconf
-#
-# only needed during build, don't need Universal Binary
-
-$(PREFIX)/bin/$(AUTOCONF): $(AUTOCONF_DIR)/$(AUTOCONF)
- @echo
- @echo INSTALLING AUTOCONF...
- @echo
- $(MAKE) -C $(AUTOCONF_DIR) install
- rm -f $(PREFIX)/lib/*.la
-
-$(AUTOCONF_DIR)/$(AUTOCONF): $(AUTOCONF_DIR)/Makefile
- @echo
- @echo MAKING AUTOCONF...
- @echo
- if [[ -e $@ ]]; then $(MAKE) -C $(AUTOCONF_DIR) clean; fi && \
- $(MAKE) -C $(AUTOCONF_DIR)
-
-$(AUTOCONF_DIR)/Makefile: | $(AUTOCONF_DIR)/configure
- @echo
- @echo CONFIGURING AUTOCONF...
- @echo
- cd $(AUTOCONF_DIR) && ./configure --prefix=$(PREFIX) --disable-dependency-tracking
-
-$(AUTOCONF_DIR)/configure: | $(AUTOCONF_DIR).tar.gz
- @echo
- @echo UNTARRING AUTOCONF...
- @echo
- $(TAR) xzf $|
-
-$(AUTOCONF_DIR).tar.gz:
- @echo
- @echo TRANSFERRING AUTOCONF...
- @echo
- $(CURL) --remote-name --location $(AUTOCONF_URL) || rm -f $(AUTOCONF_DIR).tar.gz
-
-#
-# automake
-#
-# only needed during build, don't need Universal Binary
-
-$(PREFIX)/bin/$(AUTOMAKE): $(AUTOMAKE_DIR)/$(AUTOMAKE)
- @echo
- @echo INSTALLING AUTOMAKE...
- @echo
- $(MAKE) -C $(AUTOMAKE_DIR) install
- rm -f $(PREFIX)/lib/*.la
-
-$(AUTOMAKE_DIR)/$(AUTOMAKE): $(AUTOMAKE_DIR)/Makefile
- @echo
- @echo MAKING AUTOMAKE...
- @echo
- if [[ -e $@ ]]; then $(MAKE) -C $(AUTOMAKE_DIR) clean; fi && \
- $(MAKE) -C $(AUTOMAKE_DIR)
-
-$(AUTOMAKE_DIR)/Makefile: | $(AUTOMAKE_DIR)/configure
- @echo
- @echo CONFIGURING AUTOMAKE...
- @echo
- cd $(AUTOMAKE_DIR) && ./configure --prefix=$(PREFIX) --disable-dependency-tracking
-
-$(AUTOMAKE_DIR)/configure: | $(AUTOMAKE_DIR).tar.gz
- @echo
- @echo UNTARRING AUTOMAKE...
- @echo
- $(TAR) xzf $|
-
-$(AUTOMAKE_DIR).tar.gz:
- @echo
- @echo TRANSFERRING AUTOMAKE...
- @echo
- $(CURL) --remote-name --location $(AUTOMAKE_URL) || rm -f $(AUTOMAKE_DIR).tar.gz
-
-#
-# libtool
-#
-# only needed during build, don't need Universal Binary
-
-$(PREFIX)/bin/$(LIBTOOL): $(LIBTOOL_DIR)/$(LIBTOOL)
- @echo
- @echo INSTALLING LIBTOOL...
- @echo
- $(MAKE) -C $(LIBTOOL_DIR) install
- rm -f $(PREFIX)/lib/*.la
-
-$(LIBTOOL_DIR)/$(LIBTOOL): $(LIBTOOL_DIR)/Makefile
- @echo
- @echo MAKING LIBTOOL...
- @echo
- if [[ -e $@ ]]; then $(MAKE) -C $(LIBTOOL_DIR) clean; fi && \
- $(MAKE) -C $(LIBTOOL_DIR)
-
-$(LIBTOOL_DIR)/Makefile: | $(LIBTOOL_DIR)/configure
- @echo
- @echo CONFIGURING LIBTOOL...
- @echo
- cd $(LIBTOOL_DIR) && ./configure --prefix=$(PREFIX) --disable-dependency-tracking
-
-$(LIBTOOL_DIR)/configure: | $(LIBTOOL_DIR).tar.gz
- @echo
- @echo UNTARRING LIBTOOL...
- @echo
- $(TAR) xzf $|
-
-$(LIBTOOL_DIR).tar.gz:
- @echo
- @echo TRANSFERRING LIBTOOL...
- @echo
- $(CURL) --remote-name --location $(LIBTOOL_URL) || rm -f $(LIBTOOL_DIR).tar.gz
-
#
# pkgconfig
#
@echo INSTALLING PKGCONFIG...
@echo
$(MAKE) -C $(PKGCONFIG_DIR) install
- rm -f $(PREFIX)/lib/*.la
$(PKGCONFIG_DIR)/$(PKGCONFIG): $(PKGCONFIG_DIR)/Makefile
@echo