我正在尝试为 directfb 教程添加一个包。我按照http://wiki.openwrt.org/doc/devel/packages中的说明进行操作。目前该包已成功下载到 dl 文件夹,甚至在 build 目录中编译,但是当我将 install 部分添加到 makefile 时,出现依赖错误:
Package directfb_tutorials is missing dependencies for the following libraries:
libdirect-1.4.so.0
libdirectfb-1.4.so.0
libfusion-1.4.so.0
libpthread.so.0
包 Makefile(我把它放在 package/utils/directfb_tutorials/ 下):
include $(TOPDIR)/rules.mk
PKG_NAME:=DFBTutorials
PKG_VERSION:=0.5.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.directfb.org/downloads/Extras/
PKG_MD5SUM:=13e443a64bddd68835b574045d9025e9
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/directfb_tutorials
TITLE:=directfb_tutorials
SECTION:=utils
CATEGORY:=Utilities
URL:=http://directfb.org
DEPENDS:=+libdirectfb
endef
define Package/directfb_tutorials/description
DirectFB Tutorials
endef
define Build/Configure
$(call Build/Configure/Default,)
endef
define Package/directfb_tutorials/Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)
endef
define Package/directfb_tutorials/install
$(INSTALL_DIR) $(1)/bin/dfb_tutorials
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/image/image $(1)/bin/dfb_tutorials/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/simple/simple $(1)/bin/dfb_tutorials/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/keybuffer/keybuffer $(1)/bin/dfb_tutorials/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/text/text $(1)/bin/dfb_tutorials/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sprite/sprite $(1)/bin/dfb_tutorials/
endef
$(eval $(call BuildPackage,directfb_tutorials))
将 +libpthread 添加到 DEPENDS 部分时,libpthread.so.0 不会出现在上面的缺少依赖项错误消息中:
Package directfb_tutorials is missing dependencies for the following libraries:
libdirect-1.4.so.0
libdirectfb-1.4.so.0
libfusion-1.4.so.0
是因为我必须以错误的方式使用 DEPENDS (DEPENDS= +libdirectfb)。如何判断 DEPENDS 标志的库的正确名称?将库安装到 /usr/lib 而不仅仅是 /lib(如 libpthread)这一事实是否有所不同?
提前致谢, 托默