feh: libcurl is optional not mandatory
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 11 Sep 2018 20:34:47 +0000 (22:34 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 12 Sep 2018 08:32:51 +0000 (10:32 +0200)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Acked-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/feh/Config.in
package/feh/feh.mk

index 19b4abe0e3f4d05b924914eb4d22e96cfb59114e..277ec891b33179a27867e7b1c8ace8cc869dfbd7 100644 (file)
@@ -8,7 +8,6 @@ config BR2_PACKAGE_FEH
        select BR2_PACKAGE_IMLIB2_PNG
        select BR2_PACKAGE_IMLIB2_JPEG
        select BR2_PACKAGE_IMLIB2_X
-       select BR2_PACKAGE_LIBCURL
        help
          feh is an X11 image viewer aimed mostly at console users.
 
index 403485c5507c38cca6233aa387cbb63382dbb1ea..a192bfbdb0780733b100ae607718234b9b1038cc 100644 (file)
@@ -7,17 +7,25 @@
 FEH_VERSION = 2.27.1
 FEH_SOURCE = feh-$(FEH_VERSION).tar.bz2
 FEH_SITE = http://feh.finalrewind.org
-FEH_DEPENDENCIES = libcurl imlib2 libpng xlib_libXinerama xlib_libXt
+FEH_DEPENDENCIES = imlib2 libpng xlib_libXinerama xlib_libXt
 FEH_LICENSE = MIT
 FEH_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_LIBCURL),y)
+FEH_DEPENDENCIES += libcurl
+FEH_MAKE_OPTS += curl=1
+else
+FEH_MAKE_OPTS += curl=0
+endif
+
 define FEH_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
-               $(MAKE) -C $(@D) all
+               $(MAKE) $(FEH_MAKE_OPTS) -C $(@D) all
 endef
 
 define FEH_INSTALL_TARGET_CMDS
-       $(TARGET_MAKE_ENV) $(MAKE) PREFIX=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install
+       $(TARGET_MAKE_ENV) $(MAKE) $(FEH_MAKE_OPTS) PREFIX=/usr \
+               DESTDIR=$(TARGET_DIR) -C $(@D) install
 endef
 
 $(eval $(generic-package))