diff options
Diffstat (limited to 'sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff')
-rw-r--r-- | sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff | 315 |
1 files changed, 281 insertions, 34 deletions
diff --git a/sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff b/sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff index 2fac69a63..6d3e038a6 100644 --- a/sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff +++ b/sci-misc/brlcad/files/brlcad-7.6.6-gentoo.diff @@ -1,38 +1,285 @@ ---- configure.ac 2006-01-20 03:25:29.000000000 +0000 -+++ configure.ac 2006-01-20 03:33:25.000000000 +0000 -@@ -177,7 +177,7 @@ - # set up our default shared/non-shared data install directories - # e.g. /usr/local/share/brlcad/7.4.0 - AC_MSG_CHECKING([where BRL-CAD resources are to be installed]) --if test "x$datadir" = "x\${prefix}/share" ; then -+if test "x$datadir" = "x${prefix}/share" ; then - bc_data_dir="${bc_prefix}/share/brlcad/${BRLCAD_VERSION}" - elif test "x$datadir" = "x${prefix}/share" ; then - bc_data_dir="${bc_prefix}/share/brlcad/${BRLCAD_VERSION}" -@@ -1905,9 +1905,8 @@ - #ifdef HAVE_TCL_H - # include <tcl.h> - #endif +--- brlcad-7.6.6/configure.ac 2005-12-17 15:50:00.000000000 +0000 ++++ brlcad-7.6.6-new/configure.ac 2006-01-26 19:38:06.000000000 +0000 +@@ -147,9 +147,7 @@ + + # where are we coming from and where are we going to. + # prefix is set to NONE until AC_OUTPUT unless --prefix is used +-AC_CONFIG_SRCDIR([src/librt/bool.c]) +-AC_PREFIX_DEFAULT([/usr/brlcad]) +-AC_MSG_CHECKING([where BRL-CAD is to be installed]) ++ + if test "x$prefix" = "xNONE" ; then + bc_prefix="$ac_default_prefix" + else +@@ -962,29 +960,6 @@ + ) + LIBS="$PRELIBS" + +-dnl check if libtcl library links +-tcl_link_works=no +-LIBTCL="" +-AC_CHECK_LIB(tcl8.6, Tcl_Main, tcl_link_works=yes ; LIBTCL="-ltcl8.6", +- [AC_CHECK_LIB(tcl8.5, Tcl_Main, tcl_link_works=yes ; LIBTCL="-ltcl8.5", +- [AC_CHECK_LIB(tcl8.4, Tcl_Main, tcl_link_works=yes ; LIBTCL="-ltcl8.4", +- [AC_CHECK_LIB(tcl84, Tcl_Main, tcl_link_works=yes ; LIBTCL="-ltcl84", +- [AC_CHECK_LIB(tcl, Tcl_Main, tcl_link_works=yes ; LIBTCL="-ltcl")] +- )] +- )] +- )] +-) +- +-dnl check if libtk library links +-tk_link_works=no +-LIBTK="" +-AC_CHECK_LIB(tk8.6, Tk_MainLoop, tk_link_works=yes ; LIBTK="-ltk8.6", +- [AC_CHECK_LIB(tk8.5, Tk_MainLoop, tk_link_works=yes ; LIBTK="-ltk8.5", +- [AC_CHECK_LIB(tk8.4, Tk_MainLoop, tk_link_works=yes ; LIBTK="-ltk8.4", +- [AC_CHECK_LIB(tk, Tk_MainLoop, tk_link_works=yes ; LIBTK="-ltk")] +- )] +- )] +-) + + dnl check if libitcl library links + itcl_link_works=no +@@ -1806,49 +1781,22 @@ + + + dnl *** Tcl *** ++builtin(include,m4/tcl.m4) ++SC_PATH_TCLCONFIG ++SC_LOAD_TCLCONFIG + dnl See if libtcl seems to work ++ + tcl_works=no + AC_MSG_CHECKING(for Tcl library functionality) +-PRELIBS="$LIBS" +-if test "x$tcl_link_works" = "xyes" ; then +- LIBS="$LIBS $LIBTCL" +-fi +-AC_TRY_RUN([ +-#ifdef HAVE_TCL_H +-# include <tcl.h> +-#endif +-#ifndef TCL_MAJOR_VERSION +-# error Unknown major version of Tcl +-#endif +-#ifndef TCL_MINOR_VERSION +-# error Unknown minor version of Tcl +-#endif +-#include <stdio.h> +-int main() { +- Tcl_Time time; +- Tcl_Interp *interp; +- interp = Tcl_CreateInterp(); +- if (Tcl_Init(interp) == TCL_ERROR) { +- fprintf(stderr, "Tcl_Init returned error\n"); +- return 1; +- } +- /* Tcl_GetTime is an 8.4 symbol */ +- Tcl_GetTime(&time); +-#if TCL_MAJOR_VERSION < 8 +- fprintf(stderr, "major version < 8\n"); +- return 1; +-#elif TCl_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4 +- fprintf(stderr, "minor version < 4\n"); +- return 1; +-#endif +- return 0; +-} +- ], +- [tcl_works=yes] +-) +-if test "x$tcl_link_works" = "xyes" ; then +- LIBS="$PRELIBS" ++ ++if test ${TCL_LIB_FLAG} -a ${TCL_VERSION} -a ${TCL_MAJOR_VERSION} -a ${TCL_MINOR_VERSION} -a ${TCL_PATCH_LEVEL}; then ++ ++ LIBTCL=${TCL_LIB_FLAG} ++ if test ${TCL_MAJOR_VERSION} -ge 8 -a ${TCL_MINOR_VERSION} -ge 4; then ++ tcl_works=ok ++ fi + fi ++ + AC_MSG_RESULT($tcl_works) + + dnl figure out whether we need to build Tcl +@@ -1871,14 +1819,10 @@ + fi + fi + AC_MSG_CHECKING(whether to build Tcl) +-TCL_VERSION="8.4" + AC_DEFINE_UNQUOTED([TCL_VERSION], "$TCL_VERSION", "Version of Tcl") + AC_SUBST(TCL_VERSION) +-TCL_MAJOR_VERSION=8 + AC_SUBST(TCL_MAJOR_VERSION) +-TCL_MINOR_VERSION=4 + AC_SUBST(TCL_MINOR_VERSION) +-TCL_PATCH_LEVEL=".6" + AC_SUBST(TCL_PATCH_LEVEL) + TCL="" + if test "x$build_brlcad_tcl" = "xyes" ; then +@@ -1894,54 +1838,23 @@ + + + dnl *** Tk *** ++SC_PATH_TKCONFIG ++SC_LOAD_TKCONFIG + dnl See if libtk seems to work ++ ++ + tk_works=no + AC_MSG_CHECKING(for Tk library functionality) +-PRELIBS="$LIBS" +-if test "x$tk_link_works" = "xyes" ; then +- LIBS="$LIBS $LIBTK $LIBTCL" +-fi +-AC_TRY_RUN([ +-#ifdef HAVE_TCL_H +-# include <tcl.h> +-#endif -#ifdef HAVE_TK_H -+# include <tcl.h> - # include <tk.h> --#endif - #ifndef TK_MAJOR_VERSION - # error Unknown major version of Tk - #endif -@@ -2068,14 +2067,12 @@ - dnl this test is probably not sufficient if iwidgets is not locateable - dnl in the tcl auto_path. - AC_TRY_RUN([ +-# include <tk.h> +-#endif +-#ifndef TK_MAJOR_VERSION +-# error Unknown major version of Tk +-#endif +-#ifndef TK_MINOR_VERSION +-# error Unknown minor version of Tk +-#endif +-#include <stdio.h> +-int main() { +- Tcl_Interp *interp; +- interp = Tcl_CreateInterp(); +- if (Tcl_Init(interp) == TCL_ERROR) { +- fprintf(stderr, "Tcl_Init returned error\n"); +- return 1; +- } +- if (Tk_Init(interp) == TCL_ERROR) { +- fprintf(stderr, "Tk_Init returned error\n"); +- return 1; +- } + +-#if TK_MAJOR_VERSION < 8 +- fprintf(stderr, "major version < 8\n"); +- return 1; +-#elif TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 4 +- fprintf(stderr, "minor version < 4\n"); +- return 1; +-#endif +- return 0; +-} +- ], +- [tk_works=yes] +-) +-if test "x$tk_link_works" = "xyes" ; then +- LIBS="$PRELIBS" ++if test ${TK_LIB_FLAG} -a ${TK_VERSION} -a ${TK_MAJOR_VERSION} -a ${TK_MINOR_VERSION} -a ${TK_PATCH_LEVEL}; then ++ ++ LIBTK=${TK_LIB_FLAG} ++ ++ if test ${TK_MAJOR_VERSION} -ge 8 -a ${TK_MINOR_VERSION} -ge 4; then ++ tk_works=ok ++ fi + fi ++ + AC_MSG_RESULT($tk_works) + + dnl figure out whether we need to build Tk +@@ -1965,7 +1878,6 @@ + fi + AC_MSG_CHECKING(whether to build Tk) + dnl Need to update version number(s) in src/other/libtk/Makefile.am too +-TK_VERSION="8.4" + AC_DEFINE_UNQUOTED([TK_VERSION], "$TK_VERSION", "Version of Tk") + AC_SUBST(TK_VERSION) + TK_LIBRARY='${prefix}/lib/tk${TK_VERSION}' +@@ -1984,37 +1896,14 @@ + dnl See if libitcl and libitk seem to work, make sure it's not dependant upon libtcl + itcl_works=no + AC_MSG_CHECKING(for incrTcl library functionality) +-PRELIBS="$LIBS" +-if test "x$itcl_link_works" = "xyes" ; then +- LIBS="$LIBS $LIBITCL $LIBTCL" +-fi +-AC_TRY_RUN([ +-#include <itcl.h> +-#ifndef ITCL_MAJOR_VERSION +-# error Unknown major version of incrTcl +-#endif +-#ifndef ITCL_MINOR_VERSION +-# error Unknown minor version of incrTcl +-#endif +-#include <stdio.h> +-int main() { +- Itcl_Stack stack; +- Itcl_InitStack(&stack); +-#if ITCL_MAJOR_VERSION < 3 +- fprintf(stderr, "major version < 3\n"); +- return 1; +-#elif ITCl_MAJOR_VERSION == 3 && ITCL_MINOR_VERSION < 2 +- fprintf(stderr, "minorversion < 2\n"); +- return 1; +-#endif +- return 0; +-} +- ], +- [itcl_works=yes] +-) +-if test "x$itcl_link_works" = "xyes" ; then +- LIBS="$PRELIBS" ++ ++if test -f ${TCL_BIN_DIR}/itclConfig.sh; then ++ . ${TCL_BIN_DIR}/itclConfig.sh ++ if test ITCL_VERSION; then ++ itcl_works=ok ++ fi + fi ++ + AC_MSG_RESULT($itcl_works) + + dnl figure out whether we need to build incrTcl +@@ -2059,37 +1948,13 @@ + + dnl *** iwidgets *** + dnl See if the iwidgets are available +-iwidgets_works=no +-AC_MSG_CHECKING(for iwidgets functionality) +-PRELIBS="$LIBS" +-if test "x$tcl_link_works" = "xyes" ; then +- LIBS="$LIBS $LIBTCL" +-fi +-dnl this test is probably not sufficient if iwidgets is not locateable +-dnl in the tcl auto_path. +-AC_TRY_RUN([ -#ifdef HAVE_TCL_H - # include <tcl.h> +-# include <tcl.h> -#endif - int main() { - Tcl_Interp *interp; - const char *cmd = "package require Iwidgets"; - interp = Tcl_CreateInterp(); +-int main() { +- Tcl_Interp *interp; +- const char *cmd = "package require Iwidgets"; +- interp = Tcl_CreateInterp(); - if (Itcl_Init(interp) == TCL_ERROR) { -+ if (Tcl_Init(interp) == TCL_ERROR) { - return 1; - } - if (Tcl_Eval(interp, cmd) != TCL_OK || interp->result[0] == '\0') { +- return 1; +- } +- if (Tcl_Eval(interp, cmd) != TCL_OK || interp->result[0] == '\0') { +- return 1; +- } +- return 0; +-} +- ], +- [iwidgets_works=yes] +-) +-if test "x$tcl_link_works" = "xyes" ; then +- LIBS="$PRELIBS" +-fi +-AC_MSG_RESULT($iwidgets_works) ++ ++dnl ************************************************ ++dnl Nasty. Did not find a m4 or config.sh file to ++dnl test for iwidgets. Removing test for now ++dnl to test if the other changes are correct. ++dnl *********************************************** ++iwidgets_works=yes + + dnl figure out whether we need to install the iwidgets package + build_brlcad_iwidgets="no (using system)" |