ucmb: Fix compile on 2.6.36
[openwrt/svn-archive/archive.git] / libs / glib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=glib
11 PKG_VERSION:=1.2.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.gtk.org/pub/gtk/v1.2 \
16 http://ftp.gwdg.de/pub/misc/grafik/gimp/gtk/v1.2/ \
17 http://ftp.esat.net/mirrors/ftp.gimp.org/pub/gtk/v1.2/ \
18 http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/
19 PKG_MD5SUM:=6fe30dad87c77b91b632def29dd69ef9
20
21 PKG_FIXUP:=libtool
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/glib1
27 SECTION:=libs
28 CATEGORY:=Libraries
29 DEPENDS:=+libpthread
30 TITLE:=The GLib library of C routines
31 URL:=http://www.gtk.org/
32 endef
33
34 define Package/glib1/description
35 GLib is a library containing many useful C routines for things such
36 as trees, hashes, and lists.
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40 TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/lib
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45
46 CONFIGURE_VARS += \
47 glib_cv_prog_cc_ansi_proto=no \
48 glib_cv_has__inline=yes \
49 glib_cv_has__inline__=yes \
50 glib_cv_hasinline=yes \
51 glib_cv_sane_realloc=yes \
52 glib_cv_va_copy=no \
53 glib_cv___va_copy=yes \
54 glib_cv_va_val_copy=yes \
55 glib_cv_rtldglobal_broken=no \
56 glib_cv_uscore=no \
57 glib_cv_func_pthread_mutex_trylock_posix=yes \
58 glib_cv_func_pthread_cond_timedwait_posix=yes \
59 glib_cv_sizeof_gmutex=24 \
60 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" \
61
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1) $(2)/bin
64 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
65 $(CP) $(PKG_BUILD_DIR)/.libs/*.a $(PKG_BUILD_DIR)/*/.libs/*.a $(1)/usr/lib
66 $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(1)/usr/include/glib-1.2/
67 ln -sf $(STAGING_DIR)/usr/bin/glib-config $(2)/bin/
68 $(SED) 's,-I$$$${prefix}/include/glib,-I$(STAGING_DIR)/usr/include/glib,g' $(1)/usr/bin/glib-config
69 $(SED) 's,-I$$$${exec_prefix}/lib/glib,-I$(STAGING_DIR)/usr/lib/glib,g' $(1)/usr/bin/glib-config
70 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/glib-config
71 endef
72
73 define Package/glib1/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(1)/usr/lib/
76 endef
77
78 $(eval $(call BuildPackage,glib1))