include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/tint2
SECTION:=xorg-app
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/
$(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))