3 include $(SRCDIR)/config/aros.cfg
5 #MM- workbench-libs-freetype-complete : \
6 #MM workbench-libs-freetype-linklib \
7 #MM workbench-libs-freetype-module
8 #MM workbench-libs-freetype-linklib : freetype2-fetch
9 #MM workbench-libs-freetype-module : freetype2-fetch
13 ARCHBASE := $(FT2NAME)-$(FT2VERS)
15 FT2SRCDIR := $(PORTSDIR)/$(FT2NAME)2/$(ARCHBASE)
16 FT2AROSBUILDDIR := $(FT2SRCDIR)/builds/aros/src
18 PATCHSPEC := $(ARCHBASE)-aros.diff:$(ARCHBASE):-p1
19 REPOSITORIES := https://download.savannah.gnu.org/releases/freetype
21 %fetch mmake=freetype2-fetch archive=$(ARCHBASE) destination=$(PORTSDIR)/$(FT2NAME)2 \
22 location=$(PORTSSOURCEDIR) archive_origins=$(REPOSITORIES) suffixes="tar.gz" \
23 patches_specs=$(PATCHSPEC)
25 %create_patch mmake=freetype2-create-patch \
26 archive=$(ARCHBASE) suffixes="tar.gz" \
27 destination=$(PORTSDIR)/$(FT2NAME)2
81 # Substitute BASEFILES with the AROS specific versions
82 FT2BASEARCHFILES := $(patsubst $(FT2AROSBUILDDIR)/%,%,$(basename $(wildcard $(FT2AROSBUILDDIR)/base/*.c)))
83 FT2BASENARCHFILES := $(addprefix $(FT2SRCDIR)/src/,$(filter-out $(FT2BASEARCHFILES),$(FT2BASEFILES) $(FT2BASEEXTFILES)))
95 NOWARN_FLAGS := $(NOWARN_ERROR)
96 USER_CFLAGS := $(NOWARN_FLAGS)
97 USER_CPPFLAGS := -DFT2_BUILD_LIBRARY
98 USER_INCLUDES := -I$(SRCDIR)/$(CURDIR)/src $(addprefix -I,$(DIRS))
100 #MM- workbench-libs : workbench-libs-freetype-module
101 #MM workbench-libs-freetype-linklib : workbench-libs-freetype-includes workbench-libs-freetype-pkgconfig
102 #MM workbench-libs-freetype-module : workbench-libs-freetype-includes
103 #MM- workbench-libs-freetype-linklibs : workbench-libs-freetype-linklib workbench-libs-freetype-module-linklib
105 FT2FILES := $(addprefix $(FT2AROSBUILDDIR)/,$(FT2BASEARCHFILES)) $(addprefix $(FT2SRCDIR)/src/,$(FT2AUXFILES) $(FT2RASTFILES) $(FT2FONTFILES) $(FT2HINTFILES)) $(FT2BASENARCHFILES)
107 %build_linklib mmake=workbench-libs-freetype-linklib libname=freetype2.static \
108 files=$(FT2FILES) objdir=$(OBJDIR)/freetype2_static
110 %build_module mmake=workbench-libs-freetype-module modname=freetype2 \
111 modtype=library files="$(SHFILES) $(FT2FILES)" uselibs="stdc" conffile=freetype2.conf
114 # Rules for generated files and Includes...
118 workbench-libs-freetype-pkgconfig : $(AROS_LIB)/pkgconfig/freetype2.pc
120 $(AROS_LIB)/pkgconfig/freetype2.pc : $(FT2SRCDIR)/builds/unix/freetype2.in
121 %mkdir_q dir=$(AROS_LIB)/pkgconfig
122 @$(SED) -e 's|%FT2_EXTRA_LIBS%||' \
124 -e 's|%LIBZ%|-L $(AROS_LIB) -lz|' \
125 -e 's|%exec_prefix%|$${prefix}|' \
126 -e 's|%ft_version%|2.5.0|' \
127 -e 's|%includedir%|$${prefix}/include|' \
128 -e 's|%libdir%|$(AROS_LIB)|' \
129 -e 's|%prefix%|/Developer|' \
132 FT2_INCLUDE_FILES := $(notdir $(call WILDCARD, $(FT2SRCDIR)/include/*.h))
133 %copy_includes dir=$(FT2SRCDIR)/include includes=$(FT2_INCLUDE_FILES)
135 FT2I_INCLUDE_FILES := $(notdir $(call WILDCARD, $(FT2SRCDIR)/include/freetype/*.h))
136 %copy_includes path=freetype dir=$(FT2SRCDIR)/include/freetype includes=$(FT2I_INCLUDE_FILES)
138 #MM- includes-copy : freetype2-fetch workbench-libs-freetype-genincludes
140 FT2OPTIONFILE := ftoption.h
141 FT2CONFIG_INCLUDE_FILES := $(filter-out $(FT2OPTIONFILE),$(notdir $(call WILDCARD, $(FT2SRCDIR)/include/freetype/config/*.h)))
142 %copy_includes path=freetype/config dir=$(FT2SRCDIR)/include/freetype/config includes=$(FT2CONFIG_INCLUDE_FILES)
144 $(AROS_INCLUDES)/freetype/config/$(FT2OPTIONFILE) : $(FT2SRCDIR)/include/freetype/config/$(FT2OPTIONFILE)
145 @$(ECHO) "Generating Freetype2 build options ..."
146 %mkdir_q dir=$(AROS_INCLUDES)/freetype/config
147 @$(SED) "s|.*FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES.*|/*define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES*/\\n|g" $< > $@
150 workbench-libs-freetype-genincludes : freetype2-fetch $(AROS_INCLUDES)/freetype/config/$(FT2OPTIONFILE)
153 FT2INT_INCLUDE_FILES := $(notdir $(call WILDCARD, $(FT2SRCDIR)/include/freetype/internal/*.h))
154 %copy_includes path=freetype/internal dir=$(FT2SRCDIR)/include/freetype/internal includes=$(FT2INT_INCLUDE_FILES)
156 FT2SVC_INCLUDE_FILES := $(notdir $(call WILDCARD, $(FT2SRCDIR)/include/freetype/internal/services/*.h))
157 %copy_includes path=freetype/internal/services dir=$(FT2SRCDIR)/include/freetype/internal/services includes=$(FT2SVC_INCLUDE_FILES)