libpng: convert old-style hook to new-style hook
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Sep 2010 20:45:57 +0000 (22:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Sep 2010 17:26:49 +0000 (19:26 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libpng/libpng.mk

index a81d9513c5ba7e344d4f7009cc7a2c584c2183ea..5608f4fce12cba1e9e369523fa93eeb8bc13f331 100644 (file)
@@ -14,14 +14,15 @@ LIBPNG_DEPENDENCIES = host-pkg-config zlib
 HOST_LIBPNG_CONF_OPT = --without-libpng-compat
 HOST_LIBPNG_DEPENDENCIES = host-pkg-config host-zlib
 
-$(eval $(call AUTOTARGETS,package,libpng))
-$(eval $(call AUTOTARGETS,package,libpng,host))
-
-$(LIBPNG_HOOK_POST_INSTALL):
+define LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
        $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
                -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
                -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng12\',g" \
                -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
                $(STAGING_DIR)/usr/bin/libpng12-config
-       touch $@
+endef
 
+LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
+
+$(eval $(call AUTOTARGETS,package,libpng))
+$(eval $(call AUTOTARGETS,package,libpng,host))