From owner-svn-ports-head@FreeBSD.ORG Tue Mar 18 19:50:48 2014 Return-Path: Delivered-To: svn-ports-head@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 B1E91720; Tue, 18 Mar 2014 19:50:48 +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 91E595F5; Tue, 18 Mar 2014 19:50:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2IJompW018189; Tue, 18 Mar 2014 19:50:48 GMT (envelope-from nox@svn.freebsd.org) Received: (from nox@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2IJolCX017321; Tue, 18 Mar 2014 19:50:47 GMT (envelope-from nox@svn.freebsd.org) Message-Id: <201403181950.s2IJolCX017321@svn.freebsd.org> From: Juergen Lock Date: Tue, 18 Mar 2014 19:50:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348592 - in head/devel: . linux_libusb X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 19:50:48 -0000 Author: nox Date: Tue Mar 18 19:50:47 2014 New Revision: 348592 URL: http://svnweb.freebsd.org/changeset/ports/348592 QAT: https://qat.redports.org/buildarchive/r348592/ Log: Add new port devel/linux_libusb: linux-libusb takes advantage of FreeBSD libusb(8) library, which got prepared to work correctly within linux(4) emulation layer. It lets you to take Linux binary linked with libusb.so and use it on FreeBSD. Additional information: This port has been prepared under FreeBSD with kern.osreldate = 1000510. It relies on the fact the libusb(8) API seems to be stable and no changes have been made to internal API for a long time. If this assumption isn't true, port won't work. Please submit bug report to the port maintainter in that case. WWW: http://lists.freebsd.org/pipermail/freebsd-usb/2014-March/012854.html PR: ports/146895 (older version) Submitted by: wkoszek (PR), nox (self, this version) Added: head/devel/linux_libusb/ head/devel/linux_libusb/Makefile (contents, props changed) head/devel/linux_libusb/distinfo (contents, props changed) head/devel/linux_libusb/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Tue Mar 18 19:08:35 2014 (r348591) +++ head/devel/Makefile Tue Mar 18 19:50:47 2014 (r348592) @@ -1163,6 +1163,7 @@ SUBDIR += linux-f10-sdl12 SUBDIR += linux-kmod-compat SUBDIR += linux_kdump + SUBDIR += linux_libusb SUBDIR += lion SUBDIR += llnextgen SUBDIR += llvm-devel Added: head/devel/linux_libusb/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/linux_libusb/Makefile Tue Mar 18 19:50:47 2014 (r348592) @@ -0,0 +1,85 @@ +# Created by: nox@FreeBSD.org +# $FreeBSD$ + +PORTNAME= linux_libusb +PORTVERSION= 11.0r${FSVN_REV} +PORTREVISION= 1 +CATEGORIES= devel linux +MASTER_SITES= LOCAL/nox + +MAINTAINER= emulation@FreeBSD.org +COMMENT= Linux-compatibility libusb + +#BUILD_DEPENDS= ${LINUXBASE}/usr/bin/gcc:${PORTSDIR}/emulators/linux_base-gentoo-stage3 +BUILD_DEPENDS= ${LINUXBASE}/usr/bin/gcc:${PORTSDIR}/devel/linux-f10-devtools + +USES= tar:bzip2 +ONLY_FOR_ARCHS= i386 amd64 +USE_LINUX_PREFIX= yes +PLIST_FILES= usr/lib/libusb.so \ + usr/lib/libusb-0.1.so.4 \ + "@exec ${LDCONFIG_CMD}" \ + "@unexec ${LDCONFIG_CMD}" +CC= ${LINUXBASE}/usr/bin/gcc +CFLAGS+= -I${WRKDIR}/sys +MAKE_ARGS+= LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h +MAKE_ARGS+= PTHREAD_LIBS="-lpthread -lrt" +# XXX ${LINUXBASE}/usr/bin/ld is a broken link with gentoo atm? +#MAKE_ENV+= COMPILER_PATH=/usr/i486-pc-linux-gnu/binutils-bin/2.22 + +# see: sysutils/pc-sysinstall/Makefile +FSVN_REV= 261448 +FSVNPATH?= http://svn.freebsd.org/base/head +FSVNDIR= lib/libusb + +.include + +.if ${ARCH} == "amd64" +MAKE_ARGS+= COMPAT_32BIT=YES +.endif + +pre-everything:: + @${ECHO_MSG} '===> Using the FreeBSD source tree under ${SRC_BASE}' + @${ECHO_MSG} '===> Set SRC_BASE to use an alternate source tree' + +.if ${OSVERSION} < 1000000 +IGNORE= doesn't build on < 10.x +.endif +.if !exists(${SRC_BASE}/sys/i386/linux/syscalls.master) +IGNORE= requires kernel source present in ${SRC_BASE}/sys +.endif +#.if !exists(${SRC_BASE}/lib/libusb/Makefile) +#IGNORE= requires libusb source present in ${SRC_BASE}/lib/libusb +#.endif +#.if exists(${LINUXBASE}/etc/fedora-release) +#IGNORE= does not build with the default linux base, use the package instead +#.endif + +post-patch: + ${MKDIR} ${WRKDIR}/sys + ${LN} -s ${SRC_BASE}/sys/compat ${SRC_BASE}/sys/dev ${WRKDIR}/sys + +# XXX: Due to problems with ports/ infrastructure, we don't seem to be able +# to symlink files. I provide hardlink instead. If fixed, remember to remove +# link name from PLIST_FILES. +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/usr/lib + ${INSTALL_DATA} ${WRKSRC}/libusb.so ${STAGEDIR}${PREFIX}/usr/lib +# Xilinx ISE requirement. + ${LN} -f ${STAGEDIR}${PREFIX}/usr/lib/libusb.so ${STAGEDIR}${PREFIX}/usr/lib/libusb-0.1.so.4 + +.if defined(BOOTSTRAP) || defined(SVN_FETCH) +#FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion +SVN?= svnlite + +do-fetch: + ${MKDIR} ${WRKDIR} + ${SVN} export -r ${FSVN_REV} ${FSVNPATH}/${FSVNDIR} ${WRKDIR}/${DISTNAME} + cd ${WRKDIR}; tar cvfy ${DISTDIR}/${DISTNAME}.tar.bz2 ${DISTNAME} +.if ${USER} == noxNOTYET + scp ${DISTDIR}/${DISTNAME}.tar.bz2 \ + nox@freefall.freebsd.org:public_distfiles/ +.endif +.endif + +.include Added: head/devel/linux_libusb/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/linux_libusb/distinfo Tue Mar 18 19:50:47 2014 (r348592) @@ -0,0 +1,2 @@ +SHA256 (linux_libusb-11.0r261448.tar.bz2) = e1013ccd0181e00a55bb786be54d125b71462492442122350d820b98fef97f81 +SIZE (linux_libusb-11.0r261448.tar.bz2) = 45739 Added: head/devel/linux_libusb/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/linux_libusb/pkg-descr Tue Mar 18 19:50:47 2014 (r348592) @@ -0,0 +1,12 @@ +linux-libusb takes advantage of FreeBSD libusb(8) library, which got +prepared to work correctly within linux(4) emulation layer. It lets +you to take Linux binary linked with libusb.so and use it on +FreeBSD. + +Additional information: This port has been prepared under FreeBSD +with kern.osreldate = 1000510. It relies on the fact the libusb(8) +API seems to be stable and no changes have been made to internal API +for a long time. If this assumption isn't true, port won't work. +Please submit bug report to the port maintainter in that case. + +WWW: http://lists.freebsd.org/pipermail/freebsd-usb/2014-March/012854.html