| 1 |
operz |
39 |
NAME = gtk2 |
| 2 |
|
|
VERSION = 2.24.33 |
| 3 |
|
|
DISTNAME = gtk+-$(VERSION) |
| 4 |
|
|
|
| 5 |
|
|
CATEGORIES = utils |
| 6 |
|
|
|
| 7 |
|
|
DESCRIPTION = GTK+ 2 graphical user interface toolkit |
| 8 |
|
|
define BLURB |
| 9 |
|
|
GTK+ is a multi-platform toolkit for creating graphical user interfaces. |
| 10 |
|
|
Version 2.x is widely used by applications including Pidgin. |
| 11 |
|
|
endef |
| 12 |
|
|
|
| 13 |
|
|
DYNURLS = https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.33.tar.xz |
| 14 |
|
|
DISTFILES = gtk+-2.24.33.tar.xz |
| 15 |
|
|
|
| 16 |
|
|
LICENSE = COPYING |
| 17 |
|
|
|
| 18 |
|
|
WORKSRC = $(WORKDIR)/gtk+-$(VERSION) |
| 19 |
|
|
|
| 20 |
|
|
PACKAGES = OZSWgtk2 |
| 21 |
|
|
SPKG_DESC_OZSWgtk2 = GTK+ 2 graphical user interface toolkit |
| 22 |
|
|
SPKG_CLASSES = cswdictconf |
| 23 |
|
|
RUNTIME_DEP_PKGS_OZSWgtk2 = OZSWglib OZSWpango OZSWcairo OZSWatk OZSWgdkpixbuf |
| 24 |
|
|
RUNTIME_DEP_PKGS_OZSWgtk2 += OZSWlibX11 OZSWlibXext OZSWlibXrender |
| 25 |
|
|
RUNTIME_DEP_PKGS_OZSWgtk2 += OZSWlibXi OZSWlibXrandr OZSWlibXcursor |
| 26 |
|
|
RUNTIME_DEP_PKGS_OZSWgtk2 += OZSWlibXfixes OZSWlibXdamage OZSWlibXcomposite OZSWlibXinerama |
| 27 |
|
|
RUNTIME_DEP_PKGS_OZSWgtk2 += OZSWfontconfig OZSWfreetype |
| 28 |
|
|
|
| 29 |
|
|
# gtk-update-icon-cache is also provided by OZSWgtk3; exclude from this package |
| 30 |
|
|
EXTRA_PKGFILES_EXCLUDED += .*/bin/gtk-update-icon-cache |
| 31 |
|
|
|
| 32 |
|
|
CONFIGURE_ARGS = $(DIRPATHS) |
| 33 |
|
|
CONFIGURE_ARGS += --with-gdktarget=x11 |
| 34 |
|
|
CONFIGURE_ARGS += --disable-cups |
| 35 |
|
|
CONFIGURE_ARGS += --without-libjasper |
| 36 |
|
|
CONFIGURE_ARGS += --disable-introspection |
| 37 |
|
|
CONFIGURE_ARGS += --disable-gtk-doc |
| 38 |
|
|
CONFIGURE_ARGS += --disable-man |
| 39 |
|
|
CONFIGURE_ARGS += --enable-explicit-deps=no |
| 40 |
|
|
CONFIGURE_ARGS += --disable-dependency-tracking |
| 41 |
|
|
|
| 42 |
|
|
include gar/category.mk |
| 43 |
|
|
|
| 44 |
|
|
# Solaris feature_tests.h requires _XOPEN_SOURCE=600. |
| 45 |
|
|
# GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28: GLib 2.68+ changed deprecated macros |
| 46 |
|
|
# (G_TYPE_INSTANCE_GET_PRIVATE, G_STATIC_PRIVATE_INIT, etc.) to use _Pragma("GCC warning") |
| 47 |
|
|
# which is a statement pragma, not usable as an expression. GTK2 2.24 only needs GLib 2.28 |
| 48 |
|
|
# API, so pinning to 2.28 avoids all _Pragma wrappers added for 2.32+ deprecations. |
| 49 |
|
|
CFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28 |
| 50 |
|
|
|
| 51 |
|
|
post-extract: |
| 52 |
|
|
# gtksearchenginesimple.c defines _XOPEN_SOURCE 500 which overrides our 600, |
| 53 |
|
|
# causing Solaris feature_tests.h to error. Patch it to 600. |
| 54 |
|
|
/usr/bin/gsed -i 's/^#define _XOPEN_SOURCE 500/#define _XOPEN_SOURCE 600/' \ |
| 55 |
|
|
$(WORKSRC)/gtk/gtksearchenginesimple.c |
| 56 |
|
|
# papi_status_t is an enum/int but initialized with NULL -- error in GCC 12 |
| 57 |
|
|
/usr/bin/gsed -i 's/papi_status_t pstatus = NULL;/papi_status_t pstatus = 0;/' \ |
| 58 |
|
|
$(WORKSRC)/modules/printbackends/papi/gtkprintbackendpapi.c |
| 59 |
|
|
@$(MAKECOOKIE) |
| 60 |
|
|
|
| 61 |
|
|
post-configure: |
| 62 |
|
|
# Patch LIBS in all generated Makefiles to add -lintl (libintl is a DSO on Solaris) |
| 63 |
|
|
find $(WORKSRC) -name Makefile \ |
| 64 |
|
|
-exec /usr/bin/gsed -i 's/^LIBS = *$$/LIBS = -lintl/' {} \; |
| 65 |
|
|
# Fix libtool ECHO on Solaris (ksh93 builtin "print -r --" fails under bash) |
| 66 |
|
|
find $(WORKSRC) -name "libtool" \ |
| 67 |
|
|
-exec /usr/bin/gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \; |
| 68 |
|
|
@$(MAKECOOKIE) |