[packages] glib2 fixes:
* build our own glib-genmarshal and remove requirement for a host one * add a patch to disable docs and tests * add libtool fixes * tweak sed-ifications for pkgconfig files * cleanup git-svn-id: svn://svn.openwrt.org/openwrt/packages@9106 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e9cc0e38f7
commit
a5776b7a6e
@ -15,13 +15,12 @@ PKG_RELEASE:=1
|
|||||||
PKG_SOURCE:=glib-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=glib-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.gtk.org/pub/glib/2.12/
|
PKG_SOURCE_URL:=ftp://ftp.gtk.org/pub/glib/2.12/
|
||||||
PKG_MD5SUM:=6c6a61e4b08fb4b110ca7953f71c8b5e
|
PKG_MD5SUM:=6c6a61e4b08fb4b110ca7953f71c8b5e
|
||||||
PKG_CAT:=zcat
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
||||||
define Package/glib2
|
define Package/glib2
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
@ -31,56 +30,67 @@ define Package/glib2
|
|||||||
URL:=http://www.gtk.org/
|
URL:=http://www.gtk.org/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
$(call Build/Configure/Default, \
|
define Build/Configure
|
||||||
--enable-shared \
|
|
||||||
--enable-static \
|
|
||||||
LDFLAGS="-L$(STAGING_DIR)/usr/lib/libiconv/lib \
|
|
||||||
-L$(STAGING_DIR)/usr/lib/libintl/lib" \
|
|
||||||
CPPFLAGS="-I$(STAGING_DIR)/usr/lib/libiconv/include \
|
|
||||||
-I$(STAGING_DIR)/usr/lib/libintl/include" \
|
|
||||||
, \
|
|
||||||
glib_cv_stack_grows=no \
|
|
||||||
glib_cv_uscore=no \
|
|
||||||
)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
mkdir -p $(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME)
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
( cd $(PKG_BUILD_DIR); ./configure \
|
||||||
all install
|
--target=$(GNU_HOST_NAME) \
|
||||||
endef
|
--host=$(GNU_HOST_NAME) \
|
||||||
|
--build=$(GNU_HOST_NAME) \
|
||||||
|
--prefix=$(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME) \
|
||||||
|
--disable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--enable-debug=no \
|
||||||
|
);
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) install clean
|
||||||
|
|
||||||
|
$(call Build/Configure/Default, \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--enable-debug=no \
|
||||||
|
, \
|
||||||
|
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
|
||||||
|
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libintl/include" \
|
||||||
|
LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
|
||||||
|
LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libintl/lib" \
|
||||||
|
glib_cv_stack_grows=no \
|
||||||
|
glib_cv_uscore=no \
|
||||||
|
ac_cv_path_GLIB_GENMARSHAL=$(PKG_BUILD_DIR)/build/$(GNU_HOST_NAME)/bin/glib-genmarshal \
|
||||||
|
);
|
||||||
|
$(call libtool_disable_rpath)
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) all
|
||||||
|
$(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
mkdir -p $(STAGING_DIR)/usr/include
|
mkdir -p $(STAGING_DIR)/usr/include
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/glib-2.0 $(STAGING_DIR)/usr/include/
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/glib-2.0 $(STAGING_DIR)/usr/include/
|
||||||
$(CP) $(PKG_BUILD_DIR)/glibconfig.h $(STAGING_DIR)/usr/include/glib-2.0
|
|
||||||
mkdir -p $(STAGING_DIR)/usr/lib
|
mkdir -p $(STAGING_DIR)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 $(STAGING_DIR)/usr/lib/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,object,thread}-2.0.{a,so*} $(STAGING_DIR)/usr/lib/
|
||||||
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(STAGING_DIR)/usr/lib/pkgconfig
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,object,thread}-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig
|
||||||
$(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/{libglib,libgmodule,libgobject,libgthread}-2.0.la
|
$(SED) 's,^includedir=.*,includedir=$(STAGING_DIR)/usr/include,g' $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,object,thread}-2.0.pc
|
||||||
$(SED) "s,"prefix\=/usr",prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/{glib,gmodule,gmodule-export,gmodule-no-export,gobject,gthread}-2.0.pc
|
$(SED) 's,^libdir=.*,libdir=$(STAGING_DIR)/usr/lib,g' $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,object,thread}-2.0.pc
|
||||||
$(SED) "s,"exec_prefix\=/usr",exec_prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/{glib,gmodule,gmodule-export,gmodule-no-export,gobject,gthread}-2.0.pc
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/UninstallDev
|
define Build/UninstallDev
|
||||||
rm -rf \
|
rm -rf $(STAGING_DIR)/usr/include/glib-2.0 \
|
||||||
$(STAGING_DIR)/usr/include/glib-2.0 \
|
|
||||||
$(STAGING_DIR)/usr/lib/libg*-2.0.* \
|
|
||||||
$(STAGING_DIR)/usr/lib/glib-2.0 \
|
$(STAGING_DIR)/usr/lib/glib-2.0 \
|
||||||
$(STAGING_DIR)/usr/lib/pkgconfig/g*-2.0.pc
|
$(STAGING_DIR)/usr/lib/libg{lib,module,object,thread}-2.0.{a,so*} \
|
||||||
|
$(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,object,thread}-2.0.pc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/glib2/install
|
|
||||||
|
define Package/glib2/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libg*-2.0.so* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libg*-2.0.so* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,glib2))
|
$(eval $(call BuildPackage,glib2))
|
||||||
|
|
||||||
$(eval $(call RequireCommand,glib-genmarshal, \
|
|
||||||
$(PKG_NAME) requires the glib2 dev (named like libglib2.0-dev, \
|
|
||||||
depending of your package manager) package be installed on the host-system. \
|
|
||||||
))
|
|
||||||
|
12
libs/glib2/patches/001-no_docs_and_tests.patch
Normal file
12
libs/glib2/patches/001-no_docs_and_tests.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -ruN glib-2.12.12-old/Makefile.in glib-2.12.12-new/Makefile.in
|
||||||
|
--- glib-2.12.12-old/Makefile.in 2007-05-02 01:20:29.000000000 +0200
|
||||||
|
+++ glib-2.12.12-new/Makefile.in 2007-08-18 22:02:49.000000000 +0200
|
||||||
|
@@ -239,7 +239,7 @@
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = 1.7
|
||||||
|
|
||||||
|
-SUBDIRS = . m4macros glib gobject gmodule gthread tests build po docs
|
||||||
|
+SUBDIRS = . m4macros glib gobject gmodule gthread build po
|
||||||
|
|
||||||
|
bin_SCRIPTS = glib-gettextize
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user