ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

commit 7ac48bf81f51adccb87a0e9e44aaaf95797c04ac
parent ae00f51cdd1680cc853ae1d9149c377fc6281952
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 16 May 2014 17:26:09 +0000

add st, improve fontconfig and freetype

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mfontconfig/fontconfig.mk | 29+++++++++++++++++++++--------
Mfreetype/depsinc.mk | 2+-
Dfreetype/fix_exports.mk | 77-----------------------------------------------------------------------------
Mfreetype/freetype.mk | 31+++++++++++++++++++++----------
Mfreetype/v.mk | 2+-
Ast/config.mk | 13+++++++++++++
Ast/mkfile | 5+++++
Ast/st.mk | 21+++++++++++++++++++++
8 files changed, 83 insertions(+), 97 deletions(-)

diff --git a/fontconfig/fontconfig.mk b/fontconfig/fontconfig.mk @@ -1,15 +1,19 @@ TARG = fontconfig -DEPS = expat freetype +DEPS = expat freetype libpng zlib <$mkbuild/mk.common-noinst fontconfig:QV: # skip building tests. printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > test/Makefile.in - export CFLAGS="$CFLAGS $DEPS_CFLAGS" - export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" -# export PKG_CONFIG="/bin/true" - ./configure --prefix="$prefix" \ +# export CFLAGS="$CFLAGS $DEPS_CFLAGS" +# export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + export EXPAT_CFLAGS="-I${expat_includedir}" + export EXPAT_LIBS="-L${expat_libdir} -lexpat" + export FREETYPE_CFLAGS="-I${freetype_includedir}/" + export FREETYPE_LIBS="-lfreetype -L${freetype_libdir}" + CC="${CC} -static" ./configure \ + --prefix="$prefix" \ --mandir="$ROOT/share/man" \ --sysconfdir=/etc \ --localstatedir=/var \ @@ -20,9 +24,18 @@ fontconfig:QV: --disable-docs \ --disable-shared \ --enable-static + # build these ourselves later. + for f in fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan fc-validate; do + printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > "$f/Makefile" + done # make and install. - make -j$nprocs install \ - FREETYPE_LIBS="-lfreetype -L${freetype_libdir}" FREETYPE_CFLAGS="-I${freetype_includedir}" \ - DESTDIR="`pwd`/lib" + make -j$nprocs install DESTDIR="`pwd`/lib" + # build and link tools manually. + mkdir -p "`pwd`/lib/bin" + for f in fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan fc-validate; do + ${CC} "$f/$f.c" -o "$f/$f" -Lsrc/.libs/ -I. -lfontconfig \ + ${CFLAGS} ${LDFLAGS} ${DEPS_CFLAGS} ${DEPS_LDFLAGS} + cp "$f/$f" "`pwd`/lib/bin/" && echo "$f" + done # remove .la files for now ? find `pwd`/lib -iname "*.la" -exec rm {} \; diff --git a/freetype/depsinc.mk b/freetype/depsinc.mk @@ -1,6 +1,6 @@ <$freetype_DEPDIR/v.mk freetype_libdir = $freetype_DEPDIR/freetype-$v/lib/lib -freetype_includedir = $freetype_DEPDIR/freetype-$v/lib/include +freetype_includedir = $freetype_DEPDIR/freetype-$v/lib/include/freetype2 DEPS_CFLAGS = $DEPS_CFLAGS -I${freetype_includedir} DEPS_LDFLAGS = $DEPS_LDFLAGS -L${freetype_libdir} -lfreetype diff --git a/freetype/fix_exports.mk b/freetype/fix_exports.mk @@ -1,77 +0,0 @@ -# -# FreeType 2 exports sub-Makefile -# - - -# Copyright 2005, 2006 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - - -# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY -# OTHER MAKEFILES. - - -# This sub-Makefile is used to compute the list of exported symbols whenever -# the EXPORTS_LIST variable is defined by one of the platform or compiler -# specific build files. -# -# EXPORTS_LIST contains the name of the `list' file, for example a Windows -# .DEF file. -# -ifneq ($(EXPORTS_LIST),) - - # CCexe is the compiler used to compile the `apinames' tool program - # on the host machine. This isn't necessarily the same as the compiler - # which can be a cross-compiler for a different architecture, for example. - # -# ifeq ($(CCexe),) -# CCexe := $(CC) -# endif - CCexe := cc - - # TE acts like T, but for executables instead of object files. - ifeq ($(TE),) - TE := $T - endif - - # The list of public headers we're going to parse. - PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h) - - # The `apinames' source and executable. We use $E_BUILD as the host - # executable suffix, which *includes* the final dot. - # - # Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers. - # - APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c) - APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD)) - - $(APINAMES_EXE): $(APINAMES_SRC) - $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS) - - .PHONY: symbols_list - - symbols_list: $(EXPORTS_LIST) - - # We manually add TT_New_Context and TT_RunIns, which are needed by TT - # debuggers, to the EXPORTS_LIST. - # - $(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS) - $(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS) - @echo TT_New_Context >> $(EXPORTS_LIST) - @echo TT_RunIns >> $(EXPORTS_LIST) - - $(PROJECT_LIBRARY): $(EXPORTS_LIST) - - CLEAN += $(EXPORTS_LIST) \ - $(APINAMES_EXE) - -endif - - -# EOF diff --git a/freetype/freetype.mk b/freetype/freetype.mk @@ -1,20 +1,31 @@ TARG = freetype +DEPS = zlib libpng <$mkbuild/mk.common-noinst freetype:QV: - # build apinames for host (needed in build). - # TODO: possibly use CCraw="cc" CCexe="cc" CCexe_CFLAGS="" - # couldn't get that to work though. - #CC="cc" CFLAGS="" LDFLAGS="" make src/tools/apinames - cp ../fix_exports.mk builds/exports.mk - # - CC="$CC" ./configure --prefix="$prefix" --mandir="$ROOT/share/man" \ + # CCexe is set to build apinames for host (needed in build). +# export CFLAGS="$CFLAGS $DEPS_CFLAGS" +# export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + export ZLIB_CFLAGS="-I${zlib_includedir}" + export ZLIB_LIBS="-L${zlib_libdir} -lzlib" + # needed because build system calls libpng-config. + export LIBPNG_CFLAGS="-I${libpng_includedir}" + export LIBPNG_LIBS="-L${libpng_libdir} -lpng16" + CC="$CC" ./configure \ + --prefix="$prefix" \ + --mandir="$ROOT/share/man" \ --disable-shared \ + --disable-nls \ --enable-static \ - --with-zlib - make -j$nprocs install DESTDIR="`pwd`/lib" + --with-zlib \ + --with-png + make -j$nprocs CCexe="${HOSTCC}" # DESTDIR="`pwd`/lib" + make -j$nprocs CCexe="${HOSTCC}" install DESTDIR="`pwd`/lib" # make symlink for includes, some packages depend on this (fontconfig). - ln -sf freetype2/freetype "`pwd`/lib/include/freetype" + mkdir -p "`pwd`/lib/include/freetype2/config" + ln -sf freetype2 "`pwd`/lib/include/freetype" + # fontconfig needs this. + ln -sf . "`pwd`/lib/include/freetype/freetype" # remove .la files for now ? find `pwd`/lib -iname "*.la" -exec rm {} \; diff --git a/freetype/v.mk b/freetype/v.mk @@ -1 +1 @@ -v = 2.4.11 +v = 2.5.3 diff --git a/st/config.mk b/st/config.mk @@ -0,0 +1,13 @@ +# st version +VERSION = 0.5 + +# Customize below to fit your system + +# paths +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/share/man + +# flags +CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600 +CFLAGS += -std=c99 -pedantic -Wall -Wvariadic-macros ${CPPFLAGS} +#LDFLAGS += ${LIBS} diff --git a/st/mkfile b/st/mkfile @@ -0,0 +1,5 @@ +<$mkbuild/mk.3rdparty + +src = st +git = git://git.suckless.org/st +mkfile = ../st.mk diff --git a/st/st.mk b/st/st.mk @@ -0,0 +1,21 @@ +# make deps: tic (from ncurses). +TARG = st +DEPS = \ + fontconfig xorglibxft freetype expat xorglibxcb xorglibxext xorglibxrender \ + xorgrenderproto xorglibx11 xorgxtrans xorglibxcb xorgxcbproto xorgxproto \ + xorglibxau xorglibxdmcp libpng zlib + +<$mkbuild/mk.common-noinst + +st:QV: + export CFLAGS="$CFLAGS $DEPS_CFLAGS" + export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + # overwrite default config.mk to allow overriding some variables. + cp ../config.mk config.mk + CC="${CC} -static" make -j$nprocs \ + PREFIX="$prefix" DESTDIR="$ROOT" + +install:QV: + # NOTE: set TERMINFO to force the proper path. + make -j$nprocs install PREFIX="$prefix" DESTDIR="$ROOT" \ + TERMINFO="$ROOT/share/terminfo"