|
@@ -0,0 +1,100 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2006-2014 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=jpeg
|
|
11
|
+PKG_VERSION:=6b
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
|
|
15
|
+PKG_SOURCE_URL:=@SF/libjpeg
|
|
16
|
+PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
|
|
17
|
+
|
|
18
|
+PKG_LICENSE:=IJG
|
|
19
|
+PKG_LICENSE_FILES:=README
|
|
20
|
+
|
|
21
|
+PKG_BUILD_PARALLEL:=1
|
|
22
|
+PKG_BUILD_DEPENDS:=libltdl
|
|
23
|
+
|
|
24
|
+include $(INCLUDE_DIR)/host-build.mk
|
|
25
|
+include $(INCLUDE_DIR)/package.mk
|
|
26
|
+
|
|
27
|
+define Package/jpeg/Default
|
|
28
|
+ TITLE:=The Independent JPEG Group's JPEG
|
|
29
|
+ URL:=http://www.ijg.org/
|
|
30
|
+endef
|
|
31
|
+
|
|
32
|
+define Package/libjpeg
|
|
33
|
+ $(call Package/jpeg/Default)
|
|
34
|
+ SECTION:=libs
|
|
35
|
+ CATEGORY:=Libraries
|
|
36
|
+ TITLE+= runtime library
|
|
37
|
+endef
|
|
38
|
+
|
|
39
|
+define Package/jpeg-tools
|
|
40
|
+ $(call Package/jpeg/Default)
|
|
41
|
+ SECTION:=utils
|
|
42
|
+ CATEGORY:=Utilities
|
|
43
|
+ DEPENDS:=+libjpeg
|
|
44
|
+ TITLE+= manipulation tools
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+TARGET_CFLAGS += $(FPIC)
|
|
48
|
+
|
|
49
|
+CONFIGURE_ARGS += \
|
|
50
|
+ --enable-shared \
|
|
51
|
+ --enable-static \
|
|
52
|
+
|
|
53
|
+HOST_CONFIGURE_ARGS += \
|
|
54
|
+ --enable-shared \
|
|
55
|
+ --enable-static \
|
|
56
|
+
|
|
57
|
+define Build/Prepare
|
|
58
|
+ $(call Build/Prepare/Default)
|
|
59
|
+ (cd $(PKG_BUILD_DIR); \
|
|
60
|
+ rm -f ltconfig ltmain.sh libtool; \
|
|
61
|
+ ln -s `which true` ltconfig; \
|
|
62
|
+ ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
|
|
63
|
+ )
|
|
64
|
+endef
|
|
65
|
+
|
|
66
|
+define Build/Compile
|
|
67
|
+ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
|
|
68
|
+ +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
|
69
|
+ LIBTOOL="./libtool --tag=CC" \
|
|
70
|
+ prefix="$(PKG_INSTALL_DIR)/usr" \
|
|
71
|
+ exec_prefix="$(PKG_INSTALL_DIR)/usr" \
|
|
72
|
+ all
|
|
73
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
74
|
+ prefix="$(PKG_INSTALL_DIR)/usr" \
|
|
75
|
+ exec_prefix="$(PKG_INSTALL_DIR)/usr" \
|
|
76
|
+ install install-headers install-lib
|
|
77
|
+endef
|
|
78
|
+
|
|
79
|
+define Build/InstallDev
|
|
80
|
+ $(INSTALL_DIR) $(1)/usr/include
|
|
81
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
|
|
82
|
+ $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
|
|
83
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
|
|
84
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
85
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
|
|
86
|
+endef
|
|
87
|
+
|
|
88
|
+define Package/libjpeg/install
|
|
89
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
90
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
|
|
91
|
+endef
|
|
92
|
+
|
|
93
|
+define Package/jpeg-tools/install
|
|
94
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
95
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
|
|
96
|
+endef
|
|
97
|
+
|
|
98
|
+$(eval $(call HostBuild))
|
|
99
|
+$(eval $(call BuildPackage,libjpeg))
|
|
100
|
+$(eval $(call BuildPackage,jpeg-tools))
|