mirror of
				https://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 07:21:07 +00:00 
			
		
		
		
	Split the xcrypt package build into two Makefiles and a common part for
the version definition in order to work-around build problems when
combining VARIANT with BUILDONLY and scoped InstallDev.
This is done in order to skip build of libcrypt-compat in case we are
not building against glibc in order to prevent libcrypt.so shared
library being present in staging_dir and by that breaking multiple
packages which then will link against it.
Fixes: e3cf7088f1 ("libcrypt-compat: introduce package")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/19353
Signed-off-by: Robert Marko <robimarko@gmail.com>
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
include $(TOPDIR)/rules.mk
 | 
						|
include ../libxcrypt-common.mk
 | 
						|
 | 
						|
PKG_INSTALL:=1
 | 
						|
PKG_BUILD_PARALLEL:=1
 | 
						|
PKG_BUILD_DIR:=$(BUILD_DIR)/libcrypt-compat/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
 | 
						|
 | 
						|
include $(INCLUDE_DIR)/package.mk
 | 
						|
 | 
						|
define Package/libcrypt-compat
 | 
						|
$(Package/libxcrypt/Default)
 | 
						|
  TITLE+= - libc compatibility
 | 
						|
  DEPENDS:=@USE_GLIBC
 | 
						|
endef
 | 
						|
 | 
						|
Package/libcrypt-compat/description=$(Package/libxcrypt/description)
 | 
						|
 | 
						|
CONFIGURE_ARGS += \
 | 
						|
	--with-pic \
 | 
						|
	--enable-year2038 \
 | 
						|
	--disable-xcrypt-compat-files \
 | 
						|
	--enable-obsolete-api=glibc \
 | 
						|
	--enable-hashes=glibc
 | 
						|
 | 
						|
define Package/libcrypt-compat/install
 | 
						|
	$(INSTALL_DIR) $(1)/usr/lib
 | 
						|
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.so.* $(1)/usr/lib/
 | 
						|
endef
 | 
						|
 | 
						|
define Build/InstallDev
 | 
						|
	$(INSTALL_DIR) $(1)/usr/include
 | 
						|
	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
 | 
						|
	$(INSTALL_DIR) $(1)/usr/lib
 | 
						|
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la,so*} $(1)/usr/lib/
 | 
						|
	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
 | 
						|
	# libcrypt.pc is symlink to libxcrypt.pc
 | 
						|
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxcrypt.pc $(1)/usr/lib/pkgconfig/libcrypt.pc
 | 
						|
endef
 | 
						|
 | 
						|
$(eval $(call BuildPackage,libcrypt-compat))
 |