From: Joseph Roback <openwrt-devel@roback.cc>
[openwrt.org/packages.git] / libs / jpeg / Makefile
blob:a/libs/jpeg/Makefile -> blob:b/libs/jpeg/Makefile
--- a/libs/jpeg/Makefile
+++ b/libs/jpeg/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -16,8 +16,11 @@
         ftp://ftp.uu.net/graphics/jpeg/
 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
 
-PKG_FIXUP:=libtool
+PKG_LICENSE:=FREE
+PKG_LICENSE_FILES:=README
+
 PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DEPENDS:=libltdl
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -54,21 +57,24 @@
 
 define Build/Prepare
 	$(call Build/Prepare/Default)
-	# replace the old upstream libtool stuff with our own
-	ln -sf $(STAGING_DIR)/host/bin/libtool $(PKG_BUILD_DIR)/
-	ln -sf $(STAGING_DIR)/host/share/libtool/config.sub $(PKG_BUILD_DIR)/
-	ln -sf $(STAGING_DIR)/host/share/libtool/config.guess $(PKG_BUILD_DIR)/
-	ln -sf $(STAGING_DIR)/host/share/libtool/ltmain.sh $(PKG_BUILD_DIR)/
-	ln -sf /bin/true $(PKG_BUILD_DIR)/ltconfig
+	(cd $(PKG_BUILD_DIR); \
+		rm -f ltconfig ltmain.sh libtool; \
+		ln -s `which true` ltconfig; \
+		ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
+	)
 endef
 
 define Build/Compile
 	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
-	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
 		LIBTOOL="./libtool --tag=CC" \
 		prefix="$(PKG_INSTALL_DIR)/usr" \
 		exec_prefix="$(PKG_INSTALL_DIR)/usr" \
-		all install install-headers install-lib
+		all
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		prefix="$(PKG_INSTALL_DIR)/usr" \
+		exec_prefix="$(PKG_INSTALL_DIR)/usr" \
+		install install-headers install-lib
 endef
 
 define Build/InstallDev

comments