<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[152485] trunk/dports/x11</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/152485">152485</a></dd>
<dt>Author</dt> <dd>jeremyhu@macports.org</dd>
<dt>Date</dt> <dd>2016-09-10 23:18:49 -0700 (Sat, 10 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>xorg-libXfont2: New port</pre>
<h3>Added Paths</h3>
<ul>
<li>trunk/dports/x11/xorg-libXfont2/</li>
<li><a href="#trunkdportsx11xorglibXfont2Portfile">trunk/dports/x11/xorg-libXfont2/Portfile</a></li>
<li>trunk/dports/x11/xorg-libXfont2/files/</li>
<li><a href="#trunkdportsx11xorglibXfont2files0001RevertAddcompilerwarningflagsLeavewarningfipatch">trunk/dports/x11/xorg-libXfont2/files/0001-Revert-Add-compiler-warning-flags-.-Leave-warning-fi.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0002FreeTypeCorrectanallocationsizepatch">trunk/dports/x11/xorg-libXfont2/files/0002-FreeType-Correct-an-allocation-size.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0003bitmapBailoutoninvalidinputtoFontFileMakeDirpatch">trunk/dports/x11/xorg-libXfont2/files/0003-bitmap-Bail-out-on-invalid-input-to-FontFileMakeDir-.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0004fserveSilenceaWformatwarningpatch">trunk/dports/x11/xorg-libXfont2/files/0004-fserve-Silence-a-Wformat-warning.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0005fstransRemoveunusedfoofunctionpatch">trunk/dports/x11/xorg-libXfont2/files/0005-fstrans-Remove-unused-foo-function.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0006fserveFixabufferreadoverrunin_fs_client_accespatch">trunk/dports/x11/xorg-libXfont2/files/0006-fserve-Fix-a-buffer-read-overrun-in-_fs_client_acces.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0007configureUsefvisibilityhiddenifavailablepatch">trunk/dports/x11/xorg-libXfont2/files/0007-configure-Use-fvisibility-hidden-if-available.patch</a></li>
<li><a href="#trunkdportsx11xorglibXfont2files0009freetypeFixalogicerrorincomputingfacenamepatch">trunk/dports/x11/xorg-libXfont2/files/0009-freetype-Fix-a-logic-error-in-computing-face-name.patch</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsx11xorglibXfont2Portfile"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/Portfile (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/Portfile         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/Portfile        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+# $Id$
+
+PortSystem 1.0
+
+name                xorg-libXfont2
+version                2.0.1
+categories        x11 devel
+license                X11 BSD
+maintainers        jeremyhu openmaintainer
+description        X.org libXfont
+homepage        http://www.x.org
+platforms        darwin macosx
+long_description X font handling library for server and utilities
+master_sites         xorg:individual/lib/
+
+distname        libXfont2-${version}
+checksums sha1 4cf056ab00bf631649e040051cf8e2b096cc245b \
+ rmd160 3522b8ec43b6d45f096c815365895fc977046bbc \
+ sha256 e9fbbb475ddd171b3a6a54b989cbade1f6f874fc35d505ebc5be426bc6e4db7e
+use_bzip2        yes
+
+use_parallel_build yes
+
+depends_build \
+        port:pkgconfig \
+        port:xorg-util-macros \
+        port:xorg-xtrans
+
+depends_lib \
+        port:freetype \
+        port:xorg-libfontenc \
+        port:bzip2 \
+        port:zlib \
+        port:xorg-xproto \
+        port:xorg-fontsproto
+
+configure.args \
+        --with-bzip2 \
+        --without-xmlto \
+        --without-fop \
+        --disable-devel-docs
+
+patchfiles-append \
+        0001-Revert-Add-compiler-warning-flags-.-Leave-warning-fi.patch \
+        0002-FreeType-Correct-an-allocation-size.patch \
+        0003-bitmap-Bail-out-on-invalid-input-to-FontFileMakeDir-.patch \
+        0004-fserve-Silence-a-Wformat-warning.patch \
+        0005-fstrans-Remove-unused-foo-function.patch \
+        0006-fserve-Fix-a-buffer-read-overrun-in-_fs_client_acces.patch \
+        0007-configure-Use-fvisibility-hidden-if-available.patch \
+        0009-freetype-Fix-a-logic-error-in-computing-face-name.patch
+
+patch.pre_args -p1
+
+use_autoreconf yes
+autoreconf.args -fvi
+
+build.args V=1
+
+# Depending on ghostscript for the PDF documentation creates a dependency
+# loop, so you may want to install first without the docs variant
+variant docs description "Install extra documentation" {
+        depends_build-append \
+                port:fop \
+                port:xmlto
+
+        depends_skip_archcheck-append \
+                xmlto
+
+        configure.args-delete \
+                --without-xmlto \
+                --without-fop \
+                --disable-devel-docs
+
+        configure.args-append \
+                --with-xmlto \
+                --with-fop \
+                --enable-devel-docs
+
+        configure.env-append \
+                XMLTO="${prefix}/bin/xmlto" \
+                FOP="${prefix}/bin/fop"
+}
+
+livecheck.type regex
+livecheck.url http://xorg.freedesktop.org/archive/individual/lib/?C=M&O=D
+livecheck.regex libXfont-(\\d+(?:\\.\\d+)*)
</ins><span class="cx">Property changes on: trunk/dports/x11/xorg-libXfont2/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportsx11xorglibXfont2files0001RevertAddcompilerwarningflagsLeavewarningfipatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0001-Revert-Add-compiler-warning-flags-.-Leave-warning-fi.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0001-Revert-Add-compiler-warning-flags-.-Leave-warning-fi.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0001-Revert-Add-compiler-warning-flags-.-Leave-warning-fi.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,356 @@
</span><ins>+From eefc0b0b908eb8533e704d7156ce983ad7891cc5 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Sat, 12 Dec 2015 14:54:26 -0800
+Subject: [PATCH 1/9] Revert "Add compiler warning flags". Leave warning fixes.
+
+This reverts commit eb67d10ae82b364a4324e96ce53baaa4e5e75f97, but
+leaves the warning fixes in place; it looks like either I was
+confused, or something has changed so that XORG_DEFAULT_OPTIONS now
+pulls in the appropriate compiler warnings.
+---
+ configure.ac | 24 -----
+ m4/attributes.m4 | 283 -------------------------------------------------------
+ 2 files changed, 307 deletions(-)
+ delete mode 100644 m4/attributes.m4
+
+diff --git a/configure.ac b/configure.ac
+index a555151..13c8c97 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,7 +25,6 @@ AC_INIT([libXfont2], [2.0.1],
+         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont2])
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AC_CONFIG_HEADERS([config.h])
+-AC_CONFIG_MACRO_DIR([m4])
+
+ # Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
+@@ -58,27 +57,6 @@ AC_CHECK_FUNCS([poll readlink])
+ # must first be located explicitly.
+ PKG_PROG_PKG_CONFIG
+
+-with_cflags=""
+-if test "x$GCC" = "xyes"; then
+-        CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+-                                -Wall \
+-                                -Wextra \
+-                                -Wno-sign-compare \
+-                                -Wno-missing-field-initializers \
+-                                -Wno-unused-parameter \
+-                                -Wstrict-prototypes \
+-                                -Wmissing-prototypes \
+-                                -fvisibility=hidden \
+-                                -pipe \
+-                                -fno-strict-aliasing \
+-                                -ffunction-sections \
+-                                -fdata-sections \
+-                                -fno-strict-aliasing \
+-                                -fdiagnostics-show-option \
+-                                -fno-common])
+-fi
+-AC_SUBST([GCC_CFLAGS], $with_cflags)
+-
+ #
+ # select libraries to include
+ #
+@@ -239,8 +217,6 @@ case $host_os in
+ OS_CFLAGS=
+ ;;
+ esac
+-OS_CFLAGS="$OS_CFLAGS $GCC_CFLAGS"
+-
+ AC_SUBST([OS_CFLAGS])
+
+ AC_CONFIG_FILES([Makefile
+diff --git a/m4/attributes.m4 b/m4/attributes.m4
+deleted file mode 100644
+index 5fbd43d..0000000
+--- a/m4/attributes.m4
++++ /dev/null
+@@ -1,283 +0,0 @@
+-dnl Macros to check the presence of generic (non-typed) symbols.
+-dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
+-dnl Copyright (c) 2006-2008 xine project
+-dnl Copyright (c) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
+-dnl
+-dnl This program is free software; you can redistribute it and/or modify
+-dnl it under the terms of the GNU General Public License as published by
+-dnl the Free Software Foundation; either version 2, or (at your option)
+-dnl any later version.
+-dnl
+-dnl This program is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-dnl GNU General Public License for more details.
+-dnl
+-dnl You should have received a copy of the GNU General Public License
+-dnl along with this program; if not, write to the Free Software
+-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-dnl 02110-1301, USA.
+-dnl
+-dnl As a special exception, the copyright owners of the
+-dnl macro gives unlimited permission to copy, distribute and modify the
+-dnl configure scripts that are the output of Autoconf when processing the
+-dnl Macro. You need not follow the terms of the GNU General Public
+-dnl License when using or distributing such scripts, even though portions
+-dnl of the text of the Macro appear in them. The GNU General Public
+-dnl License (GPL) does govern all other use of the material that
+-dnl constitutes the Autoconf Macro.
+-dnl
+-dnl This special exception to the GPL applies to versions of the
+-dnl Autoconf Macro released by this project. When you make and
+-dnl distribute a modified version of the Autoconf Macro, you may extend
+-dnl this special exception to the GPL to apply to your modified version as
+-dnl well.
+-
+-dnl Check if FLAG in ENV-VAR is supported by compiler and append it
+-dnl to WHERE-TO-APPEND variable
+-dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG])
+-
+-AC_DEFUN([CC_CHECK_FLAG_APPEND], [
+- AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
+- AS_TR_SH([cc_cv_$2_$3]),
+- [eval "AS_TR_SH([cc_save_$2])='${$2}'"
+- eval "AS_TR_SH([$2])='-Werror $3'"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
+- [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
+- [eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
+- eval "AS_TR_SH([$2])='$cc_save_$2'"])
+-
+- AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes],
+- [eval "$1='${$1} $3'"])
+-])
+-
+-dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2])
+-AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
+- for flag in $3; do
+- CC_CHECK_FLAG_APPEND($1, $2, $flag)
+- done
+-])
+-
+-dnl Check if the flag is supported by linker (cacheable)
+-dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
+-
+-AC_DEFUN([CC_CHECK_LDFLAGS], [
+- AC_CACHE_CHECK([if $CC supports $1 flag],
+- AS_TR_SH([cc_cv_ldflags_$1]),
+- [ac_save_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS $1"
+- AC_LINK_IFELSE([int main() { return 1; }],
+- [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
+- [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
+- LDFLAGS="$ac_save_LDFLAGS"
+- ])
+-
+- AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
+- [$2], [$3])
+-])
+-
+-dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
+-dnl the current linker to avoid undefined references in a shared object.
+-AC_DEFUN([CC_NOUNDEFINED], [
+- dnl We check $host for which systems to enable this for.
+- AC_REQUIRE([AC_CANONICAL_HOST])
+-
+- case $host in
+- dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
+- dnl are requested, as different implementations are present; to avoid problems
+- dnl use -Wl,-z,defs only for those platform not behaving this way.
+- *-freebsd* | *-openbsd*) ;;
+- *)
+- dnl First of all check for the --no-undefined variant of GNU ld. This allows
+- dnl for a much more readable commandline, so that people can understand what
+- dnl it does without going to look for what the heck -z defs does.
+- for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
+- CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
+- break
+- done
+- ;;
+- esac
+-
+- AC_SUBST([LDFLAGS_NOUNDEFINED])
+-])
+-
+-dnl Check for a -Werror flag or equivalent. -Werror is the GCC
+-dnl and ICC flag that tells the compiler to treat all the warnings
+-dnl as fatal. We usually need this option to make sure that some
+-dnl constructs (like attributes) are not simply ignored.
+-dnl
+-dnl Other compilers don't support -Werror per se, but they support
+-dnl an equivalent flag:
+-dnl - Sun Studio compiler supports -errwarn=%all
+-dnl we don't test for that, it gives us false positives when gcc doesn't
+-dnl actually complain about it. If someone wants to compile this on sun, let
+-dnl them fix it.
+-AC_DEFUN([CC_CHECK_WERROR], [
+- AC_CACHE_CHECK(
+- [for $CC way to treat warnings as errors],
+- [cc_cv_werror],
+- [CC_CHECK_FLAG_APPEND([cc_cv_werror], [CFLAGS], [-Werror])])
+-])
+-
+-AC_DEFUN([CC_CHECK_ATTRIBUTE], [
+- AC_REQUIRE([CC_CHECK_WERROR])
+- AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
+- AS_TR_SH([cc_cv_attribute_$1]),
+- [ac_save_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS $cc_cv_werror"
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
+- [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
+- [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
+- CFLAGS="$ac_save_CFLAGS"
+- ])
+-
+- AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
+- [AC_DEFINE(
+- AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
+- [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
+- )
+- $4],
+- [$5])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
+- CC_CHECK_ATTRIBUTE(
+- [constructor],,
+- [void __attribute__((constructor)) ctor() { int a; }],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
+- CC_CHECK_ATTRIBUTE(
+- [format], [format(printf, n, n)],
+- [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
+- CC_CHECK_ATTRIBUTE(
+- [format_arg], [format_arg(printf)],
+- [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
+- CC_CHECK_ATTRIBUTE(
+- [visibility_$1], [visibility("$1")],
+- [void __attribute__((visibility("$1"))) $1_function() { }],
+- [$2], [$3])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
+- CC_CHECK_ATTRIBUTE(
+- [nonnull], [nonnull()],
+- [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
+- CC_CHECK_ATTRIBUTE(
+- [unused], ,
+- [void some_function(void *foo, __attribute__((unused)) void *bar);],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
+- CC_CHECK_ATTRIBUTE(
+- [sentinel], ,
+- [void some_function(void *foo, ...) __attribute__((sentinel));],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
+- CC_CHECK_ATTRIBUTE(
+- [deprecated], ,
+- [void some_function(void *foo, ...) __attribute__((deprecated));],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
+- CC_CHECK_ATTRIBUTE(
+- [alias], [weak, alias],
+- [void other_function(void *foo) { }
+- void some_function(void *foo) __attribute__((weak, alias("other_function")));],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
+- CC_CHECK_ATTRIBUTE(
+- [malloc], ,
+- [void * __attribute__((malloc)) my_alloc(int n);],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_PACKED], [
+- CC_CHECK_ATTRIBUTE(
+- [packed], ,
+- [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_CONST], [
+- CC_CHECK_ATTRIBUTE(
+- [const], ,
+- [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
+- [$1], [$2])
+-])
+-
+-AC_DEFUN([CC_FLAG_VISIBILITY], [
+- AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
+- [cc_cv_flag_visibility],
+- [CC_CHECK_FLAG_APPEND([cc_cv_flag_visibility], [CFLAGS], [-fvisibility=hidden])])
+-
+- AS_IF([test "x$cc_cv_flag_visibility" != "x"],
+- [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
+- [Define this if the compiler supports the -fvisibility flag])
+- $1],
+- [$2])
+-])
+-
+-AC_DEFUN([CC_FUNC_EXPECT], [
+- AC_REQUIRE([CC_CHECK_WERROR])
+- AC_CACHE_CHECK([if compiler has __builtin_expect function],
+- [cc_cv_func_expect],
+- [ac_save_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS $cc_cv_werror"
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+- [int some_function() {
+- int a = 3;
+- return (int)__builtin_expect(a, 3);
+- }])],
+- [cc_cv_func_expect=yes],
+- [cc_cv_func_expect=no])
+- CFLAGS="$ac_save_CFLAGS"
+- ])
+-
+- AS_IF([test "x$cc_cv_func_expect" = "xyes"],
+- [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
+- [Define this if the compiler supports __builtin_expect() function])
+- $1],
+- [$2])
+-])
+-
+-AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
+- AC_REQUIRE([CC_CHECK_WERROR])
+- AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
+- [cc_cv_attribute_aligned],
+- [ac_save_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS $cc_cv_werror"
+- for cc_attribute_align_try in 64 32 16 8 4 2; do
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+- int main() {
+- static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
+- return c;
+- }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
+- done
+- CFLAGS="$ac_save_CFLAGS"
+- ])
+-
+- if test "x$cc_cv_attribute_aligned" != "x"; then
+- AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
+- [Define the highest alignment supported])
+- fi
+-])
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0002FreeTypeCorrectanallocationsizepatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0002-FreeType-Correct-an-allocation-size.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0002-FreeType-Correct-an-allocation-size.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0002-FreeType-Correct-an-allocation-size.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+From d0fff111992fed9d9bfbf0c19e136bda9ba1db55 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Sun, 29 May 2016 23:29:50 -0700
+Subject: [PATCH 2/9] FreeType: Correct an allocation size
+
+Found by clang static analysis:
+ Result of 'calloc' is converted to a pointer of type 'int', which is
+ incompatible with sizeof operand type 'int *'
+
+This is likely benign because the old size was larger on any platform where
+sizeof(int) <= sizeof(void *), which is everywhere.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+---
+ src/FreeType/ftfuncs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
+index bbd4db4..e7c8026 100644
+--- a/src/FreeType/ftfuncs.c
++++ b/src/FreeType/ftfuncs.c
+@@ -623,7 +623,7 @@ FreeTypeInstanceFindGlyph(unsigned idx_in, int flags, FTInstancePtr instance,
+ offset = idx - segment * FONTSEGMENTSIZE;
+
+ if((*available)[segment] == NULL) {
+- (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int *));
++ (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int));
+ if((*available)[segment] == NULL)
+ return AllocError;
+ }
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0003bitmapBailoutoninvalidinputtoFontFileMakeDirpatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0003-bitmap-Bail-out-on-invalid-input-to-FontFileMakeDir-.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0003-bitmap-Bail-out-on-invalid-input-to-FontFileMakeDir-.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0003-bitmap-Bail-out-on-invalid-input-to-FontFileMakeDir-.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+From ac559fad20bbae45332c758abb6a790c3fd341a2 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Sun, 29 May 2016 23:34:35 -0700
+Subject: [PATCH 3/9] bitmap: Bail out on invalid input to FontFileMakeDir
+ instead of calling calloc for 0 bytes
+
+Found by clang static analysis:
+ Call to 'calloc' has an allocation size of 0 bytes
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+---
+ src/bitmap/bitscale.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
+index 22747a9..00adcc6 100644
+--- a/src/bitmap/bitscale.c
++++ b/src/bitmap/bitscale.c
+@@ -1477,6 +1477,10 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */
+ lastRow = pfi->lastRow;
+
+ nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1);
++ if (nchars <= 0) {
++ goto bail;
++ }
++
+ glyph = pf->glyph;
+ for (i = 0; i < nchars; i++)
+ {
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0004fserveSilenceaWformatwarningpatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0004-fserve-Silence-a-Wformat-warning.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0004-fserve-Silence-a-Wformat-warning.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0004-fserve-Silence-a-Wformat-warning.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+From e6009adbc89ec3e1f924bcb57b333c1c02f5e66d Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Sun, 29 May 2016 23:37:13 -0700
+Subject: [PATCH 4/9] fserve: Silence a -Wformat warning
+
+src/fc/fserve.c:653:32: warning: format specifies type 'int' but the argument has type 'CARD32' (aka 'unsigned long') [-Wformat]
+ " from font server\n", rep->length);
+ ^~~~~~~~~~~
+1 warning generated.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+---
+ src/fc/fserve.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/fc/fserve.c b/src/fc/fserve.c
+index 42c4028..fb1941d 100644
+--- a/src/fc/fserve.c
++++ b/src/fc/fserve.c
+@@ -649,8 +649,8 @@ fs_get_reply (FSFpePtr conn, int *error)
+ */
+ if (rep->length > MAX_REPLY_LENGTH)
+ {
+-        ErrorF("fserve: reply length %d > MAX_REPLY_LENGTH, disconnecting"
+-         " from font server\n", rep->length);
++        ErrorF("fserve: reply length %ld > MAX_REPLY_LENGTH, disconnecting"
++         " from font server\n", (long)rep->length);
+         _fs_connection_died (conn);
+         *error = FSIO_ERROR;
+         return 0;
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0005fstransRemoveunusedfoofunctionpatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0005-fstrans-Remove-unused-foo-function.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0005-fstrans-Remove-unused-foo-function.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0005-fstrans-Remove-unused-foo-function.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+From d967caa988eaabd9e84c82879e2f21bd33b952a7 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Sun, 29 May 2016 23:39:06 -0700
+Subject: [PATCH 5/9] fstrans: Remove unused foo() function
+
+The point of it seems to have been to silence an unused function warning, but
+there's no point if we're just transitioning that to another unused function
+warning.
+
+src/fc/fstrans.c:32:20: warning: unused function 'foo' [-Wunused-function]
+static inline void foo(void) { (void) is_numeric("a"); }
+ ^
+1 warning generated.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Keith Packard <keithp@keithp.com>
+---
+ src/fc/fstrans.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/fc/fstrans.c b/src/fc/fstrans.c
+index 66bc978..902ef36 100644
+--- a/src/fc/fstrans.c
++++ b/src/fc/fstrans.c
+@@ -28,5 +28,3 @@
+ #define FONT_t
+ #define TRANS_CLIENT
+ #include <X11/Xtrans/transport.c>
+-/* inhibit warning about is_numeric */
+-static inline void foo(void) { (void) is_numeric("a"); }
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0006fserveFixabufferreadoverrunin_fs_client_accespatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0006-fserve-Fix-a-buffer-read-overrun-in-_fs_client_acces.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0006-fserve-Fix-a-buffer-read-overrun-in-_fs_client_acces.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0006-fserve-Fix-a-buffer-read-overrun-in-_fs_client_acces.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+From 6972ea08ee5b2ef1cfbdc2fcaf14f06bbd391561 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Mon, 30 May 2016 00:46:21 -0700
+Subject: [PATCH 6/9] fserve: Fix a buffer read overrun in _fs_client_access
+
+https://bugs.freedesktop.org/show_bug.cgi?id=83224
+
+Found by clang's Address Sanitizer
+
+        crac.num_auths = set_font_authorizations(&authorizations, &authlen,
+                                                 client);
+        /* Work around bug in xfs versions up through modular release 1.0.8
+         which rejects CreateAC packets with num_auths = 0 & authlen < 4 */
+        if (crac.num_auths == 0) {
+         authorizations = padding;
+         authlen = 4;
+        } else {
+         authlen = (authlen + 3) & ~0x3;
+        }
+        crac.length = (sizeof (fsCreateACReq) + authlen) >> 2;
+        crac.acid = cur->acid;
+        _fs_add_req_log(conn, FS_CreateAC);
+        _fs_write(conn, (char *) &crac, sizeof (fsCreateACReq));
+        _fs_write(conn, authorizations, authlen);
+
+In the case in the report, set_font_authorizations setup authorizations as a
+34 byte buffer (and authlen set to 34 as one would expect). The following
+block changed authlen to 36 to make it 4byte aligned and the final _fs_write()
+caused us to read 36 bytes from this 34 byte buffer.
+
+This changes the incorrect size increase to instead use _fs_write_pad which
+takes care of the padding for us.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+---
+ src/fc/fserve.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/fc/fserve.c b/src/fc/fserve.c
+index fb1941d..708fc35 100644
+--- a/src/fc/fserve.c
++++ b/src/fc/fserve.c
+@@ -2856,14 +2856,12 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync)
+         if (crac.num_auths == 0) {
+          authorizations = padding;
+          authlen = 4;
+-        } else {
+-         authlen = (authlen + 3) & ~0x3;
+         }
+         crac.length = (sizeof (fsCreateACReq) + authlen) >> 2;
+         crac.acid = cur->acid;
+         _fs_add_req_log(conn, FS_CreateAC);
+         _fs_write(conn, (char *) &crac, sizeof (fsCreateACReq));
+-        _fs_write(conn, authorizations, authlen);
++        _fs_write_pad(conn, authorizations, authlen);
+         /* ignore reply; we don't even care about it */
+         conn->curacid = 0;
+         cur->auth_generation = client_auth_generation(client);
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0007configureUsefvisibilityhiddenifavailablepatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0007-configure-Use-fvisibility-hidden-if-available.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0007-configure-Use-fvisibility-hidden-if-available.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0007-configure-Use-fvisibility-hidden-if-available.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+From 7557fe152d9948bcb4b805bb7b6b6f8121bd34fb Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 18 May 2016 11:52:27 -0400
+Subject: [PATCH 7/9] configure: Use -fvisibility=hidden if available
+
+text         data         bss         dec         hex        filename
+ 233732         8168         1616         243516         3b73c        .libs/libXfont2.so.2.before
+ 217113         6816         1616         225545         37109        .libs/libXfont2.so.2.after
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
+---
+ configure.ac | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 13c8c97..062f75d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -217,6 +217,23 @@ case $host_os in
+ OS_CFLAGS=
+ ;;
+ esac
++
++save_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS -fvisibility=hidden"
++CFLAGS_VISIBILITY=
++AC_COMPILE_IFELSE(
++ [AC_LANG_SOURCE([[
++ #if defined(__CYGWIN__) || defined(__MINGW32__)
++ #error No visibility support
++ #endif
++ extern __attribute__((__visibility__("default"))) int x;
++ ]])],
++ [CFLAGS_VISIBILITY=-fvisibility=hidden],
++ []
++)
++CFLAGS="$save_CFLAGS"
++OS_CFLAGS="$OS_CFLAGS $CFLAGS_VISIBILITY"
++
+ AC_SUBST([OS_CFLAGS])
+
+ AC_CONFIG_FILES([Makefile
+--
+2.9.3
+
</ins></span></pre></div>
<a id="trunkdportsx11xorglibXfont2files0009freetypeFixalogicerrorincomputingfacenamepatch"></a>
<div class="addfile"><h4>Added: trunk/dports/x11/xorg-libXfont2/files/0009-freetype-Fix-a-logic-error-in-computing-face-name.patch (0 => 152485)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/x11/xorg-libXfont2/files/0009-freetype-Fix-a-logic-error-in-computing-face-name.patch         (rev 0)
+++ trunk/dports/x11/xorg-libXfont2/files/0009-freetype-Fix-a-logic-error-in-computing-face-name.patch        2016-09-11 06:18:49 UTC (rev 152485)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+From 33a98f2b5343da927f29191348e992f505544873 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 8 Jun 2016 14:28:09 -0400
+Subject: [PATCH 9/9] freetype: Fix a logic error in computing face name
+
+gcc6 chirps an indentation warning here, but really this is bad code.
+Effectively this would ignore en_US or en_UK names for the font, despite
+that those are the English names the font is most likely to have.
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+---
+ src/FreeType/fttools.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/FreeType/fttools.c b/src/FreeType/fttools.c
+index 7c0bd9b..0329fae 100644
+--- a/src/FreeType/fttools.c
++++ b/src/FreeType/fttools.c
+@@ -100,7 +100,6 @@ FTGetName(FT_Face face, int nid, int pid, int eid, FT_SfntName *name_return)
+ case TT_PLATFORM_MICROSOFT:
+ if(name.language_id != TT_MS_LANGID_ENGLISH_UNITED_STATES &&
+ name.language_id != TT_MS_LANGID_ENGLISH_UNITED_KINGDOM)
+- break;
+ continue;
+ break;
+ default:
+--
+2.9.3
+
</ins></span></pre>
</div>
</div>
</body>
</html>