Root/gs/Makefile

1#
2# This is free software, licensed under the GNU General Public License v2.
3#
4
5include $(TOPDIR)/rules.mk
6
7PKG_NAME:=ghostscript
8PKG_VERSION:=9.02
9PKG_RELEASE:=1
10
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12PKG_SOURCE_URL:=http://downloads.ghostscript.com/public/
13PKG_MD5SUM:=86cc3a0509c0d96a641d58879d54274b
14
15include $(INCLUDE_DIR)/package.mk
16include $(INCLUDE_DIR)/nls.mk
17
18define Package/ghostscript
19  SECTION:=utils
20  CATEGORY:=Utilities
21  TITLE:=interpreter for the PostScript language and for PDF
22  URL:=http://pages.cs.wisc.edu/~ghost/
23  DEPENDS:=+libtiff $(ICONV_DEPENDS) +libpng +fontconfig +libfreetype @BUILD_NLS +libidn
24endef
25
26define Package/ghostscript/description
27  Ghostscript is an interpreter for the PostScript language and for PDF
28endef
29
30define Build/Prepare
31    $(call Build/Prepare/Default)
32    mkdir $(PKG_BUILD_DIR)/obj
33    #(cd $(PKG_BUILD_DIR); ./configure;);
34    #make -C $(PKG_BUILD_DIR) obj/arch.h obj/genconf obj/echogs
35    for i in genarch genconf echogs; do \
36    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; \
37    done
38endef
39
40TARGET_LDFLAGS+= \
41    -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
42
43CONFIGURE_ARGS += \
44    --with-system-libtiff \
45    $(if $(ICONV_FULL),--with-libiconv=gnu) \
46    --without-x \
47    --without-jbig2dec \
48    --without-jasper
49
50MAKE_FLAGS += \
51    EXTRALIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
52        $(ICONV_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
53        -lfontconfig -lfreetype -ldl -liconv -lidn" \
54    COMPILE_INITS="0"
55
56define Package/ghostscript/install
57    $(INSTALL_DIR) \
58        $(1)/usr/bin $(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION)
59
60    $(INSTALL_BIN) \
61        $(PKG_BUILD_DIR)/bin/gs \
62        $(1)/usr/bin/gs
63
64    $(CP) $(PKG_BUILD_DIR)/{Resource,lib,iccprofiles} \
65        $(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION)/
66endef
67
68$(eval $(call BuildPackage,ghostscript))
69

Archive Download this file



interactive