From 9a669d18b2b614b7ffb9809702240dee4575cb4c Mon Sep 17 00:00:00 2001 From: madpilot Date: Sat, 3 Feb 2018 13:36:44 +0000 Subject: [PATCH] - Fix opensp build with clang 6 - While here convert to USES=localbase PR: 225307 Submitted by: me Approved by: Maintainer timeout --- textproc/opensp/Makefile | 4 +- textproc/opensp/files/patch-configure | 265 +++++++++++++++++- textproc/opensp/files/patch-include_IList.h | 13 + .../opensp/files/patch-include_IListIter.h | 13 + textproc/opensp/files/patch-include_Ptr.h | 13 + textproc/opensp/files/patch-lib_Parser.h | 29 ++ 6 files changed, 333 insertions(+), 4 deletions(-) create mode 100644 textproc/opensp/files/patch-include_IList.h create mode 100644 textproc/opensp/files/patch-include_IListIter.h create mode 100644 textproc/opensp/files/patch-include_Ptr.h create mode 100644 textproc/opensp/files/patch-lib_Parser.h diff --git a/textproc/opensp/Makefile b/textproc/opensp/Makefile index 135addf6286a..57567210e896 100644 --- a/textproc/opensp/Makefile +++ b/textproc/opensp/Makefile @@ -15,14 +15,12 @@ LICENSE_NAME= License of James Clark's Software LICENSE_FILE= ${WRKSRC}/COPYING LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -USES= gmake iconv libtool perl5 +USES= gmake iconv libtool localbase perl5 USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-default-catalog=${PREFIX}/share/sgml/catalog \ --datadir=${PREFIX}/share/sgml/openjade \ --disable-doc-build -LDFLAGS+= -L${LOCALBASE}/lib -CFLAGS+= -I${LOCALBASE}/include OPTIONS_DEFINE= DOCS NLS OPTIONS_SUB= yes diff --git a/textproc/opensp/files/patch-configure b/textproc/opensp/files/patch-configure index 13fd5e113476..59249b2646e5 100644 --- a/textproc/opensp/files/patch-configure +++ b/textproc/opensp/files/patch-configure @@ -1,6 +1,269 @@ --- configure.orig 2005-12-23 14:15:56 UTC +++ configure -@@ -26441,12 +26441,12 @@ cat >>conftest.$ac_ext <<_ACEOF +@@ -2885,149 +2885,6 @@ echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; + esac + +-# Some people use a C++ compiler to compile C. Since we use `exit', +-# in C++ we need to declare it. In case someone uses the same compiler +-# for both compiling C and C++ we need to have the C++ compiler decide +-# the declaration of exit, since it's the most demanding environment. +-cat >conftest.$ac_ext <<_ACEOF +-#ifndef __cplusplus +- choke me +-#endif +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -3685,112 +3542,7 @@ else + CXXFLAGS= + fi + fi +-for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_cxx_werror_flag" +- || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -26441,12 +26193,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; diff --git a/textproc/opensp/files/patch-include_IList.h b/textproc/opensp/files/patch-include_IList.h new file mode 100644 index 000000000000..2776609b8b76 --- /dev/null +++ b/textproc/opensp/files/patch-include_IList.h @@ -0,0 +1,13 @@ +--- include/IList.h.orig 2005-07-21 14:04:38 UTC ++++ include/IList.h +@@ -26,8 +26,8 @@ class IList : private IListBase { (public) + void swap(IList &list) { IListBase::swap(list); } + T *head() const { return (T *)IListBase::head(); } + T *get() { return (T *)IListBase::get(); } +- IListBase::clear; +- IListBase::empty; ++ using IListBase::clear; ++ using IListBase::empty; + friend class IListIter; + private: + IList(const IList &); // undefined diff --git a/textproc/opensp/files/patch-include_IListIter.h b/textproc/opensp/files/patch-include_IListIter.h new file mode 100644 index 000000000000..29fe8e3f1e1d --- /dev/null +++ b/textproc/opensp/files/patch-include_IListIter.h @@ -0,0 +1,13 @@ +--- include/IListIter.h.orig 2005-07-21 14:04:38 UTC ++++ include/IListIter.h +@@ -17,8 +17,8 @@ class IListIter : private IListIterBase { (public) + IListIter(const IList &list) : IListIterBase(list) { } + T *cur() const { return (T *)IListIterBase::cur(); } + +- IListIterBase::next; +- IListIterBase::done; ++ using IListIterBase::next; ++ using IListIterBase::done; + }; + + #ifdef SP_NAMESPACE diff --git a/textproc/opensp/files/patch-include_Ptr.h b/textproc/opensp/files/patch-include_Ptr.h new file mode 100644 index 000000000000..a0756656525b --- /dev/null +++ b/textproc/opensp/files/patch-include_Ptr.h @@ -0,0 +1,13 @@ +--- include/Ptr.h.orig 2005-07-21 14:04:39 UTC ++++ include/Ptr.h +@@ -69,8 +69,8 @@ class ConstPtr : private Ptr { (public) + const T *operator->() const { return Ptr::pointer(); } + const T &operator*() const { return *Ptr::pointer(); } + void swap(ConstPtr &p) { Ptr::swap(p); } +- Ptr::isNull; +- Ptr::clear; ++ using Ptr::isNull; ++ using Ptr::clear; + Boolean operator==(const Ptr &p) const { return Ptr::operator==(p); } + Boolean operator!=(const Ptr &p) const { return Ptr::operator!=(p); } + Boolean operator==(const ConstPtr &p) const { diff --git a/textproc/opensp/files/patch-lib_Parser.h b/textproc/opensp/files/patch-lib_Parser.h new file mode 100644 index 000000000000..7aef32589965 --- /dev/null +++ b/textproc/opensp/files/patch-lib_Parser.h @@ -0,0 +1,29 @@ +--- lib/Parser.h.orig 2005-07-21 14:05:17 UTC ++++ lib/Parser.h +@@ -62,16 +62,16 @@ class Parser : private ParserState { (public) + Parser(const SgmlParser::Params &); + Event *nextEvent(); + void parseAll(EventHandler &, const volatile sig_atomic_t *cancelPtr); +- ParserState::sdPointer; +- ParserState::instanceSyntaxPointer; +- ParserState::prologSyntaxPointer; +- ParserState::activateLinkType; +- ParserState::allLinkTypesActivated; +- ParserState::entityManager; +- ParserState::entityCatalog; +- ParserState::baseDtd; +- ParserState::options; +- ParserState::instantiateDtd; ++ using ParserState::sdPointer; ++ using ParserState::instanceSyntaxPointer; ++ using ParserState::prologSyntaxPointer; ++ using ParserState::activateLinkType; ++ using ParserState::allLinkTypesActivated; ++ using ParserState::entityManager; ++ using ParserState::entityCatalog; ++ using ParserState::baseDtd; ++ using ParserState::options; ++ using ParserState::instantiateDtd; + friend class PiAttspecParser; + private: + Parser(const Parser &); // undefined