diff options
Diffstat (limited to 'graphics/libdrm')
-rw-r--r-- | graphics/libdrm/Makefile | 45 | ||||
-rw-r--r-- | graphics/libdrm/distinfo | 4 | ||||
-rw-r--r-- | graphics/libdrm/files/extra-configure | 39 | ||||
-rw-r--r-- | graphics/libdrm/files/extra-tests_modetest_Makefile.in | 52 | ||||
-rw-r--r-- | graphics/libdrm/files/extra-tests_modetest_modetest.c | 13 | ||||
-rw-r--r-- | graphics/libdrm/files/extra-tests_modetest_strchrnul.c | 48 | ||||
-rw-r--r-- | graphics/libdrm/pkg-plist | 25 |
7 files changed, 201 insertions, 25 deletions
diff --git a/graphics/libdrm/Makefile b/graphics/libdrm/Makefile index 1ff688d92a3d..3c3cf5b8b7a2 100644 --- a/graphics/libdrm/Makefile +++ b/graphics/libdrm/Makefile @@ -10,23 +10,26 @@ MASTER_SITES= http://dri.freedesktop.org/libdrm/ MAINTAINER= x11@FreeBSD.org COMMENT= Userspace interface to kernel Direct Rendering Module services -BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs LIB_DEPENDS= pciaccess:${PORTSDIR}/devel/libpciaccess \ pthread-stubs:${PORTSDIR}/devel/libpthread-stubs -RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:${PORTSDIR}/devel/libpthread-stubs USE_BZIP2= yes GNU_CONFIGURE= yes USE_LDCONFIG= yes -CONFIGURE_ARGS= --enable-nouveau-experimental-api - MAKE_JOBS_SAFE= yes .if defined(WITH_NEW_XORG) -OPTIONS_DEFINE= KMS -KMS_DESC= Enable experimental KMS support +USE_GMAKE= yes + +OPTIONS_DEFINE= KMS MANPAGES +OPTIONS_DEFAULT=KMS +KMS_DESC= Enable KMS support + +.if defined(PACKAGE_BUILDING) +OPTIONS_DEFAULT+= MANPAGES +.endif .include <bsd.port.options.mk> @@ -38,12 +41,34 @@ PLIST_SUB+= KMS="" PLIST_SUB+= KMS="@comment " .endif -LIBDRM_VERSION= 2.4.31 -LIBDRM_REVISION=1 +.if ${PORT_OPTIONS:MMANPAGES} +BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \ + xsltproc:${PORTSDIR}/textproc/libxslt +MAN3= drmAvailable.3 \ + drmHandleEvent.3 \ + drmModeGetResources.3 +MAN7= drm-gem.7 \ + drm-kms.7 \ + drm-memory.7 \ + drm-mm.7 \ + drm-ttm.7 \ + drm.7 +.else +CONFIGURE_ARGS+=--disable-manpages +.endif + +LIBDRM_VERSION= 2.4.44 +LIBDRM_REVISION=0 PLIST_SUB+= OLD="@comment " NEW="" +EXTRA_PATCHES+= ${FILESDIR}/extra-configure \ + ${FILESDIR}/extra-tests_modetest_Makefile.in \ + ${FILESDIR}/extra-tests_modetest_modetest.c \ + ${FILESDIR}/extra-tests_modetest_strchrnul.c +CONFIGURE_ARGS+=--disable-vmwgfx .else +CONFIGURE_ARGS= --enable-nouveau-experimental-api LIBDRM_VERSION= 2.4.17 -LIBDRM_REVISION=1 +LIBDRM_REVISION=0 PLIST_SUB+= OLD="" NEW="@comment " .endif @@ -59,7 +84,7 @@ PLIST_SUB+= RADEON_DRIVERS="@comment " pre-patch: @${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g; \ - 12661s/x86_/amd/g' \ + s,i?86|x86_64),i?86|amd64|x86_64),g' \ ${WRKSRC}/configure .include <bsd.port.post.mk> diff --git a/graphics/libdrm/distinfo b/graphics/libdrm/distinfo index df36a538eeed..1c2e82768509 100644 --- a/graphics/libdrm/distinfo +++ b/graphics/libdrm/distinfo @@ -1,4 +1,4 @@ SHA256 (libdrm-2.4.17.tar.bz2) = b8a4e7c610b0e970546d791c06e28882857a49d34698633a89292d7ae142316a SIZE (libdrm-2.4.17.tar.bz2) = 408882 -SHA256 (libdrm-2.4.31.tar.bz2) = 8fc7e0e5b2f9bf493447a4ef7adc49174a700824457774cb53c1b8f2da866af4 -SIZE (libdrm-2.4.31.tar.bz2) = 475677 +SHA256 (libdrm-2.4.44.tar.bz2) = 42b45ad15bb1bc52630a4b37b7afcfaea27e01b3c0b4791ef25d0f7b2456f6a2 +SIZE (libdrm-2.4.44.tar.bz2) = 538416 diff --git a/graphics/libdrm/files/extra-configure b/graphics/libdrm/files/extra-configure new file mode 100644 index 000000000000..3d9d5718483d --- /dev/null +++ b/graphics/libdrm/files/extra-configure @@ -0,0 +1,39 @@ +--- configure.orig 2013-02-22 00:30:16.861698520 +0100 ++++ configure 2013-02-22 00:30:26.189704713 +0100 +@@ -671,6 +671,8 @@ + HAVE_VMWGFX_TRUE + HAVE_LIBKMS_FALSE + HAVE_LIBKMS_TRUE ++HAVE_STRCHRNUL_FALSE ++HAVE_STRCHRNUL_TRUE + CLOCK_LIB + pkgconfigdir + PTHREADSTUBS_LIBS +@@ -12341,6 +12345,27 @@ + done + + ++for ac_func in strchrnul ++do : ++ ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" ++if test "x$ac_cv_func_strchrnul" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STRCHRNUL 1 ++_ACEOF ++ HAVE_STRCHRNUL=yes ++fi ++done ++ ++ ++ if test "x$ac_cv_func_strchrnul" = xyes; then ++ HAVE_STRCHRNUL_TRUE= ++ HAVE_STRCHRNUL_FALSE='#' ++else ++ HAVE_STRCHRNUL_TRUE='#' ++ HAVE_STRCHRNUL_FALSE= ++fi ++ ++ + + + MAYBE_WARN="-Wall -Wextra \ diff --git a/graphics/libdrm/files/extra-tests_modetest_Makefile.in b/graphics/libdrm/files/extra-tests_modetest_Makefile.in new file mode 100644 index 000000000000..74748e9b240a --- /dev/null +++ b/graphics/libdrm/files/extra-tests_modetest_Makefile.in @@ -0,0 +1,52 @@ +--- tests/modetest/Makefile.in.orig 2013-04-04 15:41:48.212028807 +0200 ++++ tests/modetest/Makefile.in 2013-04-04 15:45:21.384003991 +0200 +@@ -36,8 +52,11 @@ + host_triplet = @host@ + @HAVE_INSTALL_TESTS_TRUE@bin_PROGRAMS = modetest$(EXEEXT) + @HAVE_INSTALL_TESTS_FALSE@noinst_PROGRAMS = modetest$(EXEEXT) +-@HAVE_CAIRO_TRUE@am__append_1 = $(CAIRO_CFLAGS) +-@HAVE_CAIRO_TRUE@am__append_2 = $(CAIRO_LIBS) ++@HAVE_STRCHRNUL_FALSE@am__append_1 = \ ++@HAVE_STRCHRNUL_FALSE@ strchrnul.c ++ ++@HAVE_CAIRO_TRUE@am__append_2 = $(CAIRO_CFLAGS) ++@HAVE_CAIRO_TRUE@am__append_3 = $(CAIRO_LIBS) + subdir = tests/modetest + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -53,7 +72,10 @@ + CONFIG_CLEAN_VPATH_FILES = + am__installdirs = "$(DESTDIR)$(bindir)" + PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +-am_modetest_OBJECTS = buffers.$(OBJEXT) modetest.$(OBJEXT) ++am__modetest_SOURCES_DIST = buffers.c modetest.c buffers.h strchrnul.c ++@HAVE_STRCHRNUL_FALSE@am__objects_1 = strchrnul.$(OBJEXT) ++am_modetest_OBJECTS = buffers.$(OBJEXT) modetest.$(OBJEXT) \ ++ $(am__objects_1) + modetest_OBJECTS = $(am_modetest_OBJECTS) + am__DEPENDENCIES_1 = + @HAVE_CAIRO_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@@ -229,12 +265,10 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CFLAGS = -I$(top_srcdir)/include/drm -I$(top_srcdir)/libkms/ \ +- -I$(top_srcdir) $(am__append_1) +-modetest_SOURCES = \ +- buffers.c modetest.c buffers.h +- ++ -I$(top_srcdir) $(am__append_2) ++modetest_SOURCES = buffers.c modetest.c buffers.h $(am__append_1) + modetest_LDADD = $(top_builddir)/libdrm.la \ +- $(top_builddir)/libkms/libkms.la $(am__append_2) ++ $(top_builddir)/libkms/libkms.la $(am__append_3) + all: all-am + + .SUFFIXES: +@@ -333,6 +370,7 @@ + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffers.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetest.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@ + + .c.o: + @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/graphics/libdrm/files/extra-tests_modetest_modetest.c b/graphics/libdrm/files/extra-tests_modetest_modetest.c new file mode 100644 index 000000000000..db62e98f2cdf --- /dev/null +++ b/graphics/libdrm/files/extra-tests_modetest_modetest.c @@ -0,0 +1,13 @@ +--- tests/modetest/modetest.c.orig 2013-02-22 00:44:28.203705216 +0100 ++++ tests/modetest/modetest.c 2013-02-22 00:44:56.803699770 +0100 +@@ -57,6 +57,10 @@ + + #include "buffers.h" + ++#ifndef HAVE_STRCHRNUL ++char *strchrnul(const char *, int); ++#endif ++ + drmModeRes *resources; + int fd, modes; + diff --git a/graphics/libdrm/files/extra-tests_modetest_strchrnul.c b/graphics/libdrm/files/extra-tests_modetest_strchrnul.c new file mode 100644 index 000000000000..26ba9ac2e8b3 --- /dev/null +++ b/graphics/libdrm/files/extra-tests_modetest_strchrnul.c @@ -0,0 +1,48 @@ +--- tests/modetest/strchrnul.c.orig 2013-02-22 00:35:04.198698781 +0100 ++++ tests/modetest/strchrnul.c 2013-02-22 00:34:36.280333357 +0100 +@@ -0,0 +1,45 @@ ++/*- ++ * Copyright (c) 2013 Niclas Zeising ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ */ ++ ++/* ++ * Copied from: ++ * svn://svn.freebsd.org/base/head/lib/libc/string/strchrnul.c 246766 2013-02-13 15:46:33Z zeising ++ */ ++ ++char * ++strchrnul(const char *p, int ch) ++{ ++ char c; ++ ++ c = ch; ++ for (;; ++p) { ++ if (*p == c || *p == '\0') ++ return ((char *)p); ++ } ++ /* NOTREACHED */ ++} ++ diff --git a/graphics/libdrm/pkg-plist b/graphics/libdrm/pkg-plist index 4cdc099404b7..b8b6ed53fb45 100644 --- a/graphics/libdrm/pkg-plist +++ b/graphics/libdrm/pkg-plist @@ -17,12 +17,13 @@ %%NEW%%include/libdrm/drm_mode.h %%NEW%%include/libdrm/drm_sarea.h %%NEW%%include/libdrm/i915_drm.h +%%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_aub.h %%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_bufmgr.h %%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_debug.h %%NEW%%include/libdrm/mach64_drm.h %%NEW%%include/libdrm/mga_drm.h +%%NEW%%include/libdrm/nouveau.h %%NEW%%include/libdrm/nouveau_drm.h -%%NEW%%include/libdrm/nouveau_drmif.h %%NEW%%include/libdrm/r128_drm.h %%NEW%%%%RADEON_DRIVERS%%include/libdrm/r600_pci_ids.h %%NEW%%%%RADEON_DRIVERS%%include/libdrm/radeon_bo.h @@ -37,17 +38,14 @@ %%NEW%%include/libdrm/sis_drm.h %%NEW%%include/libdrm/via_drm.h %%NEW%%%%KMS%%include/libkms/libkms.h -include/nouveau/nouveau_bo.h -include/nouveau/nouveau_channel.h +%%OLD%%include/nouveau/nouveau_bo.h +%%OLD%%include/nouveau/nouveau_channel.h %%OLD%%include/nouveau/nouveau_class.h -include/nouveau/nouveau_device.h -include/nouveau/nouveau_grobj.h -include/nouveau/nouveau_notifier.h -include/nouveau/nouveau_pushbuf.h -%%NEW%%include/nouveau/nouveau_reloc.h -include/nouveau/nouveau_resource.h -%%NEW%%include/nouveau/nv04_pushbuf.h -%%NEW%%include/nouveau/nvc0_pushbuf.h +%%OLD%%include/nouveau/nouveau_device.h +%%OLD%%include/nouveau/nouveau_grobj.h +%%OLD%%include/nouveau/nouveau_notifier.h +%%OLD%%include/nouveau/nouveau_pushbuf.h +%%OLD%%include/nouveau/nouveau_resource.h include/xf86drm.h include/xf86drmMode.h lib/libdrm.la @@ -58,7 +56,8 @@ lib/libdrm.so.2 %%INTEL_DRIVER%%lib/libdrm_intel.so.1 lib/libdrm_nouveau.la lib/libdrm_nouveau.so -lib/libdrm_nouveau.so.1 +%%OLD%%lib/libdrm_nouveau.so.1 +%%NEW%%lib/libdrm_nouveau.so.2 %%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.la %%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so %%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1 @@ -70,7 +69,7 @@ libdata/pkgconfig/libdrm.pc libdata/pkgconfig/libdrm_nouveau.pc %%NEW%%%%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc %%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc -@dirrm include/nouveau +%%OLD%%@dirrm include/nouveau %%NEW%%%%KMS%%@dirrm include/libkms %%NEW%%@dirrm include/libdrm %%OLD%%@dirrm include/drm |