Convert tcp_wrappers to new packaging style, add a patch for target optimizations
[openwrt.git] / package / glib / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := glib
6 PKG_VERSION := 1.2.10
7 PKG_RELEASE := 1
8 PKG_MD5SUM := 6fe30dad87c77b91b632def29dd69ef9
9
10 PKG_SOURCE_URL := ftp://ftp.gtk.org/pub/gtk/v1.2
11 PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT := zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21
22 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
23 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
24 glib_cv_sizeof_gmutex=24 \
25 ac_cv_sizeof_char=1 \
26 ac_cv_sizeof_short=2 \
27 ac_cv_sizeof_int=4 \
28 ac_cv_sizeof_long=4 \
29 ac_cv_sizeof_long_long=8 \
30 ac_cv_sizeof_void_p=4 \
31 glib_cv_prog_cc_ansi_proto="no" \
32 glib_cv_has__inline="yes" \
33 glib_cv_has__inline__="yes" \
34 glib_cv_hasinline="yes" \
35 glib_cv_sane_realloc="yes" \
36 glib_cv_va_copy="no" \
37 glib_cv___va_copy="yes" \
38 glib_cv_va_val_copy="yes" \
39 glib_cv_rtldglobal_broken="no" \
40 glib_cv_uscore="no" \
41 ac_cv_func_getpwuid_r="yes" \
42 glib_cv_func_pthread_mutex_trylock_posix="yes" \
43 glib_cv_func_pthread_cond_timedwait_posix="yes" \
44 glib_cv_sizeof_gmutex="24" \
45 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" \
46 $(TARGET_CONFIGURE_OPTS) \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 ./configure \
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
52 --program-prefix="" \
53 --program-suffix="" \
54 --prefix=/usr \
55 --exec-prefix=/usr \
56 --bindir=/usr/bin \
57 --sbindir=/usr/sbin \
58 --libexecdir=/usr/lib \
59 --sysconfdir=/etc \
60 --datadir=/usr/share \
61 --localstatedir=/var \
62 --mandir=/usr/man \
63 --infodir=/usr/info \
64 $(DISABLE_NLS) \
65 $(DISABLE_LARGEFILE) \
66 --enable-shared=yes \
67 --enable-static=yes \
68 );
69 touch $@
70
71 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
72 rm -rf $(PKG_INSTALL_DIR)
73 mkdir -p $(PKG_INSTALL_DIR)
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 install
77 touch $@
78
79 $(IPKG_GLIB1):
80 install -m0755 -d $(IDIR_GLIB1)/usr/lib
81 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/
82 $(RSTRIP) $(IDIR_GLIB1)
83 $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR)
84
85 $(STAGING_DIR)/usr/lib/libglib.so: $(PKG_BUILD_DIR)/.built
86 mkdir -p $(STAGING_DIR)/usr/bin
87 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/
88 mkdir -p $(STAGING_DIR)/usr/include
89 cp -fpR $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/
90 cp -fpR $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
91 mkdir -p $(STAGING_DIR)/usr/lib
92 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/
93 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/
94 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/
95 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
96 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
97 touch $(STAGING_DIR)/usr/lib/libglib.so
98
99 install-dev: $(STAGING_DIR)/usr/lib/libglib.so
100
101 uninstall-dev:
102 rm -rf $(STAGING_DIR)/usr/bin/glib-config
103 rm -rf $(STAGING_DIR)/usr/include/glib-1.2
104 rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so}
105 rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.*
106 rm -rf $(STAGING_DIR)/usr/lib/glib
107 rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc
108
109 compile: install-dev
110 clean: uninstall-dev
This page took 0.043266 seconds and 5 git commands to generate.