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.00
9PKG_RELEASE:=1
10
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12PKG_SOURCE_URL:=http://ghostscript.com/releases/
13PKG_MD5SUM:=a402462478b4cdda3e1816899227b845
14
15include $(INCLUDE_DIR)/package.mk
16
17define 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
23endef
24
25define Package/ghostscript/description
26  Ghostscript is an interpreter for the PostScript language and for PDF
27endef
28
29define 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
37endef
38
39TARGET_CFLAGS+= \
40    -I$(STAGING_DIR)/usr/lib/libiconv/include \
41
42TARGET_LDFLAGS+= \
43    -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
44    -L$(STAGING_DIR)/usr/lib/libiconv/lib
45
46CONFIGURE_ARGS += \
47    --with-system-libtiff \
48    --with-libiconv=gnu \
49    --without-x \
50    --without-jbig2dec \
51    --without-jasper
52
53MAKE_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
57define 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)/
67endef
68
69$(eval $(call BuildPackage,ghostscript))
70

Archive Download this file



interactive