commit | author | age
|
b87ce0
|
1 |
# |
SG-SM-BI |
2 |
# |
|
3 |
# CDDL HEADER START |
|
4 |
# |
|
5 |
# The contents of this file are subject to the terms of the |
|
6 |
# Common Development and Distribution License (the "License"). |
|
7 |
# You may not use this file except in compliance with the License. |
|
8 |
# |
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 |
# or http://www.opensolaris.org/os/licensing. |
|
11 |
# See the License for the specific language governing permissions |
|
12 |
# and limitations under the License. |
|
13 |
# |
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 |
# |
|
20 |
# CDDL HEADER END |
|
21 |
# |
730213
|
22 |
|
AW |
23 |
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. |
0675d3
|
24 |
# Copyright (c) 2018, Michal Nowak |
13648b
|
25 |
# Copyright (c) 2022, Friedrich Kink |
730213
|
26 |
# Copyright (c) 2023, Andreas Wacknitz |
b87ce0
|
27 |
# |
2adf6d
|
28 |
BUILD_BITS = 64 |
7999b2
|
29 |
|
96f081
|
30 |
include ../../../make-rules/shared-macros.mk |
b87ce0
|
31 |
|
SG-SM-BI |
32 |
COMPONENT_NAME= ghostscript |
2adf6d
|
33 |
COMPONENT_VERSION= 10.2.1 |
F |
34 |
HUMAN_VERSION= 10.02.1 |
|
35 |
NUMERICAL_VERSION= $(subst .,,$(HUMAN_VERSION)) |
|
36 |
COMPONENT_SUMMARY= Ghostscript is an interpreter for the PostScript language and PDF files |
0675d3
|
37 |
COMPONENT_PROJECT_URL= https://ghostscript.com |
730213
|
38 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(HUMAN_VERSION) |
AW |
39 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
2adf6d
|
40 |
COMPONENT_ARCHIVE_HASH= sha256:8c58c948b0721becefcd0029c8db95f9bb3268affc25ea01d4c5a6b07fa1ab08 |
13648b
|
41 |
COMPONENT_DOWNLOAD_URL= https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download |
730213
|
42 |
COMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/gs$(NUMERICAL_VERSION)/$(COMPONENT_ARCHIVE) |
2adf6d
|
43 |
COMPONENT_FMRI= print/filter/ghostscript |
f23d00
|
44 |
COMPONENT_CLASSIFICATION= System/Printing |
730213
|
45 |
COMPONENT_LICENSE= AGPLv3, GPL, BSD, MIT, IJG, Apache 2.0 |
AW |
46 |
|
|
47 |
COMPONENT_NAME_1= tessdata_best |
|
48 |
COMPONENT_VERSION_1= 4.1.0 |
|
49 |
COMPONENT_SRC_1= $(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1) |
2adf6d
|
50 |
COMPONENT_ARCHIVE_1= $(COMPONENT_VERSION_1).tar.gz |
730213
|
51 |
COMPONENT_ARCHIVE_URL_1= https://github.com/tesseract-ocr/$(COMPONENT_NAME_1)/archive/refs/tags/$(COMPONENT_ARCHIVE_1) |
AW |
52 |
COMPONENT_ARCHIVE_HASH_1= sha256:bb05b738298ae73e7130e2913ed002b49d94cd1cea508e63be1928fe47770b32 |
b87ce0
|
53 |
|
13648b
|
54 |
include $(WS_MAKE_RULES)/common.mk |
b87ce0
|
55 |
|
730213
|
56 |
COMPONENT_POST_UNPACK_ACTION= ( \ |
AW |
57 |
$(RM) $(COMPONENT_LICENSE_FILE) && \ |
|
58 |
$(TOUCH) $(COMPONENT_LICENSE_FILE) && \ |
|
59 |
for l in $(SOURCE_DIR)/LICENSE $(SOURCE_DIR)/jbig2dec/LICENSE $(SOURCE_DIR)/openjpeg/LICENSE \ |
|
60 |
$(SOURCE_DIR)/libpng/LICENSE $(SOURCE_DIR)/libpng/contrib/gregbook/LICENSE $(SOURCE_DIR)/zlib/LICENSE \ |
|
61 |
$(SOURCE_DIR)/doc/COPYING $(SOURCE_DIR)/extract/COPYING $(SOURCE_DIR)/lcms2mt/COPYING \ |
|
62 |
$(SOURCE_DIR)/contrib/lxm3200-tweaked/LICENSE $(SOURCE_DIR)/tesseract/LICENSE ; do \ |
|
63 |
$(CAT) $$l >> $(COMPONENT_LICENSE_FILE) ; \ |
|
64 |
echo "------------------------------------------------------------" >> $(COMPONENT_LICENSE_FILE) ; \ |
|
65 |
done ; ) |
|
66 |
|
005de4
|
67 |
PATH= $(PATH.gnu) |
7fe06a
|
68 |
|
54ee5f
|
69 |
CFLAGS += $(XPG6MODE) |
7fe06a
|
70 |
|
AL |
71 |
# build with the distribution preferred libjpeg implementation |
|
72 |
CFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CFLAGS) |
|
73 |
CXXFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS) |
|
74 |
LDFLAGS += $(JPEG_LDFLAGS) |
83777e
|
75 |
|
b87ce0
|
76 |
# configure(1) options to use |
730213
|
77 |
CONFIGURE_OPTIONS += --with-drivers=ALL |
AW |
78 |
CONFIGURE_OPTIONS += --with-system-libtiff |
|
79 |
CONFIGURE_OPTIONS += --with-ijs |
|
80 |
CONFIGURE_OPTIONS += --with-jbig2dec |
|
81 |
CONFIGURE_OPTIONS += --enable-cups |
|
82 |
CONFIGURE_OPTIONS += --with-libiconv=native |
|
83 |
CONFIGURE_OPTIONS += --enable-dynamic |
|
84 |
CONFIGURE_OPTIONS += --disable-compile-inits |
|
85 |
CONFIGURE_OPTIONS += --disable-hidden-visibility |
|
86 |
CONFIGURE_OPTIONS += --enable-freetype |
|
87 |
CONFIGURE_OPTIONS += --with-fontpath=/usr/share/ghostscript/$(HUMAN_VERSION)/Resource:/usr/share/ghostscript/$(HUMAN_VERSION)/Resource/Font:/usr/share/ghostscript/fonts:/usr/openwin/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/TrueType:/usr/openwin/lib/X11/fonts/Type3:/usr/X11/lib/X11/fonts/Type1:/usr/X11/lib/fonts/TrueType:/usr/X11/lib/X11/fonts/Type3:/usr/X11/lib/X11/fonts/Resource:/usr/X11/lib/X11/Resource/Font:/usr/share/fonts/TrueType |
f6c8b4
|
88 |
|
b87ce0
|
89 |
# config env |
7d5c0f
|
90 |
CONFIGURE_ENV += LDFLAGS_SO="-shared " |
b87ce0
|
91 |
CONFIGURE_ENV += CUPSCONFIG=/usr/bin/cups-config |
SG-SM-BI |
92 |
|
f6c8b4
|
93 |
GS_VARIANT_64 = $(BUILD_DIR)/$(MACH64) |
SG |
94 |
IJS_VARIANT_64 = $(BUILD_DIR)/$(MACH64)/ijs |
b87ce0
|
95 |
|
f6c8b4
|
96 |
VARIANTS = $(GS_VARIANT) $(IJS_VARIANT) $(GS_VARIANT_64) $(IJS_VARIANT_64) |
b87ce0
|
97 |
|
SG-SM-BI |
98 |
# autoconf - Generate configuration scripts |
|
99 |
COMPONENT_PREP_ACTION = \ |
e5e214
|
100 |
(cd $(@D); $(RM) -r libpng zlib jpeg ; autoconf) |
b87ce0
|
101 |
|
SG-SM-BI |
102 |
$(GS_VARIANT)/.configured: COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
103 |
($(CLONEY) $(SOURCE_DIR) $(@D)) |
|
104 |
|
|
105 |
$(GS_VARIANT)/.installed: COMPONENT_INSTALL_TARGETS += \ |
|
106 |
install-exec install-so install-scripts install-data \ |
|
107 |
install-contrib-extras |
|
108 |
|
f6c8b4
|
109 |
$(GS_VARIANT_64)/.configured: COMPONENT_PRE_CONFIGURE_ACTION = \ |
SG |
110 |
($(CLONEY) $(SOURCE_DIR) $(@D)) |
|
111 |
|
|
112 |
$(GS_VARIANT_64)/.installed: COMPONENT_INSTALL_TARGETS += \ |
|
113 |
install-exec install-so install-scripts install-data \ |
|
114 |
install-contrib-extras |
|
115 |
|
13648b
|
116 |
$(IJS_VARIANT_64)/.configured: BITS=64 |
F |
117 |
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR)/ijs $(@D); \ |
f6c8b4
|
118 |
cd $(@D) ; $(ENV) $(CONFIGURE_ENV) ./autogen.sh ) |
SG |
119 |
|
b87ce0
|
120 |
CONFIGURE_SCRIPT = ./configure |
SG-SM-BI |
121 |
|
|
122 |
# build gs and ijs |
|
123 |
build: $(VARIANTS:%=%/.built) |
|
124 |
|
|
125 |
# install gs and ijs |
|
126 |
install: $(VARIANTS:%=%/.installed) |
|
127 |
|
730213
|
128 |
# the license file is dynamically build, thus we need to remove it: |
AW |
129 |
clean:: |
|
130 |
$(RM) $(COMPONENT_LICENSE_FILE) |
|
131 |
|
|
132 |
COMPONENT_TEST_CMD = sh $(COMPONENT_DIR)/tests/run |
|
133 |
COMPONENT_TEST_ENV += TESSDATA_PREFIX="$(SOURCE_DIR_1)" |
|
134 |
COMPONENT_TEST_TRANSFORMS += "-e '/^Using/d'" |
2adf6d
|
135 |
COMPONENT_TEST_TRANSFORMS += "-e '/ differ: /d'" |
730213
|
136 |
COMPONENT_TEST_TRANSFORMS += "-e '/extract.c:.*:extract_subpage_free/d'" |
b87ce0
|
137 |
|
f23d00
|
138 |
# Auto-generated dependencies |
13648b
|
139 |
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) |
F |
140 |
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) |
005de4
|
141 |
REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG) |
96f081
|
142 |
REQUIRED_PACKAGES += image/library/libpng16 |
13648b
|
143 |
REQUIRED_PACKAGES += image/library/libtiff |
f23d00
|
144 |
REQUIRED_PACKAGES += library/desktop/cairo |
AP |
145 |
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf |
|
146 |
REQUIRED_PACKAGES += library/desktop/gtk3 |
96f081
|
147 |
REQUIRED_PACKAGES += library/glib2 |
13648b
|
148 |
REQUIRED_PACKAGES += library/libidn |
730213
|
149 |
REQUIRED_PACKAGES += library/libpaper |
96f081
|
150 |
REQUIRED_PACKAGES += library/print/cups-libs |
AP |
151 |
REQUIRED_PACKAGES += library/zlib |
13648b
|
152 |
REQUIRED_PACKAGES += shell/ksh93 |
96f081
|
153 |
REQUIRED_PACKAGES += system/library |
AP |
154 |
REQUIRED_PACKAGES += system/library/fontconfig |
|
155 |
REQUIRED_PACKAGES += system/library/math |
|
156 |
REQUIRED_PACKAGES += x11/library/libx11 |
|
157 |
REQUIRED_PACKAGES += x11/library/toolkit/libxt |