Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-22 Thread Alan Coopersmith

On 09/20/11 06:00, Jon TURNEY wrote:

On 17/09/2011 02:11, Alan Coopersmith wrote:

On 09/16/11 06:04, Jon TURNEY wrote:

On 16/09/2011 05:21, Alan Coopersmith wrote:

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


Good catch, thank you.

I think I'd prefer to write 1.2.1, as the next version number will be at least
that, unless we know that the next version number used is going to be 1.3.0?


Like xorg-macros, if we're adding a new macro, then the next version number
will be incrementing the second part of the version (1.x.0), since the macros
we use for checking minimum version only check the first two parts of the
version number tuple, using the convention that in major.minor.patch releases,
patches fix bugs, minors add new APIs, majors break compatibility.


Thanks for the explanation, that makes perfect sense. Is there something I need
to do after applying this patch to ensure the next release is given the number
1.3.0 rather than 1.2.1? :-)


Bump the version number in configure.ac to 1.2.90 or .99 I guess.


Revised patch attached.


Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com

--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-20 Thread Jon TURNEY

On 17/09/2011 02:11, Alan Coopersmith wrote:

On 09/16/11 06:04, Jon TURNEY wrote:

On 16/09/2011 05:21, Alan Coopersmith wrote:

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


Good catch, thank you.

I think I'd prefer to write 1.2.1, as the next version number will be at least
that, unless we know that the next version number used is going to be 1.3.0?


Like xorg-macros, if we're adding a new macro, then the next version number
will be incrementing the second part of the version (1.x.0), since the macros
we use for checking minimum version only check the first two parts of the
version number tuple, using the convention that in major.minor.patch releases,
patches fix bugs, minors add new APIs, majors break compatibility.


Thanks for the explanation, that makes perfect sense.  Is there something I 
need to do after applying this patch to ensure the next release is given the 
number 1.3.0 rather than 1.2.1? :-)


Revised patch attached.
From d601587880ec1089da5a43f650b4c0bf8fe4a4c4 Mon Sep 17 00:00:00 2001
From: Jon TURNEY jon.tur...@dronecode.org.uk
Date: Tue, 26 Apr 2011 15:03:42 +0100
Subject: [PATCH fonts-util] If cross-compiling, we don't have to run
 mkfontdir

If cross-compiling, we can run the host mkfontdir on the font directory,
since the output is arch independent (I think)

If cross-compiling and we can't find mkfontdir, just warn that mkfontdir
needs to be run on the target.

When not cross-compiling, the behaviour remains unchanged: mkfontdir
must be found and is run

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 fontutil.m4.in |   27 ++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/fontutil.m4.in b/fontutil.m4.in
index f040e19..98f4781 100644
--- a/fontutil.m4.in
+++ b/fontutil.m4.in
@@ -178,6 +178,31 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
AC_SUBST([RUN_FCCACHE])
 ])
 
+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.3.0
+#
+# Set MKFONTDIR to path to mkfontdir.
+#
+# If cross-compiling, and if mkdir is not found, use a shell command
+# which warns mkfontdir needs to be run on the target
+#
+# If not cross-compiling, mkfontdir must be found
+#
+AC_DEFUN([XORG_FONT_MKFONTDIR],[
+   if test x$cross_compiling != xno ; then
+   AC_PATH_PROG(MKFONTDIR, mkfontdir, )
+   MKFONTDIR_WARN='echo ** Warning: mkfontdir not run ; echo ** 
Run mkfontdir manually on host system'
+
+   if test x$MKFONTDIR = x; then
+   MKFONTDIR=${MKFONTDIR_WARN} ; echo '** mkfontdir'
+   fi
+   else
+   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+   fi
+
+   AC_SUBST([MKFONTDIR])
+])
 
 # XORG_FONT_COMMON_UTILS()
 # 
@@ -187,7 +212,7 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
 
 AC_DEFUN([XORG_FONT_COMMON_UTILS],[
XORG_FONT_FCCACHE
-   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+   XORG_FONT_MKFONTDIR
 ])
 
 # XORG_FONT_SCALED_UTILS()
-- 
1.7.5.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-20 Thread Jon TURNEY

On 17/09/2011 02:11, Alan Coopersmith wrote:

On 09/16/11 06:04, Jon TURNEY wrote:

On 16/09/2011 05:21, Alan Coopersmith wrote:

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


Good catch, thank you.

I think I'd prefer to write 1.2.1, as the next version number will be at least
that, unless we know that the next version number used is going to be 1.3.0?


Like xorg-macros, if we're adding a new macro, then the next version number
will be incrementing the second part of the version (1.x.0), since the macros
we use for checking minimum version only check the first two parts of the
version number tuple, using the convention that in major.minor.patch releases,
patches fix bugs, minors add new APIs, majors break compatibility.


Thanks for the explanation, that makes perfect sense.  Is there something I 
need to do after applying this patch to ensure the next release is given the 
number 1.3.0 rather than 1.2.1? :-)


Revised patch attached.
From d601587880ec1089da5a43f650b4c0bf8fe4a4c4 Mon Sep 17 00:00:00 2001
From: Jon TURNEY jon.tur...@dronecode.org.uk
Date: Tue, 26 Apr 2011 15:03:42 +0100
Subject: [PATCH fonts-util] If cross-compiling, we don't have to run
 mkfontdir

If cross-compiling, we can run the host mkfontdir on the font directory,
since the output is arch independent (I think)

If cross-compiling and we can't find mkfontdir, just warn that mkfontdir
needs to be run on the target.

When not cross-compiling, the behaviour remains unchanged: mkfontdir
must be found and is run

Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
---
 fontutil.m4.in |   27 ++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/fontutil.m4.in b/fontutil.m4.in
index f040e19..98f4781 100644
--- a/fontutil.m4.in
+++ b/fontutil.m4.in
@@ -178,6 +178,31 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
AC_SUBST([RUN_FCCACHE])
 ])
 
+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.3.0
+#
+# Set MKFONTDIR to path to mkfontdir.
+#
+# If cross-compiling, and if mkdir is not found, use a shell command
+# which warns mkfontdir needs to be run on the target
+#
+# If not cross-compiling, mkfontdir must be found
+#
+AC_DEFUN([XORG_FONT_MKFONTDIR],[
+   if test x$cross_compiling != xno ; then
+   AC_PATH_PROG(MKFONTDIR, mkfontdir, )
+   MKFONTDIR_WARN='echo ** Warning: mkfontdir not run ; echo ** 
Run mkfontdir manually on host system'
+
+   if test x$MKFONTDIR = x; then
+   MKFONTDIR=${MKFONTDIR_WARN} ; echo '** mkfontdir'
+   fi
+   else
+   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+   fi
+
+   AC_SUBST([MKFONTDIR])
+])
 
 # XORG_FONT_COMMON_UTILS()
 # 
@@ -187,7 +212,7 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
 
 AC_DEFUN([XORG_FONT_COMMON_UTILS],[
XORG_FONT_FCCACHE
-   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+   XORG_FONT_MKFONTDIR
 ])
 
 # XORG_FONT_SCALED_UTILS()
-- 
1.7.5.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-16 Thread Jon TURNEY

On 16/09/2011 05:21, Alan Coopersmith wrote:

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


Good catch, thank you.

I think I'd prefer to write 1.2.1, as the next version number will be at least 
that, unless we know that the next version number used is going to be 1.3.0?

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-16 Thread Alan Coopersmith

On 09/16/11 06:04, Jon TURNEY wrote:

On 16/09/2011 05:21, Alan Coopersmith wrote:

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


Good catch, thank you.

I think I'd prefer to write 1.2.1, as the next version number will be at least
that, unless we know that the next version number used is going to be 1.3.0?


Like xorg-macros, if we're adding a new macro, then the next version number
will be incrementing the second part of the version (1.x.0), since the macros
we use for checking minimum version only check the first two parts of the
version number tuple, using the convention that in major.minor.patch releases,
patches fix bugs, minors add new APIs, majors break compatibility.

--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-15 Thread Jon TURNEY

On 14/09/2011 00:09, Jeremy Huddleston wrote:

This is confusing to me.  Why do you add the extra  ; echo '** mkfontdir'?



On Sep 12, 2011, at 9:18 AM, Jon TURNEY wrote:

+AC_DEFUN([XORG_FONT_MKFONTDIR],[
+   if test x$cross_compiling != xno ; then
+   AC_PATH_PROG(MKFONTDIR, mkfontdir, )
+   MKFONTDIR_WARN='echo ** Warning: mkfontdir not run ; echo ** Run 
mkfontdir manually on host system'
+
+   if test x$MKFONTDIR = x; then
+   MKFONTDIR=${MKFONTDIR_WARN} ; echo '** mkfontdir'
+   fi
+   else
+   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+   fi
+
+   AC_SUBST([MKFONTDIR])
+])


MKFONTDIR_WARN is the command to emit the warning that mkfontdir could be run, 
MKFONTDIR is the actual command which will be used in the makefile, and is 
supplied with a directory path, so we need to consume that, and do so by 
outputting the command we would have run if mkfontdir was available


Hope that clears things up for you :-)

It looks like this suffers a bit from being patterned after the 
XORG_FONT_FCCACHE macro a few lines above.  This is perhaps wrong, as unlike 
XORG_FONT_FCCACHE, the warning is only used in one place.

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-15 Thread Jeremy Huddleston

On Sep 15, 2011, at 11:06 AM, Jon TURNEY wrote:

 On 14/09/2011 00:09, Jeremy Huddleston wrote:
 This is confusing to me.  Why do you add the extra  ; echo '** mkfontdir'?
 
 On Sep 12, 2011, at 9:18 AM, Jon TURNEY wrote:
 +AC_DEFUN([XORG_FONT_MKFONTDIR],[
 +   if test x$cross_compiling != xno ; then
 +   AC_PATH_PROG(MKFONTDIR, mkfontdir, )
 +   MKFONTDIR_WARN='echo ** Warning: mkfontdir not run ; echo ** 
 Run mkfontdir manually on host system'
 +
 +   if test x$MKFONTDIR = x; then
 +   MKFONTDIR=${MKFONTDIR_WARN} ; echo '** mkfontdir'
 +   fi
 +   else
 +   XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
 +   fi
 +
 +   AC_SUBST([MKFONTDIR])
 +])
 
 MKFONTDIR_WARN is the command to emit the warning that mkfontdir could be 
 run, MKFONTDIR is the actual command which will be used in the makefile, and 
 is supplied with a directory path, so we need to consume that, and do so by 
 outputting the command we would have run if mkfontdir was available

Ah.  I see.  Clever.

 Hope that clears things up for you :-)
 
 It looks like this suffers a bit from being patterned after the 
 XORG_FONT_FCCACHE macro a few lines above.  This is perhaps wrong, as unlike 
 XORG_FONT_FCCACHE, the warning is only used in one place.


Reviewed-by: Jeremy Huddleston jerem...@apple.com


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-15 Thread Alan Coopersmith

On 09/12/11 07:18, Jon TURNEY wrote:

+# XORG_FONT_MKFONTDIR()
+# ---
+# Minimum version: 1.1.1


Shouldn't that be 1.3.0 since we already released 1.2.0?


--
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH fonts-util 2/2] If cross-compiling, we don't have to run mkfontdir

2011-09-13 Thread Jeremy Huddleston
This is confusing to me.  Why do you add the extra  ; echo '** mkfontdir'?


On Sep 12, 2011, at 9:18 AM, Jon TURNEY wrote:

 If cross-compiling, we can run the build host mkfontdir on the font directory,
 since the output is arch independent (I think)
 
 If cross-compiling and we can't find mkfontdir, just warn that mkfontdir
 needs to be run on the target.
 
 When not cross-compiling, the behaviour remains unchanged: mkfontdir
 must be found and is run
 
 (Unfortunately jhbuild doesn't really know much about cross-compiling and
 always sets PATH including the configured bindir, which isn't a good idea
 when cross-compiling as it causes target binaries to appear in the PATH, so
 jhbuild needs to be patched to remove that behaviour, or MKFONTDIR explicitly
 set to the build host mkfontdir, otherwise configure may find the target
 mkfontdir and we end up trying to run that.)
 
 Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk
 ---
 fontutil.m4.in |   27 ++-
 1 files changed, 26 insertions(+), 1 deletions(-)
 
 diff --git a/fontutil.m4.in b/fontutil.m4.in
 index f040e19..d3c79d1 100644
 --- a/fontutil.m4.in
 +++ b/fontutil.m4.in
 @@ -178,6 +178,31 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
   AC_SUBST([RUN_FCCACHE])
 ])
 
 +# XORG_FONT_MKFONTDIR()
 +# ---
 +# Minimum version: 1.1.1
 +#
 +# Set MKFONTDIR to path to mkfontdir.
 +#
 +# If cross-compiling, and if mkdir is not found, use a shell command
 +# which warns mkfontdir needs to be run on the target
 +#
 +# If not cross-compiling, mkfontdir must be found
 +#
 +AC_DEFUN([XORG_FONT_MKFONTDIR],[
 + if test x$cross_compiling != xno ; then
 + AC_PATH_PROG(MKFONTDIR, mkfontdir, )
 + MKFONTDIR_WARN='echo ** Warning: mkfontdir not run ; echo ** 
 Run mkfontdir manually on host system'
 +
 + if test x$MKFONTDIR = x; then
 + MKFONTDIR=${MKFONTDIR_WARN} ; echo '** mkfontdir'
 + fi
 + else
 + XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
 + fi
 +
 + AC_SUBST([MKFONTDIR])
 +])
 
 # XORG_FONT_COMMON_UTILS()
 # 
 @@ -187,7 +212,7 @@ AC_DEFUN([XORG_FONT_FCCACHE],[
 
 AC_DEFUN([XORG_FONT_COMMON_UTILS],[
   XORG_FONT_FCCACHE
 - XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
 + XORG_FONT_MKFONTDIR
 ])
 
 # XORG_FONT_SCALED_UTILS()
 -- 
 1.7.4
 
 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel
 

---
Jeremy Huddleston

Rebuild Sudan
 - Board of Directors
 - http://www.rebuildsudan.org

Berkeley Foundation for Opportunities in Information Technology
 - Advisory Board
 - http://www.bfoit.org

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel