plplot/Makefile |
16 | 16 | PKG_INSTALL:=1 |
17 | 17 | PKG_FIXUP:=libtool |
18 | 18 | |
19 | | PKG_BUILD_DEPENDS:= plplot/host libtool/host qt4 qt4-gui |
| 19 | PKG_BUILD_DEPENDS:= plplot/host libtool/host libltdl/host qt4 qt4-gui |
20 | 20 | #@INSTALL_GFORTRAN |
21 | 21 | |
22 | 22 | include $(INCLUDE_DIR)/host-build.mk |
23 | 23 | include $(INCLUDE_DIR)/package.mk |
24 | 24 | |
| 25 | CMAKE_HOST_FLAGS=-DCMAKE_INSTALL_PREFIX=/usr \ |
| 26 | -DDEFAULT_NO_DEVICES=ON \ |
| 27 | -DPKG_CONFIG_EXECUTABLE=Not-Found -DDEFAULT_NO_BINDINGS=ON |
| 28 | |
25 | 29 | ## Need host-compiled plplot build dir for cmake to work for the target |
26 | 30 | define Host/Configure |
27 | | mkdir $(HOST_BUILD_DIR)/build_dir |
| 31 | mkdir -p $(HOST_BUILD_DIR)/build_dir |
28 | 32 | cd $(HOST_BUILD_DIR)/build_dir && \ |
29 | | cmake -DCMAKE_INSTALL_PREFIX=/usr \ |
30 | | -DDEFAULT_NO_DEVICES=ON \ |
31 | | -DPKG_CONFIG_EXECUTABLE=Not-Found -DDEFAULT_NO_BINDINGS=ON \ |
| 33 | cmake $(CMAKE_HOST_FLAGS) \ |
32 | 34 | $(HOST_BUILD_DIR) |
33 | 35 | endef |
34 | 36 | |
| 37 | define Host/Compile/Octave |
| 38 | $(MAKE) -C $(HOST_BUILD_DIR)/bindings/octave massage |
| 39 | endef |
| 40 | |
35 | 41 | define Host/Compile |
36 | | make -C $(HOST_BUILD_DIR)/build_dir |
| 42 | $(if $(CONFIG_PACKAGE_plplot-octave),$(Host/Compile/Octave),) |
| 43 | $(MAKE) -C $(HOST_BUILD_DIR)/build_dir -j2 |
| 44 | endef |
| 45 | |
| 46 | define Host/Install/Octave |
| 47 | $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin |
| 48 | $(CP) $(HOST_BUILD_DIR)/bindings/octave/massage \ |
| 49 | $(STAGING_DIR_HOST)/bin/plplot-massage |
37 | 50 | endef |
38 | 51 | |
39 | 52 | define Host/Install |
40 | | $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/cmake |
41 | | $(CP) $(HOST_BUILD_DIR)/build_dir $(STAGING_DIR_HOST)/lib/cmake/ |
| 53 | $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/$(PKG_NAME)-$(PKG_VERSION) |
| 54 | $(CP) $(HOST_BUILD_DIR)/build_dir \ |
| 55 | $(STAGING_DIR_HOST)/lib/$(PKG_NAME)-$(PKG_VERSION) |
| 56 | $(if $(CONFIG_PACKAGE_plplot-octave),$(Host/Install/Octave),) |
42 | 57 | endef |
43 | 58 | |
44 | 59 | define Package/plplot/Default |
45 | | SECTION:=utils |
46 | | CATEGORY:=Utilities |
| 60 | SECTION:=libs |
| 61 | CATEGORY:=Libraries |
47 | 62 | |
48 | 63 | TITLE:=PLplot plotting library |
49 | 64 | URL:=http://plplot.sourceforge.net/ |
50 | | # SUBMENU:=Plplot |
| 65 | SUBMENU:=PLplot |
51 | 66 | endef |
52 | 67 | |
53 | 68 | define Package/plplot/Default/description |
... | ... | |
58 | 73 | |
59 | 74 | define Package/plplot |
60 | 75 | $(call Package/plplot/Default) |
61 | | DEPENDS:=+qt4 +qt4-gui |
| 76 | DEPENDS:=+libltdl |
62 | 77 | TITLE+= |
63 | 78 | endef |
64 | 79 | |
65 | 80 | define Package/plplot/description |
66 | 81 | $(call Package/plplot/Default/description) |
67 | | This package contains the Plplot executable files |
| 82 | This package contains the Plplot library with a few file output devices. |
68 | 83 | endef |
69 | 84 | |
70 | | # define Package/plplot-data |
71 | | # $(call Package/plplot/Default) |
72 | | # TITLE=+ (function files) |
73 | | # endef |
| 85 | define Package/plplot-cxx |
| 86 | $(call Package/plplot/Default) |
| 87 | DEPENDS:= +plplot +libstdcpp |
| 88 | TITLE+= (C++ bindings) |
| 89 | endef |
74 | 90 | |
75 | | # define Package/plplot-data/description |
76 | | # $(call Package/plplot/Default/description) |
77 | | # This package contains the platform-independant .m-files. |
78 | | # endef |
| 91 | define Package/plplot-cxx/description |
| 92 | $(call Package/plplot/Default/description) |
| 93 | This package contains the Plplot C++ bindings. |
| 94 | endef |
79 | 95 | |
80 | | CONFIGURE_ARGS += |
81 | | #MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib" |
| 96 | define Package/plplot-qt |
| 97 | $(call Package/plplot/Default) |
| 98 | DEPENDS:= +plplot +qt4 +qt4-gui |
| 99 | TITLE+= (Qt bindings&device) |
| 100 | endef |
| 101 | |
| 102 | define Package/plplot-qt/description |
| 103 | $(call Package/plplot/Default/description) |
| 104 | This package contains the Plplot Qt visualization driver and Qt bindings. |
| 105 | endef |
| 106 | |
| 107 | define Package/plplot-tcl |
| 108 | $(call Package/plplot/Default) |
| 109 | DEPENDS:= +plplot +tcl |
| 110 | TITLE+= (Tcl bindings) |
| 111 | endef |
| 112 | |
| 113 | define Package/plplot-tcl/description |
| 114 | $(call Package/plplot/Default/description) |
| 115 | This package contains the Plplot bindings for Tcl |
| 116 | endef |
| 117 | |
| 118 | |
| 119 | define Package/plplot-octave |
| 120 | $(call Package/plplot/Default) |
| 121 | DEPENDS:= +plplot +octave |
| 122 | TITLE+= (Octave bindings) |
| 123 | endef |
| 124 | |
| 125 | define Package/plplot-octave/description |
| 126 | $(call Package/plplot/Default/description) |
| 127 | This package contains the Plplot bindings for GNU Octave |
| 128 | endef |
| 129 | |
| 130 | CMAKE_FLAGS := \ |
| 131 | -DCMAKE_INSTALL_PREFIX=/usr \ |
| 132 | -DCMAKE_TOOLCHAIN_FILE=$(PKG_BUILD_DIR)/toolchain.cmake \ |
| 133 | -DPKG_CONFIG_EXECUTABLE=$(STAGING_DIR_HOST)/bin/pkg-config \ |
| 134 | -DDEFAULT_NO_DEVICES=ON \ |
| 135 | -DPLD_ps=ON \ |
| 136 | -DPLD_svg=ON \ |
| 137 | -DPLD_mem=ON \ |
| 138 | -DPLD_null=ON \ |
| 139 | -DDEFAULT_NO_BINDINGS=ON \ |
| 140 | -DNaNAwareCCompiler=ON \ |
| 141 | -DCMAKE_USE_NAMESPACE=ON \ |
| 142 | -DCMAKE_NATIVE_BINARY_DIR=$(STAGING_DIR_HOST)/lib/$(PKG_NAME)-$(PKG_VERSION)/build_dir |
| 143 | |
| 144 | ifdef CONFIG_PACKAGE_plplot-cxx |
| 145 | CMAKE_FLAGS += -DENABLE_cxx=ON |
| 146 | endif |
| 147 | |
| 148 | ifdef CONFIG_PACKAGE_plplot-qt |
| 149 | CMAKE_FLAGS += \ |
| 150 | -DPLD_qtwidget=ON \ |
| 151 | -DPLD_extqt=ON \ |
| 152 | -DENABLE_qt=ON \ |
| 153 | -DQT_QMAKE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/qmake \ |
| 154 | -DQT_MOC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/moc \ |
| 155 | -DQT_UIC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/uic \ |
| 156 | -DQT_RCC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/rcc |
| 157 | endif |
| 158 | |
| 159 | ifdef CONFIG_PACKAGE_plplot-tcl |
| 160 | CMAKE_FLAGS += -DENABLE_tcl=ON |
| 161 | endif |
| 162 | |
| 163 | ifdef CONFIG_PACKAGE_plplot-octave |
| 164 | CMAKE_FLAGS += \ |
| 165 | -DENABLE_octave=ON \ |
| 166 | -DUSE_RPATH=ON \ |
| 167 | -DMKOCTFILE=$(STAGING_DIR)/usr/bin/mkoctfile \ |
| 168 | -DOCTAVE_OCT_DIR=/usr/lib/octave/site/oct/$(OPTIMIZE_FOR_CPU)-openwrt-linux-gnu \ |
| 169 | -Dmassage_LOCATION=$(STAGING_DIR_HOST)/lib/$(PKG_NAME)-$(PKG_VERSION)/build_dir/bindings/octave/massage |
| 170 | endif |
| 171 | |
| 172 | # $(if $(CONFIG_PACKAGE_libX11),FEATURE_XLOCK=y,FEATURE_XLOCK=n) \ |
82 | 173 | |
83 | 174 | define Build/Configure |
84 | 175 | echo "SET(CMAKE_SYSTEM_NAME Linux)" > $(PKG_BUILD_DIR)/toolchain.cmake |
... | ... | |
103 | 194 | echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $(PKG_BUILD_DIR)/toolchain.cmake |
104 | 195 | echo "SET(PL_USE_NAMESPACE 1)" >> $(PKG_BUILD_DIR)/toolchain.cmake |
105 | 196 | |
106 | | cd $(PKG_BUILD_DIR) && \ |
107 | | cmake -DCMAKE_INSTALL_PREFIX=/usr \ |
108 | | -DCMAKE_TOOLCHAIN_FILE=$(PKG_BUILD_DIR)/toolchain.cmake \ |
109 | | -DPKG_CONFIG_EXECUTABLE=$(STAGING_DIR_HOST)/bin/pkg-config \ |
110 | | -DDEFAULT_NO_DEVICES=ON -DPLD_ps=ON -DPLD_svg=ON \ |
111 | | -DPLD_extqt=ON \ |
112 | | -DDEFAULT_NO_BINDINGS=ON \ |
113 | | -DENABLE_cxx=ON -DNaNAwareCCompiler=ON \ |
114 | | -DQT_QMAKE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/qmake \ |
115 | | -DQT_MOC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/moc \ |
116 | | -DQT_UIC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/uic \ |
117 | | -DQT_RCC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/rcc \ |
118 | | -DENABLE_qt=ON \ |
119 | | -DCMAKE_USE_NAMESPACE=ON \ |
120 | | -DCMAKE_NATIVE_BINARY_DIR=$(STAGING_DIR_HOST)/lib/cmake/build_dir |
121 | | # -DQt4_INCLUDE_DIR=$(STAGING_DIR_ROOT)/usr/include \ |
122 | | # -DQt4_LIRARY=$(STAGING_DIR_ROOT)/usr/lib/libQtGui.so \ |
123 | | |
| 197 | cd $(PKG_BUILD_DIR) && cmake $(CMAKE_FLAGS) |
124 | 198 | endef |
125 | 199 | |
126 | 200 | define Build/Compile |
127 | | $(call Build/Compile/Default, VERBOSE=1 -j2) |
| 201 | $(call Build/Compile/Default, VERBOSE=1) |
128 | 202 | endef |
129 | 203 | |
130 | 204 | define Build/Install |
... | ... | |
148 | 222 | endef |
149 | 223 | |
150 | 224 | define Package/plplot/install |
151 | | $(INSTALL_DIR) $(1)/usr |
| 225 | $(INSTALL_DIR) $(1)/usr/lib |
| 226 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libplplotd.so* \ |
| 227 | $(1)/usr/lib/ |
| 228 | $(INSTALL_DIR) $(1)/usr/lib/plplot$(PKG_VERSION)/driversd |
| 229 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/plplot$(PKG_VERSION)/driversd/{mem,null,ps,svg}.{so,rc} \ |
| 230 | $(1)/usr/lib/plplot$(PKG_VERSION)/driversd/ |
152 | 231 | $(INSTALL_DIR) $(1)/usr/share/plplot$(PKG_VERSION) |
153 | | $(CP) $(PKG_INSTALL_DIR)/usr/{bin,lib} \ |
154 | | $(1)/usr |
155 | | $(CP) $(PKG_INSTALL_DIR)/usr/share/plplot$(PKG_VERSION)/*.{map,pal,fnt} \ |
| 232 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/plplot$(PKG_VERSION)/*.{map,pal,fnt} \ |
| 233 | $(1)/usr/share/plplot$(PKG_VERSION)/ |
| 234 | endef |
| 235 | |
| 236 | define Package/plplot-cxx/install |
| 237 | $(INSTALL_DIR) $(1)/usr/lib |
| 238 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libplplotcxxd.so* \ |
| 239 | $(1)/usr/lib/ |
| 240 | endef |
| 241 | |
| 242 | define Package/plplot-qt/install |
| 243 | $(INSTALL_DIR) $(1)/usr/lib |
| 244 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libplplotqtd.so* \ |
| 245 | $(1)/usr/lib/ |
| 246 | $(INSTALL_DIR) $(1)/usr/lib/plplot$(PKG_VERSION)/driversd |
| 247 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/plplot$(PKG_VERSION)/driversd/qt.{so,rc} \ |
| 248 | $(1)/usr/lib/plplot$(PKG_VERSION)/driversd/ |
| 249 | endef |
| 250 | |
| 251 | define Package/plplot-tcl/install |
| 252 | $(INSTALL_DIR) $(1)/usr/lib |
| 253 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libplplottcltkd.so* \ |
| 254 | $(1)/usr/lib/ |
| 255 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libtclmatrixd.so* \ |
| 256 | $(1)/usr/lib/ |
| 257 | $(INSTALL_DIR) $(1)/usr/share/plplot$(PKG_VERSION)/tcl |
| 258 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/plplot$(PKG_VERSION)/pkgIndex.tcl \ |
156 | 259 | $(1)/usr/share/plplot$(PKG_VERSION)/ |
| 260 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/plplot$(PKG_VERSION)/tcl/*\ |
| 261 | $(1)/usr/share/plplot$(PKG_VERSION)/tcl/ |
| 262 | endef |
| 263 | |
| 264 | |
| 265 | define Package/plplot-octave/install |
| 266 | $(INSTALL_DIR) $(1)/usr/lib |
| 267 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/octave \ |
| 268 | $(1)/usr/lib/ |
| 269 | $(INSTALL_DIR) $(1)/usr/share |
| 270 | $(CP) $(PKG_INSTALL_DIR)/usr/share/{octave,plplot_octave} \ |
| 271 | $(1)/usr/share/ |
157 | 272 | endef |
158 | 273 | |
159 | 274 | # define Package/plplot-data/install |
... | ... | |
164 | 279 | |
165 | 280 | $(eval $(call HostBuild)) |
166 | 281 | $(eval $(call BuildPackage,plplot)) |
167 | | #$(eval $(call BuildPackage,plplot-data)) |
| 282 | $(eval $(call BuildPackage,plplot-cxx)) |
| 283 | $(eval $(call BuildPackage,plplot-qt)) |
| 284 | $(eval $(call BuildPackage,plplot-tcl)) |
| 285 | $(eval $(call BuildPackage,plplot-octave)) |
168 | 286 | |
169 | 287 | |
170 | 288 | # The following comments configure the Emacs editor. Just ignore them. |