summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-27 10:02:54 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-06-27 10:02:54 +0000
commit2698bb4117a8b693700a1d8c1589fbd68db4432d (patch)
tree1aec17c0fd888c43280ec007b370adc1c7ad0ff6
parent52bc928e28ef348318080838cf7bf6b1e5c24ac9 (diff)
Use the bsd.xorg.mk rules to install the pkgconfig file and
add the libdrm_intel.pc. with oga@.
-rw-r--r--lib/libdrm/Makefile23
-rw-r--r--lib/libdrm/Makefile.inc2
-rw-r--r--lib/libdrm/intel/Makefile4
-rw-r--r--lib/libdrm/intel/libdrm_intel.pc.in10
4 files changed, 19 insertions, 20 deletions
diff --git a/lib/libdrm/Makefile b/lib/libdrm/Makefile
index e467804f1..afc1e438e 100644
--- a/lib/libdrm/Makefile
+++ b/lib/libdrm/Makefile
@@ -1,5 +1,6 @@
-# $OpenBSD: Makefile,v 1.3 2009/05/03 19:43:26 oga Exp $
+# $OpenBSD: Makefile,v 1.4 2009/06/27 10:02:53 matthieu Exp $
.include <bsd.xconf.mk>
+.include "${.CURDIR}/Makefile.inc"
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
SUBDIR=intel
@@ -7,10 +8,6 @@ SUBDIR=intel
LIB= drm
-DRM_MAJOR= 2
-DRM_MINOR= 4
-DRM_TINY= 9
-
INCSDIR= ${X11BASE}/include/
CPP= cpp -notraditional
@@ -41,23 +38,11 @@ includes: _SUBDIRUSE
NOPROFILE =
+PKGCONFIG= libdrm.pc
+
obj: _xenocara_obj
.include <bsd.lib.mk>
.include <bsd.xorg.mk>
-libdrm.pc: libdrm.pc.in Makefile
- sed -e 's,@prefix@,$(X11BASE),' \
- -e 's,@exec_prefix@,${X11BASE},' \
- -e 's,@libdir@,${LIBDIR},' \
- -e 's,@includedir@,${INCSDIR},' \
- -e 's,@PACKAGE_VERSION@,$(DRM_MAJOR).$(DRM_MINOR).$(DRM_TINY),' \
- < ${.CURDIR}/libdrm.pc.in > libdrm.pc
-
-afterinstall: libdrm.pc
- $(INSTALL) -c -m 644 -o root -g wheel libdrm.pc \
- ${DESTDIR}${LIBDIR}/pkgconfig
-
-CLEANFILES+= libdrm.pc
-
.include <bsd.subdir.mk>
diff --git a/lib/libdrm/Makefile.inc b/lib/libdrm/Makefile.inc
new file mode 100644
index 000000000..4a9f8b171
--- /dev/null
+++ b/lib/libdrm/Makefile.inc
@@ -0,0 +1,2 @@
+PACKAGE_VERSION= 2.4.9
+
diff --git a/lib/libdrm/intel/Makefile b/lib/libdrm/intel/Makefile
index 0c82559bc..b7401c961 100644
--- a/lib/libdrm/intel/Makefile
+++ b/lib/libdrm/intel/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.1 2009/01/26 23:14:37 oga Exp $
+# $OpenBSD: Makefile,v 1.2 2009/06/27 10:02:53 matthieu Exp $
.include <bsd.xconf.mk>
LIB= drm_intel
@@ -17,6 +17,8 @@ SRCS= intel_bufmgr.c \
intel_bufmgr_gem.c \
mm.c
+PKGCONFIG= libdrm_intel.pc
+
LDADD+= -L${X11BASE}/lib -lX11
includes:
diff --git a/lib/libdrm/intel/libdrm_intel.pc.in b/lib/libdrm/intel/libdrm_intel.pc.in
new file mode 100644
index 000000000..3b4b74cd7
--- /dev/null
+++ b/lib/libdrm/intel/libdrm_intel.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdrm
+Description: Userspace interface to kernel DRM services
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -ldrm -ldrm_intel
+Cflags: -I${includedir} -I/usr/include/dev/pci/drm