blob: 8b73e442c27424327cd492c82e3c98bcd32d392d [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2008-2015 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=libtool
10PKG_CPE_ID:=cpe:/a:gnu:libtool
11PKG_VERSION:=2.4.7
12
13PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
15PKG_HASH:=04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8
16
17HOST_BUILD_PARALLEL:=1
18
19include $(INCLUDE_DIR)/host-build.mk
20
21export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
22
23HOST_CONFIGURE_VARS += \
24 lt_cv_sys_dlsearch_path=""
25
26define Host/Bootstrap
27 ( \
28 cd $(HOST_BUILD_DIR); \
29 $(AM_TOOL_PATHS) \
30 ./bootstrap \
31 --copy \
32 --force \
33 --skip-git \
34 --skip-po \
35 --gnulib-srcdir=$(GNULIB_SRCDIR) \
36 )
37endef
38
39define Host/Prepare
40 $(call Host/Prepare/Default)
41 $(call Host/Uninstall)
42 $(if $(QUILT),,$(call Host/Bootstrap))
43endef
44
45define Host/Configure
46 $(if $(QUILT),$(call Host/Bootstrap))
47 $(call Host/Configure/Default)
48endef
49
50define Host/Install
51 $(call Host/Compile/Default,install)
52 $(SED) 's,\(hardcode_into_libs\)=yes,\1=no,g' $(STAGING_DIR_HOST)/bin/libtool
53 $(CP) $(STAGING_DIR_HOST)/bin/libtool $(STAGING_DIR_HOST)/bin/libtool-ucxx
54 $(SED) 's,-lstdc++,-luClibc++,g' $(STAGING_DIR_HOST)/bin/libtool-ucxx
55endef
56
57define Host/Uninstall
58 -$(call Host/Compile/Default,uninstall)
59 (cd $(STAGING_DIR_HOST)/share/aclocal/ && rm -f libtool.m4 ltdl.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4)
60endef
61
62$(eval $(call HostBuild))