Mercurial > mxe-octave
annotate src/qscintilla.mk @ 4517:8e522798c9a7
qscintilla: simplify DLL install rules
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Oct 2017 09:00:14 -0400 |
parents | bb63484e88ae |
children | 0664d54897b4 |
rev | line source |
---|---|
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 # This file is part of MXE. |
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 # See index.html for further information. |
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 |
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 PKG := qscintilla |
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 $(PKG)_IGNORE := |
4410 | 6 $(PKG)_VERSION := 2.10.1 |
7 $(PKG)_CHECKSUM := f12499c18d80cb59fa46df3ee76ad2c66692e818 | |
4135 | 8 $(PKG)_SUBDIR := QScintilla_gpl-$($(PKG)_VERSION) |
9 $(PKG)_FILE := QScintilla_gpl-$($(PKG)_VERSION).tar.gz | |
3064
be70678cc47b
Update QScintilla to 2.7.2
"John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
10 $(PKG)_URL := http://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-$($(PKG)_VERSION)/$($(PKG)_FILE) |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
11 |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
12 |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
13 ifeq ($(ENABLE_QT5),yes) |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
14 $(PKG)_DEPS := qt5 |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
15 else |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
16 $(PKG)_DEPS := qt |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
17 endif |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 |
3613
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
19 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
20 $(PKG)_INSTALL_ROOT := |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
21 else |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
22 $(PKG)_INSTALL_ROOT := $(3) |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
23 endif |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
24 |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 define $(PKG)_UPDATE |
3708
d95b8b84cea7
enable additional $(PKG)_UPDATE targets.
John W. Eaton <jwe@octave.org>
parents:
3645
diff
changeset
|
26 $(WGET) -q -O- 'http://www.riverbankcomputing.com/software/qscintilla/download' | \ |
d95b8b84cea7
enable additional $(PKG)_UPDATE targets.
John W. Eaton <jwe@octave.org>
parents:
3645
diff
changeset
|
27 grep QScintilla-gpl | \ |
d95b8b84cea7
enable additional $(PKG)_UPDATE targets.
John W. Eaton <jwe@octave.org>
parents:
3645
diff
changeset
|
28 head -n 1 | \ |
d95b8b84cea7
enable additional $(PKG)_UPDATE targets.
John W. Eaton <jwe@octave.org>
parents:
3645
diff
changeset
|
29 $(SED) -n 's,.*QScintilla-gpl-\([0-9][^>]*\)\.zip.*,\1,p' |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 endef |
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 |
2997 | 32 ifneq ($(MXE_NATIVE_BUILD),yes) |
33 ifeq ($(MXE_SYSTEM),mingw) | |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
34 ifeq ($(ENABLE_QT5),yes) |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
35 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(BUILD_TOOLS_PREFIX)/mkspecs/win32-g++' |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
36 else |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
37 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(HOST_PREFIX)/mkspecs/win32-g++' |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
38 endif |
2997 | 39 endif |
3130
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
40 ifeq ($(MXE_SYSTEM),msvc) |
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
41 # FIXME: compute "2010" suffix dynamically |
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
42 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(HOST_LIBDIR)/qt4/mkspecs/win32-msvc2010' |
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
43 endif |
2997 | 44 endif |
45 | |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 define $(PKG)_BUILD |
4503
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
47 cd '$(1)/Qt4Qt5' && \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
48 '$(MXE_QMAKE)' -makefile \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
49 $($(PKG)_QMAKE_SPEC_OPTION) \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
50 QMAKE_UIC='$(MXE_UIC)' \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
51 QMAKE_MOC='$(MXE_MOC)' \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
52 QMAKE_LFLAGS=$(MXE_LDFLAGS) \ |
bb63484e88ae
qscintilla: Pass MXE_LDFLAGS to qmake.
John W. Eaton <jwe@octave.org>
parents:
4410
diff
changeset
|
53 QMAKE_CXXFLAGS='-std=c++11' |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 |
3130
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
55 if [ $(MXE_SYSTEM) = msvc ]; then \ |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
56 mkdir -p '$(3)' && \ |
3130
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
57 cd '$(1)/Qt4Qt5' && \ |
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
58 env -u MAKE -u MAKEFLAGS nmake && \ |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
59 env -u MAKE -u MAKEFLAGS nmake \ |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
60 INSTALL_ROOT=`cd $(3) && pwd -W | sed -e 's,^[a-zA-Z]:,,' -e 's,/,\\\\,g'` install; \ |
3130
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
61 else \ |
3c1afa2c8e43
[MSVC] enable qscintilla compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3065
diff
changeset
|
62 $(MAKE) -C '$(1)/Qt4Qt5' -j '$(JOBS)' && \ |
3613
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
63 $(MAKE) -C '$(1)/Qt4Qt5' -j 1 install INSTALL_ROOT='$($(PKG)_INSTALL_ROOT)'; \ |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
64 fi |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
65 |
4517
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
66 if [ $(MXE_SYSTEM) = mingw ]; then \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
67 $(INSTALL) -d '$($(PKG)_INSTALL_ROOT)$(HOST_BINDIR)'; \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
68 if [ $(ENABLE_QT5) = yes ]; then \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
69 mv '$($(PKG)_INSTALL_ROOT)$(HOST_PREFIX)/qt5/lib/qscintilla2_qt5.dll' '$($(PKG)_INSTALL_ROOT)$(HOST_BINDIR)'; \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
70 else \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
71 mv '$($(PKG)_INSTALL_ROOT)$(HOST_LIBDIR)/qscintilla2_qt4.dll' '$($(PKG)_INSTALL_ROOT)$(HOST_BINDIR)/'; \ |
8e522798c9a7
qscintilla: simplify DLL install rules
John W. Eaton <jwe@octave.org>
parents:
4503
diff
changeset
|
72 fi; \ |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
73 fi |
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
74 |
3293
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
75 # Qmake under MSVC uses Win32 paths. When combining this with |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
76 # DESTDIR usage (or equivalent), the real Win32 directory hierarchy |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
77 # is recreated under DESTDIR, not the MSYS hierarchy. |
cf6f40cededb
Support file list generation in packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3291
diff
changeset
|
78 if [ $(MXE_SYSTEM) = msvc ]; then \ |
3613
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
79 $(INSTALL) -d '$($(PKG)_INSTALL_ROOT)$(CMAKE_HOST_PREFIX)/bin'; \ |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
80 $(INSTALL) -m755 '$($(PKG)_INSTALL_ROOT)$(CMAKE_HOST_PREFIX)/lib/$(LIBRARY_PREFIX)qscintilla2$(LIBRARY_SUFFIX).dll' '$($(PKG)_INSTALL_ROOT)$(CMAKE_HOST_PREFIX)/bin/'; \ |
62901e283b28
qscintilla: use '' for install root in native mingw.
John Donoghue <john.donoghue@ieee.org>
parents:
3597
diff
changeset
|
81 rm -f '$($(PKG)_INSTALL_ROOT)$(CMAKE_HOST_PREFIX)/lib/$(LIBRARY_PREFIX)qscintilla2$(LIBRARY_SUFFIX).dll'; \ |
2997 | 82 fi |
4222
44b1a9b2193e
qt5: add initial qt5 to mxe-octave, based on mxe.cc
John D
parents:
4201
diff
changeset
|
83 |
2935
8cf0cbcdaeea
Include qscintilla as a dependency of Octave
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 endef |