pkgsrc-wip/modular-xorg-server-dfbsd-m.../Makefile.common

284 lines
9.2 KiB
Makefile

# $NetBSD: Makefile.common,v 1.27 2019/02/27 16:32:58 wiz Exp $
# used by x11/modular-xorg-server/Makefile
# used by x11/modular-xorg-xephyr/Makefile
# 2019-05-20 xwayland: Avoid a crash on pointer enter with a grab
COMMIT_ID= 0a07446318f248b65fcbc8ab8a73ead51153f09e
# 2019-05-07 os: add support for systemd notification
# COMMIT_ID= bb46e785405891775a30636a647e40a7dc4d1ca7
# 2019-05-02 travis: Suppress uninteresting warnings on OSX
# COMMIT_ID= dd1aebccf2e1722ac10fb73ed438251785283b8d
# 2019-05-02 hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck.
# COMMIT_ID= 71cff63c06a6b494dc8921270535f33fb78bd32b
# 2019-05-01 glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling
# COMMIT_ID= 007d812a832cf32b02542bbae13a3997e655171a
# 2019-04-30 meson: Don't use strndup() unless it's prototyped
# COMMIT_ID= 504468d2cf56c6588342249c4625a0bfadf0751d
# 2019-04-29 meson: Fix building unit tests when protocol headers aren't in default include path
# COMMIT_ID= 1f5742d27187fabba0c556b50ebfcd9fddfdcf2b
# 2019-04-23 hw/xwayland/Makefile.am: fix build without glx
# COMMIT_ID= 836f93de99b35050d78d61d3654f7c5655184144
# 2019-04-19 ephyr: fix typo: rquires -> requires
# COMMIT_ID= 0854732d55a76cdb584306e8e653c2bcd292a7cb
# 2019-04-18 appveyor: Use ccache
# COMMIT_ID= 9c7ebf259f49f5e63906f572a1101747ac023b72
# 2019-04-17 xsync: Add resource inside of SyncCreate, export SyncCreate
# COMMIT_ID= 7f962c70b6d9c346477f23f6c15211e749110078
# 2019-04-17 Fix missing prototype warning for xf86_find_platform_device_by_devnum()
# COMMIT_ID= 2764128e9fe775fabe28b0b9be427c16754e7128
# 2019-04-12 dix: Remove WindowRec::backStorage
# COMMIT_ID= 6975807945d12c07f00e18df7fafeff43efa0267
# 2019-04-04 test: Fix meson build with xvfb disabled.
# COMMIT_ID= 0a005c4fe4fccc9bb6c3a5266065f8437621fdb9
# 2019-03-29 present: Call present_vblank_scrap in screen mode
# COMMIT_ID= 4adda1f6359fd96436dd61d0250b84f55b2fd277
# 2019-03-20 Revert "systemd-logind: Monitor systemd-logind going away"
# COMMIT_ID= 5a549c957a873bd44ab351e627828905ee7dbf18
# 2019-03-13 Add xf86OSInputThreadInit to stub os-support as well
# COMMIT_ID= c020769dbfb965740c8441d8242b738ef572a7c9
# 2019-03-11 mi: Shortcut miDoCopy/miCopyArea based on clipList
# COMMIT_ID= f665a9c9e6c8643f3050378249db3088ae3057be
# 2019-03-05 meson: Bump required meson version to 0.46
# COMMIT_ID= 7e046b9467784451769af3a03db46e3c690063b0
# 2019-02-27 Revert "gitlab-ci: Only run docker-image stage if relevant source files change"
# COMMIT_ID= 0ec9a13c2a207e98e2dd6b352552c0e069af0727
# 2019-02-25 os-support/solaris: Set IOPL for input thread too
# COMMIT_ID= 12769c516d9356bd92f90e2f53a4853dbfdc4aed
PORTNAME= xserver
DISTNAME= ${PORTNAME}-${COMMIT_ID}
XORG_VERSION= 1.20.4
CATEGORIES= x11
# MASTER_SITES= ${MASTER_SITE_XORG:=xserver/}
# EXTRACT_SUFX= .tar.bz2
MASTER_SITES= http://cgit.freedesktop.org/xorg/${PORTNAME}/snapshot/
EXTRACT_SUFX= .tar.xz
HOMEPAGE= https://xorg.freedesktop.org/
LICENSE= mit AND modified-bsd AND x11 # with no-advertising clause
# GNU_CONFIGURE= yes
# USE_LIBTOOL= yes
# USE_TOOLS+= gmake pkg-config autoconf automake autoreconf
USE_TOOLS+= gmake pkg-config
USE_LANGUAGES+= c99
PKGCONFIG_OVERRIDE+= xorg-server.pc.in
SHLIBTOOL_OVERRIDE= # empty
BUILD_DEFS+= VARBASE
BUILD_DEFS_EFFECTS+= XKB_OUTPUT_DIR
OWN_DIRS+= ${VARBASE}/log
OWN_DIRS+= ${XKB_OUTPUT_DIR}
XKB_OUTPUT_DIR?= ${VARBASE}/db/xkb # XXX sync with xkeyboard-config
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
CONFIGURE_ARGS+= --with-xkb-output=${XKB_OUTPUT_DIR:Q}
# MESON_ARGS+= -Dlog_dir=${VARBASE:Q}/log
MESON_ARGS+= -Dlocalstatedir=${VARBASE:Q}
MESON_ARGS+= -Dxkb_output_dir=${XKB_OUTPUT_DIR:Q}
.if !empty(USE_TOOLS:Mauto*)
TOOLS_DEPENDS+= xorg-util-macros>=1.1.5:../../devel/xorg-util-macros
.endif
DEPENDS+= xkbcomp-[0-9]*:../../x11/xkbcomp
DEPENDS+= xkeyboard-config-[0-9]*:../../x11/xkeyboard-config
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
CPPFLAGS+= -D_OPENBSD_SOURCE # for reallocarray(3)
CONFIGURE_ARGS+= --with-builder-addr="tech-x11@NetBSD.org"
CONFIGURE_ARGS+= --with-os-vendor="The NetBSD Foundation"
MESON_ARGS+= -Dbuilder_addr="tech-x11@NetBSD.org"
MESON_ARGS+= -Dbuilder_string="The NetBSD Foundation"
# TLS is not supported by NetBSD<6
. if !empty(OS_VERSION:M[0-5].*)
CONFIGURE_ENV+= ac_cv_tls=no
CONFIGURE_ARGS+= --disable-glx-tls
. endif
.endif
CONFIGURE_ARGS+= --with-os-name=${MACHINE_PLATFORM:Q}
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts/X11
LEGACY_FONT_PATHS=
DEFAULT_FONT_PATHS=
.for f in misc TTF OTF Type1 100dpi 75dpi cyrillic
DEFAULT_FONT_PATHS+= ${PREFIX}/share/fonts/X11/${f}
LEGACY_FONT_PATHS+= ${PREFIX}/lib/X11/fonts/${f}
.endfor
FONT_PATHS= ${DEFAULT_FONT_PATHS} ${LEGACY_FONT_PATHS}
CONFIGURE_ARGS+= --with-default-font-path=${FONT_PATHS:ts,:Q}
MESON_ARGS+= -Ddefault_font_path=${FONT_PATHS:ts,:Q}
CONFIGURE_ARGS+= --disable-config-hal
CONFIGURE_ARGS+= --disable-dmx
MESON_ARGS+= -Dhal=false
MESON_ARGS+= -Ddmx=false
CONFIGURE_ARGS+= --disable-xwin
MESON_ARGS+= -Dxwin=false
CONFIGURE_ARGS+= --disable-xephyr
MESON_ARGS+= -Dxephyr=false
CONFIGURE_ARGS+= --disable-kdrive
#CONFIGURE_ARGS+= --disable-kdrive-vesa
CONFIGURE_ARGS+= --enable-xtrans-send-fds
CONFIGURE_ARGS+= --with-int10=x86emu
MESON_ARGS+= -Dint10=x86emu
.if ${OPSYS} != "Linux"
MESON_ARGS+= -Dudev=false
MESON_ARGS+= -Dxwayland=false
.endif
# From FreeBSD ports
# .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
.if ${OPSYS} == "FreeBSD"
CONFIGURE_ARGS+= --with-shared-memory-dir=/tmp
CONFIGURE_ARGS+= --disable-config-udev
CONFIGURE_ARGS+= --disable-config-udev-kms
# CONFIGURE_ARGS+= --disable-xnest
# CONFIGURE_ARGS+= --disable-xvfb
CONFIGURE_ARGS+= --disable-xwayland
CONFIGURE_ARGS+= --enable-xcsecurity
# MESON_ARGS+= -Dudev=false
# MESON_ARGS+= -Dxwayland=false
MESON_ARGS+= -Dxcsecurity=true
.endif
# FreeBSD ports devel/libunwind not ported to pkgsrc
# .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
# CONFIGURE_ARGS+= --disable-libunwind
# .endif
CONFIGURE_ENV+= APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4
PLIST_VARS+= sunos
PLIST_SUBST+= SUNOS_ARCH=${SUNOS_ARCH}
.if ${OPSYS} == "SunOS"
PLIST.sunos= yes
. if ${MACHINE_ARCH} == "i386"
SUNOS_ARCH= ia32
. elif ${MACHINE_ARCH} == "x86_64"
SUNOS_ARCH= amd64
. elif ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
SUNOS_ARCH= sparcv8plus
. endif
.endif
PLIST_VARS+= sparc
.if !empty(MACHINE_ARCH:Msparc*)
PLIST.sparc= yes
.endif
# Workaround for PR#41556.
# Avoid to use bsd_kqueue_apm, force to use bsd_apm instead.
CONFIGURE_ENV.NetBSD+= ac_cv_header_sys_event_h=no
# Avoid picking up epoll on illumos
CONFIGURE_ENV.SunOS+= ac_cv_func_epoll_create1=no
# Only available in newer releases
CONFIGURE_ENV.SunOS+= ac_cv_func_mkostemp=no
# Avoid secure-rpc on NetBSD
.if ${OPSYS} == "NetBSD"
MESON_ARGS+= -Dsecure-rpc=false
.endif
# .if ${OPSYS} == "FreeBSD"
# CFLAGS+= -Wno-missing-braces
# .endif
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
# Workaround glamor lockups when drm-devel-kmod (4.15-4.17) is installed
# with partial reverting of commit
# 86b2d8740a330deafe8a9bbf0402705a43efbb42
SUBST_CLASSES+= glamor
SUBST_STAGE.glamor= pre-configure
SUBST_MESSAGE.glamor= Workaround glamor lockups
SUBST_FILES.glamor= glamor/glamor_egl.c
SUBST_SED.glamor= -e '/glamor_make_pixmap_exportable/s,FALSE,TRUE,g'
.endif
INSTALLATION_DIRS+= lib/xorg/modules/drivers lib/xorg/modules/input
BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=7.8.0
BUILDLINK_API_DEPENDS.xtrans+= xtrans>=1.2.2
BUILDLINK_API_DEPENDS.dri+= dri>=7.8
BUILDLINK_API_DEPENDS.xfont+= xfont>=1.4.2
BUILDLINK_API_DEPENDS.pixman+= pixman>=0.21.8
BUILD_DEPENDS+= tradcpp-[0-9]*:../../devel/tradcpp
CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"
# .if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Bitrig" || ${OPSYS} == "MirBSD"
# CONFIGURE_ARGS+= --with-sha1=libc
# .else
.include "../../security/nettle/buildlink3.mk"
CONFIGURE_ARGS+= --with-sha1=libnettle
# .endif
# Autotools
# pre-configure:
# cd ${WRKSRC} && autoreconf -vif
# Meson
.include "../../devel/meson/build.mk"
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/libfontenc/buildlink3.mk"
BUILDLINK_API_DEPENDS.libpciaccess+= libpciaccess>=0.11.0
BUILDLINK_DEPMETHOD.libpciaccess= full
.include "../../sysutils/libpciaccess/buildlink3.mk"
BUILDLINK_API_DEPENDS.xorgproto+= xorgproto>=2018.3
.include "../../x11/xorgproto/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXau/buildlink3.mk"
.include "../../x11/libXaw/buildlink3.mk"
BUILDLINK_API_DEPENDS.libXext+= libXext>=1.1.1
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXfixes/buildlink3.mk"
.include "../../x11/libXfont2/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libXxf86vm/buildlink3.mk"
.include "../../x11/libXinerama/buildlink3.mk"
.include "../../x11/libxkbfile/buildlink3.mk"
.include "../../x11/pixman/buildlink3.mk"
.include "../../x11/xcb-util-keysyms/buildlink3.mk"
.include "../../x11/xtrans/buildlink3.mk"
.include "../../fonts/font-util/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../sysutils/dbus/buildlink3.mk"
.include "../../x11/xkbcomp/buildlink3.mk"