Andreas Wacknitz
2023-10-30 793d94d18e377f0ba4e3135d7c8381465924a5a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
 
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2023, Andreas Wacknitz
#
 
BUILD_BITS= 64
USE_DEFAULT_TEST_TRANSFORMS= yes
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=            ImageMagick
COMPONENT_VERSION=        7.1.1
COMPONENT_SUBVERSION=        21
HUMAN_VERSION=            $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
IPS_COMPONENT_VERSION=    $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
COMPONENT_REVISION=        1
COMPONENT_SUMMARY=        ImageMagick - Image Manipulation Utilities and Libraries
COMPONENT_PROJECT_URL=    https://imagemagick.org
COMPONENT_SRC=            $(COMPONENT_NAME)-$(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
COMPONENT_ARCHIVE=        $(COMPONENT_NAME)-$(HUMAN_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH=    sha256:09402e5f17c6575ef9f010bb2e21ae1710f1f3426f115ad4317ee9129c32608e
COMPONENT_ARCHIVE_URL=    https://github.com/ImageMagick/ImageMagick/archive/$(HUMAN_VERSION).tar.gz
COMPONENT_FMRI=            image/imagemagick
COMPONENT_CLASSIFICATION=    System/Multimedia Libraries
COMPONENT_LICENSE= Apache 2.0 license
COMPONENT_LICENSE_FILE= LICENSE
 
include $(WS_MAKE_RULES)/common.mk
 
COMPONENT_PREP_ACTION = ( cd $(@D) && libtoolize -f && autoreconf -fi )
 
# To get the Perl modules built it is necessary to copy the PerlMagick directory
# to the build directory
#
COMPONENT_PRE_CONFIGURE_ACTION= ( $(CP) -R $(SOURCE_DIR)/PerlMagick $(@D) )
 
# Don't use rpath, or relink!
COMPONENT_POST_CONFIGURE_ACTION = \
    (cd $(BUILD_DIR_$(BITS)) ; \
    $(GSED) -i \
    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -e 's|need_relink=yes|need_relink=not_on_solaris|' \
    libtool)
 
LIBS += -lsocket -lnsl
CONFIGURE_ENV += LIBS="$(LIBS)"
 
# build with the distribution preferred libjpeg implementation
CFLAGS   += $(JPEG_CPPFLAGS) $(JPEG_CFLAGS)
CXXFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS)
LDFLAGS  += $(JPEG_LDFLAGS)
 
CONFIGURE_OPTIONS += --with-modules
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --disable-static
# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
# configuration file 'type-ghostscript.xml' is being used.
#CONFIGURE_OPTIONS+= --with-fontconfig=no
# Configure option 'with-gs-font-dir' is required because some build systems might 
# not have ghostscript fonts installed.
CONFIGURE_OPTIONS += --with-gs-font-dir="/usr/share/ghostscript/fonts"
CONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS)) 
CONFIGURE_OPTIONS += --with-perl=$(PERL)
CONFIGURE_OPTIONS += --with-perl-options="INSTALLDIRS=vendor"
CONFIGURE_OPTIONS += --sysconfdir=/etc
 
# As of version 7.1.0-34, a "Linux-compatible sendfile()" is detected;
# override thiis.
CONFIGURE_OPTIONS += ac_cv_have_linux_sendfile=no
 
# Needed for "gmake test" to work successfully.  If SHELLOPTS is exported (as
# it is by the Userland Makefiles), then all shell options get exported to
# child invocations of bash, which results in test failures due to nounset and
# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
# diffs failing due to script tracing in output files.
unexport SHELLOPTS
 
# Tests hang waiting for input unless stdin is redirected.
COMPONENT_TEST_TARGETS = check < /dev/null
 
# PKGVERS is needed for manifest processing
PKG_MACROS += PERLVER=$(PERL_VERSION)
 
# Build dependencies
REQUIRED_PACKAGES += print/filter/ghostscript/fonts/gnu-gs-fonts-std
 
# Auto-generated dependencies
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG)
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += compress/xz
REQUIRED_PACKAGES += image/djvulibre
REQUIRED_PACKAGES += image/graphviz
REQUIRED_PACKAGES += image/library/libpng16
REQUIRED_PACKAGES += image/library/libraw
REQUIRED_PACKAGES += image/library/libtiff
REQUIRED_PACKAGES += image/library/openjpeg
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/lcms2
REQUIRED_PACKAGES += library/libtool/libltdl
REQUIRED_PACKAGES += library/libwebp
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/libzip
REQUIRED_PACKAGES += library/openexr
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/fontconfig
REQUIRED_PACKAGES += system/library/freetype-2
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxext