[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Rename freetype library as expected by cairo in 64bit windows (#352)

Eliot Miranda notifications at github.com
Tue Jan 8 19:31:44 UTC 2019


Why the level of indirection?  For example, all the spec files look like

freetype2_spec_download_url:=http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.9.1.tar.gz
freetype2_spec_archive_name:=freetype-2.9.1.tar.gz
freetype2_spec_unpack_dir_name:=freetype-2.9.1
freetype2_spec_product_name_macOS:=libfreetype.6.dylib
freetype2_spec_product_name_linux:=
freetype2_spec_product_name_windows:=libfreetype.dll
freetype2_spec_symlinks_macOS:=libfreetype*.dylib

and are included in a Makefile (in this case Makefile.freetype2) in the following style:
include ../../third-party/freetype2.spec

# plugin definitions
FREETYPE2URL:=$(freetype2_spec_download_url)
FREETYPE2LIBNAME:=$(freetype2_spec_product_name_macOS)
FREETYPE2DIR:=$(THIRDPARTYDIR)/$(freetype2_spec_unpack_dir_name)
FREETYPE2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(freetype2_spec_archive_name)
FREETYPE2LIB:=$(THIRDPARTYINSTALLDIR)/$(FREETYPE2LIBNAME)
FREETYPE2SYMLINKS:=$(freetype2_spec_symlinks_macOS)

Why not just have the spec file read

FREETYPE2URL:=http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.9.1.tar.gz
FREETYPE2LIBNAME:=libfreetype.6.dylib
FREETYPE2DIR:=freetype-2.9.1
FREETYPE2ARCHIVE:=freetype-2.9.1.tar.gz
FREETYPE2SYMLINKS:=libfreetype*.dylib

(or better still:
FREETYPE2VER:=freetype-2.9.1
FREETYPE2ARCHIVE:=$(FREETYPE2VER).tar.gz
FREETYPE2URL:=http://ftp.igh.cnrs.fr/pub/nongnu/freetype/$(FREETYPE2ARCHIVE)
FREETYPE2LIBNAME:=libfreetype.6.dylib
FREETYPE2DIR:=$(FREETYPE2VER)
FREETYPE2SYMLINKS:=libfreetype*.dylib
)
and then use make's ability to redefine macros to include the above more simply as:

include ../../third-party/freetype2.spec

# plugin definitions
FREETYPE2DIR:=$(THIRDPARTYDIR)/$(FREETYPE2DIR)
FREETYPE2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(FREETYPE2ARCHIVE)
FREETYPE2LIB:=$(THIRDPARTYINSTALLDIR)/$(FREETYPE2LIB)

What does the extra level of names buy us?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/352#issuecomment-452423273
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190108/37f44468/attachment-0001.html>


More information about the Vm-dev mailing list