| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= glib
|
|---|
| 10 | PKG_VERSION:= 1.2.10
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 6fe30dad87c77b91b632def29dd69ef9
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= ftp://ftp.gtk.org/pub/gtk/v1.2 \
|
|---|
| 15 | http://ftp.gwdg.de/pub/misc/grafik/gimp/gtk/v1.2/ \
|
|---|
| 16 | http://ftp.esat.net/mirrors/ftp.gimp.org/pub/gtk/v1.2/ \
|
|---|
| 17 | http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/
|
|---|
| 18 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | include $(TOPDIR)/mk/package.mk
|
|---|
| 22 |
|
|---|
| 23 | $(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 24 |
|
|---|
| 25 | $(WRKBUILD)/.configured:
|
|---|
| 26 | (cd $(WRKBUILD); rm -rf config.{cache,status}; \
|
|---|
| 27 | glib_cv_sizeof_gmutex=24 \
|
|---|
| 28 | ac_cv_sizeof_char=1 \
|
|---|
| 29 | ac_cv_sizeof_short=2 \
|
|---|
| 30 | ac_cv_sizeof_int=4 \
|
|---|
| 31 | ac_cv_sizeof_long=4 \
|
|---|
| 32 | ac_cv_sizeof_long_long=8 \
|
|---|
| 33 | ac_cv_sizeof_void_p=4 \
|
|---|
| 34 | glib_cv_prog_cc_ansi_proto="no" \
|
|---|
| 35 | glib_cv_has__inline="yes" \
|
|---|
| 36 | glib_cv_has__inline__="yes" \
|
|---|
| 37 | glib_cv_hasinline="yes" \
|
|---|
| 38 | glib_cv_sane_realloc="yes" \
|
|---|
| 39 | glib_cv_va_copy="no" \
|
|---|
| 40 | glib_cv___va_copy="yes" \
|
|---|
| 41 | glib_cv_va_val_copy="yes" \
|
|---|
| 42 | glib_cv_rtldglobal_broken="no" \
|
|---|
| 43 | glib_cv_uscore="no" \
|
|---|
| 44 | ac_cv_func_getpwuid_r="yes" \
|
|---|
| 45 | glib_cv_func_pthread_mutex_trylock_posix="yes" \
|
|---|
| 46 | glib_cv_func_pthread_cond_timedwait_posix="yes" \
|
|---|
| 47 | glib_cv_sizeof_gmutex="24" \
|
|---|
| 48 | 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" \
|
|---|
| 49 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 50 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 51 | LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
|
|---|
| 52 | ./configure \
|
|---|
| 53 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 54 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 55 | --build=$(GNU_HOST_NAME) \
|
|---|
| 56 | --program-prefix="" \
|
|---|
| 57 | --program-suffix="" \
|
|---|
| 58 | --prefix=/usr \
|
|---|
| 59 | --exec-prefix=/usr \
|
|---|
| 60 | --bindir=/usr/bin \
|
|---|
| 61 | --sbindir=/usr/sbin \
|
|---|
| 62 | --libexecdir=/usr/lib \
|
|---|
| 63 | --sysconfdir=/etc \
|
|---|
| 64 | --datadir=/usr/share \
|
|---|
| 65 | --localstatedir=/var \
|
|---|
| 66 | --mandir=/usr/man \
|
|---|
| 67 | --infodir=/usr/info \
|
|---|
| 68 | --disable-nls \
|
|---|
| 69 | --enable-largefile \
|
|---|
| 70 | --enable-shared=yes \
|
|---|
| 71 | --enable-static=yes \
|
|---|
| 72 | );
|
|---|
| 73 | touch $@
|
|---|
| 74 |
|
|---|
| 75 | $(WRKBUILD)/.built:
|
|---|
| 76 | rm -rf $(WRKINST)
|
|---|
| 77 | mkdir -p $(WRKINST)
|
|---|
| 78 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 79 | DESTDIR="$(WRKINST)" \
|
|---|
| 80 | install
|
|---|
| 81 | touch $@
|
|---|
| 82 |
|
|---|
| 83 | $(IPKG_GLIB1):
|
|---|
| 84 | install -m0755 -d $(IDIR_GLIB1)/usr/lib
|
|---|
| 85 | $(CP) $(WRKINST)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/
|
|---|
| 86 | $(RSTRIP) $(IDIR_GLIB1)
|
|---|
| 87 | $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR)
|
|---|
| 88 |
|
|---|
| 89 | $(STAGING_DIR)/usr/lib/libglib.so: $(WRKBUILD)/.built
|
|---|
| 90 | mkdir -p $(STAGING_DIR)/usr/bin
|
|---|
| 91 | $(CP) $(WRKINST)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/
|
|---|
| 92 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 93 | $(CP) $(WRKINST)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/
|
|---|
| 94 | $(CP) $(WRKBUILD)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
|
|---|
| 95 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 96 | $(CP) $(WRKINST)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/
|
|---|
| 97 | $(CP) $(WRKINST)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/
|
|---|
| 98 | $(CP) $(WRKINST)/usr/lib/glib $(STAGING_DIR)/usr/lib/
|
|---|
| 99 | mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
|---|
| 100 | $(CP) $(WRKINST)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|---|
| 101 | touch $(STAGING_DIR)/usr/lib/libglib.so
|
|---|
| 102 |
|
|---|
| 103 | install-dev: $(STAGING_DIR)/usr/lib/libglib.so
|
|---|
| 104 |
|
|---|
| 105 | uninstall-dev:
|
|---|
| 106 | rm -rf $(STAGING_DIR)/usr/bin/glib-config
|
|---|
| 107 | rm -rf $(STAGING_DIR)/usr/include/glib-1.2
|
|---|
| 108 | rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so}
|
|---|
| 109 | rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.*
|
|---|
| 110 | rm -rf $(STAGING_DIR)/usr/lib/glib
|
|---|
| 111 | rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc
|
|---|
| 112 |
|
|---|
| 113 | compile-targets: install-dev
|
|---|
| 114 | clean-targets: uninstall-dev
|
|---|