4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2016 Jim Klimov
25 # Copyright 2017 Aurelien Larcher
26 # Copyright 2021 Andreas Wacknitz
31 USE_COMMON_TEST_MASTER
= no
32 include ..
/..
/..
/make-rules
/shared-macros.mk
35 COMPONENT_VERSION
= 2.3.3
36 COMPONENT_REVISION
= 4
37 COMPONENT_SUMMARY
= The Graphics Draw Library
38 COMPONENT_PROJECT_URL
= https
://libgd.github.io
/
39 COMPONENT_SRC_NAME
= gd
40 COMPONENT_SRC
= libgd-
$(COMPONENT_SRC_NAME
)-$(COMPONENT_VERSION
)
41 COMPONENT_ARCHIVE
= $(COMPONENT_SRC_NAME
)-$(COMPONENT_VERSION
).
tar.gz
42 COMPONENT_ARCHIVE_HASH
= sha256
:24429f9d0dbe0f865aaa4b1a63558242396ba9134e6cfd32ca5e486a84483350
43 COMPONENT_ARCHIVE_URL
= https
://github.com
/libgd
/libgd
/archive
/$(COMPONENT_ARCHIVE
)
44 COMPONENT_FMRI
= library
/gd
45 COMPONENT_CLASSIFICATION
= System
/Libraries
46 COMPONENT_LICENSE
= GD2 License
47 COMPONENT_LICENSE_FILE
= COPYING
49 include $(WS_MAKE_RULES
)/common.mk
53 CFLAGS
+= $(CPP_LARGEFILES
)
54 CPPFLAGS
+= $(CPP_LARGEFILES
)
56 # build with the distribution preferred libjpeg implementation
57 CFLAGS
+= $(JPEG_CPPFLAGS
) $(JPEG_CFLAGS
)
58 CXXFLAGS
+= $(JPEG_CPPFLAGS
) $(JPEG_CXXFLAGS
)
59 LDFLAGS
+= $(JPEG_LDFLAGS
)
61 # Pass iconv related macro not set with CMake
62 CFLAGS
+= -DHAVE_ICONV_T_DEF
=1
64 # Needed for the test suite
65 COMPONENT_PRE_CONFIGURE_ACTION
= ( $(CLONEY
) $(SOURCE_DIR
) $(@D
) )
67 CMAKE_BINDIR
.32= bin
/$(MACH32
)
69 CMAKE_OPTIONS
+= -DCMAKE_CPP_FLAGS
="$(CPPFLAGS)"
70 CMAKE_OPTIONS
+= -DCMAKE_BUILD_TYPE
=Release
71 CMAKE_OPTIONS
+= -DCMAKE_INSTALL_INCLUDEDIR
=$(CMAKE_INCLUDEDIR
)/$(COMPONENT_NAME
)
72 CMAKE_OPTIONS
+= -DCMAKE_INSTALL_DOCDIR
=$(CMAKE_DOCDIR
)/$(COMPONENT_NAME
)
73 CMAKE_OPTIONS
+= -DBUILD_STATIC_LIBS
=OFF
74 CMAKE_OPTIONS
+= -DBUILD_TEST
=1
75 CMAKE_OPTIONS
+= -DENABLE_FONTCONFIG
=ON
76 CMAKE_OPTIONS
+= -DENABLE_FREETYPE
=ON
77 CMAKE_OPTIONS
+= -DFREETYPE_INCLUDE_DIRS
=/usr
/include/freetype2
78 CMAKE_OPTIONS
+= -DENABLE_ICONV
=ON
79 CMAKE_OPTIONS
+= -DICONV_INCLUDE_DIR
=/usr
/include
80 CMAKE_OPTIONS
+= -DENABLE_JPEG
=ON
81 # Tests fail in 64-bit if not specified explicitly
82 CMAKE_OPTIONS
+= -DJPEG_INCLUDE_DIR
=$(JPEG_INCDIR
)
83 CMAKE_OPTIONS
+= -DJPEG_LIBRARY
=$(JPEG_LIBDIR
)/libjpeg.so
85 CMAKE_OPTIONS
+= -DENABLE_LIQ
=OFF
86 CMAKE_OPTIONS
+= -DENABLE_PNG
=ON
87 CMAKE_OPTIONS
+= -DENABLE_TIFF
=ON
88 CMAKE_OPTIONS
+= -DENABLE_WEBP
=ON
89 CMAKE_OPTIONS
+= -DENABLE_XPM
=ON
91 COMPONENT_TEST_ENV_CMD
=
92 COMPONENT_TEST_TARGETS
=
94 COMPONENT_TEST_TRANSFORMS
= \
95 '-e "s/[0-9.]* sec//g"' \
100 # Manually added dependencies
101 REQUIRED_PACKAGES
+= library
/zlib
103 # Auto-generated dependencies
104 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
105 REQUIRED_PACKAGES
+= $(JPEG_IMPLEM_PKG
)
106 REQUIRED_PACKAGES
+= image
/library
/libpng16
107 REQUIRED_PACKAGES
+= image
/library
/libtiff
108 REQUIRED_PACKAGES
+= library
/libwebp
109 REQUIRED_PACKAGES
+= runtime
/perl
110 REQUIRED_PACKAGES
+= system
/library
111 REQUIRED_PACKAGES
+= system
/library
/fontconfig
112 REQUIRED_PACKAGES
+= system
/library
/freetype-2
113 REQUIRED_PACKAGES
+= system
/library
/math
114 REQUIRED_PACKAGES
+= x11
/library
/libxpm