Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport freetype2 from trunk #527

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions graphics/freetype2/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# $NetBSD: Makefile,v 1.100 2015/09/06 08:34:20 mef Exp $
# $NetBSD: Makefile,v 1.113 2017/09/18 16:54:06 adam Exp $

DISTNAME= freetype-2.6
DISTNAME= freetype-2.8.1
PKGNAME= ${DISTNAME:S/-/2-/}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freetype/} \
http://download.savannah.gnu.org/releases/freetype/
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freetype/}
MASTER_SITES+= http://download.savannah.gnu.org/releases/freetype/
EXTRACT_SUFX= .tar.bz2

MAINTAINER= [email protected]
HOMEPAGE= http://www.freetype.org/
HOMEPAGE= https://www.freetype.org/
COMMENT= Font rendering engine and library API
LICENSE= gnu-gpl-v2

USE_LIBTOOL= yes
USE_MULTIARCH= bin lib
USE_TOOLS+= grep gmake pkg-config
GNU_CONFIGURE= yes
CONFIGURE_DIRS= builds/unix
Expand All @@ -28,6 +27,11 @@ LDFLAGS+= -framework Carbon
.endif

PKGCONFIG_OVERRIDE= builds/unix/freetype2.in
SUBST_CLASSES+= ftc
SUBST_FILES.ftc+= builds/unix/freetype-config.in
SUBST_SED.ftc+= -e "s!echo -L\([^ ]*\)!echo ${COMPILER_RPATH_FLAG}\\1 -L\\1!"
SUBST_STAGE.ftc+= pre-configure
SUBST_MESSAGE.ftc+= Fixing rpath in freetype-config script.

.include "../../mk/bsd.prefs.mk"
.include "../../mk/compiler.mk"
Expand All @@ -40,20 +44,21 @@ CFLAGS+= -fno-strict-aliasing
.endif

# tell configure not to use unix-specific version of ftsystem.c on OpenBSD
.if ${OPSYS} == "OpenBSD"
CONFIGURE_ENV+= ac_cv_func_mmap_fixed_mapped=no
.endif
CONFIGURE_ENV.OpenBSD+= ac_cv_func_mmap_fixed_mapped=no

.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
CONFIGURE_ENV+= CC_BUILD=${NATIVE_CC:Q}
.endif

post-configure:
cd ${WRKSRC} && ${LN} -s builds/unix/unix.mk config.mk
cd ${WRKSRC} && ${LN} -f -s builds/unix/unix.mk config.mk
.if ${OPSYS} == "IRIX"
${MKDIR} ${WRKSRC}/.libs
.endif

.include "../../archivers/bzip2/buildlink3.mk"
# Avoid creating a fake zlib.pc, because if it does
# we will add a Requires for it to our .pc file
CHECK_BUILTIN.zlib:=yes
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
103 changes: 52 additions & 51 deletions graphics/freetype2/PLIST
Original file line number Diff line number Diff line change
@@ -1,56 +1,57 @@
@comment $NetBSD: PLIST,v 1.22 2015/09/06 08:34:20 mef Exp $
@comment $NetBSD: PLIST,v 1.24 2017/05/14 11:02:15 spz Exp $
bin/freetype-config
include/freetype2/config/ftconfig.h
include/freetype2/config/ftheader.h
include/freetype2/config/ftmodule.h
include/freetype2/config/ftoption.h
include/freetype2/config/ftstdlib.h
include/freetype2/freetype.h
include/freetype2/freetype/config/ftconfig.h
include/freetype2/freetype/config/ftheader.h
include/freetype2/freetype/config/ftmodule.h
include/freetype2/freetype/config/ftoption.h
include/freetype2/freetype/config/ftstdlib.h
include/freetype2/freetype/freetype.h
include/freetype2/freetype/ftadvanc.h
include/freetype2/freetype/ftautoh.h
include/freetype2/freetype/ftbbox.h
include/freetype2/freetype/ftbdf.h
include/freetype2/freetype/ftbitmap.h
include/freetype2/freetype/ftbzip2.h
include/freetype2/freetype/ftcache.h
include/freetype2/freetype/ftcffdrv.h
include/freetype2/freetype/ftchapters.h
include/freetype2/freetype/ftcid.h
include/freetype2/freetype/fterrdef.h
include/freetype2/freetype/fterrors.h
include/freetype2/freetype/ftfntfmt.h
include/freetype2/freetype/ftgasp.h
include/freetype2/freetype/ftglyph.h
include/freetype2/freetype/ftgxval.h
include/freetype2/freetype/ftgzip.h
include/freetype2/freetype/ftimage.h
include/freetype2/freetype/ftincrem.h
include/freetype2/freetype/ftlcdfil.h
include/freetype2/freetype/ftlist.h
include/freetype2/freetype/ftlzw.h
include/freetype2/freetype/ftmac.h
include/freetype2/freetype/ftmm.h
include/freetype2/freetype/ftmodapi.h
include/freetype2/freetype/ftmoderr.h
include/freetype2/freetype/ftotval.h
include/freetype2/freetype/ftoutln.h
include/freetype2/freetype/ftpcfdrv.h
include/freetype2/freetype/ftpfr.h
include/freetype2/freetype/ftrender.h
include/freetype2/freetype/ftsizes.h
include/freetype2/freetype/ftsnames.h
include/freetype2/freetype/ftstroke.h
include/freetype2/freetype/ftsynth.h
include/freetype2/freetype/ftsystem.h
include/freetype2/freetype/fttrigon.h
include/freetype2/freetype/ftttdrv.h
include/freetype2/freetype/fttypes.h
include/freetype2/freetype/ftwinfnt.h
include/freetype2/freetype/t1tables.h
include/freetype2/freetype/ttnameid.h
include/freetype2/freetype/tttables.h
include/freetype2/freetype/tttags.h
include/freetype2/freetype/ttunpat.h
include/freetype2/ft2build.h
include/freetype2/ftadvanc.h
include/freetype2/ftautoh.h
include/freetype2/ftbbox.h
include/freetype2/ftbdf.h
include/freetype2/ftbitmap.h
include/freetype2/ftbzip2.h
include/freetype2/ftcache.h
include/freetype2/ftcffdrv.h
include/freetype2/ftchapters.h
include/freetype2/ftcid.h
include/freetype2/fterrdef.h
include/freetype2/fterrors.h
include/freetype2/ftfntfmt.h
include/freetype2/ftgasp.h
include/freetype2/ftglyph.h
include/freetype2/ftgxval.h
include/freetype2/ftgzip.h
include/freetype2/ftimage.h
include/freetype2/ftincrem.h
include/freetype2/ftlcdfil.h
include/freetype2/ftlist.h
include/freetype2/ftlzw.h
include/freetype2/ftmac.h
include/freetype2/ftmm.h
include/freetype2/ftmodapi.h
include/freetype2/ftmoderr.h
include/freetype2/ftotval.h
include/freetype2/ftoutln.h
include/freetype2/ftpfr.h
include/freetype2/ftrender.h
include/freetype2/ftsizes.h
include/freetype2/ftsnames.h
include/freetype2/ftstroke.h
include/freetype2/ftsynth.h
include/freetype2/ftsystem.h
include/freetype2/fttrigon.h
include/freetype2/ftttdrv.h
include/freetype2/fttypes.h
include/freetype2/ftwinfnt.h
include/freetype2/t1tables.h
include/freetype2/ttnameid.h
include/freetype2/tttables.h
include/freetype2/tttags.h
include/freetype2/ttunpat.h
lib/libfreetype.la
lib/pkgconfig/freetype2.pc
man/man1/freetype-config.1
Expand Down
6 changes: 3 additions & 3 deletions graphics/freetype2/buildlink3.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.45 2014/12/09 10:50:04 adam Exp $
# $NetBSD: buildlink3.mk,v 1.46 2016/07/09 12:23:16 adam Exp $

BUILDLINK_TREE+= freetype2

Expand All @@ -7,8 +7,8 @@ FREETYPE2_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.4.5
BUILDLINK_ABI_DEPENDS.freetype2+= freetype2>=2.4.11
BUILDLINK_PKGSRCDIR.freetype2?= ../../graphics/freetype2
BUILDLINK_INCDIRS.freetype2?= include/freetype2
BUILDLINK_PKGSRCDIR.freetype2?= ../../graphics/freetype2
BUILDLINK_INCDIRS.freetype2?= include/freetype2

BUILDLINK_FILES.freetype2+= bin/freetype-config

Expand Down
10 changes: 5 additions & 5 deletions graphics/freetype2/builtin.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.15 2015/02/18 09:53:27 wiz Exp $
# $NetBSD: builtin.mk,v 1.16 2016/04/07 10:02:13 adam Exp $

BUILTIN_PKG:= freetype2

Expand All @@ -22,7 +22,7 @@ H_FREETYPE2:= ${H_FREETYPE2_NEW}
IS_BUILTIN.freetype2= no
. endif
.endif
MAKEVARS+= IS_BUILTIN.freetype2
MAKEVARS+= IS_BUILTIN.freetype2

###
### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
Expand Down Expand Up @@ -87,11 +87,11 @@ BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.1.3
("${BUILTIN_VERSION.freetype2}" == "2.5.3"))
_FT2_VER_MAP.2.5.3=17.2.11
_FT2_VER_MAP.2.4.5=13.0.7
SUBST_CLASSES+= fx-ft2-pc-version
SUBST_STAGE.fx-ft2-pc-version= post-wrapper
SUBST_CLASSES+= fx-ft2-pc-version
SUBST_STAGE.fx-ft2-pc-version= post-wrapper
SUBST_MESSAGE.fx-ft2-pc-version=\
Fixes wrong module version in freetype2.pc
SUBST_FILES.fx-ft2-pc-version= ${BUILDLINK_X11_DIR}/lib/pkgconfig/freetype2.pc
SUBST_FILES.fx-ft2-pc-version= ${BUILDLINK_X11_DIR}/lib/pkgconfig/freetype2.pc
SUBST_SED.fx-ft2-pc-version= \
-e 's|^\(Version:\).*|\1 ${_FT2_VER_MAP.${BUILTIN_VERSION.freetype2}}|'
. endif
Expand Down
14 changes: 7 additions & 7 deletions graphics/freetype2/distinfo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.55 2015/11/03 21:33:57 agc Exp $
$NetBSD: distinfo,v 1.63 2017/09/18 16:54:06 adam Exp $

SHA1 (freetype-2.6.tar.bz2) = cd2b144205dd2c61693e2d861069367aa3dde1bc
RMD160 (freetype-2.6.tar.bz2) = 80618594b49c5bfdd8fd951f83a346d57f04ee09
SHA512 (freetype-2.6.tar.bz2) = 0242c832dcac3d9dc5d434b7f5145e63f2289d5df32f16e1c7afc1e31c3c92f0dd374e20dfef79a9ecb26b14419f42b0d897c7154f249f629c35ee7af0aa5297
Size (freetype-2.6.tar.bz2) = 1726219 bytes
SHA1 (patch-aa) = d89f3f452354129df49d02d5063e712b57e8ba0e
SHA1 (patch-ab) = cb8c9552e2db1e1f3da3d20971c22f174e343162
SHA1 (freetype-2.8.1.tar.bz2) = 417bb3747c4ac95b6f2652024a53fad45581fa1c
RMD160 (freetype-2.8.1.tar.bz2) = 4b31c73b38d1f03c431b12408f800569e0724cc4
SHA512 (freetype-2.8.1.tar.bz2) = ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823
Size (freetype-2.8.1.tar.bz2) = 1886443 bytes
SHA1 (patch-builds_unix_freetype-config.in) = 60217b884a0f50c90f89529eaf909ded2693e3be
SHA1 (patch-builds_unix_unix-cc.in) = bd911998ec6bf6a59c1bfad9cc5702310ad5efc5
13 changes: 4 additions & 9 deletions graphics/freetype2/options.mk
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# $NetBSD: options.mk,v 1.2 2014/03/14 19:39:52 drochner Exp $
# $NetBSD: options.mk,v 1.4 2016/09/12 18:06:44 wiz Exp $

PKG_OPTIONS_VAR= PKG_OPTIONS.freetype2
PKG_SUPPORTED_OPTIONS= png subpixel
PKG_SUPPORTED_OPTIONS= png

.include "../../mk/bsd.options.mk"

# subpixel (lcd) rendering, patent issues
.if !empty(PKG_OPTIONS:Msubpixel)
CFLAGS+= -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
.endif

.if !empty(PKG_OPTIONS:Mpng)
CONFIGURE_ARGS+= --with-png=yes
CONFIGURE_ARGS+= --with-png=yes
.include "../../graphics/png/buildlink3.mk"
.else
CONFIGURE_ARGS+= --with-png=no
CONFIGURE_ARGS+= --with-png=no
.endif
13 changes: 0 additions & 13 deletions graphics/freetype2/patches/patch-aa

This file was deleted.

41 changes: 41 additions & 0 deletions graphics/freetype2/patches/patch-builds_unix_freetype-config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$NetBSD: patch-builds_unix_freetype-config.in,v 1.1 2017/09/18 16:54:06 adam Exp $

Do not substitute %PKG_CONFIG% as it ends with temporary DESTDIR.

--- builds/unix/freetype-config.in.orig 2017-09-18 15:52:06.000000000 +0000
+++ builds/unix/freetype-config.in
@@ -14,7 +14,7 @@ export LC_ALL


# if `pkg-config' is available, use values from `freetype2.pc'
-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
+pkg-config --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
if test $? -eq 0 ; then
# note that option `--variable' is not affected by the
# PKG_CONFIG_SYSROOT_DIR environment variable
@@ -23,17 +23,17 @@ if test $? -eq 0 ; then
export PKG_CONFIG_SYSROOT_DIR
fi

- prefix=`%PKG_CONFIG% --variable prefix freetype2`
- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
+ prefix=`pkg-config --variable prefix freetype2`
+ exec_prefix=`pkg-config --variable exec_prefix freetype2`

- includedir=`%PKG_CONFIG% --variable includedir freetype2`
- libdir=`%PKG_CONFIG% --variable libdir freetype2`
+ includedir=`pkg-config --variable includedir freetype2`
+ libdir=`pkg-config --variable libdir freetype2`

- version=`%PKG_CONFIG% --modversion freetype2`
+ version=`pkg-config --modversion freetype2`

- cflags=`%PKG_CONFIG% --cflags freetype2`
- dynamic_libs=`%PKG_CONFIG% --libs freetype2`
- static_libs=`%PKG_CONFIG% --static --libs freetype2`
+ cflags=`pkg-config --cflags freetype2`
+ dynamic_libs=`pkg-config --libs freetype2`
+ static_libs=`pkg-config --static --libs freetype2`
else
prefix="%prefix%"
exec_prefix="%exec_prefix%"
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$NetBSD: patch-ab,v 1.17 2011/08/03 08:25:41 cheusov Exp $
$NetBSD: patch-builds_unix_unix-cc.in,v 1.1 2017/09/18 16:54:06 adam Exp $

--- builds/unix/unix-cc.in.orig 2010-08-31 11:04:28.000000000 +0000
Provide tag to libtool.
Use CFLAGS when compiling executables.

--- builds/unix/unix-cc.in.orig 2017-03-30 10:20:23.000000000 +0000
+++ builds/unix/unix-cc.in
@@ -89,7 +89,7 @@ ANSIFLAGS := @XX_ANSIFLAGS@
#
Expand All @@ -11,9 +14,9 @@ $NetBSD: patch-ab,v 1.17 2011/08/03 08:25:41 cheusov Exp $

# Linker flags.
#
@@ -101,12 +101,12 @@ LDFLAGS := @LDFLAGS@
@@ -101,14 +101,14 @@ LDFLAGS := @LDFLAGS@
CCraw_build := @CC_BUILD@ # native CC of building system
E_BUILD := @EXEEXT_BUILD@ # extension for exexutable on building system
E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system
EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
-CCexe := $(CCraw_build) # used to compile `apinames' only
+CCexe := $(CCraw_build) @CFLAGS@ # used to compile `apinames' only
Expand All @@ -25,4 +28,7 @@ $NetBSD: patch-ab,v 1.17 2011/08/03 08:25:41 cheusov Exp $
+LINK_LIBRARY = $(LIBTOOL) --tag=CC --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
-rpath $(libdir) -version-info $(version_info) \
$(LDFLAGS) -no-undefined \
# -export-symbols $(EXPORTS_LIST)
- -export-symbols $(EXPORTS_LIST)
+ # -export-symbols $(EXPORTS_LIST)

# EOF