Mercurial > mxe-octave
annotate src/gl2ps.mk @ 5534:372ea4c0afb2
Move of-ocs PKG_XXXX to inst dir and add break patch
* src/of-ocs-3-break-fixes.patch,
src/of-ocs-4-pkgadd-fixes.patch: new files
* dist-files.mk: add ref to files
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 13 Sep 2020 08:15:14 -0400 |
parents | 70d9ddbf2aa7 |
children | d862fd40cc42 |
rev | line source |
---|---|
3275 | 1 # This file is part of MXE. |
2 # See index.html for further information. | |
3 | |
4 PKG := gl2ps | |
5382
70d9ddbf2aa7
gl2ps: update to v1.4.2
John Donoghue <john.donoghue@ieee.org>
parents:
5141
diff
changeset
|
5 $(PKG)_VERSION := 1.4.2 |
70d9ddbf2aa7
gl2ps: update to v1.4.2
John Donoghue <john.donoghue@ieee.org>
parents:
5141
diff
changeset
|
6 $(PKG)_CHECKSUM := ee1eb8972e9d07bbe325552e4ec15d6828e8197c |
70d9ddbf2aa7
gl2ps: update to v1.4.2
John Donoghue <john.donoghue@ieee.org>
parents:
5141
diff
changeset
|
7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
3275 | 8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz |
9 $(PKG)_URL := http://geuz.org/$(PKG)/src/$($(PKG)_FILE) | |
3971 | 10 $(PKG)_DEPS := libpng zlib |
4496
903796b2fcb6
fltk, gl2ps, xcursor, x11, qtbase: Fix dependencies.
John W. Eaton <jwe@octave.org>
parents:
4419
diff
changeset
|
11 ifeq ($(USE_SYSTEM_OPENGL),no) |
903796b2fcb6
fltk, gl2ps, xcursor, x11, qtbase: Fix dependencies.
John W. Eaton <jwe@octave.org>
parents:
4419
diff
changeset
|
12 $(PKG)_DEPS += mesa glu |
903796b2fcb6
fltk, gl2ps, xcursor, x11, qtbase: Fix dependencies.
John W. Eaton <jwe@octave.org>
parents:
4419
diff
changeset
|
13 endif |
3275 | 14 |
3277
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
15 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
16 ifeq ($(MXE_SYSTEM),msvc) |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
17 $(PKG)_CMAKE_FLAGS := -G 'NMake Makefiles' |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
18 endif |
3277
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
19 endif |
1418183e786b
Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents:
3275
diff
changeset
|
20 |
3275 | 21 define $(PKG)_UPDATE |
5141 | 22 $(WGET) -q -O- 'https://gitlab.onelab.info/gl2ps/gl2ps/-/tags' | \ |
23 $(SED) -n 's/.*>gl2ps_\([0-9]\)_\([0-9]\)_\([0-9]\)<.*/\1\.\2\.\3/p' | \ | |
24 $(SORT) -V | tail -1 | |
3275 | 25 endef |
26 | |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
27 ifeq ($(MXE_SYSTEM),msvc) |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
28 define $(PKG)_BUILD |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
29 cd '$(1)' && cmake \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
30 $($(PKG)_CMAKE_FLAGS) \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
31 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
32 -DPNG_NAMES=png16 \ |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
33 . |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
34 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake |
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
35 cd '$(1)' && env -u MAKE -u MAKEFLAGS nmake DESTDIR='$(3)' install |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
36 endef |
3971 | 37 else ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
38 define $(PKG)_BUILD | |
39 mkdir '$(1)/.build' | |
40 cd '$(1)' && autoreconf --force | |
41 cd '$(1)/.build' && ../configure \ | |
42 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ | |
43 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | |
44 $(ENABLE_SHARED_OR_STATIC) \ | |
45 --prefix='$(HOST_PREFIX)' \ | |
46 LIBS=-lopengl32 \ | |
47 && $(CONFIGURE_POST_HOOK) | |
48 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' LDFLAGS='-no-undefined -L$(HOST_LIBDIR)' | |
49 $(MAKE) -C '$(1)/.build' -j 1 install DESTDIR='$(3)' | |
50 endef | |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
51 else |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
52 ifeq ($(MXE_SYSTEM),mingw) |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
53 define $(PKG)_BUILD |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
54 cd '$(1)' && cmake \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
55 $($(PKG)_CMAKE_FLAGS) \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
56 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
57 . |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
58 $(MAKE) -C '$(1)' -j '$(JOBS)' VERBOSE=1 |
3278
fbf8f71bf1e6
gl2ps: install nativemingw files and bin/dll.
John Donoghue <john.donoghue@ieee.org>
parents:
3277
diff
changeset
|
59 |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
60 # native mingw build doesnt want to install the files, even |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
61 # though it logs that it did |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
62 if [ x$(MXE_NATIVE_MINGW_BUILD) = xyes ]; then \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
63 $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
64 $(INSTALL) -m644 '$(1)/libgl2ps.a' '$(3)$(HOST_LIBDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
65 $(INSTALL) -m644 '$(1)/libgl2ps.dll.a' '$(3)$(HOST_LIBDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
66 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
67 $(INSTALL) -m644 '$(1)/libgl2ps.dll' '$(3)$(HOST_BINDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
68 $(INSTALL) -d '$(3)$(HOST_INCDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
69 $(INSTALL) -m644 '$(1)/gl2ps.h' '$(3)$(HOST_INCDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
70 else \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
71 $(MAKE) -C '$(1)' -j 1 VERBOSE=1 DESTDIR='$(3)' install; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
72 if [ $(MXE_SYSTEM) = mingw ]; then \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
73 echo "Install dll"; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
74 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
75 $(INSTALL) '$(3)$(HOST_LIBDIR)/libgl2ps.dll' '$(3)$(HOST_BINDIR)/'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
76 rm -f '$(3)$(HOST_LIBDIR)/libgl2ps.dll'; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
77 fi; \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
78 fi |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
79 endef |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
80 else |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
81 define $(PKG)_BUILD |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
82 mkdir '$(1)/.build' |
4555 | 83 cd '$(1)' && aclocal && libtoolize && autoreconf --force |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
84 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
85 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
86 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
4009
38fb4dfff1fa
* gl2ps.mk: Correct --prefix for native non-Windows builds.
John W. Eaton <jwe@octave.org>
parents:
3971
diff
changeset
|
87 --prefix='$(HOST_PREFIX)' \ |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
88 && $(CONFIGURE_POST_HOOK) |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
89 |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
90 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
91 $(MAKE) -C '$(1)/.build' -j 1 install DESTDIR='$(3)' |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
92 endef |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
93 endif |
3295
14d0e2102581
[MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3278
diff
changeset
|
94 endif |
3834
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
95 |
291c610413cd
use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents:
3830
diff
changeset
|
96 |