freebsd-ports/graphics/inventor/files/patch-ivcommondefs
Pietro Cerutti 6d73d3b156 - fix build on amd64, enable that platform
PR:		157704
Submitted by:	gahr@FreeBSD.org
Approved by:	Christian Gusenbauer <c47g@gmx.at> (maintainer)
2011-06-08 15:26:57 +00:00

82 lines
1.5 KiB
Text

--- make/ivcommondefs.orig Sat Jul 12 07:40:54 2003
+++ make/ivcommondefs Sun Aug 3 15:10:28 2003
@@ -49,9 +49,9 @@
ifeq ($(usingLinux), 1)
-CC = /usr/bin/gcc
-C++ = /usr/bin/g++
-LD = /usr/bin/g++
+CC = %%CC%%
+C++ = %%CXX%%
+LD = %%CXX%%
INSTALL = /usr/bin/install
@@ -74,7 +74,7 @@
LCXXOPTS += $(LINUXOPTS)
LCOPTS += $(LINUXOPTS)
-X11DIR = /usr/X11R6
+X11DIR = ${LOCALBASE}
X11INCDIR = $(X11DIR)/include
X11LIBDIR = $(X11DIR)/lib
@@ -86,6 +86,10 @@
endif
+ifeq ($(usingFreeBSD), 1)
+LCINCS += -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2
+LCXXINCS += -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2
+endif
#
@@ -131,9 +135,9 @@
# Determine optimization from LIBTYPE.
#
-OPTIMIZER = -O -DNDEBUG
+OPTIMIZER = %%CXXFLAGS%% -DNDEBUG
ifneq (, $(findstring debug, $(LIBTYPE)))
-OPTIMIZER = -g
+OPTIMIZER = %%CXXFLAGS%% -g -DDEBUG
endif
@@ -158,6 +162,10 @@
# Font library directories.
#
+ifeq ($(usingFreeBSD), 1)
+FREETYPE=1
+endif
+
FLDIR = $(IVDEPTH)/libFL/src
FLLIB = -lFL
ifdef FREETYPE
@@ -183,7 +191,12 @@
# Inventor install directories.
#
+ifeq ($(usingFreeBSD), 1)
+IVPREFIX = ${PREFIX}
+else
IVPREFIX = /usr
+endif
+
LCXXOPTS += -DIVPREFIX=\"$(IVPREFIX)\"
LCOPTS += -DIVPREFIX=\"$(IVPREFIX)\"
@@ -213,5 +226,10 @@
else
LLDDSOOPTS += -L$(IVLIBDIR)
LLDOPTS += -L$(IVLIBDIR)
+endif
+
+ifeq ($(usingFreeBSD), 1)
+LLDOPTS += -L$(IVDEPTH)/lib -L$(IVDEPTH)/libSoXt
+LLDDSOOPTS += -L$(IVDEPTH)/lib -L$(IVDEPTH)/libSoXt -L$(LOCALBASE)/lib
CXXDSOOPTS += -L$(IVLIBDIR)
endif