Mercurial > mxe-octave
annotate src/glib.mk @ 288:9d06f168f339
portability fix for FreeBSD in package glib: don't expect the build system to have libiconv installed
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sat, 07 Mar 2009 22:20:07 +0100 |
parents | 44ce30959976 |
children | 25d9750b7a6a |
rev | line source |
---|---|
249 | 1 # GLib |
2 | |
3 PKG := glib | |
4 $(PKG)_VERSION := 2.18.4 | |
5 $(PKG)_SUBDIR := glib-$($(PKG)_VERSION) | |
6 $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.bz2 | |
265
5bf9071e67b6
put all package's project websites into Make variables $($(PKG)_WEBSITE)
Volker Grabsch <vog@notjusthosting.com>
parents:
264
diff
changeset
|
7 $(PKG)_WEBSITE := http://www.gtk.org/ |
264
01aa6a0e1c9e
new macro SHORT_PKG_VERSION which assists in creating download URLs
Volker Grabsch <vog@notjusthosting.com>
parents:
261
diff
changeset
|
8 $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
9 $(PKG)_DEPS := gcc gettext pcre libiconv |
249 | 10 |
11 define $(PKG)_UPDATE | |
12 wget -q -O- 'http://www.gtk.org/download-windows.html' | \ | |
13 grep 'glib-' | \ | |
266
b94424e6c37f
improved the regexes for package version recognition
Volker Grabsch <vog@notjusthosting.com>
parents:
265
diff
changeset
|
14 $(SED) -n 's,.*glib-\([0-9][^>]*\)\.tar.*,\1,p' | \ |
249 | 15 head -1 |
16 endef | |
17 | |
18 define $(PKG)_BUILD | |
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
|
19 # native build of libiconv (used by glib-genmarshal) |
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
|
20 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,libiconv) |
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
|
21 cd '$(1)/$(libiconv_SUBDIR)' && ./configure \ |
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
|
22 --prefix='$(1)/libiconv' \ |
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
|
23 --disable-shared \ |
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
|
24 --disable-nls |
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
|
25 $(MAKE) -C '$(1)/$(libiconv_SUBDIR)' -j 1 install |
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
|
26 |
282
44ce30959976
portability fix for Open Solaris: don't expect the build system to have pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
281
diff
changeset
|
27 # native build for glib-genmarshal, without pkg-config and gettext |
249 | 28 cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,glib) |
282
44ce30959976
portability fix for Open Solaris: don't expect the build system to have pkg-config
Volker Grabsch <vog@notjusthosting.com>
parents:
281
diff
changeset
|
29 $(SED) 's,^PKG_CONFIG=.*,PKG_CONFIG=echo,' -i '$(1)/$(glib_SUBDIR)/configure' |
281
801ca6a45598
portability fix for MacOS X: don't expect the build system to provide gettext/libintl
Volker Grabsch <vog@notjusthosting.com>
parents:
271
diff
changeset
|
30 $(SED) 's,gt_cv_have_gettext=yes,gt_cv_have_gettext=no,' -i '$(1)/$(glib_SUBDIR)/configure' |
801ca6a45598
portability fix for MacOS X: don't expect the build system to provide gettext/libintl
Volker Grabsch <vog@notjusthosting.com>
parents:
271
diff
changeset
|
31 $(SED) '/You must.*have gettext/,/exit 1;/ s,.*exit 1;.*,},' -i '$(1)/$(glib_SUBDIR)/configure' |
249 | 32 cd '$(1)/$(glib_SUBDIR)' && ./configure \ |
33 --disable-shared \ | |
34 --prefix='$(PREFIX)' \ | |
250
a216acad3492
bugfix in package glib: install all glib tools
Volker Grabsch <vog@notjusthosting.com>
parents:
249
diff
changeset
|
35 --enable-regex \ |
249 | 36 --without-threads \ |
37 --disable-selinux \ | |
38 --disable-fam \ | |
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
|
39 --disable-xattr \ |
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
|
40 --with-libiconv=gnu \ |
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
|
41 CPPFLAGS='-I$(1)/libiconv/include' \ |
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
|
42 LDFLAGS='-L$(1)/libiconv/lib' |
249 | 43 $(SED) 's,#define G_ATOMIC.*,,' -i '$(1)/$(glib_SUBDIR)/config.h' |
44 $(MAKE) -C '$(1)/$(glib_SUBDIR)/glib' -j '$(JOBS)' | |
250
a216acad3492
bugfix in package glib: install all glib tools
Volker Grabsch <vog@notjusthosting.com>
parents:
249
diff
changeset
|
45 $(MAKE) -C '$(1)/$(glib_SUBDIR)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
46 |
249 | 47 # cross build |
269
16a7b5bac4b5
bugfix in several build rules: use "$(SED)" instead of "sed"
Volker Grabsch <vog@notjusthosting.com>
parents:
266
diff
changeset
|
48 $(SED) 's,^\(Libs:.*\),\1 @PCRE_LIBS@ @G_THREAD_LIBS@ @G_LIBS_EXTRA@ -lshlwapi,' -i '$(1)/glib-2.0.pc.in' |
249 | 49 cd '$(1)' && ./configure \ |
50 --host='$(TARGET)' \ | |
51 --disable-shared \ | |
52 --prefix='$(PREFIX)/$(TARGET)' \ | |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
53 --with-threads=win32 \ |
249 | 54 --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
|
55 --with-libiconv=gnu \ |
271
2801bf7db05e
switch glib to win32 threading
Volker Grabsch <vog@notjusthosting.com>
parents:
269
diff
changeset
|
56 PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' |
249 | 57 $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= |
58 endef |