Multiple changes to gnu_configure style packages, as well as other
changes to allow better linking flags in future packages through pkg-config. Removed the PKGFS_TEMPLATESDIR, PKGFS_DEPSDIR and others that weren't too useful. Instead use a single PKGFS_DISTRIBUTIONDIR on which all those directories/files can be found. Added a template helper for pkg-config, that changes a pkg-config file after it's installed to produce correct linker paths. More helpers could be added in the future. --HG-- extra : convert_revision : a42fd2e72915a4219714de92579011bca2b0f4a6
This commit is contained in:
		
							
								
								
									
										26
									
								
								helper-templates/pkg-config-transform.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								helper-templates/pkg-config-transform.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
#! /bin/sh
 | 
			
		||||
#
 | 
			
		||||
# This script will transform the pkg-config files with correct
 | 
			
		||||
# directories pointing at PKGFS_MASTERDIR specified in the config file.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
: ${sed_cmd:=/usr/bin/sed}
 | 
			
		||||
: ${mv_cmd:=/bin/mv}
 | 
			
		||||
 | 
			
		||||
transform_pkgconfig_file()
 | 
			
		||||
{
 | 
			
		||||
	local file="$1"
 | 
			
		||||
 | 
			
		||||
	[ -z "$file" ] && return 1
 | 
			
		||||
 | 
			
		||||
	$sed_cmd	\
 | 
			
		||||
		-e "s|^exec_prefix=$PKGFS_DESTDIR/$pkgname.*$|exec_prefix=\${prefix}|" \
 | 
			
		||||
		-e "s|-L\${libdir}|-L\${libdir} -Wl,-R\${libdir}|" \
 | 
			
		||||
		$file > $file.in && \
 | 
			
		||||
	$mv_cmd $file.in $file
 | 
			
		||||
	[ "$?" -eq 0 ] && \
 | 
			
		||||
		echo "=> Transformed pkg-config file: $(basename $file)."
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
transform_pkgconfig_file "$1"
 | 
			
		||||
exit 0
 | 
			
		||||
		Reference in New Issue
	
	Block a user