2010-10-18 19:39:48 +03:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=ghostscript
|
2011-05-26 16:27:14 +03:00
|
|
|
PKG_VERSION:=9.02
|
2010-10-18 19:39:48 +03:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2011-05-26 16:27:14 +03:00
|
|
|
PKG_SOURCE_URL:=http://downloads.ghostscript.com/public/
|
|
|
|
PKG_MD5SUM:=86cc3a0509c0d96a641d58879d54274b
|
2010-10-18 19:39:48 +03:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2011-02-06 21:00:20 +02:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2010-10-18 19:39:48 +03:00
|
|
|
|
|
|
|
define Package/ghostscript
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=interpreter for the PostScript language and for PDF
|
|
|
|
URL:=http://pages.cs.wisc.edu/~ghost/
|
2011-05-26 16:23:21 +03:00
|
|
|
DEPENDS:=+libtiff $(ICONV_DEPENDS) +libpng +fontconfig +libfreetype @BUILD_NLS +libidn
|
2010-10-18 19:39:48 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ghostscript/description
|
|
|
|
Ghostscript is an interpreter for the PostScript language and for PDF
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
$(call Build/Prepare/Default)
|
|
|
|
mkdir $(PKG_BUILD_DIR)/obj
|
|
|
|
#(cd $(PKG_BUILD_DIR); ./configure;);
|
|
|
|
#make -C $(PKG_BUILD_DIR) obj/arch.h obj/genconf obj/echogs
|
|
|
|
for i in genarch genconf echogs; do \
|
|
|
|
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; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
TARGET_LDFLAGS+= \
|
2011-02-06 21:00:20 +02:00
|
|
|
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
2010-10-18 19:39:48 +03:00
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--with-system-libtiff \
|
2011-02-06 21:00:20 +02:00
|
|
|
$(if $(ICONV_FULL),--with-libiconv=gnu) \
|
2010-10-18 19:39:48 +03:00
|
|
|
--without-x \
|
|
|
|
--without-jbig2dec \
|
|
|
|
--without-jasper
|
|
|
|
|
|
|
|
MAKE_FLAGS += \
|
2011-02-11 11:05:38 +02:00
|
|
|
EXTRALIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
|
|
|
$(ICONV_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
|
2011-05-26 16:23:21 +03:00
|
|
|
-lfontconfig -lfreetype -ldl -liconv -lidn" \
|
2010-10-18 19:39:48 +03:00
|
|
|
COMPILE_INITS="0"
|
|
|
|
|
|
|
|
define Package/ghostscript/install
|
|
|
|
$(INSTALL_DIR) \
|
|
|
|
$(1)/usr/bin $(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION)
|
|
|
|
|
|
|
|
$(INSTALL_BIN) \
|
|
|
|
$(PKG_BUILD_DIR)/bin/gs \
|
|
|
|
$(1)/usr/bin/gs
|
|
|
|
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/{Resource,lib,iccprofiles} \
|
|
|
|
$(1)/usr/share/$(PKG_NAME)/$(PKG_VERSION)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,ghostscript))
|