[Buildroot] [PATCH] small patches (was: skeleton patch)

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Nov 19 12:27:40 UTC 2008


On Wed, Nov 19, 2008 at 01:21:48PM +0100, Roberto A. Foglietta wrote:
>2008/11/18 Roberto A. Foglietta <roberto.foglietta at gmail.com>:
>> Hi
>>
>>  a) mkdir -p does not hurt but probably it is optional
>>  b) s,cp -a,cp -af, because overwriting is necessary
>>
>> --- package/freetype/freetype.mk        (revision 24038)
>> +++ package/freetype/freetype.mk        (working copy)
>> @@ -15,7 +15,8 @@
>>  $(eval $(call AUTOTARGETS,package,freetype))
>>
>>  $(FREETYPE_HOOK_POST_BUILD):
>> -       -cp -a $(FREETYPE_DIR)/objs/.libs/libfreetype.so* $(TARGET_DIR)/usr/lib/
>> +       mkdir -p $(TARGET_DIR)/usr/lib
>> +       cp -af $(FREETYPE_DIR)/objs/.libs/libfreetype.so* $(TARGET_DIR)/usr/lib
>>        $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libfreetype.so
>>        $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g"
>> $(FREETYPE_DIR)/builds/unix/freetype-config
>>        $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g"
>> $(FREETYPE_DIR)/builds/unix/freetype-config
>>
>
> Patch attached
>
>-- 
>/roberto

>Index: package/freetype/freetype.mk
>===================================================================
>--- package/freetype/freetype.mk	(revision 24099)
>+++ package/freetype/freetype.mk	(working copy)
>@@ -15,7 +15,8 @@
> $(eval $(call AUTOTARGETS,package,freetype))
> 
> $(FREETYPE_HOOK_POST_BUILD):
>-	-cp -a $(FREETYPE_DIR)/objs/.libs/libfreetype.so* $(TARGET_DIR)/usr/lib/
>+	mkdir -p $(TARGET_DIR)/usr/lib
>+	cp -af $(FREETYPE_DIR)/objs/.libs/libfreetype.so* $(TARGET_DIR)/usr/lib

This will not work properly for a number of host systems (see ML archives)
Either use "cp -dpRf" or the preferred $(INSTALL), like:

	$(INSTALL) -d $(TARGET_DIR)/usr/lib
	$(INSTALL) -m0644 $(FREETYPE_DIR)/objs/.libs/libfreetype.so* $(TARGET_DIR)/usr/lib/

> 	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libfreetype.so
> 	$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(FREETYPE_DIR)/builds/unix/freetype-config
> 	$(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(FREETYPE_DIR)/builds/unix/freetype-config



More information about the buildroot mailing list