aboutsummaryrefslogtreecommitdiffstats
path: root/cad/netgen
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2016-04-21 19:33:16 +0800
committergahr <gahr@FreeBSD.org>2016-04-21 19:33:16 +0800
commitaac577b29e7c8c670b8a66c39f62bad322857d03 (patch)
treec6cb1634ff4ea3d4c9f601585a6fc959826e2ff8 /cad/netgen
parent6430722ff2a915080b85d5e4136b10757a23a481 (diff)
downloadfreebsd-ports-gnome-aac577b29e7c8c670b8a66c39f62bad322857d03.tar.gz
freebsd-ports-gnome-aac577b29e7c8c670b8a66c39f62bad322857d03.tar.zst
freebsd-ports-gnome-aac577b29e7c8c670b8a66c39f62bad322857d03.zip
Support Tk in USES=tk:tea. Convert more ports + minor fixes and modernization.
Diffstat (limited to 'cad/netgen')
-rw-r--r--cad/netgen/Makefile7
-rw-r--r--cad/netgen/files/patch-configure163
-rw-r--r--cad/netgen/files/patch-libsrc_csg_Makefile.am11
-rw-r--r--cad/netgen/files/patch-libsrc_csg_Makefile.in11
-rw-r--r--cad/netgen/files/patch-libsrc_geom2d_Makefile.am10
-rw-r--r--cad/netgen/files/patch-libsrc_geom2d_Makefile.in11
-rw-r--r--cad/netgen/files/patch-libsrc_stlgeom_Makefile.am11
-rw-r--r--cad/netgen/files/patch-libsrc_stlgeom_Makefile.in11
-rw-r--r--cad/netgen/files/patch-libsrc_visualization_Makefile.am11
-rw-r--r--cad/netgen/files/patch-libsrc_visualization_Makefile.in11
-rw-r--r--cad/netgen/files/patch-ng_Makefile.am8
-rw-r--r--cad/netgen/files/patch-ng_Makefile.in9
12 files changed, 265 insertions, 9 deletions
diff --git a/cad/netgen/Makefile b/cad/netgen/Makefile
index 563b724fd132..88ce81aba1e0 100644
--- a/cad/netgen/Makefile
+++ b/cad/netgen/Makefile
@@ -15,14 +15,13 @@ LIB_DEPENDS= libTix8.4.3.so:x11-toolkits/tix \
OCC_BROKEN= Does not compile because of issues with cad/opencascade
USE_LDCONFIG= yes
-USES= gmake jpeg libtool tk
+USES= gmake jpeg libtool tk:tea
USE_GL= yes
USE_XORG= xmu xi
-GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
LDFLAGS+= -L${LOCALBASE}/lib
-CPPFLAGS+= -I${LOCALBASE}/include -I${TCL_INCLUDEDIR} -I${TK_INCLUDEDIR} -I${LOCALBASE}/lib/Togl-1.7
-CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR} --with-tk=${TK_LIBDIR} --enable-jpeglib
+CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/lib/Togl-1.7
+CONFIGURE_ARGS= --enable-jpeglib
FETCH_BEFORE_ARGS+= -o ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}
diff --git a/cad/netgen/files/patch-configure b/cad/netgen/files/patch-configure
index b2fa14d9f714..3bc8ef069202 100644
--- a/cad/netgen/files/patch-configure
+++ b/cad/netgen/files/patch-configure
@@ -1,14 +1,167 @@
---- configure-orig 2014-07-24 20:42:11.000000000 -0500
-+++ configure 2014-07-24 20:43:21.000000000 -0500
-@@ -15361,9 +15361,9 @@
+--- configure.orig 2014-10-06 11:04:36 UTC
++++ configure
+@@ -9219,7 +9219,7 @@ $as_echo_n "checking whether the $compil
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+- link_all_deplibs=unknown
++ link_all_deplibs=no
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+@@ -9488,7 +9488,7 @@ _LT_EOF
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ fi
+ ;;
+
+@@ -9507,7 +9507,7 @@ _LT_EOF
+ _LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -9536,7 +9536,7 @@ _LT_EOF
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -9554,7 +9554,7 @@ _LT_EOF
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ else
+ ld_shlibs=no
+ fi
+@@ -10142,7 +10142,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-version-script,$lib-ver'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+@@ -10920,7 +10920,7 @@ freebsd* | dragonfly*)
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+@@ -12015,7 +12015,7 @@ striplib=
+ old_striplib=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+ $as_echo_n "checking whether stripping libraries is possible... " >&6; }
+-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -12263,7 +12263,7 @@ hardcode_automatic_CXX=no
+ inherit_rpath_CXX=no
+ module_cmds_CXX=
+ module_expsym_cmds_CXX=
+-link_all_deplibs_CXX=unknown
++link_all_deplibs_CXX=no
+ old_archive_cmds_CXX=$old_archive_cmds
+ reload_flag_CXX=$reload_flag
+ reload_cmds_CXX=$reload_cmds
+@@ -12481,7 +12481,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+@@ -13100,7 +13100,7 @@ fi
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+@@ -13108,7 +13108,7 @@ fi
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+@@ -13140,7 +13140,7 @@ fi
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-version-script ${wl}$lib-ver -o $lib'
+ ;;
+ esac
+
+@@ -13151,7 +13151,7 @@ fi
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-version-script $wl$lib-ver'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+@@ -13185,7 +13185,7 @@ fi
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-version-script ${wl}$lib-ver'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+@@ -13258,7 +13258,7 @@ fi
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++ archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-version-script,$lib-ver -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+@@ -14766,7 +14766,7 @@ freebsd* | dragonfly*)
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+@@ -15534,9 +15534,9 @@ fi
ffmpegon=false
# Check whether --enable-ffmpeg was given.
if test "${enable_ffmpeg+set}" = set; then :
- enableval=$enable_ffmpeg; FFMPEG_INCLUDES="-DFFMPEG -D__STDC_CONSTANT_MACROS"
-+ enableval=$enable_ffmpeg; FFMPEG_INCLUDES="-I%%LOCALBASE%%/include/ffmpeg0 -DFFMPEG -D__STDC_CONSTANT_MACROS"
++ enableval=$enable_ffmpeg; FFMPEG_INCLUDES="-I/usr/local/include/ffmpeg0 -DFFMPEG -D__STDC_CONSTANT_MACROS"
- FFMPEG_LIBS="-lavutil -lavformat -lavcodec -lavutil -lswscale -lz -lbz2"
-+ FFMPEG_LIBS="-L%%LOCALBASE%%/lib/ffmpeg0 -lavutil0 -lavformat0 -lavcodec0 -lavutil0 -lswscale -lz -lbz2"
++ FFMPEG_LIBS="-L/usr/local/lib/ffmpeg0 -lavutil0 -lavformat0 -lavcodec0 -lavutil0 -lswscale -lz -lbz2"
if test "$enableval" = yes; then ffmpegon=true; else ffmpegon=false; fi
diff --git a/cad/netgen/files/patch-libsrc_csg_Makefile.am b/cad/netgen/files/patch-libsrc_csg_Makefile.am
new file mode 100644
index 000000000000..b84607274fde
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_csg_Makefile.am
@@ -0,0 +1,11 @@
+--- libsrc/csg/Makefile.am.orig 2014-08-29 09:54:06 UTC
++++ libsrc/csg/Makefile.am
+@@ -5,7 +5,7 @@ polyhedra.hpp specpoin.hpp csg.hpp expli
+ revolution.hpp spline3d.hpp vscsg.hpp
+
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+
+ lib_LTLIBRARIES = libcsg.la
diff --git a/cad/netgen/files/patch-libsrc_csg_Makefile.in b/cad/netgen/files/patch-libsrc_csg_Makefile.in
new file mode 100644
index 000000000000..935bcd6a722f
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_csg_Makefile.in
@@ -0,0 +1,11 @@
+--- libsrc/csg/Makefile.in.orig 2014-10-06 11:04:37 UTC
++++ libsrc/csg/Makefile.in
+@@ -285,7 +285,7 @@ meshsurf.hpp solid.hpp triapprox.hpp csg
+ polyhedra.hpp specpoin.hpp csg.hpp explicitcurve2d.hpp identify.hpp \
+ revolution.hpp spline3d.hpp vscsg.hpp
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+ lib_LTLIBRARIES = libcsg.la $(am__append_1)
+ libcsg_la_SOURCES = algprim.cpp brick.cpp \
diff --git a/cad/netgen/files/patch-libsrc_geom2d_Makefile.am b/cad/netgen/files/patch-libsrc_geom2d_Makefile.am
new file mode 100644
index 000000000000..f8a00e76ffbc
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_geom2d_Makefile.am
@@ -0,0 +1,10 @@
+--- libsrc/geom2d/Makefile.am.orig 2014-08-29 09:54:06 UTC
++++ libsrc/geom2d/Makefile.am
+@@ -1,6 +1,6 @@
+ noinst_HEADERS = geom2dmesh.hpp geometry2d.hpp vsgeom2d.hpp
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+
+ METASOURCES = AUTO
+
diff --git a/cad/netgen/files/patch-libsrc_geom2d_Makefile.in b/cad/netgen/files/patch-libsrc_geom2d_Makefile.in
new file mode 100644
index 000000000000..c177a1ad1ae5
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_geom2d_Makefile.in
@@ -0,0 +1,11 @@
+--- libsrc/geom2d/Makefile.in.orig 2014-10-06 11:04:37 UTC
++++ libsrc/geom2d/Makefile.in
+@@ -275,7 +275,7 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ noinst_HEADERS = geom2dmesh.hpp geometry2d.hpp vsgeom2d.hpp
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+ lib_LTLIBRARIES = libgeom2d.la $(am__append_1)
+ libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
diff --git a/cad/netgen/files/patch-libsrc_stlgeom_Makefile.am b/cad/netgen/files/patch-libsrc_stlgeom_Makefile.am
new file mode 100644
index 000000000000..af05a41a166c
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_stlgeom_Makefile.am
@@ -0,0 +1,11 @@
+--- libsrc/stlgeom/Makefile.am.orig 2016-04-21 10:58:05 UTC
++++ libsrc/stlgeom/Makefile.am
+@@ -1,7 +1,7 @@
+ noinst_HEADERS = meshstlsurface.hpp stlgeom.hpp stlline.hpp \
+ stltool.hpp stltopology.hpp vsstl.hpp
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+
+ lib_LTLIBRARIES = libstl.la
diff --git a/cad/netgen/files/patch-libsrc_stlgeom_Makefile.in b/cad/netgen/files/patch-libsrc_stlgeom_Makefile.in
new file mode 100644
index 000000000000..66649b85183d
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_stlgeom_Makefile.in
@@ -0,0 +1,11 @@
+--- libsrc/stlgeom/Makefile.in.orig 2016-04-21 10:58:59 UTC
++++ libsrc/stlgeom/Makefile.in
+@@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@
+ noinst_HEADERS = meshstlsurface.hpp stlgeom.hpp stlline.hpp \
+ stltool.hpp stltopology.hpp vsstl.hpp
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+ lib_LTLIBRARIES = libstl.la $(am__append_1)
+ libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
diff --git a/cad/netgen/files/patch-libsrc_visualization_Makefile.am b/cad/netgen/files/patch-libsrc_visualization_Makefile.am
new file mode 100644
index 000000000000..66b4a76a6189
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_visualization_Makefile.am
@@ -0,0 +1,11 @@
+--- libsrc/visualization/Makefile.am.orig 2016-04-21 10:59:46 UTC
++++ libsrc/visualization/Makefile.am
+@@ -3,7 +3,7 @@ visual.hpp vssolution.hpp
+
+ include_HEADERS = soldata.hpp
+
+-AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES)
++AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+
+ if NGGUI
diff --git a/cad/netgen/files/patch-libsrc_visualization_Makefile.in b/cad/netgen/files/patch-libsrc_visualization_Makefile.in
new file mode 100644
index 000000000000..b80144856eb6
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc_visualization_Makefile.in
@@ -0,0 +1,11 @@
+--- libsrc/visualization/Makefile.in.orig 2016-04-21 11:00:04 UTC
++++ libsrc/visualization/Makefile.in
+@@ -275,7 +275,7 @@ noinst_HEADERS = meshdoc.hpp mvdraw.hpp
+ visual.hpp vssolution.hpp
+
+ include_HEADERS = soldata.hpp
+-AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES)
++AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES) $(TK_INCLUDES)
+ METASOURCES = AUTO
+ @NGGUI_TRUE@noinst_LTLIBRARIES = libvisual.la
+ libvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
diff --git a/cad/netgen/files/patch-ng_Makefile.am b/cad/netgen/files/patch-ng_Makefile.am
index 04cb6283112f..3cdff48ff077 100644
--- a/cad/netgen/files/patch-ng_Makefile.am
+++ b/cad/netgen/files/patch-ng_Makefile.am
@@ -1,5 +1,13 @@
--- ng/Makefile.am.orig 2014-08-29 09:54:01 UTC
+++ ng/Makefile.am
+@@ -1,6 +1,6 @@
+ include_HEADERS =
+
+-AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES)
++AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) $(TK_INCLUDES)
+
+
+ if NGGUI
@@ -22,7 +22,7 @@ netgen_LDADD = $(top_builddir)/libsrc/vi
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/interface/libinterface.la \
diff --git a/cad/netgen/files/patch-ng_Makefile.in b/cad/netgen/files/patch-ng_Makefile.in
index 44277e283527..41618b4ffb4d 100644
--- a/cad/netgen/files/patch-ng_Makefile.in
+++ b/cad/netgen/files/patch-ng_Makefile.in
@@ -1,5 +1,14 @@
--- ng/Makefile.in.orig 2014-10-06 11:04:37 UTC
+++ ng/Makefile.in
+@@ -303,7 +303,7 @@ include_HEADERS =
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include \
+ -I$(top_srcdir)/libsrc/interface -DOPENGL \
+ -D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) \
+- $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) $(am__append_1)
++ $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) $(TK_INCLUDES) $(am__append_1)
+ netgen_SOURCES = demoview.cpp ngappinit.cpp onetcl.cpp parallelfunc.cpp ngpkg.cpp demoview.hpp parallelfunc.hpp togl_1_7.h
+ @NGMKL_TRUE@MKL_LIBS = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lmkl_def
+ # -lpardiso500-GNU472-X86-64 -lgfortran
@@ -312,7 +312,7 @@ netgen_LDADD = $(top_builddir)/libsrc/vi
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/interface/libinterface.la \