From owner-svn-src-all@FreeBSD.ORG Sun Jan 12 21:56:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6667A89; Sun, 12 Jan 2014 21:56:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FF241477; Sun, 12 Jan 2014 21:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0CLuRkx031628; Sun, 12 Jan 2014 21:56:27 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0CLuQR7031624; Sun, 12 Jan 2014 21:56:26 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201401122156.s0CLuQR7031624@svn.freebsd.org> From: Julio Merino Date: Sun, 12 Jan 2014 21:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260576 - in head: lib/atf lib/atf/libatf-c lib/atf/libatf-c++ usr.bin/atf/atf-sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jan 2014 21:56:27 -0000 Author: jmmv Date: Sun Jan 12 21:56:26 2014 New Revision: 260576 URL: http://svnweb.freebsd.org/changeset/base/260576 Log: Generate and install pkg-config files for atf. These files are required to get packages in ports to build against atf and also to get a couple of currently-failing tests to pass. I'm following the approach already used by the libusb pkg-config files installed by the system regarding the location and the install rules. MFC after: 5 days Added: head/lib/atf/common.mk (contents, props changed) Modified: head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c/Makefile head/usr.bin/atf/atf-sh/Makefile Added: head/lib/atf/common.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/common.mk Sun Jan 12 21:56:26 2014 (r260576) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# Common Makefile code for all components of ATF. +# + +.if !defined(ATF) +.error "ATF must be defined and point to the contrib/atf directory" +.endif + +# Depend on the atf-version target to generate a file that contains the +# version number of the currently imported ATF release and that only +# changes on new imports. +atf-version: atf-version-real + @cmp -s atf-version atf-version-real \ + || cp atf-version-real atf-version +atf-version-real: .PHONY + @grep 'define VERSION' ${ATF}/bconfig.h \ + | cut -d '"' -f 2 >atf-version-real +CLEANFILES+= atf-version atf-version-real Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Sun Jan 12 21:21:19 2014 (r260575) +++ head/lib/atf/libatf-c++/Makefile Sun Jan 12 21:56:26 2014 (r260576) @@ -76,8 +76,21 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 +all: atf-c++.pc +atf-c++.pc: atf-c++.pc.in atf-version + sed -e 's,__CXX__,${CXX},g' \ + -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ + -e 's,__LIBDIR__,${LIBDIR},g' \ + -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ + <${ATF}/atf-c++/atf-c++.pc.in >atf-c++.pc + +beforeinstall: + ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + .if ${MK_TESTS} != "no" SUBDIR= tests .endif +.include "../common.mk" .include Modified: head/lib/atf/libatf-c/Makefile ============================================================================== --- head/lib/atf/libatf-c/Makefile Sun Jan 12 21:21:19 2014 (r260575) +++ head/lib/atf/libatf-c/Makefile Sun Jan 12 21:56:26 2014 (r260576) @@ -74,8 +74,21 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 +all: atf-c.pc +atf-c.pc: atf-c.pc.in atf-version + sed -e 's,__CC__,${CC},g' \ + -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ + -e 's,__LIBDIR__,${LIBDIR},g' \ + -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ + <${ATF}/atf-c/atf-c.pc.in >atf-c.pc + +beforeinstall: + ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + .if ${MK_TESTS} != "no" SUBDIR= tests .endif +.include "../common.mk" .include Modified: head/usr.bin/atf/atf-sh/Makefile ============================================================================== --- head/usr.bin/atf/atf-sh/Makefile Sun Jan 12 21:21:19 2014 (r260575) +++ head/usr.bin/atf/atf-sh/Makefile Sun Jan 12 21:56:26 2014 (r260576) @@ -45,8 +45,19 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr +all: atf-sh.pc +atf-sh.pc: atf-sh.pc.in atf-version + sed -e 's,__EXEC_PREFIX__,/usr,g' \ + -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ + <${ATF}/atf-sh/atf-sh.pc.in >atf-sh.pc + +beforeinstall: + ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif +.include "../../../lib/atf/common.mk" .include