ffe47b88ecb4d0e9f9455a4f7a74088966a305cf
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=glib
12 PKG_VERSION:=1.2.10
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.gtk.org/pub/gtk/v1.2 \
17 http://ftp.gwdg.de/pub/misc/grafik/gimp/gtk/v1.2/ \
18 http://ftp.esat.net/mirrors/ftp.gimp.org/pub/gtk/v1.2/ \
19 http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/
20 PKG_MD5SUM:=6fe30dad87c77b91b632def29dd69ef9
21
22 PKG_FIXUP = libtool
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 CONFIGURE_ARGS += \
40 --enable-shared \
41 --enable-static \
42
43 CONFIGURE_VARS += \
44 glib_cv_prog_cc_ansi_proto=no \
45 glib_cv_has__inline=yes \
46 glib_cv_has__inline__=yes \
47 glib_cv_hasinline=yes \
48 glib_cv_sane_realloc=yes \
49 glib_cv_va_copy=no \
50 glib_cv___va_copy=yes \
51 glib_cv_va_val_copy=yes \
52 glib_cv_rtldglobal_broken=no \
53 glib_cv_uscore=no \
54 glib_cv_func_pthread_mutex_trylock_posix=yes \
55 glib_cv_func_pthread_cond_timedwait_posix=yes \
56 glib_cv_sizeof_gmutex=24 \
57 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" \
58
59 define Build/Compile
60 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
61 endef
62
63 define Build/InstallDev
64 $(INSTALL_DIR) $(1) $(2)/bin
65 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
66 $(CP) $(PKG_BUILD_DIR)/.libs/*.a $(PKG_BUILD_DIR)/*/.libs/*.a $(1)/usr/lib
67 $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(1)/usr/include/glib-1.2/
68 ln -sf $(STAGING_DIR)/usr/bin/glib-config $(2)/bin/
69 $(SED) 's,-I$$$${prefix}/include/glib,-I$(STAGING_DIR)/usr/include/glib,g' $(1)/usr/bin/glib-config
70 $(SED) 's,-I$$$${exec_prefix}/lib/glib,-I$(STAGING_DIR)/usr/lib/glib,g' $(1)/usr/bin/glib-config
71 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/glib-config
72 endef
73
74 define Package/glib1/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,glib1))