浏览代码

port cpufrequtils (FIXME)

Still doesn't install, somehow libtool messes things up. Looks a bit
like we have to deliver our own, cross-compiled libbtool sooner or
later.
Phil Sutter 15 年之前
父节点
当前提交
91d3746692
共有 3 个文件被更改,包括 77 次插入0 次删除
  1. 1 0
      package/Config.in
  2. 38 0
      package/cpufrequtils/Makefile
  3. 38 0
      package/cpufrequtils/patches/patch-Makefile

+ 1 - 0
package/Config.in

@@ -149,6 +149,7 @@ endmenu
 menu "Utilities"
 source "package/bc/Config.in"
 source "package/comgt/Config.in"
+source "package/cpufrequtils/Config.in"
 source "package/fbset/Config.in"
 source "package/file/Config.in"
 source "package/findutils/Config.in"

+ 38 - 0
package/cpufrequtils/Makefile

@@ -0,0 +1,38 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		cpufrequtils
+PKG_VERSION:=		007
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		40271a1e1eadce31457e9891cdb071f1
+PKG_DESCR:=		Userspace utilities for the Linux kernel cpufreq subsystem
+PKG_SECTION:=		utils
+PKG_DEPENDS:=		@add dependendant package names@
+PKG_URL:=		http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html
+PKG_SITES:=		http://www.kernel.org/pub/linux/utils/kernel/cpufreq/
+
+# if downloaded package is not ending with .tar.gz use following
+#DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,CPUFREQUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+# use following to add ./configure options
+#CONFIGURE_ARGS+=	--disable-foo
+# overwrite any configure variables
+#CONFIGURE_ENV+=	ac_cv_func_setpgrp_void=yes
+BUILD_STYLE:=		auto
+INSTALL_STYLE:=		auto
+MAKE_FLAGS+=		V=true CROSS=${TARGET_CROSS} LIBTOOL_OPT="--tag CC"
+
+#FIXME: libtool does crap when installing stuff (appends i to the .la file and wonders afterwards why it doesn't exist)
+
+# please install all files and directories to the package dir
+post-install:
+	$(INSTALL_DIR) $(IDIR_CPUFREQUTILS)/usr/bin
+	$(INSTALL_BIN) $(WRKINST)/usr/bin/cpufrequtils $(IDIR_CPUFREQUTILS)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 38 - 0
package/cpufrequtils/patches/patch-Makefile

@@ -0,0 +1,38 @@
+	- allow passing libtool options via environment variables
+	- drop hard-coded -rpath flag when linking with libtool (distracts tagged configs)
+--- cpufrequtils-007.orig/Makefile	2010-01-16 14:47:44.000000000 +0100
++++ cpufrequtils-007/Makefile	2010-01-20 14:09:02.171177883 +0100
+@@ -147,11 +147,11 @@ CFLAGS += $(WARNINGS)
+ 
+ ifeq ($(strip $(V)),false)
+ 	QUIET=@$(PWD)/build/ccdv
+-	LIBTOOL_OPT=--silent
++	LIBTOOL_OPT+=--silent
+ 	HOST_PROGS=build/ccdv
+ else
+ 	QUIET=
+-	LIBTOOL_OPT=
++	LIBTOOL_OPT+=
+ 	HOST_PROGS=
+ endif
+ 
+@@ -185,8 +185,8 @@ libcpufreq.la: $(LIB_OBJS) $(LIB_HEADERS
+ 		echo '*** At least one of /sys support or /proc support MUST be enabled ***'; \
+ 		exit -1; \
+ 	fi;
+-	$(QUIET) $(LIBTOOL) $(LIBTOOL_OPT) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o libcpufreq.la -rpath \
+-		${libdir} -version-info $(LIB_VERSION) $(LIB_PARTS)
++	$(QUIET) $(LIBTOOL) $(LIBTOOL_OPT) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) -rpath ${libdir} $(LDFLAGS) -o libcpufreq.la \
++		-version-info $(LIB_VERSION) $(LIB_PARTS)
+ 
+ libcpufreq: libcpufreq.la
+ 
+@@ -232,7 +232,7 @@ clean:
+ 
+ install-lib:
+ 	$(INSTALL) -d $(DESTDIR)${libdir}
+-	$(LIBTOOL) --mode=install $(INSTALL) libcpufreq.la $(DESTDIR)${libdir}/libcpufreq.la
++	sh -x $(LIBTOOL) --mode=install $(INSTALL) libcpufreq.la $(DESTDIR)${libdir}/libcpufreq.la
+ 	$(INSTALL) -d $(DESTDIR)${includedir}
+ 	$(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
+