buildroot/package/libsoil/libsoil.mk
Maxime Hadjinlian 514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00

51 lines
1.5 KiB
Makefile

################################################################################
#
# libsoil
#
################################################################################
LIBSOIL_VERSION = 20080707
LIBSOIL_SOURCE = soil.zip
LIBSOIL_SITE = http://www.lonesock.net/files
LIBSOIL_INSTALL_STAGING = YES
LIBSOIL_DEPENDENCIES = libgl
LIBSOIL_LICENSE = Public Domain, MIT
LIBSOIL_LICENSE_FILES = src/stb_image_aug.c src/image_helper.c
LIBSOIL_MAKEFILE = ../projects/makefile/alternate_Makefile.txt
define LIBSOIL_EXTRACT_CMDS
$(UNZIP) -d $(@D) $(LIBSOIL_DL_DIR)/$(LIBSOIL_SOURCE)
mv $(@D)/Simple\ OpenGL\ Image\ Library/* $(@D)
endef
# gnu patch < v2.5.9 doesn't correctly handle spaces in file names,
# and we want to patch the 'alternate Makefile.txt' file, so rename
# the file (and patch the renamed file) for compatibility with older
# distributions
define REMOVE_SPACE_FROM_FILENAME
cd $(@D)/projects/makefile/ && \
mv "alternate Makefile.txt" alternate_Makefile.txt
endef
LIBSOIL_POST_EXTRACT_HOOKS += REMOVE_SPACE_FROM_FILENAME
define LIBSOIL_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \
-C $(@D)/src
endef
define LIBSOIL_INSTALL_STAGING_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \
DESTDIR=$(STAGING_DIR) install \
INSTALL=$(INSTALL) \
-C $(@D)/src
endef
define LIBSOIL_INSTALL_TARGET_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \
DESTDIR=$(TARGET_DIR) install \
INSTALL=$(INSTALL) \
-C $(@D)/src
endef
$(eval $(generic-package))