Mercurial > mxe-octave
annotate src/glib.mk @ 3048:5ef49fb3299d
treat gcc and binutils as build tools
use a separate target for building the cmake toolchain file
don't unpack gcc or binutils if we are using the system compiler
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Jun 2013 16:51:29 -0400 |
parents | 951da75fd09c |
children | 2733829a184e |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2153
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
2 # See index.html for further information. |
414
d2a6561bcb6d
add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents:
409
diff
changeset
|
3 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
302
diff
changeset
|
4 PKG := glib |
1277
104c7045f292
improved update scripts of packages: glib librsvg sdl_sound sdl_ttf
Volker Grabsch <vog@notjusthosting.com>
parents:
1272
diff
changeset
|
5 $(PKG)_IGNORE := |
2817 | 6 $(PKG)_CHECKSUM := f695d4d3a6ded331e4d45f077a9774d6ca8a47e4 |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
302
diff
changeset
|
7 $(PKG)_SUBDIR := glib-$($(PKG)_VERSION) |
2482
d3034915cd6b
packages atk* glib* libsigc++ pango: use xz archives
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
8 $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz |
306
85ffa9259036
validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents:
302
diff
changeset
|
9 $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3031
diff
changeset
|
10 $(PKG)_DEPS := gettext pcre libiconv zlib libffi dbus |
249 | 11 |
12 define $(PKG)_UPDATE | |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2482
diff
changeset
|
13 $(WGET) -q -O- 'http://git.gnome.org/browse/glib/refs/tags' | \ |
1297
b53f783f930b
use only release versions of glib
Volker Grabsch <vog@notjusthosting.com>
parents:
1277
diff
changeset
|
14 $(SED) -n "s,.*tag/?id=\([0-9]\+\.[0-9]*[02468]\.[^']*\).*,\1,p" | \ |
249 | 15 head -1 |
16 endef | |
17 | |
2743
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
18 define $(PKG)_NATIVE_BUILD |
806
64db10989f7d
update version of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
759
diff
changeset
|
19 cp -Rp '$(1)' '$(1).native' |
722
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
20 |
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
21 # native build of libiconv (used by glib-genmarshal) |
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
22 cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv) |
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
23 cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2817
diff
changeset
|
24 $(ENABLE_SHARED_OR_STATIC) \ |
1201 | 25 --disable-nls |
722
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
26 $(MAKE) -C '$(1).native/$(libiconv_SUBDIR)' -j '$(JOBS)' |
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
27 |
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
28 # native build for glib-genmarshal, without pkg-config, gettext and zlib |
712
38a787e5a126
improved coding style
Volker Grabsch <vog@notjusthosting.com>
parents:
711
diff
changeset
|
29 cd '$(1).native' && ./configure \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2817
diff
changeset
|
30 $(ENABLE_SHARED_OR_STATIC) \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3006
diff
changeset
|
31 --prefix='$(HOST_PREFIX)' \ |
250
a216acad3492
bugfix in package glib: install all glib tools
Volker Grabsch <vog@notjusthosting.com>
parents:
249
diff
changeset
|
32 --enable-regex \ |
909
fbb1667f8e3a
revert upgrade of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
906
diff
changeset
|
33 --disable-threads \ |
249 | 34 --disable-selinux \ |
2615 | 35 --disable-inotify \ |
249 | 36 --disable-fam \ |
722
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
37 --disable-xattr \ |
1195
40fff8072354
package glib: disable dtrace for native build
Tony Theodore <tonyt@logyst.com>
parents:
1191
diff
changeset
|
38 --disable-dtrace \ |
722
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
39 --with-libiconv=gnu \ |
976
c9ff59f8ceaf
improved build options for native build of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
960
diff
changeset
|
40 --with-pcre=internal \ |
722
dc0a01dbbcd6
ensure that the native glib-genmarshal build with libiconv always succeeds
Volker Grabsch <vog@notjusthosting.com>
parents:
720
diff
changeset
|
41 CPPFLAGS='-I$(1).native/$(libiconv_SUBDIR)/include' \ |
1201 | 42 LDFLAGS='-L$(1).native/$(libiconv_SUBDIR)/lib/.libs' |
759
bf4bcb3370fa
changed coding style: make "-i" always the first argument of $(SED) (by Mark Brand)
Volker Grabsch <vog@notjusthosting.com>
parents:
741
diff
changeset
|
43 $(SED) -i 's,#define G_ATOMIC.*,,' '$(1).native/config.h' |
909
fbb1667f8e3a
revert upgrade of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
906
diff
changeset
|
44 $(MAKE) -C '$(1).native/glib' -j '$(JOBS)' |
fbb1667f8e3a
revert upgrade of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
906
diff
changeset
|
45 $(MAKE) -C '$(1).native/gthread' -j '$(JOBS)' |
2615 | 46 $(MAKE) -C '$(1).native/gmodule' -j '$(JOBS)' |
909
fbb1667f8e3a
revert upgrade of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
906
diff
changeset
|
47 $(MAKE) -C '$(1).native/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec |
2615 | 48 $(MAKE) -C '$(1).native/gio/xdgmime' -j '$(JOBS)' |
914 | 49 $(MAKE) -C '$(1).native/gio' -j '$(JOBS)' glib-compile-schemas |
2615 | 50 $(MAKE) -C '$(1).native/gio' -j '$(JOBS)' glib-compile-resources |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
51 $(INSTALL) -m755 '$(1).native/gio/glib-compile-schemas' '$(HOST_BINDIR)' |
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
52 $(INSTALL) -m755 '$(1).native/gio/glib-compile-resources' '$(HOST_BINDIR)' |
2743
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
53 endef |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
54 |
2743
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
55 define $(PKG)_SYMLINK |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
56 $(LN_SF) `which glib-genmarshal` '$(HOST_BINDIR)' |
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
57 $(LN_SF) `which glib-compile-schemas` '$(HOST_BINDIR)' |
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
58 $(LN_SF) `which glib-compile-resources` '$(HOST_BINDIR)' |
2743
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
59 endef |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
60 |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
61 define $(PKG)_BUILD |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
62 cd '$(1)' && ./autogen.sh |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
63 rm -f '$(HOST_BINDIR)/glib-*' |
2743
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
64 $(if $(findstring y,\ |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
65 $(shell [ -x "`which glib-genmarshal`" ] && \ |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
66 [ -x "`which glib-compile-schemas`" ] && \ |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
67 [ -x "`which glib-compile-resources`" ] && echo y)), \ |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
68 $($(PKG)_SYMLINK), \ |
abf2a94d035f
package glib: build native tools only when not installed
Tony Theodore <tonyt@logyst.com>
parents:
2617
diff
changeset
|
69 $($(PKG)_NATIVE_BUILD)) |
249 | 70 # cross build |
71 cd '$(1)' && ./configure \ | |
3013
bcc26ffe9a0f
use variable for --host and --build configure arguments
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
72 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2817
diff
changeset
|
73 $(ENABLE_SHARED_OR_STATIC) \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
3006
diff
changeset
|
74 --prefix='$(HOST_PREFIX)' \ |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
75 --with-threads=win32 \ |
249 | 76 --with-pcre=system \ |
288
9d06f168f339
portability fix for FreeBSD in package glib: don't expect the build system to have libiconv installed
Volker Grabsch <vog@notjusthosting.com>
parents:
282
diff
changeset
|
77 --with-libiconv=gnu \ |
2615 | 78 --disable-inotify \ |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
79 CXX='$(MXE_CXX)' \ |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
80 PKG_CONFIG='$(MXE_PKG_CONFIG)' \ |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
81 GLIB_GENMARSHAL='$(HOST_BINDIR)/glib-genmarshal' \ |
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
82 GLIB_COMPILE_SCHEMAS='$(HOST_BINDIR)/glib-compile-schemas' \ |
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3013
diff
changeset
|
83 GLIB_COMPILE_RESOURCES='$(HOST_BINDIR)/glib-compile-resources' |
706
0a976e6b82e3
remove other packages' dependencies on the gettext tool
Volker Grabsch <vog@notjusthosting.com>
parents:
693
diff
changeset
|
84 $(MAKE) -C '$(1)/glib' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= |
0a976e6b82e3
remove other packages' dependencies on the gettext tool
Volker Grabsch <vog@notjusthosting.com>
parents:
693
diff
changeset
|
85 $(MAKE) -C '$(1)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= |
0a976e6b82e3
remove other packages' dependencies on the gettext tool
Volker Grabsch <vog@notjusthosting.com>
parents:
693
diff
changeset
|
86 $(MAKE) -C '$(1)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= |
0a976e6b82e3
remove other packages' dependencies on the gettext tool
Volker Grabsch <vog@notjusthosting.com>
parents:
693
diff
changeset
|
87 $(MAKE) -C '$(1)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= |
919
d9ecc9999601
fix build issues of package glib
Volker Grabsch <vog@notjusthosting.com>
parents:
914
diff
changeset
|
88 $(MAKE) -C '$(1)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF= |
1190
821fabe85a36
upgrade packages: glib gtk. new package: gdk-pixbuf
Mark Brand <mabrand@mabrand.nl>
parents:
1045
diff
changeset
|
89 $(MAKE) -C '$(1)' -j '$(JOBS)' install-pkgconfigDATA |
249 | 90 endef |