[Midnightbsd-cvs] mports [24976] trunk/devel: add libusb

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Feb 12 21:51:24 EST 2019


Revision: 24976
          http://svnweb.midnightbsd.org/mports/?rev=24976
Author:   laffer1
Date:     2019-02-12 21:51:24 -0500 (Tue, 12 Feb 2019)
Log Message:
-----------
add libusb

Modified Paths:
--------------
    trunk/devel/Makefile

Added Paths:
-----------
    trunk/devel/linux_libusb/
    trunk/devel/linux_libusb/Makefile
    trunk/devel/linux_libusb/distinfo
    trunk/devel/linux_libusb/pkg-descr

Modified: trunk/devel/Makefile
===================================================================
--- trunk/devel/Makefile	2019-02-13 02:47:21 UTC (rev 24975)
+++ trunk/devel/Makefile	2019-02-13 02:51:24 UTC (rev 24976)
@@ -213,6 +213,7 @@
 SUBDIR += linux-f10-ncurses-base
 SUBDIR += linux-f10-nspr
 SUBDIR += linux-f10-sdl12
+SUBDIR += linux_libusb
 SUBDIR += llvm34
 SUBDIR += llvm39
 SUBDIR += llvm40

Added: trunk/devel/linux_libusb/Makefile
===================================================================
--- trunk/devel/linux_libusb/Makefile	                        (rev 0)
+++ trunk/devel/linux_libusb/Makefile	2019-02-13 02:51:24 UTC (rev 24976)
@@ -0,0 +1,81 @@
+# $MidnightBSD$
+
+PORTNAME=	linux_libusb
+PORTVERSION=	11.0r${FSVN_REV}
+CATEGORIES=	devel linux
+MASTER_SITES=	LOCAL/nox
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Linux-compatibility libusb
+
+LICENSE=	unknown
+
+BUILD_DEPENDS=	${LINUXBASE}/usr/bin/gcc:devel/linux-c6-devtools
+
+USES=		tar:bzip2
+ONLY_FOR_ARCHS=	i386 amd64
+USE_LDCONFIG=	yes
+USE_LINUX_PREFIX=	yes
+PLIST_FILES=		usr/lib/libusb.so	\
+			usr/lib/libusb-0.1.so.4
+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"
+MAKE_ARGS+=	WITHOUT_SSP=yes
+# 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 <bsd.port.pre.mk>
+
+.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 !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: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 at freefall.freebsd.org:public_distfiles/
+.endif
+.endif
+
+.include <bsd.port.post.mk>


Property changes on: trunk/devel/linux_libusb/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/linux_libusb/distinfo
===================================================================
--- trunk/devel/linux_libusb/distinfo	                        (rev 0)
+++ trunk/devel/linux_libusb/distinfo	2019-02-13 02:51:24 UTC (rev 24976)
@@ -0,0 +1,2 @@
+SHA256 (linux_libusb-11.0r261448.tar.bz2) = e1013ccd0181e00a55bb786be54d125b71462492442122350d820b98fef97f81
+SIZE (linux_libusb-11.0r261448.tar.bz2) = 45739


Property changes on: trunk/devel/linux_libusb/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/linux_libusb/pkg-descr
===================================================================
--- trunk/devel/linux_libusb/pkg-descr	                        (rev 0)
+++ trunk/devel/linux_libusb/pkg-descr	2019-02-13 02:51:24 UTC (rev 24976)
@@ -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


Property changes on: trunk/devel/linux_libusb/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list