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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
249
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
1 # GLib
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3 PKG := glib
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 $(PKG)_VERSION := 2.18.4
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 $(PKG)_SUBDIR := glib-$($(PKG)_VERSION)
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 define $(PKG)_UPDATE
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12 wget -q -O- 'http://www.gtk.org/download-windows.html' | \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 head -1
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 endef
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 cd '$(1)/$(glib_SUBDIR)' && ./configure \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33 --disable-shared \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
36 --without-threads \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
37 --disable-selinux \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
43 $(SED) 's,#define G_ATOMIC.*,,' -i '$(1)/$(glib_SUBDIR)/config.h'
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
49 cd '$(1)' && ./configure \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
50 --host='$(TARGET)' \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
51 --disable-shared \
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
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
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
57 $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
f9eef93cb829 new package: glib
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
58 endef