OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | # |
| 2 | # This is free software, licensed under the GNU General Public License v2. |
| 3 | # |
| 4 | |
| 5 | include $(TOPDIR)/rules.mk |
| 6 | |
| 7 | PKG_NAME:=ghostscript |
| 8 | PKG_VERSION:=9.00 |
| 9 | PKG_RELEASE:=1 |
| 10 | |
| 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 12 | PKG_SOURCE_URL:=http://ghostscript.com/releases/ |
| 13 | PKG_MD5SUM:=a402462478b4cdda3e1816899227b845 |
| 14 | |
| 15 | include $(INCLUDE_DIR)/package.mk |
| 16 | |
| 17 | define Package/ghostscript |
| 18 | SECTION:=utils |
| 19 | CATEGORY:=Utilities |
| 20 | TITLE:=interpreter for the PostScript language and for PDF |
| 21 | URL:=http://pages.cs.wisc.edu/~ghost/ |
| 22 | DEPENDS:=+libtiff +libiconv +libpng +fontconfig +libfreetype |
| 23 | endef |
| 24 | |
| 25 | define Package/ghostscript/description |
| 26 | Ghostscript is an interpreter for the PostScript language and for PDF |
| 27 | endef |
| 28 | |
| 29 | define Build/Prepare |
| 30 | $(call Build/Prepare/Default) |
| 31 | mkdir $(PKG_BUILD_DIR)/obj |
| 32 | #(cd $(PKG_BUILD_DIR); ./configure;); |
| 33 | #make -C $(PKG_BUILD_DIR) obj/arch.h obj/genconf obj/echogs |
| 34 | for i in genarch genconf echogs; do \ |
| 35 | gcc -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -I$(PKG_BUILD_DIR)/base -o $(PKG_BUILD_DIR)/obj/$$$$i $(PKG_BUILD_DIR)/base/$$$$i.c; \ |
| 36 | done |
| 37 | endef |
| 38 | |
| 39 | TARGET_CFLAGS+= \ |
| 40 | -I$(STAGING_DIR)/usr/lib/libiconv/include \ |
| 41 | |
| 42 | TARGET_LDFLAGS+= \ |
| 43 | -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ |
| 44 | -L$(STAGING_DIR)/usr/lib/libiconv/lib |
| 45 | |
| 46 | CONFIGURE_ARGS += \ |
| 47 | --with-system-libtiff \ |
| 48 | --with-libiconv=gnu \ |
| 49 | --without-x \ |
| 50 | --without-jbig2dec \ |
| 51 | --without-jasper |
| 52 | |
| 53 | MAKE_FLAGS += \ |
| 54 | EXTRALIBS="-L$(STAGING_DIR)/usr/lib/libiconv/lib -L$(STAGING_DIR)/usr/lib -lfontconfig -lfreetype -liconv -ldl -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \ |
| 55 | COMPILE_INITS="0" |
| 56 | |
| 57 | define Package/ghostscript/install |
| 58 | $(INSTALL_DIR) \ |
| 59 | $(1)/usr/bin $(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION) |
| 60 | |
| 61 | $(INSTALL_BIN) \ |
| 62 | $(PKG_BUILD_DIR)/bin/gs \ |
| 63 | $(1)/usr/bin/gs |
| 64 | |
| 65 | $(CP) $(PKG_BUILD_DIR)/{Resource,lib,iccprofiles} \ |
| 66 | $(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION)/ |
| 67 | endef |
| 68 | |
| 69 | $(eval $(call BuildPackage,ghostscript)) |
| 70 |
