pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/30019 ([PATCH] textproc/openjade fails to build on OS X)

The following reply was made to PR pkg/30019; it has been noted by GNATS.

From: Idar Tollefsen <>
Subject: Re: pkg/30019 ([PATCH] textproc/openjade fails to build on OS X)
Date: Tue, 26 Jun 2007 23:30:17 +0200

 This is a multi-part message in MIME format.
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 > This should be fixed now.  Do you still have this problem?
 Yes, all except the undefined symbols problems which has disappeared.
 Here's the output of the warnings and errors:
 rm -f MifFOTBuilder_inst.cxx
 /usr/pkg/bin/perl ./../ MifFOTBuilder_inst.m4 
 chmod -w MifFOTBuilder_inst.cxx
 /usr/pkg/bin/perl -w ./../ -l jstyleModule MifMessages.msg
 g++ -DNDEBUG -O2 -mtune=G4 -mcpu=7450 -I/usr/pkg/include -I/usr/include 
 -I. -I./../include -I/usr/pkg/include/OpenSP 
 -I/usr/pkg/include/OpenSP/.. -I./../grove -I./../spgrove -I./../style 
 -c MifFOTBuilder.cxx
 In file included from ./../include/config.h:10,
                   from MifFOTBuilder.cxx:29:
 /usr/pkg/include/OpenSP/config.h:329:1: warning: 
 <command line>:1:1: warning: this is the location of the previous definition
 In file included from MifFOTBuilder.cxx:29:
 ./../include/config.h:39:1: warning: "SP_DEFINE_TEMPLATES" redefined
 In file included from ./../include/config.h:10,
                   from MifFOTBuilder.cxx:29:
 /usr/pkg/include/OpenSP/config.h:357:1: warning: this is the location of 
 the previous definition
 gnumake[2]: *** No rule to make target `-lintl', needed by `openjade'. 
 gnumake[1]: *** [jade] Error 2
 gnumake: *** [all] Error 2
 *** Error code 2
 bmake: stopped in /usr/pkg/pkgsrc/textproc/openjade
 *** Error code 1
 bmake: stopped in /usr/pkg/pkgsrc/textproc/openjade
 The warnings refer to the following;
 SGML catalog defined on the command line:
 SGML catalog defined bu OpenSP config.h:
 #define SGML_CATALOG_FILES_DEFAULT "/usr/pkg/share/sgml/catalog"
 SP_DEFINE_TEMPLATES from ${WRKSRC}/include/config.h:
      #ifdef __APPLE__
      #undef SP_MANUAL_INST
 SP_DEFINE_TEMPLATES from OpenSP config.h:
      #define SP_DEFINE_TEMPLATES 1
 The error speaks for itself.
 I've attached a patch for openjade-1.3.2nb5 that's a variation and 
 improvement of the previously suggested incarnations. I'll try to explain;
 1. Change OpenJade's SGML catalog definition to match that of OpenSP.
 2. Don't set CXXFLAGS to CFLAGS unless CXXFLAGS is empty.
 3. Add LDFLAGS to LINKFLAGS variables in various makefiles to make sure 
 it uses them.
 4. Pull in gettext-lib to get the libintl dependency straight.
 5. Modify existing patch-ae (against ${WRKSRC}/ to 
 remove -lintl as a target.
 6. Introduce patch-ag (against ${WRKSRC}/include/ to avoid 
 redefinition of SP_DEFINE_TEMPLATES.
 7. Update distinfo to reflect changes in patch-ae and the addition of 
 A little more in depth;
 1. I'm not sure why OpenJade wants to fight OpenSP on the definition of 
 the SGML catalog directory. If it's actually a reason why they shouldn't 
 be equal, then this part of the patch can be ignored and disregarded. 
 Otherwise, it would be nice to get rid of the warning.
 2. Some users (myself included) take great care and interested in the 
 flags passed to pkgsrc. For this reason, overwriting CXXFLAGS with 
 CFLAGS seems unwarranted. If there are specific flags you're looking for 
 that are normally defined in CFLAGS, add them instead of replacing the 
 entire thing. The only exception would be if CXXFLAGS is empty, in which 
 case setting it to CFLAGS will probably yield better results.
 3. Same reason as for 3. I'm picky about my flags, use them ;)
 4. Since OpenJade links against libintl, shouldn't it be listed as a 
 5. In ${WRKSRC}/, the variable ALL_LIBS in set to 
 ${XLIBS} ${LIBS}. LIBS is set in ${WRKSRC}/Makefile.comm after 
 configuration to -lintl. ALL_LIBS in is used to 
 generated dependency targets in sub-directories when building. For 
 ${WRKSRC}/jade, this means -lintl ends up as a target in 
 ${WRKSRC}/jade/ That's what the error is about. By removing 
 ALL_LIBS and simply using ${XLIBS} (excluding ${LIBS}) to generate 
 dependency targets, -lintl is also removed as a target. I haven't tried 
 this on any other platforms, and can't figure out why nobody else has 
 this problem. Is the LIBS variable in ${WRKSRC}/Makefile.comm empty for 
 everyone else? To me, it looks like it would fail no matter what LIBS 
 contained, unless it was actual dependency targets.
 6. The new patch against ${WRKSRC}/include/ simply wraps 
 #define SP_DEFINE_TEMPLATES in #ifndef..#endif to avoid the redefinition 
 7. As it says; updated patch-ae and new patch-ag requires a updated 
 distinfo file.
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
 diff -ruN openjade.orig/Makefile openjade/Makefile
 --- openjade.orig/Makefile     2006-03-21 07:00:50.000000000 +0100
 +++ openjade/Makefile  2007-06-26 12:10:59.000000000 +0200
 @@ -15,20 +15,31 @@
 -CONFIGURE_ARGS+=      --enable-default-catalog=${OPENJADE_DATA_DIR}/catalog \
 -              --datadir=${OPENJADE_DATA_DIR:Q}
 -SGML_CATALOGS=                ${PREFIX}/share/sgml/openjade/catalog
 +.include "../../mk/"
 +SGML_CATALOGS=                ${PREFIX}/share/sgml/catalog
  OPENJADE_DATA_DIR=    ${PREFIX}/share/sgml/openjade
  OPENJADE_DOC_DIR=     ${PREFIX}/share/doc/openjade
 +.if !defined(CXXFLAGS) || empty(CXXFLAGS)
 +CONFIGURE_ARGS+=      --enable-default-catalog=${SGML_CATALOGS} \
 +              --datadir=${OPENJADE_DATA_DIR:Q}
 +      @${CP} ${WRKSRC}/Makefile.lib ${WRKSRC}/Makefile.lib.orig
 +      @${SED} "s|LINKFLAGS = \(.*\)|LINKFLAGS = \1 ${LDFLAGS}|g" \
 +              < ${WRKSRC}/Makefile.lib.orig > ${WRKSRC}/Makefile.lib
 +      @${CP} ${WRKSRC}/Makefile.prog ${WRKSRC}/Makefile.prog.orig
 +      @${SED} "s|LINKFLAGS = \(.*\)|LINKFLAGS = \1 ${LDFLAGS}|g" \
 +              < ${WRKSRC}/Makefile.prog.orig > ${WRKSRC}/Makefile.prog
        ${INSTALL_DATA} ${WRKSRC}/pubtext/* ${OPENJADE_DATA_DIR}/pubtext
        ${INSTALL_DATA_DIR} ${OPENJADE_DOC_DIR}/jadedoc/images
        ${INSTALL_DATA} ${WRKSRC}/doc/*.htm ${OPENJADE_DOC_DIR}/doc
 @@ -36,6 +47,7 @@
        ${INSTALL_DATA} ${WRKSRC}/jadedoc/*.htm ${OPENJADE_DOC_DIR}/jadedoc
        ${INSTALL_DATA} ${WRKSRC}/jadedoc/images/* 
 +.include "../../devel/gettext-lib/"
  .include "../../textproc/opensp/"
  .include "../../textproc/xmlcatmgr/"
  .include "../../mk/"
 diff -ruN openjade.orig/distinfo openjade/distinfo
 --- openjade.orig/distinfo     2007-02-17 00:49:43.000000000 +0100
 +++ openjade/distinfo  2007-06-26 11:27:40.000000000 +0200
 @@ -7,5 +7,6 @@
  SHA1 (patch-ab) = cc5be75d416be38ada244301ba7171dc30751e75
  SHA1 (patch-ac) = 535d81d8c04e5133878e329b274a00b910c61c96
  SHA1 (patch-ad) = f8c950cc4a0ffb5bdba315a298c14a3e7ebcd637
 -SHA1 (patch-ae) = 0dad9fc8b5c2efd5a7b816539ea69d1e51663bd5
 +SHA1 (patch-ae) = eaee7864d6304cd03718a6f3cba37f4d1a92cfe1
  SHA1 (patch-af) = 1e0db04b5b85ad3b71066e55f94bf3144d69efe5
 +SHA1 (patch-ag) = 33aac18e238e64e08b4a292c013984c2ea2190ee
 diff -ruN openjade.orig/patches/patch-ae openjade/patches/patch-ae
 --- openjade.orig/patches/patch-ae     2007-02-17 00:49:43.000000000 +0100
 +++ openjade/patches/patch-ae  2007-06-26 11:27:30.000000000 +0200
 @@ -1,13 +1,13 @@
 -$NetBSD: patch-ae,v 1.2 2007/02/16 23:49:43 dmcmahill Exp $
 ----     2002-01-22 03:57:53.000000000 -0800
 -@@ -12,14 +12,14 @@ LINKFLAGS = @LINKFLAGS@
 +---     2002-01-22 12:57:53.000000000 +0100
 ++++  2007-06-26 11:26:25.000000000 +0200
 +@@ -10,16 +10,15 @@
 + top_builddir=@TOP@
  -     echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >
 -+     echo 'LT_LIBS='`echo $(ALL_LIBS)|sed -e 's/\.a/.la/g' -e 's/(^| 
)-l[0-9a-z]*//g'` >
 ++     echo 'LT_LIBS='`echo $(XLIBS)|sed -e 's/\.a/.la/g' -e 's/(^| 
)-l[0-9a-z]*//g'` >
   PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
 diff -ruN openjade.orig/patches/patch-ag openjade/patches/patch-ag
 --- openjade.orig/patches/patch-ag     1970-01-01 01:00:00.000000000 +0100
 +++ openjade/patches/patch-ag  2007-06-26 09:42:04.000000000 +0200
 @@ -0,0 +1,44 @@
 +--- include/  2007-06-26 09:39:11.000000000 +0200
 ++++ include/       2007-06-26 09:41:11.000000000 +0200
 +@@ -36,7 +36,9 @@
 + // set_new_handler() has to be declared extern "C"
 + #ifdef __APPLE__
 + #undef SP_MANUAL_INST
 + #endif
 +@@ -133,8 +135,10 @@
 + // so instead we include the template definitions in the headers,
 + // which allows Visual C++ to instantiate any needed templates
 + // in the client.
 + #endif
 + #endif /* SP_USE_DLL */
 + #ifndef SP_MANUAL_INST
 +@@ -211,8 +215,10 @@
 + #define SP_DLLIMPORT __declspec(dllimport)
 + #ifdef SP_USE_DLL
 + #ifndef BUILD_LIBSP
 + #endif
 + #endif /* SP_USE_DLL */
 + #define SP_WCHAR_T_USHORT
 + #endif /* __BORLANDC__ */
 +@@ -251,7 +257,9 @@
 + // Metrowerks for some platform (MacOS in this case)
 + #pragma mpwc_newline off
 + // #define SP_USE_DLL -- __declspec doesn't work with classes (yet)
 + #ifdef SP_USE_DLL
 + #define SP_DLLEXPORT __declspec(export)

Home | Main Index | Thread Index | Old Index