e73287b6690271c180097d6de0ddc93fc081ca91
[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 PKG_CAT:=zcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/glib1
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libpthread
32 TITLE:=The GLib library of C routines
33 DESCRIPTION:=\
34 GLib is a library containing many useful C routines for things such \\\
35 as trees, hashes, and lists.
36 URL:=http://www.gtk.org/
37 endef
38
39 # commas are interpreted by the $(call ...) macro, so define an intermediate variable holding our settings
40 PKG_CONFIGURE_VARS:=\
41 glib_cv_prog_cc_ansi_proto=no \
42 glib_cv_has__inline=yes \
43 glib_cv_has__inline__=yes \
44 glib_cv_hasinline=yes \
45 glib_cv_sane_realloc=yes \
46 glib_cv_va_copy=no \
47 glib_cv___va_copy=yes \
48 glib_cv_va_val_copy=yes \
49 glib_cv_rtldglobal_broken=no \
50 glib_cv_uscore=no \
51 glib_cv_func_pthread_mutex_trylock_posix=yes \
52 glib_cv_func_pthread_cond_timedwait_posix=yes \
53 glib_cv_sizeof_gmutex=24 \
54 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" \
55
56 define Build/Configure
57 $(call Build/Configure/Default, \
58 --enable-shared \
59 --enable-static \
60 , \
61 $(PKG_CONFIGURE_VARS) \
62 )
63 endef
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 install
69 endef
70
71 define Build/InstallDev
72 mkdir -p $(STAGING_DIR)/usr/bin
73 $(CP) $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/
74 mkdir -p $(STAGING_DIR)/usr/include
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/
76 $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
77 mkdir -p $(STAGING_DIR)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/
81 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
83 endef
84
85 define Build/UninstallDev
86 rm -rf \
87 $(STAGING_DIR)/usr/bin/glib-config \
88 $(STAGING_DIR)/usr/include/glib-1.2 \
89 $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so} \
90 $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.* \
91 $(STAGING_DIR)/usr/lib/glib \
92 $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc
93 endef
94
95 define Package/glib1/install
96 $(INSTALL_DIR) $(1)/usr/lib
97 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(1)/usr/lib/
98 endef
99
100 $(eval $(call BuildPackage,glib1))