Why exactly are we building the entirety of gettext-tools at -O0
in 10.7 branch when only a single source file, xgettext.c, is problematic on
older clang? The previous patch that applied -O4 to the compilation of 
xgettext.c,
should work fine using -O0 instead for just that file.


--- gettext-0.18.1.1/gettext-tools/src/Makefile.in.orig 2012-08-31 
20:21:15.000000000 -0400
+++ gettext-0.18.1.1/gettext-tools/src/Makefile.in      2012-08-31 
20:22:03.000000000 -0400
@@ -2357,11 +2357,11 @@
 
 xgettext-xgettext.o: xgettext.c
        $(AM_V_CC) @AM_BACKSLASH@
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xgettext-xgettext.o `test -f 
'xgettext.c' || echo '$(srcdir)/'`xgettext.c
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -O0 -c -o xgettext-xgettext.o `test -f 
'xgettext.c' || echo '$(srcdir)/'`xgettext.c
 
 xgettext-xgettext.obj: xgettext.c
        $(AM_V_CC) @AM_BACKSLASH@
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xgettext-xgettext.obj `if test -f 
'xgettext.c'; then $(CYGPATH_W) 'xgettext.c'; else $(CYGPATH_W) 
'$(srcdir)/xgettext.c'; fi`
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -O0 -c -o xgettext-xgettext.obj `if test -f 
'xgettext.c'; then $(CYGPATH_W) 'xgettext.c'; else $(CYGPATH_W) 
'$(srcdir)/xgettext.c'; fi`
 
 xgettext-x-c.o: x-c.c
        $(AM_V_CC) @AM_BACKSLASH@

Building everything at -O0 seems like massive overkill.
         Jack
Package: gettext-tools
Version: 0.18.1.1
Revision: 2
#Source: mirror:gnu:gettext/gettext-%v.tar.gz
Source: mirror:sourceforge:fink/gettext-%v.tar.gz
Source-MD5: 3dd55b952826d2b32f51308f2f91aa89
PatchFile: libgettext8-shlibs.patch
PatchFile-MD5: da5199f7a9ea3ffcd517d171c8d4b567 
PatchFile2: gettext-tools-tests.patch
PatchFile2-MD5: 964de69b23cdfedc1691cf7825886af9
PatchScript: <<
 patch -p1 < %{PatchFile}
 patch -p1 < %{PatchFile2}
 perl -pi -e 's/.*chmod.*777.*$//g' build-aux/ltmain.sh
<<
Depends: <<
        expat1-shlibs (>= 2.0.1-1),
        libgettext8-shlibs (>= %v-1),
        libiconv (>= 1.12-3),
        libncurses5-shlibs (>= 5.4-20041023-1011)
<<
Suggests: gettext-doc
BuildDepends: <<
        expat1 (>= 2.0.1-1),
        fink (>= 0.30.0),
        libgettext8-dev (>= %v-1),
        libiconv-dev (>= 1.12-3),
        libncurses5 (>= 5.4-20041023-1011)
<<
Conflicts: gettext-tools-0.17
Replaces: gettext-dev (<= 0.10.40-20), gettext (<= 0.10.40-4), gettext-bin (<= 
0.10.40-20), libgettext3-shlibs (<< 0.14.5-1), libgettextpo2-shlibs (<< 
0.14.5-2), gettext-tools-0.17

### When gettext-tools gets updated, make sure these ./configure parameters 
### match the package parameters (except build shared only here) in the 
### internal gettext builds for dpkg and libiconv.
### Not necessary, but will avoid unforeseen consequences.
ConfigureParams: <<
        --infodir='${prefix}/share/info' \
        --mandir='${prefix}/share/man' \
        --with-included-gettext \
        --disable-csharp \
        --disable-rpath \
        --disable-libasprintf \
        --disable-java \
        --disable-native-java \
        --with-included-glib \
        --with-included-libcroco \
        --with-included-libxml \
        --with-included-libunistring \
        --without-git \
        --without-cvs \
        ac_cv_prog_AWK=/usr/bin/awk \
        ac_cv_path_GREP=/usr/bin/grep \
        ac_cv_path_SED=/usr/bin/sed
<<
# xgettext.c tickles a bug in oldish-clang at anything above -O0
# http://llvm.org/bugs/show_bug.cgi?id=9892 which is fixed
# Dep on Xcode 4.3+ ?
CompileScript: <<
        #!/bin/sh -ev
        cd gettext-tools
        env EMACS=no ./configure %c
        make -w
<<
InfoTest: <<
        TestScript: <<
                cd gettext-tools; LC_ALL=C make -k check || exit 2
        <<
<<
InstallScript: <<
        #!/bin/sh -ev
        cd gettext-tools; make install prefix=%i
        rm %i/lib/libgettextlib.*
        rm %i/lib/libgettextsrc.*
        rm %i/lib/libintl*
        rm %i/include/libintl.h
        rm %i/share/locale/locale.alias
<<
DocFiles: README* AUTHORS COPYING* NEWS THANKS ChangeLog* 
InfoDocs: gettext.info
Shlibs: <<
  !%p/lib/libgettextlib-0.18.1.dylib
  !%p/lib/libgettextsrc-0.18.1.dylib
<<
Description: GNU Internationalization utils (shared libs)

Splitoff: <<
  Package: libgettextpo2-dev
  Replaces: libgettext3-dev (<< 0.14.5-1)
  Depends: <<
        libgettextpo2-shlibs (= %v-%r),
        gettext-bin (>= %v-1),
        gettext-tools (>= %v-%r)
  <<
  BuildDependsOnly: true
  DocFiles: README* AUTHORS COPYING* NEWS THANKS ChangeLog*
  Description: GNU Internationalization utils (Development Files)
  Files: include lib/*.a lib/*.la lib/libgettextpo.dylib 
<<

SplitOff2: <<
 Package: libgettextpo2-shlibs
 Essential: no
 Depends: <<
        libiconv,
        libiconv-bin,
        base-files,
        libgettext8-shlibs
 <<
 Conflicts: libgettext3
 Replaces: gettext-bin (<< 0.14-1), libgettext3, libgettext3-shlibs (<< 
0.14.5-1)
 Files: lib/libgettextpo.*.dylib
 DocFiles: README* AUTHORS COPYING* NEWS THANKS ChangeLog*
 Shlibs: <<
   %p/lib/libgettextpo.0.dylib 6.0.0 %n (>= 0.18-1)
 <<
<<

#Splitoff3: <<
#  Package: gettext-tools-doc
#  DocFiles: README* AUTHORS COPYING* NEWS THANKS ChangeLog*
#  Description: GNU Internationalization utils (Documentation)
#  Files: share/doc/gettext
#<<

DescDetail: <<
  The gettext packages provides some of the i18n and l10n support used by
  many GNU programs but missing from the Darwin C library.
<<

DescPort: <<
  The emacs files have been moved to a separate gettext-emacs package
  (EMACS=no prevents them from being compiled here).
  
  xgettext.c finds a bug in clang from Xcode < 4.2 at anything above -O0
  So, set CFLAGS to -O0 (or have a BDep Xcode >= 4.3).
  http://llvm.org/bugs/show_bug.cgi?id=9892
<<

DescPackaging: <<
  We now follow the packaging advice from the upstream authors, and have
  separated gettext-tools into its own package (a separate build from
  the same source).  The libraries from that portion have gone into
  libgettextpo2-*.

  However, we have retained the idea of a gettext-doc splitoff from
  the previous version of libgettext3-shlibs, which was prepared by
  Chris Zubrzycki.

  The two shared libraries libgettextlib-%v.dylib and libgettextsrc-%v.dylib
  are intended to only be used by binaries in the gettext-tools package
  (to avoid duplication of code in those binaries, apparently). They
  are thus private shared libraries in the package with the binaries.
  The files used to link against them are removed so that nothing else
  can link to those libraries.

  We also remove a few stray files related to libintl which 'make install'
  installs for us. Cannot scrap the whole libintl build because -tools
  uses private parts of libintl (gettext-runtime/intl sources that are
  not part of public API). Maybe could force use of installed libintl
  and overlay it with shims or a few local sources, but safer to use
  consistent set and follow upstream recommendations.

        Tests that would fail otherwise:

        lang-c++ complains about "autosprintf.h" not being found, so we
        disable 'libasprintf' at ./configure to match libgettext8-shlibs.

        lang-bash test fails because system-bash does not have iconv support.
        So we make it exit out immediately rather than failing.

        Don't bother checking for AIX-specific bug (test is bugged on
        clang). See:
        http://lists.gnu.org/archive/html/bug-autoconf/2010-08/msg00116.html
<<


License: GPL/LGPL
Maintainer: Fink Core Group <fink-c...@lists.sourceforge.net>
Homepage: http://www.gnu.org/software/gettext/
diff -uNr gettext-0.18.1.1/gettext-runtime/libasprintf/Makefile.in 
gettext-0.18.1.1-new/gettext-runtime/libasprintf/Makefile.in
--- gettext-0.18.1.1/gettext-runtime/libasprintf/Makefile.in    2007-11-06 
18:35:22.000000000 -0500
+++ gettext-0.18.1.1-new/gettext-runtime/libasprintf/Makefile.in        
2007-12-06 16:31:05.000000000 -0500
@@ -394,7 +394,7 @@
 # How to build libasprintf.
 # With libtool 1.5.14, on some platforms, like BeOS, "libtool --tag=CXX" fails
 # to create a shared library, however "libtool --tag=CC" succeeds.
-libasprintf_la_LDFLAGS = @LTNOUNDEF@
+libasprintf_la_LDFLAGS = @LTNOUNDEF@ -static
 libgnu_la_SOURCES = dummy.c
 libgnu_la_LIBADD = $(gl_LTLIBOBJS) @LTALLOCA@
 libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@
diff -uNr gettext-0.18.1.1/gettext-runtime/libasprintf/Makefile.in 
gettext-0.18.1.1-new/gettext-runtime/libasprintf/Makefile.in
--- gettext-0.18.1.1/gettext-tools/configure 2010-06-06 13:12:20.000000000 -0700
+++ gettext-0.18.1.1-new/gettext-tools/configure 2010-08-13 23:24:09.000000000 
-0700
@@ -40606,7 +40606,9 @@
 #include <stdlib.h>
 #include <string.h> /* for strcpy */
 /* The stpncpy prototype is missing in <string.h> on AIX 4.  */
+#ifndef stpncpy
 extern char *stpncpy (char *dest, const char *src, size_t n);
+#endif
 int main () {
   const char *src = "Hello";
   char dest[10];
--- gettext-0.18.1.1/gettext-tools/src/Makefile.in.orig 2012-08-31 
20:21:15.000000000 -0400
+++ gettext-0.18.1.1/gettext-tools/src/Makefile.in      2012-08-31 
20:22:03.000000000 -0400
@@ -2357,11 +2357,11 @@
 
 xgettext-xgettext.o: xgettext.c
        $(AM_V_CC) @AM_BACKSLASH@
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xgettext-xgettext.o `test -f 
'xgettext.c' || echo '$(srcdir)/'`xgettext.c
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -O0 -c -o xgettext-xgettext.o `test -f 
'xgettext.c' || echo '$(srcdir)/'`xgettext.c
 
 xgettext-xgettext.obj: xgettext.c
        $(AM_V_CC) @AM_BACKSLASH@
-       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xgettext-xgettext.obj `if test -f 
'xgettext.c'; then $(CYGPATH_W) 'xgettext.c'; else $(CYGPATH_W) 
'$(srcdir)/xgettext.c'; fi`
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xgettext_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -O0 -c -o xgettext-xgettext.obj `if test -f 
'xgettext.c'; then $(CYGPATH_W) 'xgettext.c'; else $(CYGPATH_W) 
'$(srcdir)/xgettext.c'; fi`
 
 xgettext-x-c.o: x-c.c
        $(AM_V_CC) @AM_BACKSLASH@
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to