comparison src/release-octave.mk @ 4748:a6b4355efbd6

new organization for release, stable, and default versions of Octave * release-octave-1-gnulib.patch, release-octave-1-qt.patch, release-octave.mk: Copied from stable-*. * release-octave.mk: Explain purpose of file in comment. Update package name. * stable-octave-1-qt.patch: Delete. * stable-octave.mk, default-octave.mk: Explain purpose of file in comment. Use invalid URL for sources. Set version to 4.4.0+ to distinguish from the octave-release package. * dist-files.mk: Update. * configure.ac: Accept --enable-octave=release option and make it the default. * index.html: Include a release-octave package in the list.
author John W. Eaton <jwe@octave.org>
date Thu, 28 Jun 2018 13:39:45 -0400
parents src/stable-octave.mk@ebc418be26ec
children 2612d718f3a5
comparison
equal deleted inserted replaced
4747:b84e8b43eb8f 4748:a6b4355efbd6
1 # This file is part of MXE.
2 # See index.html for further information.
3
4 ## This set of rules is intended for building the latest released
5 ## version of Octave found on ftp.gnu.org using the current
6 ## packages found in the mxe-octave archive. To reproduce the binary
7 ## builds for Windows that are distributed on ftp.gnu.org, you must
8 ## choose the revision of mxe-octave that matches the release you
9 ## wish to reproduce. Those should be tagged in the mxe-octave archive
10 ## with tags like "octave-release-4.4.0". The options used to build are
11 ##
12 ## --enable-octave=release
13 ## --enable-binary-packages
14 ## --enable-devel-tools
15 ## --enable-qt5
16 ## --disable-system-opengl
17 ##
18 ## and one of the following
19 ##
20 ## * 64-bit Windows build; 32-bit integers for Fortran
21 ## (including BLAS and LAPACK libraries) which is the typical
22 ## configuration for all Linux distributions:
23 ##
24 ## --enable-windows-64 --enable-64 --disable-fortran-int64
25 ##
26 ## * 64-bit Windows build; 64-bit integers for Fortran
27 ## (including BLAS and LAPACK libraries):
28 ##
29 ## --enable-windows-64 --enable-64 --enable-fortran-int64
30 ##
31 ## * 32-bit Windows build:
32 ##
33 ## --disable-windows-64 --disable-64 --disable-fortran-int64
34
35 PKG := release-octave
36 $(PKG)_IGNORE :=
37 $(PKG)_VERSION := 4.4.0
38 $(PKG)_CHECKSUM := 2f682e2843d45d858ed7bf603f569d6b0acd2fb9
39 $(PKG)_SUBDIR := octave-$($(PKG)_VERSION)
40 $(PKG)_FILE := octave-$($(PKG)_VERSION).tar.lz
41 $(PKG)_URL := ftp://ftp.gnu.org/gnu/octave/$($(PKG)_FILE)
42 ifeq ($(USE_SYSTEM_FONTCONFIG),no)
43 $(PKG)_FONTCONFIG := fontconfig
44 endif
45 $(PKG)_DEPS := blas arpack curl epstool fftw fltk $($(PKG)_FONTCONFIG) ghostscript gl2ps glpk gnuplot graphicsmagick hdf5 lapack libsndfile mesa pcre portaudio pstoedit qhull qrupdate qscintilla readline sundials-ida suitesparse texinfo zlib
46
47 ifeq ($(ENABLE_QT5),yes)
48 $(PKG)_DEPS += qt5
49 else
50 $(PKG)_DEPS += qt
51 endif
52
53 ifeq ($(MXE_WINDOWS_BUILD),no)
54 ifeq ($(USE_SYSTEM_X11_LIBS),no)
55 $(PKG)_DEPS += x11 xext
56 endif
57 endif
58
59 ifeq ($(MXE_SYSTEM),mingw)
60 ifeq ($(USE_SYSTEM_GCC),no)
61 $(PKG)_DEPS += libgomp
62 endif
63 endif
64
65 ifeq ($(ENABLE_JIT),yes)
66 $(PKG)_DEPS += llvm
67 $(PKG)_ENABLE_JIT_CONFIGURE_OPTIONS := --enable-jit
68 else
69 $(PKG)_ENABLE_JIT_CONFIGURE_OPTIONS := --disable-jit
70 endif
71
72 ifeq ($(ENABLE_JAVA),no)
73 $(PKG)_ENABLE_JAVA_CONFIGURE_OPTIONS := --disable-java
74 else
75 ifeq ($(MXE_SYSTEM),mingw)
76 ifeq ($(MXE_NATIVE_BUILD),no)
77 $(PKG)_ENABLE_JAVA_CONFIGURE_OPTIONS := \
78 --with-java-includedir="$(HOST_INCDIR)/java"
79 endif
80 endif
81 endif
82
83 ## If we allow the system Qt libraries to be used, then these
84 ## won't make sense.
85 $(PKG)_QT_CONFIGURE_OPTIONS := \
86 MOC_QTVER=$(MXE_MOC) \
87 UIC_QTVER=$(MXE_UIC) \
88 RCC_QTVER=$(MXE_RCC) \
89 LRELEASE_QTVER=$(MXE_LRELEASE)
90
91 ifeq ($(ENABLE_QT5),yes)
92 #$(PKG)_PKG_CONFIG_PATH := "$(HOST_LIBDIR)/pkgconfig"
93 $(PKG)_PKG_CONFIG_PATH := "$(HOST_PREFIX)/qt5/lib/pkgconfig:$(HOST_LIBDIR)/pkgconfig"
94 $(PKG)_QTDIR := $(HOST_PREFIX)/qt5
95 $(PKG)_QT_CONFIGURE_OPTIONS += octave_cv_lib_qscintilla="-lqscintilla2_qt5"
96 else
97 $(PKG)_PKG_CONFIG_PATH := "$(HOST_LIBDIR)/pkgconfig"
98 $(PKG)_QTDIR := $(HOST_PREFIX)
99 $(PKG)_QT_CONFIGURE_OPTIONS += octave_cv_lib_qscintilla="-lqscintilla2_qt4"
100 endif
101
102
103 ifneq ($(ENABLE_DOCS),yes)
104 $(PKG)_ENABLE_DOCS_CONFIGURE_OPTIONS := --disable-docs
105 endif
106
107 ifeq ($(MXE_NATIVE_BUILD),yes)
108 $(PKG)_CONFIGURE_ENV := LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)
109 ifeq ($(ENABLE_64),yes)
110 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --enable-64
111 else
112 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --disable-64
113 endif
114 else
115 ifeq ($(MXE_SYSTEM),mingw)
116 $(PKG)_CROSS_CONFIG_OPTIONS := \
117 FLTK_CONFIG='$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)fltk-config' \
118 gl_cv_func_gettimeofday_clobber=no \
119 gl_cv_func_tzset_clobber=no
120 ifeq ($(ENABLE_64),yes)
121 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --enable-64
122 else
123 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --disable-64
124 endif
125 endif
126 endif
127
128 ifeq ($(ENABLE_FORTRAN_INT64),yes)
129 $(PKG)_ENABLE_FORTRAN_INT64_CONFIGURE_OPTIONS := F77_INTEGER_8_FLAG=-fdefault-integer-8 ax_blas_f77_func_ok=yes ax_blas_integer_size=8 octave_cv_sizeof_fortran_integer=8
130 else
131 $(PKG)_ENABLE_FORTRAN_INT64_CONFIGURE_OPTIONS := ax_blas_f77_func_ok=yes ax_blas_integer_size=4 octave_cv_sizeof_fortran_integer=4
132 endif
133
134 ifeq ($(MXE_SYSTEM),msvc)
135 $(PKG)_PREFIX := '$(HOST_PREFIX)/local/$($(PKG)_SUBDIR)'
136 # - Enable atomic refcount (required for QtHandles)
137 # - Skip configure test for pow and sqrt, MSVC fails to compile them
138 # because it uses intrinsics (with -O2 flag) and bump on the fake
139 # "char FUNC()" forward declaration.
140 # - Override CFLAGS and CXXFLAGS to disable some warnings.
141 $(PKG)_EXTRA_CONFIGURE_OPTIONS := \
142 --enable-atomic-refcount \
143 ac_cv_func_pow=yes ac_cv_func_sqrt=yes \
144 CFLAGS='-O2 -wd4244 -wd4003 -wd4005 -wd4068' \
145 CXXFLAGS='-O2 -wd4244 -wd4003 -wd4005 -wd4068'
146 else
147 $(PKG)_PREFIX := '$(HOST_PREFIX)'
148 $(PKG)_EXTRA_CONFIGURE_OPTIONS := \
149 LDFLAGS='-Wl,-rpath-link,$(HOST_LIBDIR) -L$(HOST_LIBDIR) -L$($(PKG)_QTDIR)/lib'
150 endif
151
152 ifeq ($(MXE_SYSTEM),mingw)
153 $(PKG)_EXTRA_CONFIGURE_OPTIONS += --with-x=no
154 endif
155
156 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
157 $(PKG)_EXTRA_CONFIGURE_OPTIONS += ac_cv_search_tputs=-ltermcap
158 endif
159
160 # if want binary packages and are cross compiling, then we need cross tools enabled
161 ifeq ($(ENABLE_BINARY_PACKAGES),yes)
162 ifeq ($(MXE_NATIVE_BUILD),no)
163 $(PKG)_EXTRA_CONFIGURE_OPTIONS += --enable-cross-tools
164 endif
165 endif
166
167 define $(PKG)_UPDATE
168 echo 'Warning: Updates are temporarily disabled for package octave.' >&2;
169 echo $($(PKG)_VERSION)
170 endef
171
172 define $(PKG)_BUILD
173 # jni install
174 if [ "$(MXE_SYSTEM)" == "mingw" ] \
175 && [ "$(MXE_NATIVE_BUILD)" == "no" ] \
176 && [ "$(ENABLE_JAVA)" == "yes" ]; then \
177 if [ ! -f $(HOST_INCDIR)/java/jni.h ]; then \
178 mkdir -p '$(HOST_INCDIR)/java'; \
179 $(WGET) -N http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/raw-file/tip/src/share/javavm/export/jni.h \
180 -O $(HOST_INCDIR)/java/jni.h; \
181 fi; \
182 if [ ! -f $(HOST_INCDIR)/java/win32/jni_md.h ]; then \
183 mkdir -p '$(HOST_INCDIR)/java/win32'; \
184 $(WGET) -N http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/raw-file/tip/src/windows/javavm/export/jni_md.h \
185 -O $(HOST_INCDIR)/java/win32/jni_md.h; \
186 fi; \
187 fi
188
189 mkdir '$(1)/.build'
190 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \
191 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
192 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
193 --prefix='$($(PKG)_PREFIX)' \
194 --disable-silent-rules \
195 --enable-install-build-logs \
196 $($(PKG)_CROSS_CONFIG_OPTIONS) \
197 $($(PKG)_ENABLE_64_CONFIGURE_OPTIONS) \
198 $($(PKG)_ENABLE_FORTRAN_INT64_CONFIGURE_OPTIONS) \
199 $($(PKG)_ENABLE_JAVA_CONFIGURE_OPTIONS) \
200 $($(PKG)_ENABLE_JIT_CONFIGURE_OPTIONS) \
201 $($(PKG)_ENABLE_DOCS_CONFIGURE_OPTIONS) \
202 $($(PKG)_QT_CONFIGURE_OPTIONS) \
203 $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \
204 PKG_CONFIG='$(MXE_PKG_CONFIG)' \
205 PKG_CONFIG_PATH=$($(PKG)_PKG_CONFIG_PATH) \
206 && $(CONFIGURE_POST_HOOK)
207
208 $(MAKE) -C '$(1)/.build/libgnu'
209
210 ## We want both of these install steps so that we install in the
211 ## location set by the configure --prefix option, and the other
212 ## in a directory tree that will have just Octave files.
213 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install DESTDIR='$(3)'
214
215 if [ "x$(MXE_SYSTEM)" == "xmingw" ]; then \
216 cp '$(1)/.build/src/.libs/octave-gui.exe' '$(3)$(HOST_BINDIR)'; \
217 if [ "x$(ENABLE_BINARY_PACKAGES)" == "xyes" ]; then \
218 mkdir -p '$(3)$(BUILD_TOOLS_PREFIX)/bin'; \
219 $(INSTALL) '$(1)/.build/src/$(MXE_TOOL_PREFIX)mkoctfile' '$(3)$(BUILD_TOOLS_PREFIX)/bin'; \
220 $(INSTALL) '$(1)/.build/src/$(MXE_TOOL_PREFIX)octave-config' '$(3)$(BUILD_TOOLS_PREFIX)/bin'; \
221 fi; \
222 fi
223
224 if [ "x$(ENABLE_DOCS)" == "xyes" ]; then \
225 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' DESTDIR=$(3) install-pdf install-html; \
226 fi
227
228 if [ $(MXE_SYSTEM) != msvc ]; then \
229 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' DESTDIR=$(TOP_BUILD_DIR)/octave install; \
230 fi
231
232 # create a file with latest installed octave rev in it
233 echo "$($(PKG)_VERSION)" > $(TOP_BUILD_DIR)/octave/octave-version
234 endef