jpeg: convert to a real package
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 7 Mar 2013 10:18:35 +0000 (10:18 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 9 Mar 2013 21:27:02 +0000 (22:27 +0100)
jpeg is a virtual package, but since it is listed in the dependencies
of other packages, it should obey to all the normal make rules for
packages. Notably, the jpeg-show-depends target is mandatory for the
graph-depends script to work.

Instead to implement such a make target manually, make jpeg a normal
generic-package, except that it doesn't have any source.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/jpeg/jpeg.mk

index 3caacaa7ffa1d26b1925be97e67c8649a7535dc7..962908df39a7002b629229f00849c0af57c7809a 100644 (file)
@@ -1,10 +1,24 @@
 #############################################################
 #
-# jpeg
+# Virtual jpeg package
 #
 #############################################################
 
-jpeg: $(if $(BR2_PACKAGE_JPEG_TURBO),jpeg-turbo,libjpeg)
+JPEG_SOURCE =
 
-host-jpeg: host-libjpeg
-host-jpeg-source: host-libjpeg-source
+ifeq ($(BR2_PACKAGE_JPEG_TURBO),y)
+JPEG_DEPENDENCIES += jpeg-turbo
+endif
+
+ifeq ($(BR2_PACKAGE_LIBJPEG),y)
+JPEG_DEPENDENCIES += libjpeg
+endif
+
+ifeq ($(JPEG_DEPENDENCIES),)
+define JPEG_CONFIGURE_CMDS
+       echo "No JPEG implementation defined. Configuration error"
+       exit 1
+endef
+endif
+
+$(eval $(generic-package))