annotate src/gl2ps.mk @ 3834:291c610413cd

use autotools for building gl2ps on Linux systems
author John W. Eaton <jwe@octave.org>
date Wed, 04 Mar 2015 17:25:01 -0500
parents c2abfa00fca5
children e2f0a87790ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3275
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 # This file is part of MXE.
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 # See index.html for further information.
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 PKG := gl2ps
3480
13be64f9f16d move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents: 3324
diff changeset
5 $(PKG)_VERSION := 1.3.8
3275
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 $(PKG)_CHECKSUM := 792e11db0fe7a30a4dc4491af5098b047ec378b1
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-source
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 $(PKG)_URL := http://geuz.org/$(PKG)/src/$($(PKG)_FILE)
3830
c2abfa00fca5 qt.mk, gl2ps.mk: make X11 dependencies optional
John W. Eaton <jwe@octave.org>
parents: 3743
diff changeset
10 $(PKG)_DEPS :=
3275
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11
3830
c2abfa00fca5 qt.mk, gl2ps.mk: make X11 dependencies optional
John W. Eaton <jwe@octave.org>
parents: 3743
diff changeset
12 ifeq ($(USE_SYSTEM_X11_LIBS),no)
c2abfa00fca5 qt.mk, gl2ps.mk: make X11 dependencies optional
John W. Eaton <jwe@octave.org>
parents: 3743
diff changeset
13 $(PKG)_DEPS += xft
c2abfa00fca5 qt.mk, gl2ps.mk: make X11 dependencies optional
John W. Eaton <jwe@octave.org>
parents: 3743
diff changeset
14 endif
3277
1418183e786b Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents: 3275
diff changeset
15
1418183e786b Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents: 3275
diff changeset
16 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
3295
14d0e2102581 [MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3278
diff changeset
17 ifeq ($(MXE_SYSTEM),msvc)
14d0e2102581 [MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3278
diff changeset
18 $(PKG)_CMAKE_FLAGS := -G 'NMake Makefiles'
14d0e2102581 [MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3278
diff changeset
19 endif
3277
1418183e786b Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents: 3275
diff changeset
20 endif
1418183e786b Enable native mingw build of gl2ps
John Donoghue <john.donoghue@ieee.org>
parents: 3275
diff changeset
21
3275
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 define $(PKG)_UPDATE
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 echo 'Warning: Updates are temporarily disabled for package octave.' >&2;
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 echo $(gl2ps_VERSION)
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 endef
3d985d5d48ec gl2ps: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
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
3295
14d0e2102581 [MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3278
diff changeset
37 else
3834
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
38 ifeq ($(MXE_SYSTEM),mingw)
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
39 define $(PKG)_BUILD
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
40 cd '$(1)' && cmake \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
41 $($(PKG)_CMAKE_FLAGS) \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
42 -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
43 .
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
44 $(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
45
3834
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
46 # 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
47 # 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
48 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
49 $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
50 $(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
51 $(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
52 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
53 $(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
54 $(INSTALL) -d '$(3)$(HOST_INCDIR)'; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
55 $(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
56 else \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
57 $(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
58 if [ $(MXE_SYSTEM) = mingw ]; then \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
59 echo "Install dll"; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
60 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
61 $(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
62 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
63 fi; \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
64 fi
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
65 endef
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
66 else
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
67 define $(PKG)_BUILD
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
68 mkdir '$(1)/.build'
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
69 cd '$(1)' && autoreconf --force
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
70 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
71 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
72 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
73 --prefix='$($(PKG)_PREFIX)' \
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
74 && $(CONFIGURE_POST_HOOK)
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
75
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
76 $(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
77 $(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
78 endef
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
79 endif
3295
14d0e2102581 [MSVC] Enable gl2ps compilation.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3278
diff changeset
80 endif
3834
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
81
291c610413cd use autotools for building gl2ps on Linux systems
John W. Eaton <jwe@octave.org>
parents: 3830
diff changeset
82