Root/libnsfb/Makefile

Source at commit 1b3135c created 12 years 5 months ago.
By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries
1include $(TOPDIR)/rules.mk
2
3PKG_NAME:=libnsfb
4PKG_REV:=10618
5PKG_VERSION:=r$(PKG_REV)
6PKG_RELEASE:=1
7
8PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
9PKG_SOURCE_URL:=svn://svn.netsurf-browser.org/trunk/libnsfb
10PKG_SOURCE_PROTO:=svn
11PKG_SOURCE_VERSION:=$(PKG_REV)
12PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
13PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14
15include $(INCLUDE_DIR)/package.mk
16
17define Package/libnsfb
18    MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
19    SECTION:=libs
20    CATEGORY:=Libraries
21    TITLE:=LibNSFB is a framebuffer abstraction library, written in C
22    DEPENDS:=+libsdl
23    URL:=http://www.netsurf-browser.org/projects/libnsfb/
24endef
25
26define Package/libnsfb/description
27    The overall idea of the library is to provide a generic abstraction to a linear section of memory which corresponds to a visible array of pixel elements on a display device. Different colour depths are supported and the library provides routines for tasks such as drawing onto the framebuffer and rectangle copy operations.
28endef
29
30define Build/Compile
31    rm -rf $(PKG_INSTALL_DIR)
32    $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
33        $(MAKE_FLAGS) \
34        WARNFLAGS="" \
35        COMPONENT_TYPE=lib-shared \
36        DESTDIR="$(PKG_INSTALL_DIR)" \
37        all install
38endef
39
40define Build/InstallDev
41    mkdir -p $(1)/usr/include
42    $(CP) $(PKG_INSTALL_DIR)/usr/local/include/* $(1)/usr/include/
43    mkdir -p $(1)/usr/lib
44    $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/* $(1)/usr/lib/
45    $(SED) \
46        's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
47        $(1)/usr/lib/pkgconfig/libnsfb.pc
48    $(SED) \
49        's/xcb\|xcb-icccm\|xcb-image\|xcb-keysyms//g' \
50        $(1)/usr/lib/pkgconfig/libnsfb.pc
51endef
52
53define Package/libnsfb/install
54    $(INSTALL_DIR) $(1)/usr/lib
55    $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libnsfb.so* $(1)/usr/lib/
56endef
57
58$(eval $(call BuildPackage,libnsfb))
59

Archive Download this file



interactive