From 216b5a285fdcc1456a307fcc60f3507c20d613eb Mon Sep 17 00:00:00 2001
From: Tijl Coosemans <tijl@FreeBSD.org>
Date: Tue, 26 Aug 2014 14:06:08 +0000
Subject: - Fix missing library problems when the linker enforces explicit
 linking

PR:		192062
Exp-run by:	antoine
Approved by:	portmgr (antoine)
---
 math/calcoo/Makefile                          |  1 +
 math/goblin/Makefile                          |  9 +++------
 math/qtiplot/files/build.conf                 |  4 ++--
 math/qtiplot/files/patch-qtiplot__qtiplot.pro | 10 +++++++++-
 4 files changed, 15 insertions(+), 9 deletions(-)

(limited to 'math')

diff --git a/math/calcoo/Makefile b/math/calcoo/Makefile
index ea2b861a0c3e..212b5d632bc6 100644
--- a/math/calcoo/Makefile
+++ b/math/calcoo/Makefile
@@ -12,6 +12,7 @@ COMMENT=	RPN and algebraic scientific calculator
 USES=		pkgconfig
 USE_GNOME=	gtk20
 GNU_CONFIGURE=	yes
+LIBS+=		-lm
 
 PLIST_FILES=	bin/calcoo \
 		man/man1/calcoo.1.gz
diff --git a/math/goblin/Makefile b/math/goblin/Makefile
index 3c7d7bdcc358..5bcffeb7a3d4 100644
--- a/math/goblin/Makefile
+++ b/math/goblin/Makefile
@@ -27,15 +27,12 @@ PORTDOCS=	*
 PORTEXAMPLES=	*
 
 CFLAGS+=	-I${LOCALBASE}/include/tcl${TCL_VER} -I${LOCALBASE}/include/ \
-		-I${LOCALBASE}/include/tk${TK_VER}
-LIBS+=		-L${LOCALBASE}/lib -ltcl${TCL_SHLIB_VER} -ltk${TK_SHLIB_VER} -lm
+		-I${LOCALBASE}/include/tk${TK_VER} -fPIC
+CXXFLAGS+=	-fPIC
+LIBS+=		-L${LOCALBASE}/lib -ltcl${TCL_SHLIB_VER} -ltk${TK_SHLIB_VER} -lm -pthread
 
 .include <bsd.port.options.mk>
 
-.if ${ARCH} == "amd64"
-CFLAGS+=	-fPIC
-.endif
-
 post-patch:
 	${REINPLACE_CMD} -e 's|/usr/bin/wish|${WISH}|g' ${WRKSRC}/display
 	${REINPLACE_CMD} -e \
diff --git a/math/qtiplot/files/build.conf b/math/qtiplot/files/build.conf
index 2fec427440b3..4b544f2d8c30 100644
--- a/math/qtiplot/files/build.conf
+++ b/math/qtiplot/files/build.conf
@@ -3,7 +3,7 @@ isEmpty( QTI_ROOT ) {
 }
 
 SYS_INCLUDEPATH = $$LOCALBASE/include
-SYS_LIBS = -L$$LOCALBASE/lib -lGLU
+SYS_LIBS = -L$$LOCALBASE/lib
 
 MUPARSER_INCLUDEPATH =
 MUPARSER_LIBS = -lmuparser
@@ -15,7 +15,7 @@ QWT_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwt/src
 QWT_LIBS = $$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
 
 QWT3D_INCLUDEPATH = $$QTI_ROOT/3rdparty/qwtplot3d/include
-QWT3D_LIBS = $$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+QWT3D_LIBS = $$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a -lGLU
 
 LIBPNG_INCLUDEPATH =
 LIBPNG_LIBS = -lpng
diff --git a/math/qtiplot/files/patch-qtiplot__qtiplot.pro b/math/qtiplot/files/patch-qtiplot__qtiplot.pro
index 56f38e312926..e9359778cba8 100644
--- a/math/qtiplot/files/patch-qtiplot__qtiplot.pro
+++ b/math/qtiplot/files/patch-qtiplot__qtiplot.pro
@@ -49,7 +49,15 @@
  
  unix: man.files += ../qtiplot.1
  
-@@ -159,18 +145,19 @@
+@@ -133,6 +119,7 @@
+ ###############################################################
+ 
+ SOURCES += ../3rdparty/zlib/minigzip.c
++LIBS += -lz
+ 
+ ###############################################################
+ ################# Default Modules #############################
+@@ -159,18 +146,19 @@
    				    qtiUtil.py \
    				    qti_wordlist.txt \
  
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0