2012-10-10 17:56:22 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010-2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This Makefile and the code shipped in src/ is free software, licensed
|
|
|
|
# under the GNU Lesser General Public License, version 2.1 and later.
|
|
|
|
# See src/COPYING for more information.
|
|
|
|
#
|
|
|
|
# Refer to src/COPYRIGHT for copyright statements on the source files.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libiconv
|
2016-05-02 00:46:33 +00:00
|
|
|
PKG_RELEASE:=8
|
2012-10-10 17:56:22 +00:00
|
|
|
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=LGPL-2.1
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
|
2016-06-07 09:42:32 +00:00
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
2012-10-10 17:56:22 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
|
|
|
define Package/libiconv
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2013-02-19 17:22:46 +00:00
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
|
2012-10-10 17:56:22 +00:00
|
|
|
$(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/aclocal
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libiconv/install
|
|
|
|
$(INSTALL_DIR) $(1)/tmp
|
|
|
|
touch $(1)/tmp/.libiconv-placeholder
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Prepare
|
|
|
|
mkdir -p $(HOST_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Configure
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Compile
|
|
|
|
$(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
|
|
|
|
ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
2017-01-10 17:43:57 +00:00
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib
|
|
|
|
$(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOSTPKG)/lib/
|
2012-10-10 17:56:22 +00:00
|
|
|
|
2017-01-10 17:43:57 +00:00
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include
|
|
|
|
$(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOSTPKG)/include/
|
2012-10-10 17:56:22 +00:00
|
|
|
|
2017-01-10 17:43:57 +00:00
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal
|
|
|
|
$(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/
|
2012-10-10 17:56:22 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|
|
|
|
$(eval $(call BuildPackage,libiconv))
|