b79173707b30482da9dd06e33a38917f144f84b7
[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
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/glib1
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libpthread
29 TITLE:=The GLib library of C routines
30 URL:=http://www.gtk.org/
31 endef
32
33 define Package/glib1/description
34 GLib is a library containing many useful C routines for things such
35 as trees, hashes, and lists.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41 --enable-shared \
42 --enable-static \
43
44 CONFIGURE_VARS += \
45 glib_cv_prog_cc_ansi_proto=no \
46 glib_cv_has__inline=yes \
47 glib_cv_has__inline__=yes \
48 glib_cv_hasinline=yes \
49 glib_cv_sane_realloc=yes \
50 glib_cv_va_copy=no \
51 glib_cv___va_copy=yes \
52 glib_cv_va_val_copy=yes \
53 glib_cv_rtldglobal_broken=no \
54 glib_cv_uscore=no \
55 glib_cv_func_pthread_mutex_trylock_posix=yes \
56 glib_cv_func_pthread_cond_timedwait_posix=yes \
57 glib_cv_sizeof_gmutex=24 \
58 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" \
59
60 TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/lib
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
63 endef
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1) $(2)/bin
67 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
68 $(CP) $(PKG_BUILD_DIR)/.libs/*.a $(PKG_BUILD_DIR)/*/.libs/*.a $(1)/usr/lib
69 $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(1)/usr/include/glib-1.2/
70 ln -sf $(STAGING_DIR)/usr/bin/glib-config $(2)/bin/
71 $(SED) 's,-I$$$${prefix}/include/glib,-I$(STAGING_DIR)/usr/include/glib,g' $(1)/usr/bin/glib-config
72 $(SED) 's,-I$$$${exec_prefix}/lib/glib,-I$(STAGING_DIR)/usr/lib/glib,g' $(1)/usr/bin/glib-config
73 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/glib-config
74 endef
75
76 define Package/glib1/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,glib1))