Bug 169869 - [patch] print/fontforge: fix conflict with stdbool.h
Summary: [patch] print/fontforge: fix conflict with stdbool.h
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-15 04:50 UTC by Jan Beich
Modified: 2012-07-16 21:34 UTC (History)
0 users

See Also:


Attachments
stdbool.diff (415 bytes, patch)
2012-07-15 04:50 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2012-07-15 04:50:10 UTC

How-To-Repeat: splineutil2.c:4816:9: error: cannot combine with previous 'int' declaration
      specifier
    int bool;
        ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4816:5: warning: declaration does not declare anything
      [-Wmissing-declarations]
    int bool;
    ^~~~~~~~
splineutil2.c:4830:10: error: expected identifier or '('
    bool = spline->from->nonextcp;
         ^
splineutil2.c:4832:30: error: expected expression
    spline->from->noprevcp = bool;
                             ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4833:10: error: expected identifier or '('
    bool = spline->from->nextcpdef;
         ^
splineutil2.c:4835:31: error: expected expression
    spline->from->prevcpdef = bool;
                              ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4844:11: error: expected identifier or '('
            bool = spline->to->nonextcp;
                 ^
splineutil2.c:4846:29: error: expected expression
            spline->to->noprevcp = bool;
                                   ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
splineutil2.c:4847:11: error: expected identifier or '('
            bool = spline->to->nextcpdef;
                 ^
splineutil2.c:4849:30: error: expected expression
            spline->to->prevcpdef = bool;
                                    ^
/usr/include/stdbool.h:37:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
1 warning and 9 errors generated.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-07-15 04:50:18 UTC
Maintainer of print/fontforge,

Please note that PR ports/169869 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/169869

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-07-15 04:50:20 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Naram Qashat 2012-07-15 06:34:11 UTC
I approve of this patch.

Naram Qashat
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-07-15 08:01:50 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Alex Kozlov freebsd_committer freebsd_triage 2012-07-16 19:10:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-07-16 21:28:48 UTC
Author: ak
Date: Mon Jul 16 20:28:34 2012
New Revision: 300981
URL: http://svn.freebsd.org/changeset/ports/300981

Log:
  - Fix build on FreeBSD9/CURRENT with WITH_ICONV set in src.conf [1]
  - Pet portlint by renaming patch with unrecommended characters (:) in filename
  
  PR:	ports/169869 [1]
  Submitted by:	Jan Beich <jbeich@tormail.org>
  Approved by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)

Added:
     - copied unchanged from r300972, head/print/fontforge/files/patch-fontforge::Makefile.dynamic.in
  head/print/fontforge/files/patch-fontforge_splineutil2.c   (contents, props changed)
Directory Properties:
  head/print/fontforge/files/patch-fontforge_Makefile.dynamic.in   (props changed)
Deleted:
  head/print/fontforge/files/patch-fontforge::Makefile.dynamic.in

Copied: head/print/fontforge/files/patch-fontforge_Makefile.dynamic.in (from r300972, head/print/fontforge/files/patch-fontforge::Makefile.dynamic.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/fontforge/files/patch-fontforge_Makefile.dynamic.in	Mon Jul 16 20:28:34 2012	(r300981, copy of r300972, head/print/fontforge/files/patch-fontforge::Makefile.dynamic.in)
@@ -0,0 +1,24 @@
+--- fontforge/Makefile.dynamic.in.orig	2008-12-23 16:03:34.000000000 -0500
++++ fontforge/Makefile.dynamic.in	2008-12-25 11:20:01.000000000 -0500
+@@ -59,7 +59,7 @@
+ DIFFOBJS = sfddiff.o stamp.o
+ ACORNOBJS = acorn2sfd.o stamp.o
+ 
+-_CFLAGS = -I$(top_srcdir)/inc -I../inc -I$(srcdir) -I. @WFLAGS@ $(X_CFLAGS) \
++_CFLAGS = -I$(LOCALBASE)/include -I$(top_srcdir)/inc -I../inc -I$(srcdir) -I. @WFLAGS@ $(X_CFLAGS) \
+     @DEFS@ '-DSHAREDIR="$(sharedir)"' -DLIBDIR='"$(libdir)"' \
+     @CPPFLAGS@ '-DPREFIX="@prefix@"'
+ CFLAGS = @CFLAGS@ @CPPFLAGS@ $(_CFLAGS)
+@@ -68,10 +68,10 @@
+ LDFLAGS = @LDFLAGS@
+ LIBS = -rpath $(libdir) $(X_LIBS) @LINK_WITH_GDRAW@ ../libgutils.la \
+     ../libgunicode.la \
+-    $(X_PRE_LIBS) $(X_11LIB) $(X_EXTRA_LIBS) @LIBS@ $(STATIC_LIBS) -lm
++    $(X_PRE_LIBS) $(X_11LIB) $(X_EXTRA_LIBS) @LIBS@ $(STATIC_LIBS) -lm -lintl
+ LIBLIBS = -rpath $(libdir) ../libgutils.la ../libgunicode.la \
+     @LIBS@ $(STATIC_LIBS) -lm
+-DLIBS = -rpath $(libdir)  ../libfontforge.la ../libgutils.la ../libgunicode.la @LIBS@ $(STATIC_LIBS) -lm
++DLIBS = -rpath $(libdir)  ../libfontforge.la ../libgutils.la ../libgunicode.la @LIBS@ $(STATIC_LIBS) -lm -lintl
+ 
+ all: @FINAL_TARGET@ @MACAPP@ sfddiff fontimage fontlint
+ 

Added: head/print/fontforge/files/patch-fontforge_splineutil2.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/fontforge/files/patch-fontforge_splineutil2.c	Mon Jul 16 20:28:34 2012	(r300981)
@@ -0,0 +1,11 @@
+Index: fontforge/splineutil2.c
+@@ -4813,7 +4813,8 @@ SplineSet *SplineSetReverse(SplineSet *s
+     Spline *spline, *first, *next;
+     BasePoint tp;
+     SplinePoint *temp;
+-    int bool;
++    int b;
++#define bool b
+     int i;
+     /* reverse the splineset so that what was the start point becomes the end */
+     /*  and vice versa. This entails reversing every individual spline, and */
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Alex Kozlov freebsd_committer freebsd_triage 2012-07-16 21:34:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!