Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Sep 2020 21:18:34 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r550227 - head/devel/linux_libusb
Message-ID:  <202009262118.08QLIYZ4013505@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sat Sep 26 21:18:34 2020
New Revision: 550227
URL: https://svnweb.freebsd.org/changeset/ports/550227

Log:
  Add a direct build dependency on linux_base instead of relying on devtools
  to pull it in.  This guarantees that the version constraint set in
  Mk/Uses/linux.mk is taken into account.
  
  Compile with --sysroot=${LINUXBASE} such that gcc doesn't pick up headers
  from /usr.
  
  Build the 32 bit library on amd64 with -m32 such that it's actually a 32 bit
  library.  This must have become broken long time ago when 64 bit linux
  support was added and the compiler became 64 bit. [1]
  
  PR:		249516
  Reported by:	Alex S <iwtcex@gmail.com> [1]

Modified:
  head/devel/linux_libusb/Makefile

Modified: head/devel/linux_libusb/Makefile
==============================================================================
--- head/devel/linux_libusb/Makefile	Sat Sep 26 21:12:50 2020	(r550226)
+++ head/devel/linux_libusb/Makefile	Sat Sep 26 21:18:34 2020	(r550227)
@@ -3,7 +3,7 @@
 
 PORTNAME=	linux_libusb
 PORTVERSION=	13.0r${FSVN_REV}
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel linux
 MASTER_SITES=	http://www.selasky.org/hans_petter/distfiles/ \
 		http://home.selasky.org/distfiles/
@@ -17,7 +17,7 @@ ONLY_FOR_ARCHS=	amd64 i386
 
 USES=		linux tar:bzip2
 USE_LDCONFIG=	yes
-USE_LINUX=	base devtools:build
+USE_LINUX=	base:build,run devtools:build
 USE_LINUX_PREFIX=	yes
 
 LIBDIR_amd64=	lib64
@@ -26,7 +26,7 @@ PLIST_FILES=	usr/${LIBDIR_${ARCH}}/libusb.so \
 		usr/${LIBDIR_${ARCH}}/libusb.so.3 \
 		usr/${LIBDIR_${ARCH}}/libusb-0.1.so.4
 
-CC=		${LINUXBASE}/usr/bin/gcc
+CC=		${LINUXBASE}/usr/bin/gcc --sysroot=${LINUXBASE}
 CFLAGS:=	${CFLAGS:N-march=*}
 CFLAGS+=	-I${WRKDIR}/${DISTNAME}/include
 SSP_CFLAGS?=	-fstack-protector # XXX -strong isn't supported by GCC < 4.9
@@ -57,9 +57,9 @@ do-build:
 		${MAKE_ARGS:N${DESTDIRNAME}=*}
 .if ${ARCH} == amd64
 	${MKDIR} ${WRKSRC}/lib
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} MAKEOBJDIR=lib \
-		${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} \
-		${MAKE_ARGS:N${DESTDIRNAME}=*} COMPAT_32BIT=yes
+	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV:NCC=*} CC="${CC} -m32" \
+		MAKEOBJDIR=lib ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \
+		${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} COMPAT_32BIT=yes
 .endif
 
 do-install:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009262118.08QLIYZ4013505>