130 lines
4.3 KiB
Makefile
Raw Normal View History

2019-10-04 14:18:17 +00:00
# $OpenBSD: Makefile,v 1.220 2019/10/04 14:18:17 ajacoutot Exp $
2017-09-05 08:09:19 +00:00
2018-02-15 08:47:41 +00:00
# XXX add support for libcloudproviders?
# Everything is a Freaking GLib/GTK+ problem
CFLAGS += -g
INSTALL_STRIP= # empty
2017-04-09 09:13:17 +00:00
2018-06-27 06:53:06 +00:00
PORTROACH= skipv:3.90.0,3.92.1,3.93.0,3.94.0
2013-03-27 17:55:44 +00:00
COMMENT-main= multi-platform graphical toolkit
COMMENT-cups= gtk+3 CUPS print backend
2014-03-26 08:31:13 +00:00
COMMENT-cloudprint= gtk+3 Google Cloud Print backend
COMMENT-guic= gtk+ icon theme caching utility
2013-03-27 17:55:44 +00:00
GNOME_PROJECT= gtk+
2019-10-04 14:18:17 +00:00
GNOME_VERSION= 3.24.12
Unbreak autoconf checks with clang by not using nested functions in the checks. Someone clearly did not read the autoconf documentation because using the following functions with a function declaration inside the body will end up declaring a function inside a function. - AC_TRY_COMPILE( [], [ int main() { return 0; } ], - AC_LANG_PROGRAM([[]], [[int main (void) { return 0; }]])], - AC_TRY_LINK([], [int main (void) { return 0; }], Result: int main () { int main (void) { return 0; } ; return 0; } nested functions is a gcc extension which is not supported by clang. test.c:4:17: error: function definition is not allowed here int main (void) { return 0; } ^ 1 error generated. This causes tests to fail in the configure scripts resulting in missing compile and link time flags from the builds. This resulted in weird behaviour of several software, like gnome hanging completely due to gtk+3 not being built properly. This change intrudces the following fixes: - remove int main() declaration from AC_TRY_COMPILE, AC_LANG_PROGRAM, AC_TRY_LINK as it comes with a declaration already, and people misused them - change to use AC_LANG_SOURCE when needed in case a complete source block is specified Most of the changes are in configure.(ac|in), however there were some cases where autoconf is either broken or the build failed because of an autoconf generated configure script. Everytihng else is switched to autoconf, so the maintainers can go ahead and upstream these diffs. There are more to come, we are continously checking the tree for these issues and in the future the infrastructure will error if such a case is found.
2017-09-25 09:16:12 +00:00
2013-03-27 17:55:44 +00:00
PKGNAME-main= gtk+3-${GNOME_VERSION}
PKGNAME-cups= gtk+3-cups-${GNOME_VERSION}
2014-03-26 08:31:13 +00:00
PKGNAME-cloudprint= gtk+3-cloudprint-${GNOME_VERSION}
PKGNAME-guic= gtk-update-icon-cache-${GNOME_VERSION}
2013-03-27 17:55:44 +00:00
CATEGORIES= x11 devel
2019-10-04 14:18:17 +00:00
SHARED_LIBS += gdk-3 2201.1 # 2404.8
SHARED_LIBS += gtk-3 2201.0 # 2404.8
2012-09-21 13:20:19 +00:00
SHARED_LIBS += gailutil-3 0.0 # 0.0
2013-03-27 17:55:44 +00:00
HOMEPAGE= http://www.gtk.org/
2013-03-27 17:55:44 +00:00
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# LGPLv2
2019-06-22 14:11:11 +00:00
PERMIT_PACKAGE= Yes
WANTLIB += ffi gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
2019-01-01 11:35:01 +00:00
WANTLIB += iconv intl m pcre pthread z
MULTI_PACKAGES= -main -cups -cloudprint -guic
MODULES= devel/dconf \
2013-03-27 17:55:44 +00:00
x11/gnome
2013-03-27 17:55:44 +00:00
LIB_DEPENDS-main= ${LIB_DEPENDS} \
2013-11-27 07:34:41 +00:00
devel/pango \
graphics/gdk-pixbuf2 \
2015-03-27 16:00:55 +00:00
x11/gnome/at-spi2-atk
2014-03-26 08:31:13 +00:00
RUN_DEPENDS-main= ${RUN_DEPENDS} \
x11/hicolor-icon-theme
# convenient dependency to prevent hunting what needs what:
# some apps need more icons than the stock ones
# some apps needs the svg version of the icon (librsvg pulled in)
RUN_DEPENDS-main += x11/gnome/adwaita-icon-theme
2018-04-22 13:28:32 +00:00
WANTLIB-main += ${WANTLIB} c epoxy fribidi
2017-10-29 15:58:52 +00:00
WANTLIB-main += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi
WANTLIB-main += Xinerama Xrandr Xrender atk-1.0 atk-bridge-2.0 atspi
WANTLIB-main += cairo cairo-gobject dbus-1 expat fontconfig freetype
WANTLIB-main += graphite2 gthread-2.0 harfbuzz pango-1.0 pangocairo-1.0
WANTLIB-main += pangoft2-1.0 pixman-1 xcb xcb-render xcb-shm png
2013-03-27 17:55:44 +00:00
LIB_DEPENDS-cups= ${LIB_DEPENDS} \
print/cups,-libs \
${BASE_PKGPATH},-main=${GNOME_VERSION}
2017-11-02 21:41:57 +00:00
RUN_DEPENDS-cups=
2018-04-22 13:28:32 +00:00
WANTLIB-cups += ${WANTLIB} epoxy idn2 fribidi
2017-10-29 15:58:52 +00:00
WANTLIB-cups += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi
WANTLIB-cups += Xinerama Xrandr Xrender atk-1.0 atk-bridge-2.0 atspi
WANTLIB-cups += cairo cairo-gobject dbus-1 expat fontconfig freetype
WANTLIB-cups += graphite2 gthread-2.0 harfbuzz pango-1.0 pangocairo-1.0
WANTLIB-cups += pangoft2-1.0 pixman-1 xcb xcb-render png
WANTLIB-cups += avahi-client avahi-common cups gdk-3 gmp xcb-shm
2017-02-14 03:51:19 +00:00
WANTLIB-cups += gnutls gtk-3 hogweed nettle p11-kit tasn1 unistring
2014-03-26 08:31:13 +00:00
LIB_DEPENDS-cloudprint= ${LIB_DEPENDS} \
devel/json-glib \
net/librest \
${BASE_PKGPATH},-main=${GNOME_VERSION}
2017-11-02 21:41:57 +00:00
RUN_DEPENDS-cloudprint=
2014-03-26 08:31:13 +00:00
2019-01-16 19:55:18 +00:00
WANTLIB-cloudprint += ${WANTLIB} epoxy fribidi idn2 psl unistring
2017-10-29 15:58:52 +00:00
WANTLIB-cloudprint += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi
WANTLIB-cloudprint += Xinerama Xrandr Xrender atk-1.0 atk-bridge-2.0 atspi
WANTLIB-cloudprint += cairo cairo-gobject dbus-1 expat fontconfig freetype
WANTLIB-cloudprint += graphite2 gthread-2.0 harfbuzz pango-1.0 pangocairo-1.0
2017-10-23 17:11:02 +00:00
WANTLIB-cloudprint += pangoft2-1.0 pixman-1 xcb xcb-render
2014-03-26 08:31:13 +00:00
WANTLIB-cloudprint += gdk-3 gtk-3 json-glib-1.0 rest-0.7 soup-2.4 soup-gnome-2.4
WANTLIB-cloudprint += sqlite3 xml2 lzma xcb-shm png
LIB_DEPENDS-guic= graphics/gdk-pixbuf2
2017-11-02 21:41:57 +00:00
RUN_DEPENDS-guic= x11/hicolor-icon-theme
# uses pledge()
WANTLIB-guic += ${WANTLIB} c
2014-03-26 08:31:13 +00:00
2014-10-08 12:15:09 +00:00
MODGNOME_TOOLS= docbook gobject-introspection gtk-update-icon-cache \
desktop-file-utils
2013-03-27 17:55:44 +00:00
TEST_IS_INTERACTIVE= x11
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --disable-libcanberra
2019-08-17 10:47:56 +00:00
# sync with devel/spidermonkey60 (ONLY_FOR_ARCHS):
# colord -> polkit -> spidermonkey60
.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "alpha" || \
${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "mips64el" || \
${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "powerpc" || \
${MACHINE_ARCH} == "sparc64"
2013-03-27 17:55:44 +00:00
LIB_DEPENDS-cups += graphics/colord
WANTLIB-cups += colordprivate colord lcms2
.else
CONFIGURE_ARGS += --disable-colord
.endif
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/gtk+3
# configure will disable lpr in default gtk-print-backends if cups is found
MAKE_FLAGS= GTK_PRINT_BACKENDS="file,lpr,cups,cloudprint"
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/gtk-3.0/modules
rm ${PREFIX}/lib/gtk-3.0/3.0.0/{printbackends,immodules}/*.{a,la}
.include <bsd.port.mk>