| @@ -1,28 +1,33 @@ | | | @@ -1,28 +1,33 @@ |
1 | $NetBSD: patch-gtk_build-intel-lib.sh,v 1.1 2022/07/14 05:09:46 dbj Exp $ | | 1 | $NetBSD: patch-gtk_build-intel-lib.sh,v 1.2 2022/07/19 08:49:43 dbj Exp $ |
2 | | | 2 | |
3 | Avoid pkgsrc libtool on Darwin. | | 3 | Avoid pkgsrc libtool on Darwin. |
4 | | | 4 | |
5 | On NetBSD, build intel lib as if it was FreeBSD | | 5 | On NetBSD, build intel lib as if it was FreeBSD |
6 | | | 6 | |
7 | --- gtk/build-intel-lib.sh.orig 2022-06-16 09:39:50.000000000 +0000 | | 7 | --- gtk/build-intel-lib.sh.orig 2022-06-16 09:39:50.000000000 +0000 |
8 | +++ gtk/build-intel-lib.sh | | 8 | +++ gtk/build-intel-lib.sh |
9 | @@ -45,6 +45,19 @@ tar xvfz ../inteldecimal/IntelRDFPMathLi | | 9 | @@ -45,6 +45,24 @@ tar xvfz ../inteldecimal/IntelRDFPMathLi |
10 | cd IntelRDFPMathLib20U1 | | 10 | cd IntelRDFPMathLib20U1 |
11 | patch -p0 <../intel-lib-linux.patch | | 11 | patch -p0 <../intel-lib-linux.patch |
12 | | | 12 | |
13 | +# avoid pkgsrc libtool on Darwin | | 13 | +# avoid pkgsrc libtool on Darwin |
14 | +mv LIBRARY/makefile.iml_head LIBRARY/makefile.iml_head.orig && \ | | 14 | +mv LIBRARY/makefile.iml_head LIBRARY/makefile.iml_head.orig && \ |
15 | + sed -e 's/libtool/xcrun libtool/' \ | | 15 | + sed -e 's/libtool/xcrun libtool/' \ |
16 | + LIBRARY/makefile.iml_head.orig > LIBRARY/makefile.iml_head | | 16 | + LIBRARY/makefile.iml_head.orig > LIBRARY/makefile.iml_head |
17 | + | | 17 | + |
| | | 18 | +# Fixup fenv.h inclusion detection. NetBSD uses _FENV_H_ |
| | | 19 | +mv LIBRARY/src/bid_functions.h LIBRARY/src/bid_functions.h.orig && \ |
| | | 20 | + sed -e 's/!defined (_FENV_H)/& \&\& !defined(_FENV_H_)/' \ |
| | | 21 | + LIBRARY/src/bid_functions.h.orig > LIBRARY/src/bid_functions.h |
| | | 22 | + |
18 | +# make NetBSD look like FreeBSD to the Makefiles, this is a little hackish | | 23 | +# make NetBSD look like FreeBSD to the Makefiles, this is a little hackish |
19 | +if [ `uname -s` = "NetBSD" ]; then | | 24 | +if [ `uname -s` = "NetBSD" ]; then |
20 | + OS_ARG="CFLAGS_OPT=-DLINUX" | | 25 | + OS_ARG="CFLAGS_OPT=-DLINUX" |
21 | + mv LIBRARY/makefile.iml_head LIBRARY/makefile.iml_head.orig2 && \ | | 26 | + mv LIBRARY/makefile.iml_head LIBRARY/makefile.iml_head.orig2 && \ |
22 | + sed -e 's/FreeBSD/NetBSD/' -e 's/FREEBSD/NETBSD/' \ | | 27 | + sed -e 's/FreeBSD/NetBSD/' -e 's/FREEBSD/NETBSD/' \ |
23 | + LIBRARY/makefile.iml_head.orig2 > LIBRARY/makefile.iml_head | | 28 | + LIBRARY/makefile.iml_head.orig2 > LIBRARY/makefile.iml_head |
24 | +fi | | 29 | +fi |
25 | + | | 30 | + |
26 | # When building for architectures other than x86 or x86_64, I remove the | | 31 | # When building for architectures other than x86 or x86_64, I remove the |
27 | # section titled "Determine host architecture" in | | 32 | # section titled "Determine host architecture" in |
28 | # IntelRDFPMathLib20U1/LIBRARY/makefile.iml_head, and replace it with a simple | | 33 | # IntelRDFPMathLib20U1/LIBRARY/makefile.iml_head, and replace it with a simple |