tint2: Use the cmake framework
authorMichael Büsch <mb@bu3sch.de>
Sat, 5 Feb 2011 19:52:37 +0000 (19:52 +0000)
committerMichael Büsch <mb@bu3sch.de>
Sat, 5 Feb 2011 19:52:37 +0000 (19:52 +0000)
SVN-Revision: 25377

desktop/apps/tint2/Makefile

index 436e6015ded710a9e4685812ae629f7fa50484de..2f010c38df5322ed6b27351e4cd441e70e9cce75 100644 (file)
@@ -22,6 +22,7 @@ PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/tint2
   SECTION:=xorg-app
@@ -38,39 +39,10 @@ define Package/tint2/description
 endef
 
 EXTRA_CFLAGS:=\
-       -I$(STAGING_DIR)/usr/include \
        -I$(STAGING_DIR)/usr/include/cairo \
        -I$(STAGING_DIR)/usr/include/pango-1.0 \
        -I$(STAGING_DIR)/usr/include/glib-2.0
 
-MAKE_FLAGS+=\
-       VERBOSE=1
-
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); \
-               cmake   -DCMAKE_SYSTEM_NAME=Linux \
-                       -DCMAKE_SYSTEM_VERSION=1 \
-                       -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
-                       -DCMAKE_BUILD_TYPE=Release \
-                       -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-                       -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-                       -DCMAKE_C_COMPILER=$(TOOLCHAIN_DIR)/bin/$(TARGET_CC) \
-                       -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
-                       -DCMAKE_CXX_COMPILER=$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX) \
-                       -DCMAKE_CXX_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
-                       -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
-                       -DCMAKE_MODULE_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
-                       -DCMAKE_SHARED_LINKER_FLAGS="$(TARGET_LDFLAGS)" \
-                       -DCMAKE_FIND_ROOT_PATH=$(STAGING_DIR) \
-                       -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=$(STAGING_DIR_HOST) \
-                       -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=$(STAGING_DIR) \
-                       -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=$(STAGING_DIR) \
-                       -DCMAKE_STRIP=$(STRIP) \
-                       -DCMAKE_INSTALL_PREFIX=/usr \
-               . \
-       )
-endef
-
 define Package/tint2/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share $(1)/etc/xdg/tint2
        $(CP) ./files/tint2rc $(1)/etc/xdg/tint2/
@@ -78,16 +50,4 @@ define Package/tint2/install
        $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
 endef
 
-CMAKE_MAJOR:=$$$$(cmake --version | cut -d' ' -f 3 | cut -d'.' -f1)
-CMAKE_MINOR:=$$$$(cmake --version | cut -d' ' -f 3 | cut -d'.' -f2)
-
-define Require/cmake26
-       [ "$(CMAKE_MAJOR)" -gt 2 ] || \
-       [ "$(CMAKE_MAJOR)" -eq 2 -a "$(CMAKE_MINOR)" -ge 6 ]
-endef
-
-$(eval $(call Require,cmake26, \
-       Please install CMake version 2.6 or later. \
-))
-
 $(eval $(call BuildPackage,tint2))