changeset 3903:385f5f4412b7

of-nurbs: fix cross compile, install libgomp's omp.h * src/of-nurbs.mk: make nurbs dependant on libgomp * src/of-nurbs-1-fixes.patch: update patch to use cross mkoctfile * src/libgomp.mk: update version to match gcc, install omp.h to HOST_INCDIR
author John Donoghue
date Tue, 14 Apr 2015 13:51:09 -0400
parents cc946e55afb3
children 3d16df45776b
files src/libgomp.mk src/of-nurbs-1-fixes.patch src/of-nurbs.mk
diffstat 3 files changed, 29 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/libgomp.mk	Mon Apr 13 13:52:59 2015 -0400
+++ b/src/libgomp.mk	Tue Apr 14 13:51:09 2015 -0400
@@ -3,7 +3,7 @@
 
 PKG             := libgomp
 $(PKG)_IGNORE    = $(build-gcc_IGNORE)
-$(PKG)_VERSION  := 4.7.0
+$(PKG)_VERSION  := $(build-gcc_VERSION)
 $(PKG)_CHECKSUM  = $(build-gcc_CHECKSUM)
 $(PKG)_SUBDIR    = $(build-gcc_SUBDIR)
 $(PKG)_FILE      = $(build-gcc_FILE)
@@ -33,6 +33,10 @@
     $(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '$(JOBS)'
     $(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '1' install DESTDIR='$(3)'
 
+    # also copy omp.h to where other programs will see it
+    $(INSTALL) -d "$(3)$(HOST_INCDIR)" 
+    $(INSTALL) -m644 '$(1)/build/$(TARGET)/libgomp/omp.h' '$(3)$(HOST_INCDIR)/'
+
     #'$(MXE_CC)' \
     #    -W -Wall -Werror -ansi -pedantic \
     #    '$(2).c' -o '$(HOST_BINDIR)/test-libgomp.exe' \
--- a/src/of-nurbs-1-fixes.patch	Mon Apr 13 13:52:59 2015 -0400
+++ b/src/of-nurbs-1-fixes.patch	Tue Apr 14 13:51:09 2015 -0400
@@ -1,6 +1,27 @@
+diff -ur nurbs.orig/src/Makefile nurbs/src/Makefile
+--- nurbs.orig/src/Makefile	2015-04-14 13:19:10.283611864 -0400
++++ nurbs/src/Makefile	2015-04-14 13:21:10.137011941 -0400
+@@ -2,13 +2,15 @@
+ curvederivcpts.oct nrb_srf_basisfun_der__.oct surfderiveval.oct bspderiv.oct \
+ nrbsurfderiveval.oct tbasisfun.oct
+ 
++MKOCTFILE ?= mkoctfile
++
+ all: $(OCTFILES)
+ 
+ low_level_functions.o: low_level_functions.cc
+-	mkoctfile -c $<
++	$(MKOCTFILE) -c $<
+ 
+ %.oct:  %.cc low_level_functions.o
+-	mkoctfile $< low_level_functions.o
++	$(MKOCTFILE) $< low_level_functions.o
+ 
+ clean:
+ 	-rm -f *.o core octave-core *.oct *~
 diff -ur nurbs.orig/src/nrbsurfderiveval.cc nurbs/src/nrbsurfderiveval.cc
---- nurbs.orig/src/nrbsurfderiveval.cc	2015-04-13 06:35:14.000000000 -0400
-+++ nurbs/src/nrbsurfderiveval.cc	2015-04-13 06:36:26.000000000 -0400
+--- nurbs.orig/src/nrbsurfderiveval.cc	2015-04-14 13:19:10.283611864 -0400
++++ nurbs/src/nrbsurfderiveval.cc	2015-04-14 13:19:47.273352588 -0400
 @@ -120,7 +120,7 @@
        
        Array<idx_vector> idx(dim_vector (3, 1), idx_vector(':'));	 
--- a/src/of-nurbs.mk	Mon Apr 13 13:52:59 2015 -0400
+++ b/src/of-nurbs.mk	Tue Apr 14 13:51:09 2015 -0400
@@ -9,7 +9,7 @@
 $(PKG)_SUBDIR   := nurbs
 $(PKG)_FILE     := nurbs-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := '$(OCTAVE_FORGE_BASE_URL)/$($(PKG)_FILE)/download'
-$(PKG)_DEPS     := 
+$(PKG)_DEPS     := libgomp
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'http://$(SOURCEFORGE_MIRROR)/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/' | \