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